Class: Box

X3D: 3.3
Component: Geometry3D
Status:
fully implemented

.nodeTypes. Box

The Box node specifies a rectangular parallelepiped box centred at (0, 0, 0) in the local coordinate system and aligned with the local coordinate axes. By default, the box measures 2 units in each dimension, from -1 to +1.

HTML Encoding and Default Values

<Box ccw='true' hasHelperColors='false' lit='true' metadata='X3DMetadataObject' size='2,2,2' solid='true' useGeoCache='true' ></Box>

Inheritance


Constructor

Box(ctx)

Constructor for Box

Parameters:
Name Type Argument Default Description
ctx Object <optional>
null context object, containing initial settings like namespace

Fields

These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
ccw SFBool true X3DGeometryNode The ccw field defines the ordering of the vertex coordinates of the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations.
hasHelperColors SFBool false Specifies whether helper colors should be used, which will color each vertex with a different color. This will overwrite the color of the corresponding appearance node.
lit SFBool true X3DGeometryNode Specifies whether this geometry should be rendered with or without lighting.
metadata SFNode X3DMetadataObject X3DNode Field to add metadata information
size SFVec3f 2,2,2 [0, inf] The size field specifies the extents of the box along the X-, Y-, and Z-axes respectively and each component value shall be greater than zero.
solid SFBool true X3DGeometryNode Specifies whether backface-culling is used. If solid is TRUE only front-faces are drawn.
useGeoCache SFBool true X3DGeometryNode Most geo primitives use geo cache and others might later on, but one should be able to disable cache per geometry node. Defaults to global useGeoCache setting parameter.