Class BinaryStlFacetDefinition

  • All Implemented Interfaces:
    FacetDefinition

    public class BinaryStlFacetDefinition
    extends SimpleFacetDefinition
    Facet definition class that provides access to the 2-byte attribute value stored with each triangle in the binary STL format.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int attributeValue
      Attribute value for the facet (2 bytes).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAttributeValue()
      Get the 2-byte attribute value (known as the "attribute byte count") stored at the end of the STL facet definition binary representation.
      • Methods inherited from class java.lang.Object

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

      • attributeValue

        private final int attributeValue
        Attribute value for the facet (2 bytes).
    • Constructor Detail

      • BinaryStlFacetDefinition

        public BinaryStlFacetDefinition​(java.util.List<Vector3D> vertices,
                                        Vector3D normal,
                                        int attributeValue)
        Construct a new instance.
        Parameters:
        vertices - facet vertices
        normal - facet normal
        attributeValue - 2-byte attribute value
    • Method Detail

      • getAttributeValue

        public int getAttributeValue()
        Get the 2-byte attribute value (known as the "attribute byte count") stored at the end of the STL facet definition binary representation. This value is typically set to zero but non-standard implementations may choose to store other values here.

        The bytes are stored with the first byte in the upper portion (bits 8-15) of the int and the second byte in the lower portion (bits 0-7).

        Returns:
        2-byte attribute value for the facet