#Inventor V2.1 ascii # Check all aspects of SoFaceSet rendering. # # 19990414 mortene Separator { # Global settings. Coordinate3 { point [ -1 1 0, -1 -1 0, 1 -1 0, 1 1 0, # face 0 -1 1 0, 1 1 0, 0 2 -1, # face 1 1 -1 0, 2 0 -1, 1 1 0, # face 2 -1 -1 0, 0 -2 -1, 1 -1 0, # face 3 -1 1 0, -2 0 -1, -1 -1 0, # face 4 ] } Material { diffuseColor [ 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1, 1 1 1, 0 0 0, 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1, 1 1 1, 0 0 0, ] } TextureCoordinate2 { point [ 0 0, 0 1, 1 0, 1 1, 0 0, 0 1, 1 0, 1 1, 0 0, 0 1, 1 0, 1 1, 0 0, 0 1, 1 0, 1 1, ] } Switch { whichChild -2 DEF fs FaceSet { numVertices [ 4, 3, 3, 3, 3 ] } } # (ROW 0) MaterialBinding Separator { MaterialBinding { value OVERALL } USE fs Translation { translation +5 0 0 } MaterialBinding { value PER_PART } USE fs Translation { translation +5 0 0 } MaterialBinding { value PER_PART_INDEXED } USE fs Translation { translation +5 0 0 } MaterialBinding { value PER_FACE } USE fs Translation { translation +5 0 0 } MaterialBinding { value PER_FACE_INDEXED } USE fs Translation { translation +5 0 0 } MaterialBinding { value PER_VERTEX } USE fs Translation { translation +5 0 0 } MaterialBinding { value PER_VERTEX_INDEXED } USE fs } # (ROW 1) NormalBinding Translation { translation 0 +6 0 } Separator { NormalBinding { value OVERALL } USE fs Translation { translation +5 0 0 } NormalBinding { value PER_PART } USE fs Translation { translation +5 0 0 } NormalBinding { value PER_PART_INDEXED } USE fs Translation { translation +5 0 0 } NormalBinding { value PER_FACE } USE fs Translation { translation +5 0 0 } NormalBinding { value PER_FACE_INDEXED } USE fs Translation { translation +5 0 0 } NormalBinding { value PER_VERTEX } USE fs Translation { translation +5 0 0 } NormalBinding { value PER_VERTEX_INDEXED } USE fs } # (ROW 2) Test how IndexedFaceSet is affected by Complexity. Translation { translation 0 +6 0 } Separator { Complexity { type BOUNDING_BOX } USE fs Translation { translation +5 0 0 } Complexity { type OBJECT_SPACE value 1.0 } USE fs Translation { translation +5 0 0 } Complexity { type OBJECT_SPACE value 0.2 } USE fs Translation { translation +5 0 0 } Complexity { type OBJECT_SPACE value 0.0 } USE fs } # (ROW 3) With different LightModel settings. Translation { translation 0 +6 0 } Separator { LightModel { model BASE_COLOR } USE fs Translation { translation +5 0 0 } LightModel { model PHONG } USE fs } # (ROW 4) With different DrawStyle settings. Translation { translation 0 +6 0 } Separator { DrawStyle { style INVISIBLE } USE fs Translation { translation +5 0 0 } DrawStyle { style LINES } USE fs Translation { translation +5 0 0 } DrawStyle { style LINES lineWidth 1 } USE fs Translation { translation +5 0 0 } DrawStyle { style LINES lineWidth 2 } USE fs Translation { translation +5 0 0 } DrawStyle { style LINES lineWidth 4 } USE fs Translation { translation +5 0 0 } DrawStyle { style LINES lineWidth 2 linePattern 0x0180 } USE fs Translation { translation +5 0 0 } DrawStyle { style POINTS } USE fs Translation { translation +5 0 0 } DrawStyle { style POINTS pointSize 3 } USE fs Translation { translation +5 0 0 } DrawStyle { style FILLED } USE fs } # (ROW 5) With different ShapeStyle settings. Translation { translation 0 +6 0 } Separator { Translation { translation +5 0 0 } ShapeHints { vertexOrdering CLOCKWISE } USE fs Translation { translation +5 0 0 } ShapeHints { vertexOrdering COUNTERCLOCKWISE } USE fs Translation { translation +5 0 0 } ShapeHints { shapeType UNKNOWN_SHAPE_TYPE } USE fs Translation { translation +5 0 0 } ShapeHints { shapeType SOLID } USE fs Translation { translation +5 0 0 } ShapeHints { faceType UNKNOWN_FACE_TYPE } USE fs Translation { translation +5 0 0 } ShapeHints { faceType CONVEX } USE fs Translation { translation +5 0 0 } ShapeHints { creaseAngle 0.5 } USE fs Translation { translation +5 0 0 } ShapeHints { creaseAngle 1.57 } USE fs } # (ROW 6) Test how IndexedFaceSet is affected by texturemapping. Translation { translation 0 +6 0 } Separator { Texture2 { image 8 6 3 0xff000000 0xff000000 0x00000000 0x00000000 0xff00ff00 0xff00ff00 0xff000000 0xff000000 0x00000000 0x00000000 0xff00ff00 0xff00ff00 0xff000000 0xff000000 0x00000000 0x00000000 0xff00ff00 0xff00ff00 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xffff0000 0xffff0000 0x00000000 0x00000000 0xffffff00 0xffffff00 0xffff0000 0xffff0000 0x00000000 0x00000000 0xffffff00 0xffffff00 0xffff0000 0xffff0000 0x00000000 0x00000000 0xffffff00 0xffffff00 } USE fs Translation { translation +5 0 0 } TextureCoordinateBinding { value PER_VERTEX } USE fs Translation { translation +5 0 0 } TextureCoordinateBinding { value PER_VERTEX_INDEXED } USE fs } }