Class BinaryStlFacetDefinition
- java.lang.Object
-
- org.apache.commons.geometry.io.euclidean.threed.SimpleFacetDefinition
-
- org.apache.commons.geometry.io.euclidean.threed.stl.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).
-
Constructor Summary
Constructors Constructor Description BinaryStlFacetDefinition(java.util.List<Vector3D> vertices, Vector3D normal, int attributeValue)
Construct a new instance.
-
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 org.apache.commons.geometry.io.euclidean.threed.SimpleFacetDefinition
getNormal, getVertices, toString
-
-
-
-
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
-
-