KudanAR - Android  1.6.0
ARBillboardNode Class Reference

Inherits ARNode.

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 ()
 
Vector3f getFullScale ()
 
Quaternion getFullOrientation ()
 
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 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

◆ getForward()

Vector3f ARBillboardNode.getForward ( )

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.

◆ isLockX()

boolean ARBillboardNode.isLockX ( )
Returns
boolean Whether rotation around the X is locked. Default is false.

◆ isLockY()

boolean ARBillboardNode.isLockY ( )
Returns
boolean Whether rotation around the Y is locked. Default is false.

◆ isLockZ()

boolean ARBillboardNode.isLockZ ( )
Returns
boolean Whether rotation around the Z is locked. Default is false.

◆ preRender()

void ARBillboardNode.preRender ( )

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

Reimplemented from ARNode.

◆ setForward()

void ARBillboardNode.setForward ( Vector3f  value)

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.

◆ setLockX()

void ARBillboardNode.setLockX ( boolean  value)

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

Parameters
valueTrue to lock axis, False to unlock axis.

◆ setLockY()

void ARBillboardNode.setLockY ( boolean  value)

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

Parameters
valueTrue to lock axis, False to unlock axis.

◆ setLockZ()

void ARBillboardNode.setLockZ ( boolean  value)

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: