FreeWRL/FreeX3D
3.0.0
Main Page
Related Pages
Data Structures
Files
File List
FWCreateField.java
1
// the type number identificators are in CFuncs/headers.h
2
package
vrml;
3
import
vrml.field.*;
4
5
public
class
FWCreateField
{
6
7
public
static
Field
createField(String type) {
8
type = type.intern();
9
10
if
(type ==
"1"
)
return
new
SFBool
();
11
else
if
(type ==
"2"
)
return
new
SFColor
();
12
else
if
(type ==
"3"
)
return
new
SFFloat
();
13
else
if
(type ==
"4"
)
return
new
SFTime
();
14
else
if
(type ==
"5"
)
return
new
SFInt32
();
15
else
if
(type ==
"6"
)
return
new
SFString
();
16
else
if
(type ==
"7"
)
return
new
SFNode
();
17
else
if
(type ==
"8"
)
return
new
SFRotation
();
18
else
if
(type ==
"9"
)
return
new
SFVec2f
();
19
else
if
(type ==
"10"
)
return
new
SFImage
();
20
else
if
(type ==
"11"
)
return
new
MFColor
();
21
else
if
(type ==
"12"
)
return
new
MFFloat
();
22
else
if
(type ==
"13"
)
return
new
MFTime
();
23
else
if
(type ==
"14"
)
return
new
MFInt32
();
24
else
if
(type ==
"15"
)
return
new
MFString
();
25
else
if
(type ==
"16"
)
return
new
MFNode
();
26
else
if
(type ==
"17"
)
return
new
MFRotation
();
27
else
if
(type ==
"18"
)
return
new
MFVec2f
();
28
else
if
(type ==
"19"
)
return
new
MFVec3f
();
29
else
if
(type ==
"20"
)
return
new
SFVec3f
();
30
else
31
throw
new
IllegalArgumentException(
"Unknown field type "
+type);
32
}
33
34
public
static
ConstField
createConstField(String type) {
35
36
type = type.intern();
37
if
(type ==
"1"
)
return
new
ConstSFBool
();
38
else
if
(type ==
"2"
)
return
new
ConstSFColor
();
39
else
if
(type ==
"3"
)
return
new
ConstSFFloat
();
40
else
if
(type ==
"4"
)
return
new
ConstSFTime
();
41
else
if
(type ==
"5"
)
return
new
ConstSFInt32
();
42
else
if
(type ==
"6"
)
return
new
ConstSFString
();
43
else
if
(type ==
"7"
)
return
new
ConstSFNode
();
44
else
if
(type ==
"8"
)
return
new
ConstSFRotation
();
45
else
if
(type ==
"9"
)
return
new
ConstSFVec2f
();
46
else
if
(type ==
"10"
)
return
new
ConstSFImage
();
47
else
if
(type ==
"11"
)
return
new
ConstMFColor
();
48
else
if
(type ==
"12"
)
return
new
ConstMFFloat
();
49
else
if
(type ==
"13"
)
return
new
ConstMFTime
();
50
else
if
(type ==
"14"
)
return
new
ConstMFInt32
();
51
else
if
(type ==
"15"
)
return
new
ConstMFString
();
52
else
if
(type ==
"16"
)
return
new
ConstMFNode
();
53
else
if
(type ==
"17"
)
return
new
ConstMFRotation
();
54
else
if
(type ==
"18"
)
return
new
ConstMFVec2f
();
55
else
if
(type ==
"19"
)
return
new
ConstMFVec3f
();
56
else
if
(type ==
"20"
)
return
new
ConstSFVec3f
();
57
else
58
throw
new
IllegalArgumentException(
"Unknown field type "
+type);
59
}
60
}
vrml.field.ConstMFRotation
Definition:
ConstMFRotation.java:10
vrml.field.SFColor
Definition:
SFColor.java:10
vrml.field.MFRotation
Definition:
MFRotation.java:10
vrml.field.SFVec2f
Definition:
SFVec2f.java:10
vrml.field.ConstMFColor
Definition:
ConstMFColor.java:10
vrml.field.ConstSFNode
Definition:
ConstSFNode.java:10
vrml.field.ConstSFImage
Definition:
ConstSFImage.java:10
vrml.field.MFVec3f
Definition:
MFVec3f.java:10
vrml.field.MFFloat
Definition:
MFFloat.java:10
vrml.field.ConstMFVec2f
Definition:
ConstMFVec2f.java:10
vrml.field.ConstSFString
Definition:
ConstSFString.java:10
vrml.field.ConstSFVec3f
Definition:
ConstSFVec3f.java:10
vrml.field.ConstSFInt32
Definition:
ConstSFInt32.java:10
vrml.field.MFColor
Definition:
MFColor.java:10
vrml.field.SFImage
Definition:
SFImage.java:10
vrml.field.MFString
Definition:
MFString.java:10
vrml.ConstField
Definition:
ConstField.java:3
vrml.Field
Definition:
Field.java:4
vrml.field.SFString
Definition:
SFString.java:10
vrml.field.ConstSFFloat
Definition:
ConstSFFloat.java:10
vrml.field.MFTime
Definition:
MFTime.java:10
vrml.field.ConstSFColor
Definition:
ConstSFColor.java:10
vrml.field.ConstSFRotation
Definition:
ConstSFRotation.java:10
vrml.field.ConstMFString
Definition:
ConstMFString.java:10
vrml.field.SFFloat
Definition:
SFFloat.java:10
vrml.field.ConstMFTime
Definition:
ConstMFTime.java:10
vrml.field.SFTime
Definition:
SFTime.java:10
vrml.field.SFInt32
Definition:
SFInt32.java:10
vrml.field.SFVec3f
Definition:
SFVec3f.java:10
vrml.field.ConstMFNode
Definition:
ConstMFNode.java:10
vrml.field.MFVec2f
Definition:
MFVec2f.java:10
vrml.field.MFNode
Definition:
MFNode.java:10
vrml.field.SFBool
Definition:
SFBool.java:10
vrml.field.ConstSFVec2f
Definition:
ConstSFVec2f.java:10
vrml.FWCreateField
Definition:
FWCreateField.java:5
vrml.field.ConstMFVec3f
Definition:
ConstMFVec3f.java:10
vrml.field.SFNode
Definition:
SFNode.java:10
vrml.field.ConstMFFloat
Definition:
ConstMFFloat.java:10
vrml.field.SFRotation
Definition:
SFRotation.java:10
vrml.field.ConstMFInt32
Definition:
ConstMFInt32.java:10
vrml.field.MFInt32
Definition:
MFInt32.java:10
vrml.field.ConstSFTime
Definition:
ConstSFTime.java:10
vrml.field.ConstSFBool
Definition:
ConstSFBool.java:10
src
java
vrml
FWCreateField.java
Generated on Thu Dec 14 2017 12:14:40 for FreeWRL/FreeX3D by
1.8.6