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
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Ray3d
create(Vector3d origin, Vector3d direction)
Returns a ray with the given origin and direction.static Ray3d
create(Ray3d other)
Returns a deep copy of the given ray.Vector3d
getDirection()
Returns the direction of this ray.Vector3d
getOrigin()
Returns the origin of this ray.Optional<MVector3d>
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 Detail
-
create
static Ray3d create(Ray3d other)
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
static Ray3d create(Vector3d origin, Vector3d direction)
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
boolean intersects(AABB3d aabb)
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
boolean intersects(Triangle3d triangle)
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
Optional<MVector3d> intersect(Triangle3d triangle)
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
-
-