org.xith3d.scenegraph
Interface Billboard

All Known Implementing Classes:
FixedSizedBillboard, GeneratorShape3D, RectBillboard, TextBillboard

public interface Billboard

A BillBoard is someting, that always faces the View. Implement this interface in Shape3D extensions to make the renderer use it.


Method Summary
 org.openmali.types.twodee.Sized2iRO getSizeOnScreen()
          Returns the Billboard desired on screen dimensions.
 void updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation, long frameId, long nanoTime, long nanoStep)
          This method is called by the renderer each frame, the BillBoard is rendered.
 

Method Detail

getSizeOnScreen

org.openmali.types.twodee.Sized2iRO getSizeOnScreen()
Returns the Billboard desired on screen dimensions. For the default Billboard implementation, this method should return null, as the on-screen dimension is dependant on the distance between the Billboard and the camera. If the desired effect is a Billboard having a constant size on screen (usefull for icons, or textual information that should be readable at any distance), then this method should return the desired size in pixels. In this case, the Sized2iRO returned will generally be a constant. This method is called by the renderer each frame the Billboard is rendered. Note to implementers: for this behaviour to work properly, the unmodified geometry should of course have a unit size, ie: the width and the height should should be equal to 1f. Else the effective desired size on screen will be scaled accordingly.

Returns:
the desired size on screen, or null for a standard billboard.

updateFaceToCamera

void updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation,
                        long frameId,
                        long nanoTime,
                        long nanoStep)
This method is called by the renderer each frame, the BillBoard is rendered.

Parameters:
viewRotation - the camera's rotation
frameId - the current rendered frame's id
nanoTime -
nanoStep -