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 )
156 inline bool operator == (
const Vector4& rkVector )
const
158 return (
x == rkVector.
x &&
164 inline bool operator != (
const Vector4& rkVector )
const
166 return (
x != rkVector.
x ||
220 assert( fScalar != 0.0 );
222 Real fInv = 1.0f / fScalar;
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;
405 ( std::ostream& o,
const Vector4& v )
407 o <<
"Vector4(" << v.x <<
", " << v.y <<
", " << v.z <<
", " << v.w <<
")";
static bool isNaN(Real f)
Standard 3-dimensional vector.
Vector4(const Vector3 &rhs)
Real * ptr()
Pointer accessor for direct copying.
const Real * ptr() const
Pointer accessor for direct copying.
Vector4(const Real afCoordinate[4])
static const Vector4 ZERO
Vector4(const Real fX, const Real fY, const Real fZ, const Real fW)
Vector4(const int afCoordinate[4])
void swap(Vector4 &other)
Exchange the contents of this vector with another.
Real dotProduct(const Vector4 &vec) const
Calculates the dot (scalar) product of this vector with another.
Vector4(const Real scaler)
Vector4()
Default constructor.
bool isNaN() const
Check whether this vector contains valid values.
float Real
Software floating point type.
void swap(Ogre::SmallVectorImpl< T > &LHS, Ogre::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.