public class SimpleFacetDefinition extends Object implements FacetDefinition
FacetDefinition
implementation that stores a list of vertices and
optional normal.Constructor and Description |
---|
SimpleFacetDefinition(List<Vector3D> vertices)
Construct a new instance with the given vertices and no defined normal.
|
SimpleFacetDefinition(List<Vector3D> vertices,
Vector3D normal)
Construct a new instance with the given vertices and normal.
|
Modifier and Type | Method and Description |
---|---|
Vector3D |
getNormal()
Get the normal defined for the facet or null if one has not been explicitly
specified.
|
List<Vector3D> |
getVertices()
Get the facet vertices.
|
String |
toString() |
public SimpleFacetDefinition(List<Vector3D> vertices)
vertices
- facet verticesIllegalArgumentException
- if vertices
contains fewer than 3 elementspublic SimpleFacetDefinition(List<Vector3D> vertices, Vector3D normal)
vertices
- facet verticesnormal
- facet normal; may be nullIllegalArgumentException
- if vertices
contains fewer than 3 elementspublic List<Vector3D> getVertices()
getVertices
in interface FacetDefinition
public Vector3D getNormal()
getNormal
in interface FacetDefinition
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.