AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
RayF类 参考

Public 成员函数

 RayF (Vector3 origin, Vector3 direction)
 
void setOrigin (Vector3 origin)
 
Vector3 getOrigin ()
 
void setDirection (Vector3 dir)
 
Vector3 getDirection ()
 
Vector3 getPoint (float t)
 
RayIntersectF intersects (PlaneF p)
 
RayIntersectF intersects (BoundedVolume p)
 
RayIntersectF intersects (SphereF s)
 
RayIntersectF intersects (AABoxF box)
 
boolean IsVertexOn (Vector3 vertex)
 
void applyMatrix (Matrix4 trf)
 
float projectPoint (Vector3 pt)
 

详细描述

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

成员函数说明

◆ getDirection()

Vector3 RayF.getDirection ( )

Gets the direction of the ray.

◆ getOrigin()

Vector3 RayF.getOrigin ( )

Gets the origin of the ray.

◆ getPoint()

Vector3 RayF.getPoint ( float t)

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

◆ intersects() [1/4]

RayIntersectF RayF.intersects ( AABoxF box)

Tests whether this ray intersects the given box.

返回
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().

◆ intersects() [2/4]

RayIntersectF RayF.intersects ( BoundedVolume p)

Tests whether this ray intersects the given plane bounded volume.

返回
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().

◆ intersects() [3/4]

RayIntersectF RayF.intersects ( PlaneF p)

Tests whether this ray intersects the given plane.

返回
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().

◆ intersects() [4/4]

RayIntersectF RayF.intersects ( SphereF s)

Tests whether this ray intersects the given sphere.

返回
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().

◆ IsVertexOn()

boolean RayF.IsVertexOn ( Vector3 vertex)

return true if the vertex is on the ray

◆ setDirection()

void RayF.setDirection ( Vector3 dir)

Sets the direction of the ray.

◆ setOrigin()

void RayF.setOrigin ( Vector3 origin)

Sets the origin of the ray.