org.ogre4j
Class Billboard

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Billboard
All Implemented Interfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IBillboard, ISceneObjAllocatedObject, INativeObject

public class Billboard
extends NativeObject
implements IBillboard


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Billboard()
          Default constructor.
  Billboard(InstancePointer p)
          This constructor is public for internal useage only!
protected Billboard(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Billboard(IVector3 position, IBillboardSet owner, IColourValue colour)
          Normal constructor as called by .
  Billboard(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _notifyOwner(IBillboardSet owner)
          Internal method for notifying the billboard of it's owner.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 IColourValue getColour()
          Gets the colour of this billboard.
 void getmColour(IColourValue returnValue)
           
 void getmDirection(IVector3 returnValue)
           
 IBillboardSet getmParentSet()
           
 void getmPosition(IVector3 returnValue)
           
 void getmRotation(IRadian returnValue)
           
 float getOwnHeight()
          Retrieves the billboard's personal width, if hasOwnDimensions is true.
 float getOwnWidth()
          Retrieves the billboard's personal width, if hasOwnDimensions is true.
 IVector3 getPosition()
          Get the position of the billboard.
 IRadian getRotation()
          Get the rotation of the billboard.
 int getTexcoordIndex()
          returns the previous value set by .
 IFloatRect getTexcoordRect()
          returns the previous value set by .
 boolean hasOwnDimensions()
          Returns true if this billboard deviates from the BillboardSet's default dimensions (i.e. if the method has been called for this instance).
 boolean isUseTexcoordRect()
          Returns true if this billboard use individual texture coordinate rect (i.e. if the method has been called for this instance), or returns false if use texture coordinates defined in the parent BillboardSet's texture coordinates array (i.e. if the method has been called for this instance).
 void resetDimensions()
          Resets this to use the parent BillboardSet's dimensions instead of it's own.
 void setColour(IColourValue colour)
          Sets the colour of this billboard.
 void setDimensions(float width, float height)
          Sets the width and height for this billboard.
 void setmColour(IColourValue _jni_value_)
           
 void setmDirection(IVector3 _jni_value_)
           
 void setmParentSet(IBillboardSet _jni_value_)
           
 void setmPosition(IVector3 _jni_value_)
           
 void setmRotation(IRadian _jni_value_)
           
 void setPosition(float x, float y, float z)
          Set the position of the billboard.
 void setPosition(IVector3 position)
          Set the position of the billboard.
 void setRotation(IRadian rotation)
          Set the rotation of the billboard.
 void setTexcoordIndex(int texcoordIndex)
          sets which texture coordinate rect this billboard will use when rendering.
 void setTexcoordRect(float u0, float v0, float u1, float v1)
          sets the individual texture coordinate rect of this billboard will use when rendering.
 void setTexcoordRect(IFloatRect texcoordRect)
          sets the individual texture coordinate rect of this billboard will use when rendering.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

Billboard

public Billboard(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


Billboard

protected Billboard(InstancePointer p,
                    boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


Billboard

public Billboard(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Billboard

public Billboard()
Default constructor.


Billboard

public Billboard(IVector3 position,
                 IBillboardSet owner,
                 IColourValue colour)
Normal constructor as called by .

Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

getRotation

public IRadian getRotation()
Get the rotation of the billboard.

Specified by:
getRotation in interface IBillboard

setRotation

public void setRotation(IRadian rotation)
Set the rotation of the billboard.

Specified by:
setRotation in interface IBillboard

setPosition

public void setPosition(IVector3 position)
Set the position of the billboard.

Specified by:
setPosition in interface IBillboard

setPosition

public void setPosition(float x,
                        float y,
                        float z)
Set the position of the billboard.

Specified by:
setPosition in interface IBillboard

getPosition

public IVector3 getPosition()
Get the position of the billboard.

Specified by:
getPosition in interface IBillboard

setDimensions

public void setDimensions(float width,
                          float height)
Sets the width and height for this billboard.

Specified by:
setDimensions in interface IBillboard

resetDimensions

public void resetDimensions()
Resets this to use the parent BillboardSet's dimensions instead of it's own.

Specified by:
resetDimensions in interface IBillboard

setColour

public void setColour(IColourValue colour)
Sets the colour of this billboard.

Specified by:
setColour in interface IBillboard

getColour

public IColourValue getColour()
Gets the colour of this billboard.

Specified by:
getColour in interface IBillboard

hasOwnDimensions

public boolean hasOwnDimensions()
Returns true if this billboard deviates from the BillboardSet's default dimensions (i.e. if the method has been called for this instance).

Specified by:
hasOwnDimensions in interface IBillboard

getOwnWidth

public float getOwnWidth()
Retrieves the billboard's personal width, if hasOwnDimensions is true.

Specified by:
getOwnWidth in interface IBillboard

getOwnHeight

public float getOwnHeight()
Retrieves the billboard's personal width, if hasOwnDimensions is true.

Specified by:
getOwnHeight in interface IBillboard

_notifyOwner

public void _notifyOwner(IBillboardSet owner)
Internal method for notifying the billboard of it's owner.

Specified by:
_notifyOwner in interface IBillboard

isUseTexcoordRect

public boolean isUseTexcoordRect()
Returns true if this billboard use individual texture coordinate rect (i.e. if the method has been called for this instance), or returns false if use texture coordinates defined in the parent BillboardSet's texture coordinates array (i.e. if the method has been called for this instance).

Specified by:
isUseTexcoordRect in interface IBillboard

setTexcoordIndex

public void setTexcoordIndex(int texcoordIndex)
sets which texture coordinate rect this billboard will use when rendering. The parent billboard set may contain more than one, in which case a billboard can be textured with different pieces of a larger texture sheet very efficiently.

Specified by:
setTexcoordIndex in interface IBillboard

getTexcoordIndex

public int getTexcoordIndex()
returns the previous value set by . The default value is 0, which is always a valid texture coordinate set.

Specified by:
getTexcoordIndex in interface IBillboard

setTexcoordRect

public void setTexcoordRect(IFloatRect texcoordRect)
sets the individual texture coordinate rect of this billboard will use when rendering. The parent billboard set may contain more than one, in which case a billboard can be textured with different pieces of a larger texture sheet very efficiently.

Specified by:
setTexcoordRect in interface IBillboard

setTexcoordRect

public void setTexcoordRect(float u0,
                            float v0,
                            float u1,
                            float v1)
sets the individual texture coordinate rect of this billboard will use when rendering. The parent billboard set may contain more than one, in which case a billboard can be textured with different pieces of a larger texture sheet very efficiently.

Specified by:
setTexcoordRect in interface IBillboard

getTexcoordRect

public IFloatRect getTexcoordRect()
returns the previous value set by .

Specified by:
getTexcoordRect in interface IBillboard

getmPosition

public void getmPosition(IVector3 returnValue)
Specified by:
getmPosition in interface IBillboard

setmPosition

public void setmPosition(IVector3 _jni_value_)
Specified by:
setmPosition in interface IBillboard

getmDirection

public void getmDirection(IVector3 returnValue)
Specified by:
getmDirection in interface IBillboard

setmDirection

public void setmDirection(IVector3 _jni_value_)
Specified by:
setmDirection in interface IBillboard

getmParentSet

public IBillboardSet getmParentSet()
Specified by:
getmParentSet in interface IBillboard

setmParentSet

public void setmParentSet(IBillboardSet _jni_value_)
Specified by:
setmParentSet in interface IBillboard

getmColour

public void getmColour(IColourValue returnValue)
Specified by:
getmColour in interface IBillboard

setmColour

public void setmColour(IColourValue _jni_value_)
Specified by:
setmColour in interface IBillboard

getmRotation

public void getmRotation(IRadian returnValue)
Specified by:
getmRotation in interface IBillboard

setmRotation

public void setmRotation(IRadian _jni_value_)
Specified by:
setmRotation in interface IBillboard


Copyright © 2007 netAllied GmbH. All Rights Reserved.