Class 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 Detail

      • indices

        protected int[] indices
        Indices contained in this element.
    • Constructor Detail

      • ColladaP

        public ColladaP​(java.lang.String ns)
        Construct an instance.
        Parameters:
        ns - the qualifying namespace URI. May be null to indicate no namespace qualification.
    • 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 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:
        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.