|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.Leaf
org.xith3d.scenegraph.Shape3D
org.xith3d.scenegraph.primitives.FixedSizedBillboard
public class FixedSizedBillboard
A simple implementation for the Billboard interface. It does not inherit from Rectangle or TextRectangle as RectBillboard and TextBillboard do to avoid geometry duplication. Moreover, features like creating a text Billboard should go into a factory class and not clutter this class with numerous constructors.
FixedSizedBillboardFactory| 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 | |
|---|---|
FixedSizedBillboard(org.openmali.vecmath2.Tuple3f center,
float width,
float height)
Constructor. |
|
| Method Summary | |
|---|---|
TriangleStripArray |
getGeometry()
|
org.openmali.types.twodee.Sized2iRO |
getSizeOnScreen()
Returns the desired size on screen for this billboard, in pixels. |
void |
setSizeOnScreen(int width,
int height)
Sets the desired size on screen in pixels. |
void |
setTexture(Texture texture,
org.openmali.vecmath2.Tuple2f texLowerLeft,
org.openmali.vecmath2.Tuple2f texUpperRight)
Sets the texture used by this billboard. |
void |
setTexturePosition(org.openmali.vecmath2.Tuple2f texLowerLeft,
org.openmali.vecmath2.Tuple2f texUpperRight)
Sets the new texture-coordinates for this Rectangle. |
void |
updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation,
long frameId,
long nanoTime,
long nanoStep)
Interface implementation. |
| 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.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 |
|---|
public FixedSizedBillboard(org.openmali.vecmath2.Tuple3f center,
float width,
float height)
center - the billboard center. Can be null, and will
usually be.width - the billboard width.height - the billboard height.| Method Detail |
|---|
public void setTexture(Texture texture,
org.openmali.vecmath2.Tuple2f texLowerLeft,
org.openmali.vecmath2.Tuple2f texUpperRight)
texture - the texture to use, or null to remove the texture.texLowerLeft - the texture lower left coordinate. It can be
null in which case the (0f;0f) value is assumed.texUpperRight - the texture upper right coordinate. It can be
null in which case the (1f;1f) value is assumed.
public void setTexturePosition(org.openmali.vecmath2.Tuple2f texLowerLeft,
org.openmali.vecmath2.Tuple2f texUpperRight)
texLowerLeft - the texture lower left coordinate. It can be
null in which case the (0f;0f) value is assumed.texUpperRight - the texture upper right coordinate. It can be
null in which case the (1f;1f) value is assumed.public org.openmali.types.twodee.Sized2iRO getSizeOnScreen()
getSizeOnScreen in interface Billboardnull for a classical
billboard.
public void setSizeOnScreen(int width,
int height)
getSizeOnScreen() method will return
null.
width - the desired width in pixels.height - the desired height in pixels.
public void updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation,
long frameId,
long nanoTime,
long nanoStep)
updateFaceToCamera in interface BillboardviewRotation - the camera's rotationframeId - the current rendered frame's idpublic TriangleStripArray getGeometry()
getGeometry in class Shape3D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||