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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ALcdOpenFlightSceneVisitor aVisitor) Accepts an OpenFlight visitor.voidaddChild(ILcdOpenFlightNode aChild) Adds a child to this node.getChild(int aIndex) Returns the child node at the specified index.intReturns 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.voidvoidsetParent(ILcdOpenFlightNode aParent) Sets this node's parent.toString()
-
Constructor Details
-
TLcdOpenFlightNode
-
-
Method Details
-
getChildCount
public int getChildCount()Description copied from interface:ILcdOpenFlightNodeReturns the number of child nodes directly beneath this node.- Specified by:
getChildCountin interfaceILcdOpenFlightNode- Returns:
- the number of child nodes directly beneath this node
-
getChild
Description copied from interface:ILcdOpenFlightNodeReturns the child node at the specified index.- Specified by:
getChildin 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:ILcdOpenFlightNodeReturns this node's parent node. May be null for the root node of the scene graph only.- Specified by:
getParentin interfaceILcdOpenFlightNode- Returns:
- this node's parent node
-
getID
Description copied from interface:ILcdOpenFlightNodeReturns this node's ID. The ID is present in all primary node records defined by OpenFlight.- Specified by:
getIDin interfaceILcdOpenFlightNode- Returns:
- the ID of this node
-
setID
- Parameters:
aID- the new ID of this node- See Also:
-
toString
-
getMeshes
Description copied from interface:ILcd3DMeshNodeReturns 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:
getMeshesin interfaceILcd3DMeshNode- Returns:
- a list of 3D meshes, possibly empty but never
null
-
getTransformation
public double[] getTransformation()Description copied from interface:ILcd3DMeshNodeReturns 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().nullcan be returned and represents the identity matrix.- Specified by:
getTransformationin interfaceILcd3DMeshNode- Returns:
- a 4x4 column-major transformation matrix, possibly
null
-
getChildren
Description copied from interface:ILcd3DMeshNodeReturns this node's children, or an empty list if the node is a leaf node.- Specified by:
getChildrenin interfaceILcd3DMeshNode- Returns:
- a list of children, possibly empty but never
null
-
accept
Description copied from interface:ILcdOpenFlightNodeAccepts an OpenFlight visitor. A typical implementation of this method should callaVisitor.visit(this).- Specified by:
acceptin interfaceILcdOpenFlightNode- Parameters:
aVisitor- the visitor to accept
-