|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.javagl.swogl.layout.BillboardLayout3D
public class BillboardLayout3D
This is an implementation of the LayoutManager3D interface
that lays out all SwoglComponents so that they face the viewer.
The computation is based on a Camera that provides the
viewing information. This class also offers a static utility
method for computing the billboarding transform, which may
be used in other implementations of layout managers.
| Constructor Summary | |
|---|---|
BillboardLayout3D(Camera camera)
Creates a new BillboardLayout3D that lets all SwoglComponents face the given camera. |
|
| Method Summary | |
|---|---|
void |
cameraChanged(Camera camera)
Will be called when a property of the given Camera changed |
static javax.vecmath.Matrix4f |
computeBillboardTransform(SwoglComponent swoglComponent,
Camera camera)
Utility method that computes the transform that must be applied to the given SwoglComponent so that it faces the given
Camera. |
void |
doLayout3D()
Lays out the SwoglComponents in a SwoglContainer |
void |
setSwoglContainer(SwoglContainer swoglContainer)
This method will assign the given SwoglContainer to this LayoutManager3D. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BillboardLayout3D(Camera camera)
camera - The camera| Method Detail |
|---|
public void cameraChanged(Camera camera)
CameraListenerCamera changed
cameraChanged in interface CameraListenercamera - The Camerapublic void setSwoglContainer(SwoglContainer swoglContainer)
LayoutManager3DSwoglContainer.setLayout3D(LayoutManager3D) method,
the SwoglContainer will pass itself to this method. When a
different LayoutManager3D is assigned to the SwoglContainer,
then the SwoglContainer will call this method and pass
null as the argument. This allows implementations
of this interface to perform an initialization when this
LayoutManager3D becomes assigned to a SwoglContainer, and
necessary cleanup operations when it is detached from a
SwoglContainer.
setSwoglContainer in interface LayoutManager3DswoglContainer - The SwoglContainer for this LayoutManager3Dpublic void doLayout3D()
LayoutManager3D
doLayout3D in interface LayoutManager3D
public static javax.vecmath.Matrix4f computeBillboardTransform(SwoglComponent swoglComponent,
Camera camera)
SwoglComponent so that it faces the given
Camera.
swoglComponent - The SwoglComponentcamera - The Camera
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||