Back to index

libsfml  1.6+dfsg2
Functions
Vector3.inl File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
Vector3< T > operator- (const Vector3< T > &V)
 Operator - overload ; returns the opposite of a vector /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > & operator+= (Vector3< T > &V1, const Vector3< T > &V2)
 Operator += overload ; add two vectors and assign to the first op /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > & operator-= (Vector3< T > &V1, const Vector3< T > &V2)
 Operator -= overload ; subtract two vectors and assign to the first op /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > operator+ (const Vector3< T > &V1, const Vector3< T > &V2)
 Operator + overload ; adds two vectors /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > operator- (const Vector3< T > &V1, const Vector3< T > &V2)
 Operator - overload ; subtracts two vectors /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > operator* (const Vector3< T > &V, T X)
 Operator * overload ; multiply a vector by a scalar value /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > operator* (T X, const Vector3< T > &V)
 Operator * overload ; multiply a scalar value by a vector /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > & operator*= (Vector3< T > &V, T X)
 Operator *= overload ; multiply-assign a vector by a scalar value /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > operator/ (const Vector3< T > &V, T X)
 Operator / overload ; divide a vector by a scalar value /////////////////////////////////////////////////////////.
template<typename T >
Vector3< T > & operator/= (Vector3< T > &V, T X)
 Operator /= overload ; divide-assign a vector by a scalar value /////////////////////////////////////////////////////////.
template<typename T >
bool operator== (const Vector3< T > &V1, const Vector3< T > &V2)
 Operator == overload ; compares the equality of two vectors /////////////////////////////////////////////////////////.
template<typename T >
bool operator!= (const Vector3< T > &V1, const Vector3< T > &V2)
 Operator != overload ; compares the difference of two vectors /////////////////////////////////////////////////////////.

Function Documentation

template<typename T >
bool operator!= ( const Vector3< T > &  V1,
const Vector3< T > &  V2 
)

Operator != overload ; compares the difference of two vectors /////////////////////////////////////////////////////////.

Definition at line 182 of file Vector3.inl.

{
    return (V1.x != V2.x) || (V1.y != V2.y) || (V1.z != V2.z);
}
template<typename T >
Vector3<T> operator* ( const Vector3< T > &  V,
X 
)

Operator * overload ; multiply a vector by a scalar value /////////////////////////////////////////////////////////.

Definition at line 114 of file Vector3.inl.

{
    return Vector3<T>(V.x * X, V.y * X, V.z * X);
}
template<typename T >
Vector3<T> operator* ( X,
const Vector3< T > &  V 
)

Operator * overload ; multiply a scalar value by a vector /////////////////////////////////////////////////////////.

Definition at line 124 of file Vector3.inl.

{
    return Vector3<T>(V.x * X, V.y * X, V.z * X);
}
template<typename T >
Vector3<T>& operator*= ( Vector3< T > &  V,
X 
)

Operator *= overload ; multiply-assign a vector by a scalar value /////////////////////////////////////////////////////////.

Definition at line 134 of file Vector3.inl.

{
    V.x *= X;
    V.y *= X;
    V.z *= X;

    return V;
}
template<typename T >
Vector3<T> operator+ ( const Vector3< T > &  V1,
const Vector3< T > &  V2 
)

Operator + overload ; adds two vectors /////////////////////////////////////////////////////////.

Definition at line 94 of file Vector3.inl.

{
    return Vector3<T>(V1.x + V2.x, V1.y + V2.y, V1.z + V2.z);
}
template<typename T >
Vector3<T>& operator+= ( Vector3< T > &  V1,
const Vector3< T > &  V2 
)

Operator += overload ; add two vectors and assign to the first op /////////////////////////////////////////////////////////.

Definition at line 66 of file Vector3.inl.

{
    V1.x += V2.x;
    V1.y += V2.y;
    V1.z += V2.z;

    return V1;
}
template<typename T >
Vector3<T> operator- ( const Vector3< T > &  V)

Operator - overload ; returns the opposite of a vector /////////////////////////////////////////////////////////.

Definition at line 56 of file Vector3.inl.

{
    return Vector3<T>(-V.x, -V.y, -V.z);
}
template<typename T >
Vector3<T> operator- ( const Vector3< T > &  V1,
const Vector3< T > &  V2 
)

Operator - overload ; subtracts two vectors /////////////////////////////////////////////////////////.

Definition at line 104 of file Vector3.inl.

{
    return Vector3<T>(V1.x - V2.x, V1.y - V2.y, V1.z - V2.z);
}
template<typename T >
Vector3<T>& operator-= ( Vector3< T > &  V1,
const Vector3< T > &  V2 
)

Operator -= overload ; subtract two vectors and assign to the first op /////////////////////////////////////////////////////////.

Definition at line 80 of file Vector3.inl.

{
    V1.x -= V2.x;
    V1.y -= V2.y;
    V1.z -= V2.z;

    return V1;
}
template<typename T >
Vector3<T> operator/ ( const Vector3< T > &  V,
X 
)

Operator / overload ; divide a vector by a scalar value /////////////////////////////////////////////////////////.

Definition at line 148 of file Vector3.inl.

{
    return Vector3<T>(V.x / X, V.y / X, V.z / X);
}
template<typename T >
Vector3<T>& operator/= ( Vector3< T > &  V,
X 
)

Operator /= overload ; divide-assign a vector by a scalar value /////////////////////////////////////////////////////////.

Definition at line 158 of file Vector3.inl.

{
    V.x /= X;
    V.y /= X;
    V.z /= X;

    return V;
}
template<typename T >
bool operator== ( const Vector3< T > &  V1,
const Vector3< T > &  V2 
)

Operator == overload ; compares the equality of two vectors /////////////////////////////////////////////////////////.

Definition at line 172 of file Vector3.inl.

{
    return (V1.x == V2.x) && (V1.y == V2.y) && (V1.z == V2.z);
}