Class TLcdOpenFlightNode
java.lang.Object
com.luciad.format.object3d.openflight.model.TLcdOpenFlightNode
- All Implemented Interfaces:
ILcd3DMeshNode
,ILcdOpenFlightNode
- Direct Known Subclasses:
TLcdOpenFlightFaceNode
,TLcdOpenFlightHeaderNode
,TLcdOpenFlightInstanceDefinitionNode
,TLcdOpenFlightInstanceReferenceNode
,TLcdOpenFlightTransformableNode
,TLcdOpenFlightVertexNode
Basic implementation of ILcdOpenFlightNode. Provides a standard mechanism for
managing child nodes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ALcdOpenFlightSceneVisitor aVisitor) Accepts an OpenFlight visitor.void
addChild
(ILcdOpenFlightNode aChild) Adds a child to this node.getChild
(int aIndex) Returns the child node at the specified index.int
Returns the number of child nodes directly beneath this node.List
<? extends ILcd3DMeshNode> Returns this node's children, or an empty list if the node is a leaf node.getID()
Returns this node's ID.Returns the geometry contained in this node, in the form of 3D meshes, or an empty list if this node does not contain any data.Returns this node's parent node.double[]
Returns a transformation matrix that applies to this node and its children.void
void
setParent
(ILcdOpenFlightNode aParent) Sets this node's parent.toString()
-
Constructor Details
-
TLcdOpenFlightNode
-
-
Method Details
-
getChildCount
public int getChildCount()Description copied from interface:ILcdOpenFlightNode
Returns the number of child nodes directly beneath this node.- Specified by:
getChildCount
in interfaceILcdOpenFlightNode
- Returns:
- the number of child nodes directly beneath this node
-
getChild
Description copied from interface:ILcdOpenFlightNode
Returns the child node at the specified index.- Specified by:
getChild
in interfaceILcdOpenFlightNode
- Parameters:
aIndex
- the index of the child node to be retrieved- Returns:
- the child node at the specified index
-
addChild
Adds a child to this node.- Parameters:
aChild
- the ILcdOpenFlightNode to be added below this node
-
setParent
Sets this node's parent.- Parameters:
aParent
-
-
getParent
Description copied from interface:ILcdOpenFlightNode
Returns this node's parent node. May be null for the root node of the scene graph only.- Specified by:
getParent
in interfaceILcdOpenFlightNode
- Returns:
- this node's parent node
-
getID
Description copied from interface:ILcdOpenFlightNode
Returns this node's ID. The ID is present in all primary node records defined by OpenFlight.- Specified by:
getID
in interfaceILcdOpenFlightNode
- Returns:
- the ID of this node
-
setID
- Parameters:
aID
- the new ID of this node- See Also:
-
toString
-
getMeshes
Description copied from interface:ILcd3DMeshNode
Returns the geometry contained in this node, in the form of 3D meshes, or an empty list if this node does not contain any data.- Specified by:
getMeshes
in interfaceILcd3DMeshNode
- Returns:
- a list of 3D meshes, possibly empty but never
null
-
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
- Returns:
- a 4x4 column-major transformation matrix, possibly
null
-
getChildren
Description copied from interface:ILcd3DMeshNode
Returns this node's children, or an empty list if the node is a leaf node.- Specified by:
getChildren
in interfaceILcd3DMeshNode
- Returns:
- a list of children, possibly empty but never
null
-
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
- Parameters:
aVisitor
- the visitor to accept
-