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

vector2f - two-dimensional single precision vector More...

Public Member Functions

_FORCEINLINE vector2f ()
 The constructor does not set the initial values to the fields.
 
_FORCEINLINE vector2f (float _a)
 Конструктор, задает все параметры равными одному значению.
 
_FORCEINLINE vector2f (float _x, float _y)
 
_FORCEINLINE float angle (vector2f &b)
 The angle between the vectors.
 
_FORCEINLINE void combine (vector2f &a, vector2f &b, float c, float d)
 Масштобирование и сложение векторов по формуле a * c + b * d.
 
_FORCEINLINE float dot (vector2f &a)
 Dot product.
 
_FORCEINLINE bool leftOfLine (const vector2f &a, const vector2f &b)
 The position of a point on a straight line passing through a b.
 
_FORCEINLINE void lerp (vector2f &a, vector2f &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 vector2f norm ()
 Converts the vector to a unit length.
 
_FORCEINLINE void normalize ()
 Scales the vector to a unit length.
 
_FORCEINLINE const vector2f operator* (const quaternionf &b)
 Transforming a vector by a quaternion.
 
_FORCEINLINE const vector2f operator* (const float &b)
 Scaling vector.
 
_FORCEINLINE const vector2f operator+ (const vector2f &a)
 Addition of vectors.
 
_FORCEINLINE const vector2foperator+= (const vector2f &a)
 Addition of vectors.
 
_FORCEINLINE const vector2f operator- (const vector2f &a)
 Subtraction of vectors.
 
_FORCEINLINE const vector2foperator-= (const vector2f &a)
 Subtraction of vectors.
 
_FORCEINLINE float & operator[] (unsigned int id) const
 Accessing parameters as array elements.
 
_FORCEINLINE float quadDistanceFromLine (const vector2f &a, const vector2f &b)
 The square of the distance from a point to a straight line passing through a b.
 
_FORCEINLINE vector2f reflect (vector2f &a)
 The reflection vector.
 
_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

float x
 Параметр оси X.
 
float y
 Параметр оси Y.
 

Friends

_FORCEINLINE friend vector2f operator* (const vector2f &a, const quaternionf &b)
 Transforming a vector by a quaternion.
 
_FORCEINLINE friend vector2f operator* (const vector2f &a, const float &b)
 Scaling vector.
 
_FORCEINLINE friend vector2f operator* (const float &b, const vector2f &a)
 Scaling vector.
 
_FORCEINLINE friend vector2f operator* (vector2f &a, float &b)
 Scaling vector.
 
_FORCEINLINE friend vector2f operator* (float &b, vector2f &a)
 Scaling vector.
 
_FORCEINLINE friend vector2f operator+ (const vector2f &a, const vector2f &b)
 Addition of vectors.
 
_FORCEINLINE friend vector2f operator+ (vector2f &a, vector2f &b)
 Addition of vectors.
 
_FORCEINLINE friend vector2f operator+= (vector2f &a, vector2f &b)
 Addition of vectors.
 
_FORCEINLINE friend vector2f operator- (const vector2f &a, const vector2f &b)
 Subtraction of vectors.
 
_FORCEINLINE friend vector2f operator- (vector2f &a, vector2f &b)
 Subtraction of vectors.
 
_FORCEINLINE friend vector2f operator-= (vector2f &a, vector2f &b)
 Subtraction of vectors.
 

Detailed Description

vector2f - two-dimensional single precision vector

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

Constructor & Destructor Documentation

_FORCEINLINE bt::vector2f::vector2f ( float  _x,
float  _y 
)
inline

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

Parameters
_x- vector x
_y- vector y