• Name: Box
  • VRML-Syntax:
    Box {
        field SFVec3f size 2 2 2
    }
    
  • Relevance:
    Boxes are important 'primitives'. Many complex shapes can be build using a (multiple) box(es) as a starting point.
  • Example:
    A Box.
    A Brick.
    Anything more or less box-shaped...
  • Dissection:
    A simple example.
    Standard VRML header, Version 2.0, utf8 encoding
    #VRML V2.0 utf8
    
    Geometry is always contained in a 'Shape' node.
    Shape {
    
    In this case choose the default 'Appearance', the 'Appearance, node will be treated later on...
        appearance NULL
    
    Choose the 'Box' node as geometry for this 'Shape'.
        geometry Box {
    
    The 'Box' has 1 SFVec3f field called 'size', this field defines the dimensions for the 'Box' shape.
            size 2.0 2.0 2.0
        }
    }
    
  • Related Nodes:
    Shape
    Appearance
    Cone, Sphere, Cylinder
  • Application(s): whatever.wrl