KudanAR - Android  1.6.0
ARMeshNode Class Reference

Inherits ARNode.

Inherited by ARAlphaVideoNode, ARImageNode, ARPointNode, and ARVideoNode.

Public Member Functions

 ARMeshNode ()
 
Vector3f getCaptureColour ()
 
ARMesh getMesh ()
 
void setMesh (ARMesh mesh)
 
ARMaterial getMaterial ()
 
void setMaterial (ARMaterial material)
 
void render ()
 
Vector3f getLightDirection ()
 
void setLightDirection (Vector3f mLightVector)
 
- 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 ()
 
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)
 

Protected Member Functions

void glDraw ()
 

Detailed Description

An ARMeshNode is a subclass of ARNode that represents a drawable mesh. The geometry to be used, as well as its shading, is specified via this node.

Constructor & Destructor Documentation

◆ ARMeshNode()

ARMeshNode.ARMeshNode ( )

Initialise an empty ARMeshNode to be assigned values later. This also gives the mesh a basic black material.

Member Function Documentation

◆ getCaptureColour()

Vector3f ARMeshNode.getCaptureColour ( )

Returns the colour of a mesh node at a given point on screen. This is used for detecting touch events. This is an internal method an should not be used.

Returns
Vector3f Vector3f representing an R,G,B colour.

◆ getLightDirection()

Vector3f ARMeshNode.getLightDirection ( )

Returns ARMeshNode's directional light's direction.

Returns
Vector3f Vector representing the mesh node's light direction.

◆ getMaterial()

ARMaterial ARMeshNode.getMaterial ( )

Returns the material to use for shading the mesh attached to this node.

Returns
The material used for shading the mesh.

◆ getMesh()

ARMesh ARMeshNode.getMesh ( )

Returns the ARMesh associated with the ARMeshNode. ARMesh's can be shared between ARMeshNode objects.

Returns
The mesh geometry.

◆ glDraw()

void ARMeshNode.glDraw ( )
protected

Draws ARMeshNode.

Reimplemented in ARPointNode.

◆ render()

void ARMeshNode.render ( )

Renders the ARMeshNode.

Reimplemented from ARNode.

◆ setLightDirection()

void ARMeshNode.setLightDirection ( Vector3f  mLightVector)

Sets the ARMeshNode's directional light's direction.

Parameters
mLightVectorVector representing the mesh nodes directional lights direction.

◆ setMaterial()

void ARMeshNode.setMaterial ( ARMaterial  material)

Applies a material to the mesh node. Null materials will not be drawn. Materials can be shared between ARMeshNode objects.

Example of how to set a material:

ARModelImporter modelImporter = new ARModelImporter();
modelImporter.loadFromAsset("example.armodel");
ARModelNode modelNode = modelImporter.getNode();
ARLightMaterial lightMaterial = new ARLightMaterial();
lightMaterial.setAmbient(0.7, 0.7, 0.7);
lightMaterial.setColour(0.882, 0.125, 0.250);
for(ARMeshNode meshNode : modelNode.getMeshNodes())
{
    meshNode.setMaterial(lightMaterial);
}
Parameters
materialThe material to use with this mesh node.

◆ setMesh()

void ARMeshNode.setMesh ( ARMesh  mesh)

Set the ARMeshNodes mesh.

Parameters
meshAn ARMesh representing the ARMeshNodes geometry.

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