public interface Ray3d
Modifier and Type | Method and Description |
---|---|
static Ray3d |
create(Ray3d other)
Returns a deep copy of the given ray.
|
static Ray3d |
create(Vector3d origin,
Vector3d direction)
Returns a ray with the given origin and direction.
|
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.
|
static Ray3d create(Ray3d other)
other
- the other raystatic Ray3d create(Vector3d origin, Vector3d direction)
origin
- the origin of the raydirection
- the direction of the rayVector3d getOrigin()
Vector3d getDirection()
boolean intersects(AABB3d aabb)
aabb
- the axis-aligned bounding boxboolean intersects(Triangle3d triangle)
triangle
- the triangleOptional<MVector3d> intersect(Triangle3d triangle)
triangle
- the triangleCopyright © 2019 Solibri, Inc.. All rights reserved.