Skip to main content

Module vrml

Module vrml 

Source
Expand description

Reading VRML scenes: the meshes a VRML97 (2.0) or VRML 1.0 file draws, each placed by the transforms above it and coloured by its material.

VRML97 is a tree of nodes. Group-like nodes (Transform, Group, Anchor, Billboard, Collision, LOD’s first level, Switch’s chosen child) are walked, DEF names a node and USE places it again, and each Shape gives one mesh: an IndexedFaceSet’s polygons fanned into triangles, or a Box, Sphere, Cylinder or Cone tessellated. Prototypes, routes, scripts, sensors and interpolators draw nothing and are passed over. VRML 1.0 is a state machine instead: Separator saves and restores the state, Coordinate3, Material and the transform nodes set it, and each IndexedFaceSet draws with it.

Functions§

read_vrml
Read the meshes a VRML file draws.