C# Class BEPUutilities2.Toolbox

Helper class with many algorithms for intersection testing and 3D math.
Show file Open project: RossNordby/scratchpad

Public Properties

Property Type Description
BackVector Vector3
BigEpsilon float
DownVector Vector3
Epsilon float
ForwardVector Vector3
IdentityOrientation Quaternion
LeftVector Vector3
NoVector Vector3
RightVector Vector3
RigidIdentity RigidTransform
UpVector Vector3
ZeroVector Vector3

Public Methods

Method Description
FindRayTriangleIntersection ( Ray &ray, float maximumLength, TriangleSidedness sidedness, Vector3 &a, Vector3 &b, Vector3 &c, RayHit &hit ) : bool

Determines the intersection between a ray and a triangle.

FindRayTriangleIntersection ( Ray &ray, float maximumLength, Vector3 &a, Vector3 &b, Vector3 &c, bool &hitClockwise, RayHit &hit ) : bool

Determines the intersection between a ray and a triangle.

Private Methods

Method Description
GetVelocityOfPoint ( Vector3 point, Vector3 center, Vector3 linearVelocity, Vector3 angularVelocity ) : Vector3
GetVelocityOfPoint ( Vector3 &point, Vector3 &center, Vector3 &linearVelocity, Vector3 &angularVelocity, Vector3 &velocity ) : void

Method Details

FindRayTriangleIntersection() public static method

Determines the intersection between a ray and a triangle.
public static FindRayTriangleIntersection ( Ray &ray, float maximumLength, TriangleSidedness sidedness, Vector3 &a, Vector3 &b, Vector3 &c, RayHit &hit ) : bool
ray Ray Ray to test.
maximumLength float Maximum length to travel in units of the direction's length.
sidedness TriangleSidedness Sidedness of the triangle to test.
a Vector3 First vertex of the triangle.
b Vector3 Second vertex of the triangle.
c Vector3 Third vertex of the triangle.
hit RayHit Hit data of the ray, if any
return bool

FindRayTriangleIntersection() public static method

Determines the intersection between a ray and a triangle.
public static FindRayTriangleIntersection ( Ray &ray, float maximumLength, Vector3 &a, Vector3 &b, Vector3 &c, bool &hitClockwise, RayHit &hit ) : bool
ray Ray Ray to test.
maximumLength float Maximum length to travel in units of the direction's length.
a Vector3 First vertex of the triangle.
b Vector3 Second vertex of the triangle.
c Vector3 Third vertex of the triangle.
hitClockwise bool True if the the triangle was hit on the clockwise face, false otherwise.
hit RayHit Hit data of the ray, if any
return bool

Property Details

BackVector public static property

Reference for a vector with dimensions (0,0,1).
public static Vector3 BackVector
return Vector3

BigEpsilon public static property

Large tolerance value. Defaults to 1e-5f.
public static float BigEpsilon
return float

DownVector public static property

Reference for a vector with dimensions (0,-1,0).
public static Vector3 DownVector
return Vector3

Epsilon public static property

Tolerance value. Defaults to 1e-7f.
public static float Epsilon
return float

ForwardVector public static property

Reference for a vector with dimensions (0,0,-1).
public static Vector3 ForwardVector
return Vector3

IdentityOrientation public static property

Refers to the identity quaternion.
public static Quaternion IdentityOrientation
return Quaternion

LeftVector public static property

Reference for a vector with dimensions (-1,0,0).
public static Vector3 LeftVector
return Vector3

NoVector public static property

Represents an invalid Vector3.
public static Vector3 NoVector
return Vector3

RightVector public static property

Reference for a vector with dimensions (1,0,0).
public static Vector3 RightVector
return Vector3

RigidIdentity public static property

Refers to the rigid identity transformation.
public static RigidTransform,BEPUutilities2 RigidIdentity
return RigidTransform

UpVector public static property

Reference for a vector with dimensions (0,1,0).
public static Vector3 UpVector
return Vector3

ZeroVector public static property

Reference for a vector with dimensions (0,0,0).
public static Vector3 ZeroVector
return Vector3