Difference between revisions of "Box"
(better attempt example still doing the same) |
(fix layout and wording, now looks more like booktext) |
||
Line 9: | Line 9: | ||
</pre> | </pre> | ||
− | Is there a way we can do this so we can make the keywords into bolds - e.g. with wiki tables? Here's an attempt. | + | Is there a way we can do this so we can make the keywords into bolds - e.g. with wiki tables? Yes. Here's an attempt. |
{| border="0" cellpadding="2" | {| border="0" cellpadding="2" | ||
− | + | | align="left" colspan="9" | Box : X3DGeometryNode { | |
|- | |- | ||
| width="20" | || '''SFNode''' || '''in,out''' || '''metadata''' || NULL || '''X3DMetadataObject''' | | width="20" | || '''SFNode''' || '''in,out''' || '''metadata''' || NULL || '''X3DMetadataObject''' | ||
|- | |- | ||
− | | width="20" | || '''SFVec3f''' || | + | | width="20" | || '''SFVec3f''' || || size || 2 2 2 || (0,∞) |
|- | |- | ||
− | | width="20" | || '''SFBool''' || | + | | width="20" | || '''SFBool''' || || solid || TRUE || |
|- | |- | ||
− | + | | align="left" colspan="9" | } | |
|} | |} | ||
The Box node specifies a rectangular parallelepiped box centered 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. 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. Figure 1 illustrates the Box node. | The Box node specifies a rectangular parallelepiped box centered 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. 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. Figure 1 illustrates the Box node. | ||
<center>http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/Images/box.gif<br>Figure 1 - Box node</center> | <center>http://www.web3d.org/x3d/specifications/ISO-IEC-19775-X3DAbstractSpecification/Images/box.gif<br>Figure 1 - Box node</center> | ||
− | |||
Textures are applied individually to each face of the box. On the front (+Z), back (-Z), right (+X), and left (-X) faces of the box, when viewed from the outside with the +Y-axis up, the texture is mapped onto each face with the same orientation as if the image were displayed normally in 2D. On the top face of the box (+Y), when viewed from above and looking down the Y-axis toward the origin with the -Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box (-Y), when viewed from below looking up the Y-axis toward the origin with the +Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. TextureTransform affects the texture coordinates of the Box. | Textures are applied individually to each face of the box. On the front (+Z), back (-Z), right (+X), and left (-X) faces of the box, when viewed from the outside with the +Y-axis up, the texture is mapped onto each face with the same orientation as if the image were displayed normally in 2D. On the top face of the box (+Y), when viewed from above and looking down the Y-axis toward the origin with the -Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box (-Y), when viewed from below looking up the Y-axis toward the origin with the +Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. TextureTransform affects the texture coordinates of the Box. | ||
Line 32: | Line 31: | ||
==Authoring Tip== | ==Authoring Tip== | ||
− | The size of a box cannot be changed after its creation. | + | The size of a box cannot be changed after its creation. In order to change its size you need to place it in a Transform node and change its scale field. |
==Implementation Tip== | ==Implementation Tip== | ||
− | The size field is made InitializeOnly so implementations can optimize memory and bus bandwidth under the covers. | + | The size field is made InitializeOnly so implementations can optimize memory and bus bandwidth under the covers. All instances with the same size can share the same geometry instance. |
*[[Node Reference]] | *[[Node Reference]] |
Revision as of 18:27, 6 July 2012
Box
Box : X3DGeometryNode { SFNode [in,out] metadata NULL [X3DMetadataObject] SFVec3f [] size 2 2 2 (0,∞) SFBool [] solid TRUE }
Is there a way we can do this so we can make the keywords into bolds - e.g. with wiki tables? Yes. Here's an attempt.
Box : X3DGeometryNode { | ||||||||
SFNode | in,out | metadata | NULL | X3DMetadataObject | ||||
SFVec3f | size | 2 2 2 | (0,∞) | |||||
SFBool | solid | TRUE | ||||||
} |
The Box node specifies a rectangular parallelepiped box centered 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. 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. Figure 1 illustrates the Box node.
Figure 1 - Box node
Textures are applied individually to each face of the box. On the front (+Z), back (-Z), right (+X), and left (-X) faces of the box, when viewed from the outside with the +Y-axis up, the texture is mapped onto each face with the same orientation as if the image were displayed normally in 2D. On the top face of the box (+Y), when viewed from above and looking down the Y-axis toward the origin with the -Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box (-Y), when viewed from below looking up the Y-axis toward the origin with the +Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. TextureTransform affects the texture coordinates of the Box.
The solid field determines whether the box is visible when viewed from the inside.
Authoring Tip
The size of a box cannot be changed after its creation. In order to change its size you need to place it in a Transform node and change its scale field.
Implementation Tip
The size field is made InitializeOnly so implementations can optimize memory and bus bandwidth under the covers. All instances with the same size can share the same geometry instance.