Class CompressedGeometryData.Header

java.lang.Object
com.sun.j3d.utils.geometry.compression.CompressedGeometryData.Header
Enclosing class:
CompressedGeometryData

public static class CompressedGeometryData.Header extends Object
The Header class is a data container for the header information, used in conjunction with a CompressedGeometryData object. This information is used to aid the decompression of the compressed geometry.

All instance data is declared public and no get or set methods are provided.

Since:
Java 3D 1.5
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    bufferDataPresent: bit indicating that alpha information is bundled with the vertices in the compressed geometry buffer.
    int
    Contains bits indicating what data is bundled with the vertices in the compressed geometry buffer.
    int
    Describes the type of data in the compressed geometry buffer.
    static final int
    bufferDataPresent: bit indicating that RGB color information is bundled with the vertices in the compressed geometry buffer.
    static final int
    bufferType: compressed geometry is made up of line segments.
    javax.vecmath.Point3d
    A point that defines the lower bound of the x, y, and z components for all positions in the compressed geometry buffer.
    int
    The major version number for the compressed geometry format that was used to compress the geometry.
    int
    The minor-minor version number for the compressed geometry format that was used to compress the geometry.
    int
    The minor version number for the compressed geometry format that was used to compress the geometry.
    static final int
    bufferDataPresent: bit indicating that normal information is bundled with the vertices in the compressed geometry buffer.
    static final int
    bufferType: compressed geometry is made up of individual points.
    int
    Size of the compressed geometry in bytes.
    int
    Offset in bytes of the start of the compressed geometry from the beginning of the compressed geometry byte array passed to the CompressedGeometryData constructor.
    static final int
    bufferType: compressed geometry is made up of triangles.
    javax.vecmath.Point3d
    A point that defines the upper bound of the x, y, and z components for all positions in the compressed geometry buffer.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new Header object used for the creation of a CompressedGeometryData object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a String describing the contents of the Header object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • POINT_BUFFER

      public static final int POINT_BUFFER
      bufferType: compressed geometry is made up of individual points.
      See Also:
    • LINE_BUFFER

      public static final int LINE_BUFFER
      bufferType: compressed geometry is made up of line segments.
      See Also:
    • TRIANGLE_BUFFER

      public static final int TRIANGLE_BUFFER
      bufferType: compressed geometry is made up of triangles.
      See Also:
    • NORMAL_IN_BUFFER

      public static final int NORMAL_IN_BUFFER
      bufferDataPresent: bit indicating that normal information is bundled with the vertices in the compressed geometry buffer.
      See Also:
    • COLOR_IN_BUFFER

      public static final int COLOR_IN_BUFFER
      bufferDataPresent: bit indicating that RGB color information is bundled with the vertices in the compressed geometry buffer.
      See Also:
    • ALPHA_IN_BUFFER

      public static final int ALPHA_IN_BUFFER
      bufferDataPresent: bit indicating that alpha information is bundled with the vertices in the compressed geometry buffer.
      See Also:
    • majorVersionNumber

      public int majorVersionNumber
      The major version number for the compressed geometry format that was used to compress the geometry. If the version number of compressed geometry is incompatible with the supported version of compressed geometry in the current version of Java 3D, the compressed geometry obejct will not be rendered.
      See Also:
      • invalid reference
        Canvas3D#queryProperties
    • minorVersionNumber

      public int minorVersionNumber
      The minor version number for the compressed geometry format that was used to compress the geometry. If the version number of compressed geometry is incompatible with the supported version of compressed geometry in the current version of Java 3D, the compressed geometry obejct will not be rendered.
      See Also:
      • invalid reference
        Canvas3D#queryProperties
    • minorMinorVersionNumber

      public int minorMinorVersionNumber
      The minor-minor version number for the compressed geometry format that was used to compress the geometry. If the version number of compressed geometry is incompatible with the supported version of compressed geometry in the current version of Java 3D, the compressed geometry obejct will not be rendered.
      See Also:
      • invalid reference
        Canvas3D#queryProperties
    • bufferType

      public int bufferType
      Describes the type of data in the compressed geometry buffer. Only one type may be present in any given compressed geometry buffer.
    • bufferDataPresent

      public int bufferDataPresent
      Contains bits indicating what data is bundled with the vertices in the compressed geometry buffer. If this data is not present (e.g. color) then this info will be inherited from the Appearance node.
    • size

      public int size
      Size of the compressed geometry in bytes.
    • start

      public int start
      Offset in bytes of the start of the compressed geometry from the beginning of the compressed geometry byte array passed to the CompressedGeometryData constructor.

      If the CompressedGeometryData is created with reference access semantics, then this allow external compressors or file readers to embed several blocks of compressed geometry in a single large byte array, possibly interspersed with metadata that is not specific to Java 3D, without having to copy each block to a separate byte array.

      If the CompressedGeometryData is created with copy access semantics, then size bytes of compressed geometry data are copied from the offset indicated by start instead of copying the entire byte array. The getCompressedGeometry() method will return only the bytes used to construct the object, and the getCompressedGeometryHeader() method will return a header with the start field set to 0.

    • lowerBound

      public javax.vecmath.Point3d lowerBound
      A point that defines the lower bound of the x, y, and z components for all positions in the compressed geometry buffer. If null, a lower bound of (-1,-1,-1) is assumed. Java 3D will use this information to construct a bounding box around compressed geometry objects that are used in nodes for which the auto compute bounds flag is true. The default value for this point is null.
    • upperBound

      public javax.vecmath.Point3d upperBound
      A point that defines the upper bound of the x, y, and z components for all positions in the compressed geometry buffer. If null, an upper bound of (1,1,1) is assumed. Java 3D will use this information to construct a bounding box around compressed geometry objects that are used in nodes for which the auto compute bounds flag is true. The default value for this point is null.
  • Constructor Details

    • Header

      public Header()
      Creates a new Header object used for the creation of a CompressedGeometryData object. All instance data is declared public and no get or set methods are provided. All values are set to 0 by default and must be filled in by the application.
      See Also:
  • Method Details

    • toString

      public String toString()
      Returns a String describing the contents of the Header object.
      Overrides:
      toString in class Object
      Returns:
      a String describing contents of the compressed geometry header