#include <Vector4.hpp>
Inheritance diagram for se_core::Vector4:
Public Types | |
typedef coor_t | value_type |
the type for values | |
typedef short | size_type |
the type for index | |
enum | { DIMENSION = 4 } |
dimension More... | |
Public Member Functions | |
Vector4 (coor_t x, coor_t y, coor_t z, coor_t w) | |
Constructs and initializes a Vector4 from the specified xyzw coordinates. | |
Vector4 (const coor_t v[]) | |
Constructs and initializes a Vector4 from the specified array of length 4. | |
Vector4 (const Tuple4 &t1) | |
Constructs and initializes a Vector4 from the specified Tuple4d. | |
Vector4 () | |
Constructs and initializes a Vector4 to (0,0,0,0). | |
Vector4 (const Tuple3 &t1) | |
Constructs and initializes a Vector4 from the specified Tuple3. | |
void | set3 (const Tuple3 &t1) |
Sets the x,y,z components of this point to the corresponding components of tuple t1. | |
coor_double_t | lengthSquared () const |
Returns the squared length of this vector. | |
coor_t | length () const |
Returns the length of this vector. | |
coor_t | dot (const Vector4 &v1) const |
Computes the dot product of the this vector and vector v1. | |
void | normalize (const Vector4 &v1) |
Sets the value of this vector to the normalization of vector v1. | |
void | normalize () |
Normalizes this vector in place. | |
bray_t | angle (const Vector4 &v1) const |
Returns the (4-space) angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI]. | |
Vector4 & | operator= (const Tuple4 &t) |
void | set (coor_t xvalue, coor_t yvalue, coor_t zvalue, coor_t wvalue) |
Sets the value of this tuple to the specified xyzw coordinates. | |
void | set (const coor_t t[]) |
Sets the value of this tuple from the 4 values specified in the array. | |
void | set (const Tuple4 &t1) |
Sets the value of this tuple to the value of tuple t1. | |
void | get (coor_t t[]) const |
Copies the value of the elements of this tuple into the array t[]. | |
void | get (Tuple4 *t) const |
Gets the value of this tuple and copies the values into the Tuple4. | |
void | add (const Tuple4 &t1, const Tuple4 &t2) |
Sets the value of this tuple to the vector sum of tuples t1 and t2. | |
void | add (const Tuple4 &t1) |
Sets the value of this tuple to the vector sum of itself and tuple t1. | |
void | sub (const Tuple4 &t1, const Tuple4 &t2) |
Sets the value of this tuple to the vector difference of tuple t1 and t2 (this = t1 - t2). | |
void | sub (const Tuple4 &t1) |
Sets the value of this tuple to the vector difference of itself and tuple t1 (this = this - t1). | |
void | negate (const Tuple4 &t1) |
Sets the value of this tuple to the negation of tuple t1. | |
void | negate () |
Negates the value of this vector in place. | |
void | scale (scale_t s, const Tuple4 &t1) |
Sets the value of this tuple to the scalar multiplication of tuple t1. | |
void | scale (scale_t s) |
Sets the value of this tuple to the scalar multiplication of itself. | |
void | scaleAdd (scale_t s, const Tuple4 &t1, const Tuple4 &t2) |
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2). | |
void | scaleAdd (scale_t s, const Tuple4 &t1) |
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1). | |
bool | equals (const Tuple4 &t1) const |
Returns true if all of the data members of Tuple4 t1 are equal to the corresponding data members in this. | |
bool | isNan () const |
bool | epsilonEquals (const Tuple4 &t1, coor_t epsilon) const |
Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false. | |
void | clamp (coor_t min, coor_t max, const Tuple4 &t) |
Clamps the tuple parameter to the range [low, high] and places the values into this tuple. | |
void | clamp (coor_t min, coor_t max) |
Clamps this tuple to the range [low, high]. | |
void | clampMin (coor_t min, const Tuple4 &t) |
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple. | |
void | clampMin (coor_t min) |
Clamps the minimum value of this tuple to the min parameter. | |
void | clampMax (coor_t max, const Tuple4 &t) |
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple. | |
void | clampMax (coor_t max) |
Clamps the maximum value of this tuple to the max parameter. | |
void | absolute (const Tuple4 &t) |
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple. | |
void | absolute () |
Sets each component of this tuple to its absolute value. | |
void | interpolate (const Tuple4 &t1, const Tuple4 &t2, scale_t alpha) |
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2. | |
void | interpolate (const Tuple4 &t1, scale_t alpha) |
Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1. | |
char * | toString (char *buffer) const |
Returns a string that contains the values of this Tuple4. | |
const char * | toLog () const |
bool | operator== (const Tuple4 &t1) const |
coor_t | operator[] (size_type index) const |
coor_t & | operator[] (size_type index) |
Tuple4 & | operator+= (const Tuple4 &t1) |
Tuple4 & | operator-= (const Tuple4 &t1) |
Tuple4 & | operator *= (scale_t s) |
Tuple4 | operator+ (const Tuple4 &t1) const |
Tuple4 | operator- (const Tuple4 &t1) const |
Tuple4 | operator * (scale_t s) const |
Public Attributes | |
coor_t | x_ |
The x coordinate. | |
coor_t | y_ |
The y coordinate. | |
coor_t | z_ |
The z coordinate. | |
coor_t | w_ |
The w coordinate. |
Definition at line 30 of file Vector4.hpp.
|
the type for index
Definition at line 47 of file Tuple4.hpp. |
|
the type for values
Definition at line 43 of file Tuple4.hpp. |
|
dimension
Definition at line 51 of file Tuple4.hpp. |
|
Constructs and initializes a Vector4 from the specified xyzw coordinates.
Definition at line 39 of file Vector4.hpp. |
|
Constructs and initializes a Vector4 from the specified array of length 4.
Definition at line 45 of file Vector4.hpp. |
|
Constructs and initializes a Vector4 from the specified Tuple4d.
Definition at line 51 of file Vector4.hpp. |
|
Constructs and initializes a Vector4 to (0,0,0,0).
Definition at line 56 of file Vector4.hpp. |
|
Constructs and initializes a Vector4 from the specified Tuple3. The x,y,z components of this point are set to the corresponding components of tuple t1. The w component of this point is set to 0.
Definition at line 67 of file Vector4.hpp. |
|
Sets each component of this tuple to its absolute value.
Definition at line 380 of file Tuple4.hpp. |
|
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
Definition at line 332 of file Tuple4.hpp. |
|
Sets the value of this tuple to the vector sum of itself and tuple t1.
Definition at line 169 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Sets the value of this tuple to the vector sum of tuples t1 and t2.
Definition at line 158 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. Referenced by se_core::ViewPoint::add(). |
|
Returns the (4-space) angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI].
Definition at line 148 of file Vector4.hpp. |
|
Clamps this tuple to the range [low, high].
Definition at line 342 of file Tuple4.hpp. |
|
Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
Definition at line 300 of file Tuple4.hpp. |
|
Clamps the maximum value of this tuple to the max parameter.
Definition at line 366 of file Tuple4.hpp. |
|
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
Definition at line 322 of file Tuple4.hpp. |
|
Clamps the minimum value of this tuple to the min parameter.
Definition at line 351 of file Tuple4.hpp. |
|
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
Definition at line 311 of file Tuple4.hpp. |
|
Computes the dot product of the this vector and vector v1.
Definition at line 111 of file Vector4.hpp. References coor_t, se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2), abs(w1-w2)].
Definition at line 8 of file Tuple4.cpp. References abs, se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Returns true if all of the data members of Tuple4 t1 are equal to the corresponding data members in this.
Definition at line 278 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Gets the value of this tuple and copies the values into the Tuple4.
Definition at line 145 of file Tuple4.hpp. References Assert, se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Copies the value of the elements of this tuple into the array t[].
Definition at line 134 of file Tuple4.hpp. |
|
Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.
Definition at line 409 of file Tuple4.hpp. References scale_t, se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.
Definition at line 398 of file Tuple4.hpp. |
|
Definition at line 30 of file Tuple4.cpp. |
|
Returns the length of this vector.
Definition at line 7 of file Vector4.cpp. |
|
Returns the squared length of this vector.
Definition at line 92 of file Vector4.hpp. References coor_double_t. |
|
Negates the value of this vector in place.
Definition at line 214 of file Tuple4.hpp. |
|
Sets the value of this tuple to the negation of tuple t1.
Definition at line 204 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Normalizes this vector in place.
Definition at line 131 of file Vector4.hpp. References coor_t. |
|
Sets the value of this vector to the normalization of vector v1.
Definition at line 123 of file Vector4.hpp. |
|
Definition at line 488 of file Tuple4.hpp. |
|
Definition at line 478 of file Tuple4.hpp. |
|
Definition at line 482 of file Tuple4.hpp. |
|
Definition at line 470 of file Tuple4.hpp. |
|
Definition at line 485 of file Tuple4.hpp. |
|
Definition at line 474 of file Tuple4.hpp. |
|
Reimplemented from se_core::Tuple4. Reimplemented in se_core::Point4. Definition at line 164 of file Vector4.hpp. |
|
Definition at line 427 of file Tuple4.hpp. |
|
Definition at line 447 of file Tuple4.hpp. |
|
Definition at line 431 of file Tuple4.hpp. |
|
Sets the value of this tuple to the scalar multiplication of itself.
Reimplemented in se_core::Quat4. Definition at line 238 of file Tuple4.hpp. |
|
Sets the value of this tuple to the scalar multiplication of tuple t1.
Definition at line 227 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).
Definition at line 265 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2).
Definition at line 252 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Sets the value of this tuple to the value of tuple t1.
Reimplemented in se_core::Quat4. Definition at line 123 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Sets the value of this tuple from the 4 values specified in the array.
Definition at line 112 of file Tuple4.hpp. |
|
Sets the value of this tuple to the specified xyzw coordinates.
Reimplemented in se_core::Quat4. Definition at line 101 of file Tuple4.hpp. Referenced by se_core::Quat4::Quat4(), and se_core::Quat4::setIdentity(). |
|
Sets the x,y,z components of this point to the corresponding components of tuple t1. The w component of this point is set to 1. NOTE: This method's name should be 'set'. Newer compilers support 'using Tuple4::set;' and use the name 'set'. but for now, renamed to 'set3'.
Reimplemented in se_core::Point4. Definition at line 81 of file Vector4.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Sets the value of this tuple to the vector difference of itself and tuple t1 (this = this - t1).
Definition at line 193 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Sets the value of this tuple to the vector difference of tuple t1 and t2 (this = t1 - t2).
Definition at line 182 of file Tuple4.hpp. References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. Referenced by se_core::ViewPoint::sub(). |
|
Definition at line 24 of file Tuple4.cpp. References log_msg(). |
|
Returns a string that contains the values of this Tuple4. The form is (x,y,z,w).
Definition at line 17 of file Tuple4.cpp. |
|
|
|
|
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:32 2007 by Doxygen version 1.3.9.1.