public abstract class ColladaAbstractGeometry extends ColladaAbstractObject
Modifier and Type | Field and Description |
---|---|
static int |
COORDS_PER_VERTEX
Number of coordinates per vertex.
|
static java.lang.String |
DEFAULT_TEX_COORD_SEMANTIC
Default semantic that identifies texture coordinates.
|
protected java.util.List<ColladaInput> |
inputs
Inputs for the geometry.
|
static int |
TEX_COORDS_PER_VERTEX
Number of texture coordinates per vertex.
|
CHARACTERS_CONTENT, fields, namespaceURI, parent
Constructor and Description |
---|
ColladaAbstractGeometry(java.lang.String ns)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getCount()
Indicates the number of shapes (lines or triangles) in the geometry.
|
protected void |
getFloatFromAccessor(java.nio.FloatBuffer buffer,
ColladaAccessor accessor,
java.lang.String semantic,
int floatsPerVertex)
Retrieve numbers from an accessor.
|
protected int[] |
getIndices(java.lang.String semantic) |
java.util.List<ColladaInput> |
getInputs()
Indicates the inputs that provide vertices, textures coordinates, etc.
|
java.lang.String |
getMaterial()
Indicates the identifier for the material applied to this geometry.
|
ColladaAccessor |
getNormalAccessor() |
void |
getNormals(java.nio.FloatBuffer buffer)
Retrieves normal vectors in this geometry.
|
ColladaAccessor |
getTexCoordAccessor(java.lang.String semantic)
Indicates the accessor for texture coordinates.
|
void |
getTextureCoordinates(java.nio.FloatBuffer buffer,
java.lang.String semantic)
Retrieves the texture coordinates of vertices in this geometry.
|
ColladaAccessor |
getVertexAccessor() |
void |
getVertices(java.nio.FloatBuffer buffer)
Retrieves the coordinates of vertices in this geometry.
|
protected abstract int |
getVerticesPerShape()
Indicates the number of vertices per shape in the geometry.
|
void |
setField(java.lang.String keyName,
java.lang.Object value) |
getLocalExtent, 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
public static final int COORDS_PER_VERTEX
public static final java.lang.String DEFAULT_TEX_COORD_SEMANTIC
protected java.util.List<ColladaInput> inputs
public static final int TEX_COORDS_PER_VERTEX
public ColladaAbstractGeometry(java.lang.String ns)
ns
- the qualifying namespace URI. May be null to indicate no namespace qualification.public int getCount()
protected void getFloatFromAccessor(java.nio.FloatBuffer buffer, ColladaAccessor accessor, java.lang.String semantic, int floatsPerVertex)
buffer
- Buffer to receive floats.accessor
- Accessor that will provide floats.semantic
- Semantic that identifiers the set of indices to use (for example, "VERTEX" or "NORMAL").floatsPerVertex
- Number of floats to read for each vertex.protected int[] getIndices(java.lang.String semantic)
public java.util.List<ColladaInput> getInputs()
public java.lang.String getMaterial()
public ColladaAccessor getNormalAccessor()
public void getNormals(java.nio.FloatBuffer buffer)
buffer
- Buffer to receive coordinates.public ColladaAccessor getTexCoordAccessor(java.lang.String semantic)
semantic
- Semantic that identifies the texture coordinates. May be null, in which case the semantic
"TEXCOORD" is used.public void getTextureCoordinates(java.nio.FloatBuffer buffer, java.lang.String semantic)
buffer
- Buffer to receive coordinates.semantic
- String to identify which input holds the texture coordinates. May be null, in which case the
"TEXCOORD" is used.public ColladaAccessor getVertexAccessor()
public void getVertices(java.nio.FloatBuffer buffer)
buffer
- Buffer to receive coordinates.protected abstract int getVerticesPerShape()
public void setField(java.lang.String keyName, java.lang.Object value)
setField
in class AbstractXMLEventParser