- Cal3D 0.11 API Reference -

Public Member Functions | Public Attributes | List of all members
CalVector Class Reference

The vector class. More...

#include <vector.h>

Public Member Functions

 CalVector (const CalVector &v)
 
 CalVector (float vx, float vy, float vz)
 
float & operator[] (unsigned int i)
 
const float & operator[] (unsigned int i) const
 
void operator= (const CalVector &v)
 
void operator+= (const CalVector &v)
 
void operator-= (const CalVector &v)
 
void operator*= (const float d)
 
void operator*= (const CalQuaternion &q)
 Constructs the vector instance.
 
void operator*= (const CalMatrix &m)
 
void operator/= (const float d)
 
bool operator== (const CalVector &v) const
 
bool operator!= (const CalVector &v) const
 
void blend (float d, const CalVector &v)
 
void clear ()
 
float length () const
 
float normalize ()
 
void set (float vx, float vy, float vz)
 

Public Attributes

float x
 
float y
 
float z
 

Detailed Description

The vector class.

Member Function Documentation

◆ operator*=()

void CalVector::operator*= ( const CalQuaternion & q)

Constructs the vector instance.

This function is the default constructor of the vector instance. Constructs the vector instance.

This function is a constructor of the vector instance.

Parameters
vThe vector to construct this vector instance from. Constructs the vector instance.

This function is a constructor of the vector instance.

Parameters
vxThe x component.
vyThe y component.
vzThe z component. Destructs the vector instance.

This function is the destructor of the vector instance. Provides access to the components of the vector instance.

This function provides read and write access to the three components of the vector instance.

Parameters
iThe index to the specific component.
Returns
A reference to the specific component. Provides access to the components of the vector instance.

This function provides read access to the three components of the vector instance.

Parameters
iThe index to the specific component.
Returns
A constant reference to the specific component. Equates the vector instance with another vector.

This operator equates the vector instance with another vector.

Parameters
vThe vector to equate the vector instance with. Adds another vector to the vector instance.

This operator adds another vector to the vector instance.

Parameters
vThe vector to be added. Subtracts another vector from the vector instance.

This operator subtracts another vector from the vector instance.

Parameters
vThe vector to be subtracted. Scales the vector instance.

This operator scales the vector instance by multiplying its components by a specific factor.

Parameters
dThe factor to multiply the vector components by. Transforms the vector instance by a quaternion.

This function transforms the vector instance by a given quaternion.

Parameters
qThe quaternion to be used for the transformation.

The documentation for this class was generated from the following files:

Generated by The Cal3D Team with Doxygen 1.10.0