RaySupreme Script API
 All Data Structures Functions Pages
Public Member Functions
Vector3 Class Reference

Public Member Functions

 Vector3 (float x, float y, float z)
 
float x (void)
 
float y (void)
 
float z (void)
 
void set (float x, float y, float z)
 
float index (int offset)
 
void transform (const TransMatrix &matrix)
 
Vector3transformed (const TransMatrix &matrix)
 

Detailed Description

The Vector3 class represents a 3D vector.

Constructor & Destructor Documentation

Vector3::Vector3 ( float  x,
float  y,
float  z 
)

Constructs a new Vector3 instance.

Parameters
xThe x-coordinate of the Vector3.
yThe y-coordinate of the Vector3.
zThe z-coordinate of the Vector3.

Member Function Documentation

float Vector3::index ( int  offset)

Returns the value at the given coordinate offset (0=x, 1=y, 2=z).

Parameters
offsetThe offset for the coordinate value to return.
Returns
The coordinate value at the given offset.
void Vector3::set ( float  x,
float  y,
float  z 
)

Sets the x,y,z values of the Vector3.

Parameters
xThe x-value.
yThe y-value.
zThe z-value.
void Vector3::transform ( const TransMatrix matrix)

Transforms this Vector3 instance with the given TransMatrix.

Parameters
matixThe TransMatrix which will be used for the transformation.
Vector3* Vector3::transformed ( const TransMatrix matrix)

Transforms a new instance of the Vector3 with the given TransMatrix and returns it.

Parameters
matixThe TransMatrix which will be used for the transformation.
Returns
The new Vector3 which has the transformation matrix applied.
float Vector3::x ( void  )

Returns the x-coordinate of the Vector3.

Returns
The x-coordinate.
float Vector3::y ( void  )

Returns the y-coordinate of the Vector3.

Returns
The y-coordinate.
float Vector3::z ( void  )

Returns the z-coordinate of the Vector3.

Returns
The z-coordinate.