Package com.solibri.geometry.primitive2d
Interface Ray2d
- All Known Subinterfaces:
MRay2d
public interface Ray2d
Read-only interface to handle 2-dimensional rays.
- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic Ray2d
Returns a ray with the given origin and direction.static Ray2d
Returns a deep copy of the given ray.Returns the direction of this ray.Returns the origin of this ray.Returns an optional containing the intersection point between the rays if present, an empty optional otherwise.boolean
intersects
(AABB2d aabb) Returns true if the ray intersects with the bounding rectangle, false otherwise.boolean
intersects
(Ray2d ray) Returns true if the rays intersect, 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
Vector2d getOrigin()Returns the origin of this ray.- Returns:
- the origin of this ray
- Since:
- 9.10.2
-
getDirection
Vector2d getDirection()Returns the direction of this ray.- Returns:
- the direction of this ray
- Since:
- 9.10.2
-
intersects
Returns true if the rays intersect, false otherwise.- Parameters:
ray
- the ray with which this ray is checked for intersection- Returns:
- true if the rays intersect, false otherwise
- Since:
- 9.10.2
-
intersect
Returns an optional containing the intersection point between the rays if present, an empty optional otherwise.- Parameters:
ray
- the ray with which this ray is checked for intersection- Returns:
- an optional containing the intersection point between the rays if present, an empty optional otherwise
- Since:
- 9.10.2
-
intersects
Returns true if the ray intersects with the bounding rectangle, false otherwise.- Parameters:
aabb
- the axis-aligned bounding rectangle with which this is checked for intersection- Returns:
- true if the ray intersects with the bounding rectangle, false otherwise
- Since:
- 9.10.2
-