VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere...

20
VRML Shapes and Geometry

Transcript of VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere...

Page 1: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

VRML Shapes and Geometry

Page 2: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Learning Objectives

• Understand how to use: Box, Cone, Cylinder, and Sphere

• Understand how to use Elevation Grid and Indexed Face Set

• Understand how to use Text

Page 3: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

The Shape Node

• Shape { – exposedField SFNode appearance

NULL – exposedField SFNode geometry

NULL

• }

Page 4: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Shapes and Geometry Nodes• Box • Cone • Cylinder • Sphere • ElevationGrid • IndexedFaceSet • Text • Extrusion • IndexedLineSet • PointSet

Page 5: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Box

• Box { field SFVec3f size 2 2 2 # (0,  ) }

Page 6: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Cone

• Cone { – field SFFloat bottomRadius

1 # (0, ) – field SFFloat height 2 # (0, ) – field SFBool side TRUE – field SFBool bottom TRUE

• }

Page 7: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Cylinder

• Cylinder { – field SFBool bottom TRUE – field SFFloat height 2 #

(0, ) – field SFFloat radius 1 #

(0, ) – field SFBool side TRUE – field SFBool top TRUE

• }

Page 8: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Sphere• Sphere {field SFFloat radius 1 # (0, ) }

Page 9: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Elevation Grid• ElevationGrid {

– SFNode color NULL – exposedField SFNode normal NULL – exposedField SFNode texCoord

NULL – field MFFloat height [] # (- , ) – field SFBool ccw TRUE – field SFBool colorPerVertex – TRUE field SFFloat creaseAngle 0 #

[0, ] – field SFBool normalPerVertex TRUE – field SFBool solid TRUE – field SFInt32 xDimension 0 # [0, ) – field SFFloat xSpacing 1.0 # (0, ) – field SFInt32 zDimension 0 # [0, ) – field SFFloat zSpacing 1.0 # (0, ) }

Page 10: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.
Page 11: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Indexed Face Set• IndexedFaceSet {

– exposedField SFNode color NULL – exposedField SFNode coord NULL – exposedField SFNode normal NULL – exposedField SFNode texCoord NULL – field SFBool ccw TRUE – field MFInt32 colorIndex [] # [-1, ) – field SFBool colorPerVertex TRUE – field SFBool convex TRUE – field MFInt32 coordIndex [] # [-1, ) – field SFFloat creaseAngle 0 # [0, ) – field MFInt32 normalIndex [] # [-1, ) – field SFBool normalPerVertex TRUE – field SFBool solid TRUE – field MFInt32 texCoordIndex [] # [-1, ) }

Page 12: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Faces for Face Set

a. at least three non-coincident vertices;

b. vertices that define a planar polygon;

c. vertices that define a non-self-intersecting polygon.

Page 13: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Text

• Text { – exposedField MFString string [] – exposedField SFNode fontStyle NULL– exposedField MFFloat length [] # [0, )– exposedField SFFloat maxExtent 0.0 #

[0, )

• }

Page 14: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Text Style• FontStyle {

– field MFString family "SERIF" – field SFString style "PLAIN" – field MFString justify "BEGIN" – field SFString language "" – field SFBool horizontal TRUE – field SFBool leftToRight TRUE – field SFBool topToBottom TRUE – field SFFloat size 1.0 # (0, ) – field SFFloat spacing 1.0 # [0, )

• }

SERIF, SANS or TYPEWRITERPLAIN, BOLD or ITALICBEGIN, MIDDLE or END

Page 15: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.
Page 16: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Extrusion

• Extrusion { – SFBool beginCap TRUE – field SFBool ccw TRUE – field SFBool convex – TRUE field SFFloat creaseAngle 0 # [0, ) – field MFVec2f crossSection [ 1 1, 1 -1, -1 -1, -1 1, 1

1 ] # (- , ) – field SFBool endCap TRUE – field MFRotation orientation 0 0 1 0 # [-1,1],(- , )– field MFVec2f scale 1 1 # (0, ) – field SFBool solid TRUE – field MFVec3f spine [ 0 0 0, 0 1 0 ] # (- , )

• }

Page 17: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Indexed Line Set

• IndexedLineSet { – exposedField SFNode color NULL– exposedField SFNode coord NULL – field MFInt32 colorIndex [] # [-1, ) – field SFBool colorPerVertex TRUE – field MFInt32 coordIndex [] # [-1, )

• }

Page 18: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Point Set

• PointSet { – exposedField SFNode color NULL– exposedField SFNode coord NULL

• }

Page 19: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.

Learning Objectives

• Understand how to use: Box, Cone, Cylinder, and Sphere

• Understand how to use Elevation Grid and Indexed Face Set

• Understand how to use Text

Page 20: VRML Shapes and Geometry. Learning Objectives Understand how to use: Box, Cone, Cylinder, and Sphere Understand how to use Elevation Grid and Indexed.