33 :
x(rhs.
x),
y(rhs.
y),
z(rhs.
z),
w(_w) {}
43 const void*
ptr(
void)
const{
return &
x;}
74 return DtVector4<T>(x+fScalar, y+fScalar, z+fScalar, w+fScalar);
79 return DtVector4<T>(x-fScalar, y-fScalar, z-fScalar, w-fScalar);
85 return DtVector4<T>(x*fScalar, y*fScalar, z*fScalar, w*fScalar);
91 T OneByfScalar = T(1.0)/fScalar;
92 return DtVector4<T>(x*OneByfScalar, y*OneByfScalar, z*OneByfScalar, w*OneByfScalar);
110 const T* ptrT =
static_cast<const T*
>(ptr());
155 return this->operator*=(T(1.0)/fScalar);
159 inline std::ostream& operator <<( std::ostream& o, const DtVector4<T>& v )
161 o <<
"Vector4(" << v.x <<
", " << v.y <<
", " << v.z <<
", " << v.w <<
")";
const void * ptr(void) const
Definition: DtVector4.h:43
DtVector4 & operator-=(T fScalar)
Definition: DtVector4.h:133
~DtVector4()
DTOR.
Definition: DtVector4.h:41
T x
Definition: DtVector4.h:62
std::list< Vector4_32 > Vector4_32_List
Definition: DtVector4.h:68
DtVector4(const DtVector3< T > &rhs, T _w)
CTOR.
Definition: DtVector4.h:32
DtVector4 & operator*=(T fScalar)
Definition: DtVector4.h:143
DtVector4 operator+(T fScalar) const
Definition: DtVector4.h:72
DtVector4 operator/(T fScalar) const
Definition: DtVector4.h:89
4 dimensional vector
Definition: DtVector4.h:24
std::vector< Vector4_32 > Vector4_32_Vector
Definition: DtVector4.h:69
T operator[](size_t index) const
Definition: DtVector4.h:107
DtVector4(const T1 &v)
CTOR construct from type with constructable components.
Definition: DtVector4.h:38
T z
Definition: DtVector4.h:62
DtVector4 & operator+=(T fScalar)
Definition: DtVector4.h:123
bool isEqual(const DtVector4 &rhs, T tolerance) const
Definition: DtVector4.h:97
static size_t sizeInBytes(void)
Definition: DtVector4.h:166
T w
Definition: DtVector4.h:62
DtVector4 operator-(void) const
Definition: DtVector4.h:45
static bool isEqual(int32 lhs, int32 rhs, int32 tolerance=std::numeric_limits< int32 >::epsilon())
Test equality with tolerance.
DtVector4(T _x, T _y, T _z, T _w)
CTOR.
Definition: DtVector4.h:30
2 dimensional vector
Definition: DtVector3.h:26
DtVector4< float32 > Vector4_32
Definition: DtVector4.h:67
DtVector4()
CTOR.
Definition: DtVector4.h:28
DtVector4 operator*(T fScalar) const
Definition: DtVector4.h:83
#define ASSERT_PREDICATE(p)
Definition: DtAssert.h:28
T y
Definition: DtVector4.h:62
DtVector4 & operator/=(T fScalar)
Definition: DtVector4.h:153