Package 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
Fields Modifier and Type Field Description protected int[]
indices
Indices contained in this element.-
Fields inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser
CHARACTERS_CONTENT, fields, namespaceURI, parent
-
-
Constructor Summary
Constructors Constructor Description ColladaP(java.lang.String ns)
Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getIndices()
Indicates the contents of the P element.java.lang.Object
parse(XMLEventParserContext ctx, javax.xml.stream.events.XMLEvent event, java.lang.Object... args)
Parse the event and initialize the parser's values to those found in the event.protected int[]
parseInts(java.lang.String intArrayString)
Parse an string of integers into an array.-
Methods inherited from class gov.nasa.worldwind.ogc.collada.ColladaAbstractObject
getLocalExtent, getRoot
-
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, setNamespaceURI, setParent
-
-
-
-
Method Detail
-
getIndices
public int[] getIndices()
Indicates the contents of the P element.- Returns:
- Array of indices defined by this element.
-
parse
public java.lang.Object parse(XMLEventParserContext ctx, javax.xml.stream.events.XMLEvent event, java.lang.Object... args) throws javax.xml.stream.XMLStreamException
Parse the event and initialize the parser's values to those found in the event.- Specified by:
parse
in interfaceXMLEventParser
- Overrides:
parse
in classAbstractXMLEventParser
- 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:
javax.xml.stream.XMLStreamException
- if an exception occurs during event-stream reading.
-
parseInts
protected int[] parseInts(java.lang.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.
-
-