Package com.solibri.geometry.primitive3d
Interface Ray3d
- All Known Subinterfaces:
MRay3d
public interface Ray3d
Read-only interface to handle 3-dimensional rays.
- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic Ray3d
Returns a ray with the given origin and direction.static Ray3d
Returns a deep copy of the given ray.Returns the direction of this ray.Returns the origin of this ray.intersect(Triangle3d triangle)
Returns an optional containing the intersection point between the ray and the triangle if present, an empty optional otherwise.boolean
intersects(AABB3d aabb)
Returns true if the ray intersects with the box, false otherwise.boolean
intersects(Triangle3d triangle)
Returns true if the ray intersects with the triangle, false otherwise.
-
Method Details
-
create
Returns a deep copy of the given ray.- Parameters:
other
- the other ray- Returns:
- a deep copy of the given ray
- Since:
- 9.10.2
-
create
Returns a ray with the given origin and direction.- Parameters:
origin
- the origin of the raydirection
- the direction of the ray- Returns:
- a ray with the given origin and direction
- Since:
- 9.10.2
-
getOrigin
Vector3d getOrigin()Returns the origin of this ray.- Returns:
- the origin of this ray
- Since:
- 9.10.2
-
getDirection
Vector3d getDirection()Returns the direction of this ray.- Returns:
- the direction of this ray
- Since:
- 9.10.2
-
intersects
Returns true if the ray intersects with the box, false otherwise.- Parameters:
aabb
- the axis-aligned bounding box- Returns:
- true if the ray intersects with the box, false otherwise
- Since:
- 9.10.2
-
intersects
Returns true if the ray intersects with the triangle, false otherwise.- Parameters:
triangle
- the triangle- Returns:
- true if the ray intersects with the triangle, false otherwise
- Since:
- 9.10.2
-
intersect
Returns an optional containing the intersection point between the ray and the triangle if present, an empty optional otherwise.- Parameters:
triangle
- the triangle- Returns:
- an optional containing the intersection point between the ray and the triangle if present, an empty optional otherwise
-