Hi all,
I have a problem with IndexedFaceSet.
I create an object with CreateNodeFromString function and put it in a scene with RootNodes->Add function. When I use a simple object as input string like this:
DEF object Transform{children[\
DEF shp Shape {geometry\
IndexedFaceSet{\
solid FALSE convex TRUE \
coord Coordinate{point[-2 -2.5 -2.7 , -2 0 2 , 2.8 3.2 2, -2 3 2],}\
coordIndex[0,3,2,1,-1]}\
}\
]}
there is no problem, but when I use a object as a cube for example:
Shape {
appearance Appearance {
material Material {}
}
geometry IndexedFaceSet {
solid FALSE
coord Coordinate {
point [
-1.0 1.0 1.0, #0 links oben vorn
-1.0 -1.0 1.0, #1 links unten vorn
1.0 -1.0 1.0, #2 rechts unten vorn
1.0 1.0 1.0, #3 rechts oben vorn
-1.0 1.0 -1.0, #4 links oben hinten
-1.0 -1.0 -1.0, #5 links unten hinten
1.0 -1.0 -1.0, #6 rechts oben hinten
1.0 1.0 -1.0 #7 rechts unten hinten
]
}
coordIndex [
0, 1, 2, 3, 0, -1, # vorderes Quadrat
4, 5, 6, 7, 4, -1, # hinteres Quadrat
0, 3, 7, 4, 0, -1, # oberes Quadrat
1, 2, 6, 5, 1, -1, # unteres Quadrat
3, 2, 6, 7, 3, -1, # rechtes Quadrat
0, 1, 5, 4, 0 # linkes Quadrat
]
}
}
the object is invisible. What can I do to prevent this problem.
Regards
Stoyan
|
|