Inherited by ARBillboardNode, ARBoneNode, ARCamera, ARMeshNode, ARModelNode, and ARWorld.
|
| ARNode () |
|
| ARNode (String name) |
|
void | remove () |
|
void | removeAllChildren () |
|
void | addChild (ARNode child) |
|
ARNode | getParent () |
|
void | setParent (ARNode parent) |
|
List< ARNode > | getChildren () |
|
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 | 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) |
|
An ARNode represents the base object of the scene-graph. It is responsible for the spatial layout of content, and is the node type from which all other nodes derive.
◆ ARNode() [1/2]
◆ ARNode() [2/2]
ARNode.ARNode |
( |
String |
name | ) |
|
Creates a new ARNode and assigns it the given name.
Example of use:
ARNode node = new ARNode("Example Node");
- Parameters
-
name | The name to give this node. |
◆ addChild()
void ARNode.addChild |
( |
ARNode |
child | ) |
|
Add a node as a child of this node. Any transformations applied to a node are inherited by its children.
- Parameters
-
child | The node to be added. |
◆ addChildren()
void ARNode.addChildren |
( |
List< ARNode > |
children | ) |
|
Adds a list of nodes as children of this node.
- Parameters
-
children | The list of nodes to be added as children. |
◆ findChildByName()
ARNode ARNode.findChildByName |
( |
String |
name | ) |
|
Find a child of this node with the given name. If there are multiple child nodes with the same name, any nodes after the first cannot be found, as this method will always return the first match. In order to be able to find all nodes, they must all have unique names.
- Parameters
-
name | The name of the node to search for. |
- Returns
- The first ARNode in the list of children with the given name, or null if no such node is found.
◆ getChildren()
List<ARNode> ARNode.getChildren |
( |
| ) |
|
Returns a list containing all direct child nodes of this node. This only returns nodes added to this node as children. Any nodes added to those nodes will not be listed here.
- Returns
- A list containing all direct child nodes of this node.
◆ getFullOrientation()
Quaternion ARNode.getFullOrientation |
( |
| ) |
|
Get the nodes full orientation of the node in eye space.
- Returns
- The nodes full orientation.
◆ getFullPosition()
Vector3f ARNode.getFullPosition |
( |
| ) |
|
Gets the full position of the node in eye space.
- Returns
- A Vector3f representing this node's full position.
◆ getFullTransform()
Matrix4f ARNode.getFullTransform |
( |
| ) |
|
Gets the full transformation of this node in eye space.
- Returns
- A 4x4 matrix representing this node's full transform.
◆ getLocalTransform()
Matrix4f ARNode.getLocalTransform |
( |
| ) |
|
Gets the nodes transformation from its parent node.
- Returns
- A 4x4 matrix representing this node's local transform.
◆ getName()
String ARNode.getName |
( |
| ) |
|
Gets the name of this node.
- Returns
- The node's name.
◆ getOrientation()
Quaternion ARNode.getOrientation |
( |
| ) |
|
Returns the nodes local orientation as a quaternion;
- Returns
- This node's orientation relative to its parent.
◆ getParent()
Returns this node's parent node. If its parent is a root node, this returns null.
- Returns
- This node's parent node.
◆ getPosition()
Vector3f ARNode.getPosition |
( |
| ) |
|
Returns the position of this node relative to its parent in a vector.
- Returns
- This node's position relative to its parent.
◆ getScale()
Vector3f ARNode.getScale |
( |
| ) |
|
Gets the scale of this node, relative to its parent.
- Returns
- This node's scale relative to its parent.
◆ getVisible()
boolean ARNode.getVisible |
( |
| ) |
|
Gets whether or not this node and all of its child nodes should be drawn. If false, this node and its children will not render, even if the child's visibility is set to true.
- Returns
- This node's visibility. If visible is set to NO then no children will be rendered.
◆ getWorld()
Returns the world node this node descends from.
- Returns
- The world node this node descends from.
◆ getWorldOrientation()
Quaternion ARNode.getWorldOrientation |
( |
| ) |
|
Gets the orientation of this node in the space of the nearest AR world this node descends from.
- Returns
- A Quaternion representing this node's world orientation.
◆ getWorldPosition()
Vector3f ARNode.getWorldPosition |
( |
| ) |
|
Gets the position of this node in the space of the nearest ARWorld this node descends from.
- Returns
- A Vector3f representing this node's world position.
◆ getWorldScale()
Vector3f ARNode.getWorldScale |
( |
| ) |
|
Gets the scale of this node in the space of the nearest ARWorld this node descends from.
- Returns
- A Vector3f representing this node's world scale.
◆ getWorldTransform()
Matrix4f ARNode.getWorldTransform |
( |
| ) |
|
Gets the nodes transformation from the nodes nearest world.
- Returns
- A 4x4 matrix representing this node's world transform.
◆ postRender()
void ARNode.postRender |
( |
| ) |
|
◆ preRender()
void ARNode.preRender |
( |
| ) |
|
◆ remove()
Remove this node from its parent node.
◆ removeAllChildren()
void ARNode.removeAllChildren |
( |
| ) |
|
Remove all children from this node.
◆ render()
◆ rotateByDegrees()
void ARNode.rotateByDegrees |
( |
float |
angle, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Rotate this node by the given number of degrees around the noted axes.
Example of use:
node.rotateByDegrees(90, 1, 0, 1);
- Parameters
-
angle | The angle, in degrees, to rotate by. |
x | Whether or not to rotate about this node's X axis. 0 for no, 1 for yes. |
y | Whether or not to rotate about this node's X axis. 0 for no, 1 for yes. |
z | Whether or not to rotate about this node's X axis. 0 for no, 1 for yes. |
◆ rotateByQuaternion()
void ARNode.rotateByQuaternion |
( |
Quaternion |
quaternion | ) |
|
Rotate this node by multiplying its orientation by a quaternion.
- Parameters
-
quaternion | The quaternion to rotate this node with. |
◆ rotateByRadians()
void ARNode.rotateByRadians |
( |
float |
angle, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Rotates ARNode using a 4 floats representing a quaternion.
- Parameters
-
angle | Angle of rotation in radians. |
x | Rotation around the x axis. |
y | Rotation around the y axis. |
z | Rotation around the z axis. |
◆ scaleBy()
void ARNode.scaleBy |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Scale this node separately along each axis. Scale can be non-uniform.
- Parameters
-
x | The amount to scale in the X-axis. |
y | The amount to scale in the Y-axis. |
z | The amount to scale in the Z-axis. |
◆ scaleByUniform()
void ARNode.scaleByUniform |
( |
float |
scale | ) |
|
Scale this node uniformly across each axis. This does not set the scale, but rather adds to the existing scale by the given amount. For example, if you scale a node by 2, then by 4, its overall scale will be 8 times bigger. Scaling occurs in the node's local space.
Example of use:
node.scaleByUniform(2);
- Parameters
-
scale | The factor to scale by. |
◆ scaleByVector()
void ARNode.scaleByVector |
( |
Vector3f |
scale | ) |
|
Scales ARNode using a Vector3f.
- Parameters
-
◆ setName()
void ARNode.setName |
( |
String |
name | ) |
|
Sets the name of this node. The name should be unique so that the tracker can find it when using findChildByName.
- Parameters
-
name | The name to assign to this node. |
◆ setOrientation() [1/2]
void ARNode.setOrientation |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
w |
|
) |
| |
Sets the node's orientation relative to its parent using 4 floats. This directly sets the quaternion representation of the node's orientation. This method is not recommended unless you have a thorough understanding of quaternions.
- Parameters
-
x | The X component of the orientation. |
y | The Y component of the orientation. |
z | The Z component of the orientation. |
w | The W component of the orientation. |
◆ setOrientation() [2/2]
void ARNode.setOrientation |
( |
Quaternion |
orientation | ) |
|
Sets node's orientation relative to its parent using a quaternion.
- Parameters
-
◆ setParent()
void ARNode.setParent |
( |
ARNode |
parent | ) |
|
Sets this node's parent node.
- Parameters
-
parent | The node to assign as this node's parent. |
◆ setPosition() [1/2]
void ARNode.setPosition |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Set nodes position relative to their parent using three floats.
- Parameters
-
x | The X component of the position. |
y | The Y component of the position. |
z | The Z component of the position. |
◆ setPosition() [2/2]
void ARNode.setPosition |
( |
Vector3f |
position | ) |
|
Sets the node's position relative to its parent using a vector.
- Parameters
-
position | The position to give this node. |
◆ setScale() [1/2]
void ARNode.setScale |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Sets the scale of a node using the provided floats.
- Parameters
-
x | The scale to give this node in its local X-axis. |
y | The scale to give this node in its local Y-axis. |
z | The scale to give this node in its local Z-axis. |
◆ setScale() [2/2]
void ARNode.setScale |
( |
Vector3f |
scale | ) |
|
Sets the scale of the node, relative to its parent, using the given vector.
- Parameters
-
scale | The scale to give this node, represented as a vector. |
◆ translateBy()
void ARNode.translateBy |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Translates the position of this node in its own local space by the given number of units in each axis. This simply adds the given 3 values to each corresponding component of the node's position. It does not set the position of the node directly.
- Parameters
-
x | The number of units to translate along the X-axis. |
y | The number of units to translate along the Y-axis. |
z | The number of units to translate along the Z-axis. |
◆ translateByVector()
void ARNode.translateByVector |
( |
Vector3f |
translation | ) |
|
Translates ARNode using a Vector3f.
- Parameters
-
The documentation for this class was generated from the following file: