Fovia C++ In-Process API
Public Member Functions | Public Attributes | List of all members
VECTOR3L Struct Reference

Public Member Functions

VECTOR3L add (const VECTOR3L &var)
 
void assign (const VECTOR3L &copy)
 
VECTOR3L cross (const VECTOR3L &op)
 
double dot (VECTOR3L op)
 
double length ()
 
VECTOR3L operator+ (const VECTOR3L &var)
 
VECTOR3L operator- (const VECTOR3L &var)
 
VECTOR3Loperator= (const VECTOR3L &r)
 
VECTOR3L scale (const double scalar)
 
VECTOR3L sub (const VECTOR3L &var)
 
std::string toString ()
 
 VECTOR3L ()
 
 VECTOR3L (const VECTOR3L &copy)
 
 VECTOR3L (signed int nx, signed int ny, signed int nz)
 

Public Attributes

signed int x
 
signed int y
 
signed int z
 

Detailed Description

3D vector type that works with 32-bit integers.

$ \left|x y z \right| $

Constructor & Destructor Documentation

VECTOR3L::VECTOR3L ( )
inline

Constructs a VECTOR3L. Does not initialize the member fields.

VECTOR3L::VECTOR3L ( const VECTOR3L copy)
inline

Copies the values in copy to a new VECTOR3L.

Parameters
copyThe VECTOR3L to copy.

References assign().

VECTOR3L::VECTOR3L ( signed int  nx,
signed int  ny,
signed int  nz 
)
inline

Constructs a new VECTOR3L with the values nx, ny and nz in x, y and z respectively.

Parameters
nxThe new x value.
nyThe new y value.
nzThe new z value.

Member Function Documentation

VECTOR3L VECTOR3L::add ( const VECTOR3L var)
inline

Adds this vector to the vector var and returns the result.

Parameters
varThe value that will be added to this vector.
Returns
The result of the add operation.

References x, y, and z.

void VECTOR3L::assign ( const VECTOR3L copy)
inline

Assigns the values contained in copy to this object.

Parameters
copyThe VECTOR3L to assign to this object.

Referenced by VECTOR3L().

VECTOR3L VECTOR3L::cross ( const VECTOR3L op)
inline

Performs a cross product with the VECTOR3L op and returns the result.

Parameters
opThe right side of the cross product operation.
Returns
The result of the cross product.

References x, y, and z.

double VECTOR3L::dot ( VECTOR3L  op)
inline

Returns the result of the dot product of this object with the VECTOR3L op. This is equal to the cosine of the angle between the two vectors.

Parameters
opThe right side of the dot product operation.
Returns
The result of the dot product.

References x, y, and z.

double VECTOR3L::length ( )
inline

Returns the length of the vector.

Returns
The length of this vector.
VECTOR3L VECTOR3L::scale ( const double  scalar)
inline

Multiplies each member of this vector by the value scalar and returns the result in a new vector.

Parameters
scalarThe value by which to multiply each member.
Returns
The result of the scale operation.
VECTOR3L VECTOR3L::sub ( const VECTOR3L var)
inline

Subtracts the vector var from this vector and returns the result.

Parameters
varThe value that will be subtracted from this vector.
Returns
The result of the subtract operation.

References x, y, and z.

std::string VECTOR3L::toString ( )
inline

Creates a string with the contents of this object.

Returns
The string describing the object.

Member Data Documentation

signed int VECTOR3L::x

The x value.

Referenced by add(), cross(), dot(), and sub().

signed int VECTOR3L::y

The y value.

Referenced by add(), cross(), dot(), and sub().

signed int VECTOR3L::z

The z value.

Referenced by add(), cross(), dot(), and sub().