org.xith3d.scenegraph.primitives
Class Box

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.Leaf
              extended by org.xith3d.scenegraph.Shape3D
                  extended by org.xith3d.scenegraph.primitives.Box
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode
Direct Known Subclasses:
Cube

public class Box
extends Shape3D

This primitive Shape represents a simple 3D-box.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
Box(float sizeX, float sizeY, float sizeZ, Appearance app)
          Creates a Box centered at the origin with the given Appearance.
Box(float sizeX, float sizeY, float sizeZ, org.openmali.vecmath2.Colorf color)
          Creates a Box centered at the origin with the given color.
Box(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, Appearance app)
          Creates a Box centered at the given offset with the given Appearance.
Box(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, org.openmali.vecmath2.Colorf color)
          Creates a Box centered at the given offset with the given color.
Box(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Creates a Box centered at the given offset.
Box(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, java.lang.String texture)
          Creates a Box centered at the given offset with the given texture.
Box(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, Texture texture)
          Creates a Box centered at the given offset with the given texture.
Box(float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Creates a Box centered at the origin.
Box(float sizeX, float sizeY, float sizeZ, java.lang.String texture)
          Creates a Box centered at the origin with the given texture.
Box(float sizeX, float sizeY, float sizeZ, Texture texture)
          Creates a Box centered at the origin with the given texture.
Box(org.openmali.vecmath2.Tuple3f offset, float sizeX, float sizeY, float sizeZ, Appearance app)
          Creates a Box centered at the given offset with the given Appearance.
Box(org.openmali.vecmath2.Tuple3f offset, float sizeX, float sizeY, float sizeZ, org.openmali.vecmath2.Colorf color)
          Creates a Box centered at the given offset with the given color.
Box(org.openmali.vecmath2.Tuple3f offset, float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Creates a Box centered at the given offset.
Box(org.openmali.vecmath2.Tuple3f offset, float sizeX, float sizeY, float sizeZ, java.lang.String texture)
          Creates a Box centered at the given offset with the given texture.
Box(org.openmali.vecmath2.Tuple3f offset, float sizeX, float sizeY, float sizeZ, Texture texture)
          Creates a Box centered at the given offset with the given texture.
 
Method Summary
static Box createFromBoxBody(org.openmali.spatial.bodies.Box box, Appearance app)
          Creates a Box.
static Box createFromBoxBody(org.openmali.spatial.bodies.Box box, org.openmali.vecmath2.Colorf color)
          Creates a Box.
static Box createFromBoxBody(org.openmali.spatial.bodies.Box box, int features, boolean colorAlpha, int texCoordsSize)
          Creates a Box.
static Box createFromBoxBody(org.openmali.spatial.bodies.Box box, java.lang.String texture)
          Creates a Box.
static Box createFromBoxBody(org.openmali.spatial.bodies.Box box, Texture texture)
          Creates a Box.
static Geometry createGeometry(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Create a Geometry.
static Geometry createGeometry(float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Create a Geometry.
static GeometryConstruct createGeometryConstructTA(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Create a GeometryConstruct.
static GeometryConstruct createGeometryConstructTA(float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Create a GeometryConstruct.
static TriangleArray createGeometryTA(float offsetX, float offsetY, float offsetZ, float sizeX, float sizeY, float sizeZ, int features, boolean colorAlpha, int texCoordsSize)
          Create a TriangleArray.
static GeometryType getGeometryConstructionTypeHint()
          Returns the hint for this Shape's Geometry to be constructed of a certain type.
static void setGeometryConstructionTypeHint(GeometryType hint)
          Sets the hint for this Shape's Geometry to be constructed of a certain type.
 
Methods inherited from class org.xith3d.scenegraph.Shape3D
absorbDetails, copy, freeOpenGLResources, getAppearance, getAppearance, getCustomComparable, getGeometry, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, newInstance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setCustomComparable, setGeometry, setIsShadowReceiver, setModListener, setVisible, sharedCopy, sharedCopy, traverse, updateBounds, updateBoundsCheap, updateWorldTransform, verifyAppChange
 
Methods inherited from class org.xith3d.scenegraph.Leaf
dump, getPickHost, setPickHost
 
Methods inherited from class org.xith3d.scenegraph.Node
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBoundsAutoCompute, setBoundsDirty, setBoundsDirtyUpward, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateOrderedChild, updateTransformGroup
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Box

public Box(float offsetX,
           float offsetY,
           float offsetZ,
           float sizeX,
           float sizeY,
           float sizeZ,
           int features,
           boolean colorAlpha,
           int texCoordsSize)
Creates a Box centered at the given offset.

Parameters:
offsetX - the x-offset of the center of the box
offsetY - the y-offset of the center of the box
offsetZ - the z-offset of the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
features -
colorAlpha -
texCoordsSize -

Box

public Box(org.openmali.vecmath2.Tuple3f offset,
           float sizeX,
           float sizeY,
           float sizeZ,
           int features,
           boolean colorAlpha,
           int texCoordsSize)
Creates a Box centered at the given offset.

Parameters:
offset - the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
features -
colorAlpha -
texCoordsSize -

Box

public Box(float sizeX,
           float sizeY,
           float sizeZ,
           int features,
           boolean colorAlpha,
           int texCoordsSize)
Creates a Box centered at the origin.

Parameters:
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
features -
colorAlpha -
texCoordsSize -

Box

public Box(float offsetX,
           float offsetY,
           float offsetZ,
           float sizeX,
           float sizeY,
           float sizeZ,
           Texture texture)
Creates a Box centered at the given offset with the given texture.

Parameters:
offsetX - the x-offset of the center of the box
offsetY - the y-offset of the center of the box
offsetZ - the z-offset of the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
texture - the texture to use
See Also:
Texture

Box

public Box(org.openmali.vecmath2.Tuple3f offset,
           float sizeX,
           float sizeY,
           float sizeZ,
           Texture texture)
Creates a Box centered at the given offset with the given texture.

Parameters:
offset - the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
texture - the texture to use
See Also:
Texture

Box

public Box(float sizeX,
           float sizeY,
           float sizeZ,
           Texture texture)
Creates a Box centered at the origin with the given texture.

Parameters:
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
texture - the texture to use
See Also:
Texture

Box

public Box(float offsetX,
           float offsetY,
           float offsetZ,
           float sizeX,
           float sizeY,
           float sizeZ,
           java.lang.String texture)
Creates a Box centered at the given offset with the given texture.

Parameters:
offsetX - the x-offset of the center of the box
offsetY - the y-offset of the center of the box
offsetZ - the z-offset of the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
texture - the texture to use

Box

public Box(org.openmali.vecmath2.Tuple3f offset,
           float sizeX,
           float sizeY,
           float sizeZ,
           java.lang.String texture)
Creates a Box centered at the given offset with the given texture.

Parameters:
offset - the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
texture - the texture to use

Box

public Box(float sizeX,
           float sizeY,
           float sizeZ,
           java.lang.String texture)
Creates a Box centered at the origin with the given texture.

Parameters:
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
texture - the texture to use

Box

public Box(float offsetX,
           float offsetY,
           float offsetZ,
           float sizeX,
           float sizeY,
           float sizeZ,
           org.openmali.vecmath2.Colorf color)
Creates a Box centered at the given offset with the given color.

Parameters:
offsetX - the x-offset of the center of the box
offsetY - the y-offset of the center of the box
offsetZ - the z-offset of the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
color - the color of the box

Box

public Box(org.openmali.vecmath2.Tuple3f offset,
           float sizeX,
           float sizeY,
           float sizeZ,
           org.openmali.vecmath2.Colorf color)
Creates a Box centered at the given offset with the given color.

Parameters:
offset - the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
color - the color of the box

Box

public Box(float sizeX,
           float sizeY,
           float sizeZ,
           org.openmali.vecmath2.Colorf color)
Creates a Box centered at the origin with the given color.

Parameters:
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
color - the color of the box

Box

public Box(float offsetX,
           float offsetY,
           float offsetZ,
           float sizeX,
           float sizeY,
           float sizeZ,
           Appearance app)
Creates a Box centered at the given offset with the given Appearance.

Parameters:
offsetX - the x-offset of the center of the box
offsetY - the y-offset of the center of the box
offsetZ - the z-offset of the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
app - the Appearance to use
See Also:
Appearance

Box

public Box(org.openmali.vecmath2.Tuple3f offset,
           float sizeX,
           float sizeY,
           float sizeZ,
           Appearance app)
Creates a Box centered at the given offset with the given Appearance.

Parameters:
offset - the center of the box
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
app - the Appearance to use
See Also:
Appearance

Box

public Box(float sizeX,
           float sizeY,
           float sizeZ,
           Appearance app)
Creates a Box centered at the origin with the given Appearance.

Parameters:
sizeX - the size of the box along the x-axis
sizeY - the size of the box along the y-axis
sizeZ - the size of the box along the z-axis
app - the Appearance to use
See Also:
Appearance
Method Detail

setGeometryConstructionTypeHint

public static void setGeometryConstructionTypeHint(GeometryType hint)
Sets the hint for this Shape's Geometry to be constructed of a certain type.

Parameters:
hint - the hint to use
See Also:
GeometryType

getGeometryConstructionTypeHint

public static GeometryType getGeometryConstructionTypeHint()
Returns the hint for this Shape's Geometry to be constructed of a certain type.

Returns:
the hint
See Also:
GeometryType

createGeometryConstructTA

public static GeometryConstruct createGeometryConstructTA(float offsetX,
                                                          float offsetY,
                                                          float offsetZ,
                                                          float sizeX,
                                                          float sizeY,
                                                          float sizeZ,
                                                          int features,
                                                          boolean colorAlpha,
                                                          int texCoordsSize)
Create a GeometryConstruct.

Parameters:
offsetX -
offsetY -
offsetZ -
sizeX -
sizeY -
sizeZ -
features -
colorAlpha -
texCoordsSize -
Returns:
the newly created GeometryConstruct.
See Also:
GeometryConstruct

createGeometryConstructTA

public static GeometryConstruct createGeometryConstructTA(float sizeX,
                                                          float sizeY,
                                                          float sizeZ,
                                                          int features,
                                                          boolean colorAlpha,
                                                          int texCoordsSize)
Create a GeometryConstruct.

Parameters:
sizeX -
sizeY -
sizeZ -
features -
colorAlpha -
texCoordsSize -
Returns:
the newly created GeometryConstruct.
See Also:
GeometryConstruct

createGeometryTA

public static TriangleArray createGeometryTA(float offsetX,
                                             float offsetY,
                                             float offsetZ,
                                             float sizeX,
                                             float sizeY,
                                             float sizeZ,
                                             int features,
                                             boolean colorAlpha,
                                             int texCoordsSize)
Create a TriangleArray.

Parameters:
offsetX -
offsetY -
offsetZ -
sizeX -
sizeY -
sizeZ -
features -
colorAlpha -
texCoordsSize -
Returns:
the newly created TriangleArray.
See Also:
TriangleArray

createGeometry

public static Geometry createGeometry(float offsetX,
                                      float offsetY,
                                      float offsetZ,
                                      float sizeX,
                                      float sizeY,
                                      float sizeZ,
                                      int features,
                                      boolean colorAlpha,
                                      int texCoordsSize)
Create a Geometry.

Parameters:
offsetX -
offsetY -
offsetZ -
sizeX -
sizeY -
sizeZ -
features -
colorAlpha -
texCoordsSize -
Returns:
the newly created Geometry.
See Also:
Geometry

createGeometry

public static Geometry createGeometry(float sizeX,
                                      float sizeY,
                                      float sizeZ,
                                      int features,
                                      boolean colorAlpha,
                                      int texCoordsSize)
Create a Geometry.

Parameters:
sizeX -
sizeY -
sizeZ -
features -
colorAlpha -
texCoordsSize -
Returns:
the newly created Geometry.
See Also:
Geometry

createFromBoxBody

public static final Box createFromBoxBody(org.openmali.spatial.bodies.Box box,
                                          int features,
                                          boolean colorAlpha,
                                          int texCoordsSize)
Creates a Box.

Parameters:
box - the box-body to create this scenegraph-box-primitive from
features - GeometryArray features
colorAlpha -
texCoordsSize -
Returns:
the newly created Box

createFromBoxBody

public static final Box createFromBoxBody(org.openmali.spatial.bodies.Box box,
                                          Texture texture)
Creates a Box.

Parameters:
box - the box-body to create this scenegraph-box-primitive from
texture - the texture to use
Returns:
the newly created Box
See Also:
Texture

createFromBoxBody

public static final Box createFromBoxBody(org.openmali.spatial.bodies.Box box,
                                          java.lang.String texture)
Creates a Box.

Parameters:
box - the box-body to create this scenegraph-box-primitive from
texture - the texture to use
Returns:
the newly created Box

createFromBoxBody

public static final Box createFromBoxBody(org.openmali.spatial.bodies.Box box,
                                          org.openmali.vecmath2.Colorf color)
Creates a Box.

Parameters:
box - the box-body to create this scenegraph-box-primitive from
color - the color to use
Returns:
the newly created Box

createFromBoxBody

public static final Box createFromBoxBody(org.openmali.spatial.bodies.Box box,
                                          Appearance app)
Creates a Box.

Parameters:
box - the box-body to create this scenegraph-box-primitive from
app - the appearance to use
Returns:
the newly created Box
See Also:
Appearance