public interface Ray2d
Modifier and Type | Method and Description |
---|---|
static Ray2d |
create(Ray2d other)
Returns a deep copy of the given ray.
|
static Ray2d |
create(Vector2d origin,
Vector2d direction)
Returns a ray with the given origin and direction.
|
Vector2d |
getDirection()
Returns the direction of this ray.
|
Vector2d |
getOrigin()
Returns the origin of this ray.
|
Optional<MVector2d> |
intersect(Ray2d 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.
|
static Ray2d create(Ray2d other)
other
- the other raystatic Ray2d create(Vector2d origin, Vector2d direction)
origin
- the origin of the raydirection
- the direction of the rayVector2d getOrigin()
Vector2d getDirection()
boolean intersects(Ray2d ray)
ray
- the ray with which this ray is checked for intersectionOptional<MVector2d> intersect(Ray2d ray)
ray
- the ray with which this ray is checked for intersectionboolean intersects(AABB2d aabb)
aabb
- the axis-aligned bounding rectangle with which this is
checked for intersectionCopyright © 2019 Solibri, Inc.. All rights reserved.