Class TLcdOpenFlightTransformableNode
java.lang.Object
com.luciad.format.object3d.openflight.model.TLcdOpenFlightNode
com.luciad.format.object3d.openflight.model.TLcdOpenFlightTransformableNode
- All Implemented Interfaces:
ILcd3DMeshNode
,ILcdOpenFlightNode
- Direct Known Subclasses:
TLcdOpenFlightBSPNode
,TLcdOpenFlightExternalReferenceNode
,TLcdOpenFlightGeometryNode
,TLcdOpenFlightSwitchNode
Base class for nodes that support transformation of their subtrees.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ALcdOpenFlightSceneVisitor aVisitor) Accepts an OpenFlight visitor.double[]
Returns a transformation matrix that applies to this node and its children.void
setTransformation
(double[] aMatrix4x4) Sets this node's transformation matrix.Methods inherited from class com.luciad.format.object3d.openflight.model.TLcdOpenFlightNode
addChild, getChild, getChildCount, getChildren, getID, getMeshes, getParent, setID, setParent, toString
-
Constructor Details
-
TLcdOpenFlightTransformableNode
-
-
Method Details
-
getTransformation
public double[] getTransformation()Description copied from interface:ILcd3DMeshNode
Returns a transformation matrix that applies to this node and its children. The matrix should be 4x4 elements in column-major order. This is the same convention used by OpenGL functions such asglLoadMatrix()
.null
can be returned and represents the identity matrix.- Specified by:
getTransformation
in interfaceILcd3DMeshNode
- Overrides:
getTransformation
in classTLcdOpenFlightNode
- Returns:
- a 4x4 column-major transformation matrix, possibly
null
-
setTransformation
public void setTransformation(double[] aMatrix4x4) Sets this node's transformation matrix. The matrix must be 4x4 elements and be in column major form.null
values are allowed, and will be more efficient than specifying an identity matrix.- Parameters:
aMatrix4x4
- a 16-element double array defining a 4x4 transformation matrix
-
accept
Description copied from interface:ILcdOpenFlightNode
Accepts an OpenFlight visitor. A typical implementation of this method should callaVisitor.visit(this)
.- Specified by:
accept
in interfaceILcdOpenFlightNode
- Overrides:
accept
in classTLcdOpenFlightNode
- Parameters:
aVisitor
- the visitor to accept
-