AnyCAD Rapid SDK  2020
The Rapid CAD SDK
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Ray Class Reference

Public Member Functions

synchronized void delete ()
 
 Ray (Vector3 origin, Vector3 direction)
 
void setOrigin (Vector3 origin)
 
Vector3 getOrigin ()
 
void setDirection (Vector3 dir)
 
Vector3 getDirection ()
 
Vector3 getPoint (float t)
 
RayIntersect intersects (Plane p)
 
RayIntersect intersects (PlaneBoundedVolume p)
 
RayIntersect intersects (Sphere s)
 
RayIntersect intersects (AxisAlignedBox box)
 
boolean IsVertexOn (Vector3 vertex)
 
void applyMatrix (Matrix4 trf)
 
float projectPoint (Vector3 pt)
 

Protected Member Functions

 Ray (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 

Static Protected Member Functions

static long getCPtr (Ray obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

Representation of a ray in space,
i.e. a line with an origin and direction.

Member Function Documentation

Vector3 Ray.getDirection ( )

Gets the direction of the ray.

Vector3 Ray.getOrigin ( )

Gets the origin of the ray.

Vector3 Ray.getPoint ( float  t)

Gets the position of a point t units along the ray.

RayIntersect Ray.intersects ( Plane  p)

Tests whether this ray intersects the given plane.

Returns
A pair structure where the first element indicates whether
an intersection occurs, and if true, the second element will
indicate the distance along the ray at which it intersects.
This can be converted to a point in space by calling getPoint().
RayIntersect Ray.intersects ( PlaneBoundedVolume  p)

Tests whether this ray intersects the given plane bounded volume.

Returns
A pair structure where the first element indicates whether
an intersection occurs, and if true, the second element will
indicate the distance along the ray at which it intersects.
This can be converted to a point in space by calling getPoint().
RayIntersect Ray.intersects ( Sphere  s)

Tests whether this ray intersects the given sphere.

Returns
A pair structure where the first element indicates whether
an intersection occurs, and if true, the second element will
indicate the distance along the ray at which it intersects.
This can be converted to a point in space by calling getPoint().
RayIntersect Ray.intersects ( AxisAlignedBox  box)

Tests whether this ray intersects the given box.

Returns
A pair structure where the first element indicates whether
an intersection occurs, and if true, the second element will
indicate the distance along the ray at which it intersects.
This can be converted to a point in space by calling getPoint().
boolean Ray.IsVertexOn ( Vector3  vertex)

return true if the vertex is on the ray

void Ray.setDirection ( Vector3  dir)

Sets the direction of the ray.

void Ray.setOrigin ( Vector3  origin)

Sets the origin of the ray.