Package com.solibri.geometry.primitive3d
Interface Triangle3d
- All Known Subinterfaces:
MTriangle3d
Read-only interface for 3-dimensional triangles.
- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic Triangle3d
Creates a new instance.static Triangle3d
create(Triangle3d other)
Creates a new instance.static Triangle3d
Creates a new instance.Returns the axis-aligned bounding box of this triangle.Returns the cross product of this triangle.Returns the first point of the triangle.Returns the second point of the triangle.Returns the third point of the triangle.Returns an optional with the intersection point between the triangle and the line if present, otherwise an empty optional.Returns an optional with the intersection point between the triangle and the ray if present, otherwise an empty optional.boolean
intersects(Line3d line)
Returns true if the triangle intersects the given line.boolean
intersects(MTriangle3d triangle)
Returns true if the triangles intersect, false otherwise.boolean
intersects(Ray3d ray)
Returns true if the triangle intersects the given ray.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface com.solibri.geometry.primitive3d.Polygon3d
contains, contains, edgesIntersect, getArea, getCentroid, getEdgeIterator, getMean, getNormal, getVertexCount, getVertices, intersect, intersects, isConvex
-
Method Details
-
getFirstPoint
Vector3d getFirstPoint()Returns the first point of the triangle.- Returns:
- the first point of the triangle
- Since:
- 9.10.2
-
getSecondPoint
Vector3d getSecondPoint()Returns the second point of the triangle.- Returns:
- the second point of the triangle
- Since:
- 9.10.2
-
getThirdPoint
Vector3d getThirdPoint()Returns the third point of the triangle.- Returns:
- the third point of the triangle
- Since:
- 9.10.2
-
getCrossProduct
MVector3d getCrossProduct()Returns the cross product of this triangle. The resulting vector is not normalized.- Returns:
- the cross product resulting vector
- Since:
- 9.10.2
-
intersects
Returns true if the triangle intersects the given ray.- Parameters:
ray
- the ray- Returns:
- true if they intersect, false otherwise
- Since:
- 9.10.2
-
intersect
Returns an optional with the intersection point between the triangle and the ray if present, otherwise an empty optional.- Parameters:
ray
- the ray- Returns:
- an optional with the intersection point if existing, otherwise an empty optional
- Since:
- 9.10.2
-
intersects
Returns true if the triangle intersects the given line.- Parameters:
line
- the line- Returns:
- true if they intersect, false otherwise
- Since:
- 9.10.2
-
intersect
Returns an optional with the intersection point between the triangle and the line if present, otherwise an empty optional.- Parameters:
line
- the line- Returns:
- an optional with the intersection point if existing, otherwise an empty optional
- Since:
- 9.10.2
-
getBoundingBox
AABB3d getBoundingBox()Returns the axis-aligned bounding box of this triangle.- Specified by:
getBoundingBox
in interfacePolygon3d
- Returns:
- the axis-aligned bounding box of this triangle
- Since:
- 9.10.2
-
intersects
Returns true if the triangles intersect, false otherwise.- Parameters:
triangle
- the triangle- Returns:
- true if the triangles intersect, false otherwise
- Since:
- 9.10.2
-
create
Creates a new instance.- Parameters:
points
- list of points- Returns:
- the newly created instance
- Throws:
IllegalArgumentException
- if the list does not contain exactly three points- Since:
- 9.10.2
-
create
Creates a new instance.- Parameters:
firstPoint
- the first pointsecondPoint
- the second pointthirdPoint
- the thirdPoint- Returns:
- the newly created instance
- Throws:
IllegalArgumentException
- if the list does not contain exactly three points- Since:
- 9.10.2
-
create
Creates a new instance.- Parameters:
other
- the other triangle- Returns:
- the newly created instance
- Since:
- 9.10.2
-