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
Facet definition class that provides access to the 2-byte attribute value
stored with each triangle in the binary STL format.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Attribute value for the facet (2 bytes). -
Constructor Summary
ConstructorsConstructorDescriptionBinaryStlFacetDefinition
(List<Vector3D> vertices, Vector3D normal, int attributeValue) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionint
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
-
Field Details
-
attributeValue
private final int attributeValueAttribute value for the facet (2 bytes).
-
-
Constructor Details
-
BinaryStlFacetDefinition
Construct a new instance.- Parameters:
vertices
- facet verticesnormal
- facet normalattributeValue
- 2-byte attribute value
-
-
Method Details
-
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
-