56 : x( fX ), y( fY ), z( fZ ), w( fW)
61 : x( afCoordinate[0] ),
68 inline explicit Vector4(
const int afCoordinate[4] )
70 x = (
Real)afCoordinate[0];
71 y = (
Real)afCoordinate[1];
72 z = (
Real)afCoordinate[2];
73 w = (
Real)afCoordinate[3];
77 : x( r[0] ), y( r[1] ), z( r[2] ), w( r[3] )
90 : x(rhs.x), y(rhs.y), z(rhs.z), w(1.0f)
104 inline Real operator [] (
const size_t i )
const
111 inline Real& operator [] (
const size_t i )
154 return ( x == rkVector.
x &&
162 return ( x != rkVector.
x ||
216 assert( fScalar != 0.0 );
218 Real fInv = 1.0f / fScalar;
243 return Vector4(-x, -y, -z, -w);
249 fScalar * rkVector.
x,
250 fScalar * rkVector.
y,
251 fScalar * rkVector.
z,
252 fScalar * rkVector.
w);
258 fScalar / rkVector.
x,
259 fScalar / rkVector.
y,
260 fScalar / rkVector.
z,
261 fScalar / rkVector.
w);
360 assert( fScalar != 0.0 );
362 Real fInv = 1.0f / fScalar;
391 return x * vec.
x + y * vec.
y + z * vec.
z + w * vec.
w;
400 inline _OgreExport friend std::ostream&
operator <<
403 o <<
"Vector4(" << v.x <<
", " << v.y <<
", " << v.z <<
", " << v.w <<
")";
float Real
Software floating point type.
Vector4(const Real fX, const Real fY, const Real fZ, const Real fW)
Vector4(const Real afCoordinate[4])
Radian operator*(Real a, const Radian &b)
Radian operator/(Real a, const Radian &b)
Vector4(const int afCoordinate[4])
Real * ptr()
Pointer accessor for direct copying.
const Real * ptr() const
Pointer accessor for direct copying.
Vector4(const Vector3 &rhs)
void swap(Ogre::SmallVectorImpl< T > &LHS, Ogre::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
Standard 3-dimensional vector.
Real dotProduct(const Vector4 &vec) const
Calculates the dot (scalar) product of this vector with another.
void swap(Vector4 &other)
Exchange the contents of this vector with another.
Vector4(const Real scaler)
static bool isNaN(Real f)
static const Vector4 ZERO
4-dimensional homogeneous vector.
bool isNaN() const
Check whether this vector contains valid values.
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)