gov.nasa.worldwind.ogc.collada
Class ColladaP
java.lang.Object
gov.nasa.worldwind.util.xml.AbstractXMLEventParser
gov.nasa.worldwind.ogc.collada.ColladaAbstractObject
gov.nasa.worldwind.ogc.collada.ColladaP
- All Implemented Interfaces:
- XMLEventParser
public class ColladaP
- extends ColladaAbstractObject
Represents the COLLADA p element and provides access to its contents. The p element is a sort of
indirect index that determines how vertices, normals, and texture coordinates are read from the inputs. This
tutorial is helpful for understanding how the p element relates to COLLADA geometry: http://www.wazim.com/Collada_Tutorial_1.htm.
|
Field Summary |
protected int[] |
indices
Indices contained in this element. |
| Methods inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser |
allocate, doAddCharacters, doAddEventAttribute, doAddEventContent, doParseEventAttributes, doParseEventContent, freeResources, getAConstructor, getCharacters, getField, getField, getFields, getNamespaceURI, getParent, hasField, hasField, hasFields, mergeFields, newInstance, overrideFields, parseCharacterContent, removeField, setField, setField, setFields, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
indices
protected int[] indices
- Indices contained in this element.
ColladaP
public ColladaP(String ns)
- Construct an instance.
- Parameters:
ns - the qualifying namespace URI. May be null to indicate no namespace qualification.
getIndices
public int[] getIndices()
- Indicates the contents of the P element.
- Returns:
- Array of indices defined by this element.
parse
public Object parse(XMLEventParserContext ctx,
XMLEvent event,
Object... args)
throws XMLStreamException
- Parse the event and initialize the parser's values to those found in the event.
- Specified by:
parse in interface XMLEventParser- Overrides:
parse in class AbstractXMLEventParser
- Parameters:
ctx - a current parser context.event - the event to parse.args - an optional list of arguments that may by used by subclasses.
- Returns:
- if parsing is successful, returns
this, otherwise returns null.
- Throws:
XMLStreamException - if an exception occurs during event-stream reading.
parseInts
protected int[] parseInts(String intArrayString)
- Parse an string of integers into an array.
- Parameters:
intArrayString - String of integers separated by spaces.
- Returns:
- Array of integers parsed from the input string.