60 : x( fX ), y( fY ), z( fZ ), w( fW )
65 : x( afCoordinate[0] ),
72 inline explicit Vector4(
const int afCoordinate[4] )
74 x = (
Real)afCoordinate[0];
75 y = (
Real)afCoordinate[1];
76 z = (
Real)afCoordinate[2];
77 w = (
Real)afCoordinate[3];
81 : x( r[0] ), y( r[1] ), z( r[2] ), w( r[3] )
94 : x(rhs.x), y(rhs.y), z(rhs.z), w(1.0f)
108 inline Real operator [] (
const size_t i )
const
115 inline Real& operator [] (
const size_t i )
158 return ( x == rkVector.
x &&
166 return ( x != rkVector.
x ||
220 assert( fScalar != 0.0 );
222 Real fInv = 1.0f / fScalar;
247 return Vector4(-x, -y, -z, -w);
253 fScalar * rkVector.
x,
254 fScalar * rkVector.
y,
255 fScalar * rkVector.
z,
256 fScalar * rkVector.
w);
262 fScalar / rkVector.
x,
263 fScalar / rkVector.
y,
264 fScalar / rkVector.
z,
265 fScalar / rkVector.
w);
364 assert( fScalar != 0.0 );
366 Real fInv = 1.0f / fScalar;
395 return x * vec.
x + y * vec.
y + z * vec.
z + w * vec.
w;
404 inline _OgreExport friend std::ostream&
operator <<
407 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)
Vector4()
Default constructor.
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++)