public class ColladaNode extends ColladaAbstractObject implements ColladaRenderable
Modifier and Type | Field and Description |
---|---|
protected List<ColladaRenderable> |
children
Children of this node.
|
protected List<ColladaInstanceGeometry> |
geometries
Geometries defined in this node.
|
protected Matrix |
matrix
Transform matrix for this node.
|
protected List<ColladaMeshShape> |
shapes
Shape used to render geometry in this node.
|
CHARACTERS_CONTENT, fields, namespaceURI, parent
Constructor and Description |
---|
ColladaNode(String ns)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
protected List<ColladaMeshShape> |
createShapes()
Create shapes to render this node.
|
protected void |
createShapesForGeometry(ColladaInstanceGeometry geomInstance,
List<ColladaMeshShape> shapes)
Create shapes for a geometry.
|
protected List<ColladaRenderable> |
getChildren()
Indicates the children of this node.
|
Box |
getLocalExtent(ColladaTraversalContext tc)
Returns this renderable's model coordinate extent.
|
protected Matrix |
getMatrix()
Indicates the transform matrix specified in this node.
|
protected double[] |
parseDoubleArray(String doubleArrayString)
Parse a string of doubles into a double[].
|
void |
preRender(ColladaTraversalContext tc,
DrawContext dc)
Pre-Render this element.
|
void |
render(ColladaTraversalContext tc,
DrawContext dc)
Render this element.
|
void |
setField(String keyName,
Object value) |
getRoot
allocate, doAddCharacters, doAddEventAttribute, doAddEventContent, doParseEventAttributes, doParseEventContent, freeResources, getAConstructor, getCharacters, getField, getField, getFields, getNamespaceURI, getParent, hasField, hasField, hasFields, mergeFields, newInstance, overrideFields, parse, parseCharacterContent, removeField, setField, setFields, setNamespaceURI, setParent
protected List<ColladaRenderable> children
protected List<ColladaInstanceGeometry> geometries
protected Matrix matrix
protected List<ColladaMeshShape> shapes
public ColladaNode(String ns)
ns
- the qualifying namespace URI. May be null to indicate no namespace qualification.protected List<ColladaMeshShape> createShapes()
protected void createShapesForGeometry(ColladaInstanceGeometry geomInstance, List<ColladaMeshShape> shapes)
geomInstance
- Geometry for which to create shapes.shapes
- List to collect the new shapes.protected List<ColladaRenderable> getChildren()
public Box getLocalExtent(ColladaTraversalContext tc)
ColladaAbstractObject
getLocalExtent
in interface ColladaRenderable
getLocalExtent
in class ColladaAbstractObject
tc
- The traversal context to use when determining the extent.protected Matrix getMatrix()
protected double[] parseDoubleArray(String doubleArrayString)
doubleArrayString
- String of doubles, separated by whitespace.public void preRender(ColladaTraversalContext tc, DrawContext dc)
preRender
in interface ColladaRenderable
tc
- the current COLLADA traversal context.dc
- the current draw context.public void render(ColladaTraversalContext tc, DrawContext dc)
render
in interface ColladaRenderable
tc
- the current COLLADA traversal context.dc
- the current draw context.public void setField(String keyName, Object value)
setField
in class AbstractXMLEventParser