71 cVector3(
const tFloat64 f64X,
const tFloat64 f64Y,
const tFloat64 f64Z)
73 Set(f64X, f64Y, f64Z);
101 OPT_INLINE
void Set(
const tFloat64 Value)
113 OPT_INLINE
void Set(
const tFloat64 f64X,
const tFloat64 f64Y,
const tFloat64 f64Z)
157 OPT_INLINE
void Scale(
const tFloat64 Value)
200 return *
this * Vector;
212 return (tFloat64) sqrt(
x *
x +
y *
y +
z *
z);
241 printf(
"%05.2f\n",
x);
242 printf(
"%05.2f\n",
y);
243 printf(
"%05.2f\n",
z);
369 return cVector3(v1.
y * v2.
z - v1.
z * v2.
y, v1.
z * v2.
x - v1.
x * v2.
z, v1.
x * v2.
y - v1.
y * v2.
x);
447 if (v1.
x == v2.
x && v1.
y == v2.
y && v1.
z == v2.
z)
463 if (v1.
x == v2.
x && v1.
y == v2.
y && v1.
z == v2.
z)
476 return static_cast<IVector3*
>(
this);
487using dengar::cVector3;
virtual tFloat64 GetY() const =0
virtual tFloat64 GetZ() const =0
virtual tFloat64 GetX() const =0
OPT_INLINE void Sub(const cVector3 &Vector)
Subtract the given vector from the current one.
OPT_INLINE void Zero()
Set vector to zero.
OPT_INLINE void Set(const tFloat64 Value)
Set vector to the given value.
tVoid Release()
Releases this vector.
cVector3 operator-(void)
Negate the current vector.
tVoid SetZ(tFloat64 f64ZValue)
Set the current z value to the given one.
friend cVector3 operator*(const tFloat64 s, const cVector3 &v)
Scalar product of vector and scalar.
OPT_INLINE void Scale(const tFloat64 Value)
Scale the current vector by the given value.
static const tFloat64 oneScalar
scalar identity value
friend bool operator==(const cVector3 &v1, const cVector3 &v2)
Comparison for equality of two vectors.
OPT_INLINE void Set(const cVector3 &Vector)
Set vector to the given value.
friend cVector3 operator+(const cVector3 &v1, const cVector3 &v2)
Add two vectors.
friend cVector3 operator/(const cVector3 &v, const tFloat64 s)
Divide vector through scalar.
cVector3 operator=(const cVector3 &v)
Set the current vector to the given one.
tFloat64 GetY() const
gets the value of the y component
cVector3(const IVector3 *pVector3)
constructor from IVector3
OPT_INLINE cVector3 Multiply(const cVector3 &Vector) const
Cross product of the current vector and the given one.
void Dump()
Dump the current vector to stdout.
tFloat64 GetZ() const
gets the value of the z component
friend void operator-=(cVector3 &v1, const cVector3 &v2)
Subtraction of two vectors.
friend bool operator!=(const cVector3 &v1, const cVector3 &v2)
Comparison for inequality of two vectors.
tFloat64 x
X coordinate of vector.
friend void operator+=(cVector3 &v1, const cVector3 &v2)
Add two vectors.
cVector3(const tFloat64 f64X, const tFloat64 f64Y, const tFloat64 f64Z)
Constructor.
tFloat Length() const
Calculate the length of the current vector.
friend cVector3 operator-(const cVector3 &v1, const cVector3 &v2)
Subtract two vectors.
tVoid SetY(tFloat64 f64YValue)
Set the current y value to the given one.
tFloat64 z
Z coordinate of vector.
OPT_INLINE void Scale(const cVector3 &Vector)
Scale the current vector by the given one.
friend cVector3 operator*(const cVector3 &v1, const cVector3 &v2)
Cross-product of two vectors.
static const tFloat64 nullScalar
scalar null value
tVoid SetX(tFloat64 f64XValue)
Set the current x value to the given one.
OPT_INLINE void Add(const cVector3 &Vector)
Add the given vector to the current one.
static const cVector3 One
Identity vector.
OPT_INLINE cVector3 Scalar(const cVector3 &Vector) const
Multiply every coordinate of the current vector with the corresponding coordinate from the given one.
tFloat64 y
Y coordinate of vector.
friend cVector3 operator*(const cVector3 &v, const tFloat64 s)
Scalar product of vector and scalar.
OPT_INLINE void Set(const tFloat64 f64X, const tFloat64 f64Y, const tFloat64 f64Z)
Set vector to the given value.
tFloat64 GetX() const
gets the value of the x component
static const cVector3 Null
Null vector.
void Normalize()
Normalize the current vector so that the length becomes one.
Namespace for functionality provided by the Display Toolbox.
Copyright © Audi Electronics Venture GmbH.