CSAD
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
Public Member Functions | Public Attributes | Friends | List of all members
bt::vector4f Class Reference

vector4f - four-dimensional single precision vector More...

Public Member Functions

_FORCEINLINE vector4f ()
 The constructor does not set the initial values to the fields.
 
_FORCEINLINE vector4f (float _a)
 Конструктор, задает все параметры равными одному значению.
 
_FORCEINLINE vector4f (float _x, float _y, float _z, float _w)
 
_FORCEINLINE void combine (vector4f &a, vector4f &b, float c, float d)
 Scaling and addition of vectors by the formula a * c + b * d.
 
_FORCEINLINE float dot (vector4f &a)
 Dot product.
 
_FORCEINLINE void lerp (vector4f &a, vector4f &b, float c)
 The vector interpolation between a and b, с[0.0 .. 1.0].
 
_FORCEINLINE void neg ()
 The appeal of the sign of the vector.
 
_FORCEINLINE const vector4f norm ()
 Scales the vector to a unit length.
 
_FORCEINLINE void normalize ()
 Scales the vector to a unit length.
 
_FORCEINLINE const vector4f operator* (const vector4f &a)
 Element-by-element multiplication of vectors.
 
_FORCEINLINE const vector4f operator+ (const vector4f &a)
 Addition of vectors.
 
_FORCEINLINE const vector4foperator+= (const vector4f &a)
 Addition of vectors.
 
_FORCEINLINE const vector4f operator- (const vector4f &a)
 Subtraction of vectors.
 
_FORCEINLINE const vector4foperator-= (const vector4f &a)
 Subtraction of vectors.
 
_FORCEINLINE float & operator[] (unsigned int id) const
 Accessing parameters as array elements.
 
_FORCEINLINE const double operator| (vector4f &a)
 Dot product of the vectors.
 
_FORCEINLINE void scale (float a)
 Scales the vector.
 
_FORCEINLINE float sqrLen ()
 Vector length squared.
 
_FORCEINLINE void zero ()
 Sets the value of the fields to zero.
 

Public Attributes

BT_API TYPEINFO_H
 Статический индентификатор типа vector4f::t()
 
float w
 Параметр оси W.
 
float x
 Параметр оси X.
 
float y
 Параметр оси Y.
 
float z
 Параметр оси Z.
 

Friends

_FORCEINLINE friend vector4f operator* (vector4f &a, float &b)
 Scaling vector.
 
_FORCEINLINE friend vector4f operator* (float &b, vector4f &a)
 Scaling vector.
 
_FORCEINLINE friend vector4f operator* (vector4f &a, vector4f &b)
 Element-by-element multiplication of vectors.
 
_FORCEINLINE friend vector4f operator+ (const vector4f &a, const vector4f &b)
 Addition of vectors.
 
_FORCEINLINE friend vector4f operator+ (vector4f &a, vector4f &b)
 Addition of vectors.
 
_FORCEINLINE friend vector4foperator+= (vector4f &a, vector4f &b)
 Addition of vectors.
 
_FORCEINLINE friend vector4f operator- (vector4f &a, vector4f &b)
 Subtraction of vectors.
 
_FORCEINLINE friend vector4foperator-= (vector4f &a, vector4f &b)
 Subtraction of vectors.
 
_FORCEINLINE friend vector4f operator/ (vector4f &a, vector4f &b)
 Element-by-element division of vectors.
 
_FORCEINLINE friend double operator| (vector4f &a, vector4f &b)
 Dot product of the vectors.
 

Detailed Description

vector4f - four-dimensional single precision vector

При обьявлении переменной типа vector4f, значения полей не определены: vector4f vec1;

Можно обращатся к параметрам как к полям структуры: vec1.x=300.0f; vec1.y=123.0f; vec1.z=0.01f; vec1.w=1.0f;

Можно обращатся к параметрам как к массиву: vec1[0]=300.0f; vec1[1]=123.0f; vec1[2]=0.01f; vec1[3]=1.0f;

See Also
vector4d, vector2f, vector2d, vector3f, vector3d, bt: math

Constructor & Destructor Documentation

_FORCEINLINE bt::vector4f::vector4f ( float  _x,
float  _y,
float  _z,
float  _w 
)
inline

Конструктор.

Parameters
_x- vector x
_y- vector y
_z- vector z
_w- vector w