Vector3C
Vector3C class defines a three dimensional vector class which is used by the Demopaja system. The vector class implements standard set of methods and overdriven opertators for easy use.
This class is implemented by the system.
Header: | Vector3C.h |
Library: | core.lib |
Vector3C(
|
Creates a new vector with the values as the arguments.
Vector3C(
|
Copy constructor. Creates a new vector with the same values as the argument.
Vector3C(
|
Creates a new vector with the values as the array pointed by the argument.
float32& operator[](
|
const float32& operator[](
|
Reference to the component pointed by the index.
The index values from 0 to 2 corresponds to components X, Y, and Z respectively. There are two versions of this method, the first enables to assign values and the second is for retrieving the values.
Vector3C operator-() const;
|
Negated vector.
bool operator==(
|
True if both vectors are equal, else false.
bool operator!=(
|
True if both vectors are not equal, else false.
Vector3C& operator-=(
|
Substracts the vector specified by argument from the vector and stores the result.
Vector3C& operator+=(
|
Adds the vector specified by argument from the vector and stores the result.
Vector3C& operator*=(
|
Multiplies the vector by a scalar value specified by the argument and stores the result.
Vector3C& operator/=(
|
Divides the vector by a scalar value specified by the argument and stores the result.
Vector3C operator*(
|
Multiplies the vector by a scalar value specified by the argument and returns the result.
Vector3C operator/(
|
Divides the vector by a scalar value specified by the argument and returns the result.
Vector3C operator-(
|
Substracts the vector specified by argument from the vector and returns the result.
Vector3C operator+(
|
Adds the vector specified by argument from the vector and returns the result.
Vector3C operator*(
|
Multiplies the vector specified by argument from the vector and returns the result. The multiplication is done component vise (that is, each corresponding component is multiplied).
friend Vector3C operator*(
|
Multiplies the vector by a scalar value specified by the argument and returns the result.
Vector3C normalize() const;
|
The normalized vector.
Normalizes the vector to unit size and returns the result.
float32 length() const;
|
Returns the length of the vector
float32 dot(
|
Computes the dot product of the two vectors and returns the result.
Vector3C cross(
|
Computes the cross product of the two vectors and returns the result.
Copyright © 2000 Moppi Productions