KudanAR - Android
ARBillboardNode Class Reference
+ Inheritance diagram for ARBillboardNode:
+ Collaboration diagram for ARBillboardNode:

Public Member Functions

boolean isLockX ()
 
boolean isLockY ()
 
boolean isLockZ ()
 
void setLockX (boolean value)
 
void setLockY (boolean value)
 
void setLockZ (boolean value)
 
Vector3f getForward ()
 
void setForward (Vector3f value)
 
void preRender ()
 
- Public Member Functions inherited from ARNode
 ARNode ()
 
 ARNode (String name)
 
void remove ()
 
void removeAllChildren ()
 
void addChild (ARNode child)
 
ARNode getParent ()
 
void setParent (ARNode parent)
 
List< ARNodegetChildren ()
 
ARNode getWorld ()
 
Vector3f getPosition ()
 
void setPosition (Vector3f position)
 
void setPosition (float x, float y, float z)
 
void translateBy (float x, float y, float z)
 
void scaleBy (float x, float y, float z)
 
Vector3f getScale ()
 
void setScale (Vector3f scale)
 
void setScale (float x, float y, float z)
 
void scaleByUniform (float scale)
 
Quaternion getOrientation ()
 
void setOrientation (Quaternion orientation)
 
void setOrientation (float x, float y, float z, float w)
 
void rotateByQuaternion (Quaternion quaternion)
 
void rotateByDegrees (float angle, float x, float y, float z)
 
Matrix4f getFullTransform ()
 
Matrix4f getLocalTransform ()
 
Matrix4f getWorldTransform ()
 
void render ()
 
boolean getVisible ()
 
void setVisible (boolean visible)
 
Quaternion getWorldOrientation ()
 
Vector3f getWorldScale ()
 
Vector3f getWorldPosition ()
 
Vector3f getFullPosition ()
 
String getName ()
 
void setName (String name)
 
void preRender ()
 
void postRender ()
 
ARNode findChildByName (String name)
 
void addChildren (List< ARNode > children)
 
void translateByVector (Vector3f translation)
 
void scaleByVector (Vector3f scale)
 
void rotateByRadians (float angle, float x, float y, float z)
 

Detailed Description

An ARBillboardNode is a subclass of ARNode that changes its orientation to ensure it always maintains its given forward vector direction relative to the camera. This is useful for showing content that rotates and follows the device as it moves around the scene and is especially useful for videos or other 2D content.

Member Function Documentation

Vector3f getForward ( )
inline

Sets the vector that should be aimed at the camera. For example, a vector of (0, 1, 0) would cause the Y-axis of the node's local space to point towards the camera. This vector must be set in order for an ARBillboardNode to work.

Example of use:

billboardNode.setForward(new Vector3f(0, 1, 0));
Returns
The vector which should be aimed at the camera. (0, -1, 0) would cause the negative y-axis to point towards the camera.
boolean isLockX ( )
inline
Returns
boolean Whether rotation around the X is locked. Default is false.
boolean isLockY ( )
inline
Returns
boolean Whether rotation around the Y is locked. Default is false.
boolean isLockZ ( )
inline
Returns
boolean Whether rotation around the Z is locked. Default is false.
void preRender ( )
inline

ARRendererListener interface method called prior to rendering each frame. Updates billboard nodes orientation.

void setForward ( Vector3f  value)
inline

The vector which should be aimed at the camera. (0, -1, 0) would caused the negative y-axis to point towards the camera. This needs to be set.

void setLockX ( boolean  value)
inline

Determines whether rotation around the X is locked. Default is false.

Parameters
valueTrue to lock axis, False to unlock axis.
void setLockY ( boolean  value)
inline

Determines whether rotation around the Y is locked. Default is false.

Parameters
valueTrue to lock axis, False to unlock axis.
void setLockZ ( boolean  value)
inline

Determines whether rotation around the Z is locked. Default is false.

Parameters
valueTrue to lock axis, False to unlock axis.

The documentation for this class was generated from the following file: