org.xith3d.scenegraph.primitives
Class DrawRectangle
java.lang.Object
org.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.Leaf
org.xith3d.scenegraph.Shape3D
org.xith3d.scenegraph.primitives.Quad
org.xith3d.scenegraph.primitives.Rectangle
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( ... ).
|
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.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 |
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)
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 widthheight - the new heightxOffset - relative x-Location of the RectangleyOffset - relative y-Location of the RectanglezOffset - relative z-Location of the Rectangle