org.xith3d.scenegraph.primitives
Class DrawRectangle

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.Quad
                      extended by org.xith3d.scenegraph.primitives.Rectangle
                          extended by org.xith3d.scenegraph.primitives.DrawRectangle
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode

public class DrawRectangle
extends Rectangle

This a simple Rectangle extension for pixel-perfect drawing. Use it in a RenderPass created through RenderPass.create2D( ... ).


Nested Class Summary
 
Nested classes/interfaces inherited from class org.xith3d.scenegraph.primitives.Rectangle
Rectangle.ZeroPointLocation
 
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
DrawRectangle(float width, float height, boolean useByteBuffer)
           
DrawRectangle(float width, float height, boolean withAlpha, boolean useByteBuffer)
           
DrawRectangle(float width, float height, boolean generateNormals, boolean withAlpha, boolean useByteBuffer)
           
 
Method Summary
 boolean getAllowBiggerTexture()
          If set to true, the underlying TextureImage2D is not shinked, if a smaller size would be sufficient, when the rectangle is shrinked.
 Texture2D getTexture()
           
 Texture2DCanvas getTextureCanvas()
           
 boolean resize(float width, float height, float xOffset, float yOffset, float zOffset)
          Resizes and repositions the Rectangle.
 void setAllowBiggerTexture(boolean allow)
          If set to true, the underlying TextureImage2D is not shinked, if a smaller size would be sufficient, when the rectangle is shrinked.
 
Methods inherited from class org.xith3d.scenegraph.primitives.Rectangle
createPosition, createPosition, createTextureCoordinates, createVertexCoords, createVertexCoords, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, createWithoutNormals, getHeight, getSize, getWidth, resize, resize, resize, resize, resize, setTexture, setTexture, setTexture, setTexturePosition, setTexturePosition
 
Methods inherited from class org.xith3d.scenegraph.primitives.Quad
createGeometry, generateNormals, getAlpha, getColor, getGeometry, setAlpha, setColor, setTexture, setTexture, setTexture, setTextureCoordinates, setTexturePosition, setVertexCoords, setVertexCoords, setVertexCoords, update, update
 
Methods inherited from class org.xith3d.scenegraph.Shape3D
absorbDetails, copy, freeOpenGLResources, getAppearance, getAppearance, getCustomComparable, 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

DrawRectangle

public DrawRectangle(float width,
                     float height,
                     boolean generateNormals,
                     boolean withAlpha,
                     boolean useByteBuffer)

DrawRectangle

public DrawRectangle(float width,
                     float height,
                     boolean withAlpha,
                     boolean useByteBuffer)

DrawRectangle

public DrawRectangle(float width,
                     float height,
                     boolean useByteBuffer)
Method Detail

setAllowBiggerTexture

public void setAllowBiggerTexture(boolean allow)
If set to true, the underlying TextureImage2D is not shinked, if a smaller size would be sufficient, when the rectangle is shrinked.

Parameters:
allow -

getAllowBiggerTexture

public final boolean getAllowBiggerTexture()
If set to true, the underlying TextureImage2D is not shinked, if a smaller size would be sufficient, when the rectangle is shrinked.


getTexture

public Texture2D getTexture()
Overrides:
getTexture in class Rectangle
Returns:
this Rectangle's Texture or null

getTextureCanvas

public final Texture2DCanvas getTextureCanvas()

resize

public boolean resize(float width,
                      float height,
                      float xOffset,
                      float yOffset,
                      float zOffset)
Resizes and repositions the Rectangle.

Overrides:
resize in class Rectangle
Parameters:
width - the new width
height - the new height
xOffset - relative x-Location of the Rectangle
yOffset - relative y-Location of the Rectangle
zOffset - relative z-Location of the Rectangle