ClanLib
2.3.7
|
2D (x,y) point structure - Float More...
#include <point.h>
Public Types | |
typedef float | datatype |
Public Member Functions | |
CL_Pointf () | |
CL_Pointf (float x, float y) | |
CL_Pointf (const CL_Pointx< float > &p) | |
CL_Pointf (const CL_Vec2< float > &p) | |
Attributes | |
CL_Vec2< float > & | normalize () |
Normalizes this vector. More... | |
float | dot (const CL_Vec2< float > &vector) const |
Dot products this vector with an other vector. More... | |
CL_Vec2< float > & | round () |
Rounds all components of this vector. More... | |
CL_Vec2< float > & | rotate (const CL_Vec2< float > &hotspot, const CL_Angle &angle) |
Rotate this vector around another point. More... | |
float | length () const |
Returns the length (magnitude) of this vector. More... | |
CL_Angle | angle (const CL_Vec2< float > &vector) const |
Calculate the angle between this vector and an other vector. More... | |
CL_Angle | angle_relative (const CL_Vec2< float > &vector) const |
Calculate the angle between this vector relative to another vector. More... | |
float | distance (const CL_Vec2< float > &vector) const |
Calculate the distance between this vector and an other vector. More... | |
float | round_value (float value) const |
Rounds a value for the datatype. More... | |
Operators | |
const float & | operator[] (unsigned int i) const |
float & | operator[] (unsigned int i) |
operator float * () | |
operator float *const () const | |
void | operator+= (const CL_Vec2< float > &vector) |
+= operator. More... | |
void | operator+= (floatvalue) |
+= operator. More... | |
CL_Vec2< float > | operator+ (const CL_Vec2< float > &vector) const |
| |
CL_Vec2< float > | operator+ (floatvalue) const |
| |
void | operator-= (const CL_Vec2< float > &vector) |
-= operator. More... | |
void | operator-= (floatvalue) |
-= operator. More... | |
CL_Vec2< float > | operator- (const CL_Vec2< float > &vector) const |
| |
CL_Vec2< float > | operator- (floatvalue) const |
| |
CL_Vec2< float > | operator- () const |
| |
void | operator*= (const CL_Vec2< float > &vector) |
*= operator. More... | |
void | operator*= (floatvalue) |
*= operator. More... | |
CL_Vec2< float > | operator* (const CL_Vec2< float > &vector) const |
| |
CL_Vec2< float > | operator* (floatvalue) const |
| |
void | operator/= (const CL_Vec2< float > &vector) |
/= operator. More... | |
void | operator/= (floatvalue) |
/= operator. More... | |
CL_Vec2< float > | operator/ (const CL_Vec2< float > &vector) const |
/ operator. More... | |
CL_Vec2< float > | operator/ (floatvalue) const |
/ operator. More... | |
bool | operator== (const CL_Vec2< float > &vector) const |
== operator. More... | |
bool | operator!= (const CL_Vec2< float > &vector) const |
!= operator. More... | |
Static Public Member Functions | |
static CL_Pointx< float > | calc_origin (CL_Origin origin, const CL_Sizex< float > &size) |
Returns the anchor point for the origin within the dimensions of the size structure. More... | |
static float | dot (const CL_Vec2< float > &vector_1, const CL_Vec2< float > &vector_2) |
Dot products a vector with an other vector. More... | |
static CL_Vec2< float > | normalize (const CL_Vec2< float > &vector) |
Normalizes a vector. More... | |
static CL_Vec2< float > | rotate (const CL_Vec2< float > &vector, const CL_Vec2< float > &hotspot, const CL_Angle &angle) |
Rotate a vector around another point. More... | |
static CL_Vec2< float > | round (const CL_Vec2< float > &vector) |
Rounds all components on a vector. More... | |
Public Attributes | |
union { | |
Type g | |
Type t | |
Type y | |
}; | |
union { | |
Type r | |
Type s | |
Type x | |
}; | |
float | g |
float | r |
float | s |
float | t |
float | x |
float | y |
2D (x,y) point structure - Float
|
inline |
|
inline |
|
inline |
|
inline |
Calculate the angle between this vector and an other vector.
vector | = Second vector used to calculate angle. |
Calculate the angle between this vector relative to another vector.
vector | = Second vector used to calculate angle. |
|
staticinherited |
Returns the anchor point for the origin within the dimensions of the size structure.
origin | = The origin |
size | = The size |
Calculate the distance between this vector and an other vector.
vector | = Second vector used to calculate distance. |
|
inlinestaticinherited |
Dot products a vector with an other vector.
Operates in the native datatype
vector_1 | = First vector used for the dot product. |
vector_2 | = Second vector used for the dot product. |
Dot products this vector with an other vector.
Operates in the native datatype
vector | Second vector used for the dot product. |
|
inherited |
Returns the length (magnitude) of this vector.
Operates in the native datatype
|
staticinherited |
Normalizes a vector.
Operates in the native datatype
vector | = Vector to use |
Normalizes this vector.
Operates in the native datatype
|
inlineinherited |
|
inlineinherited |
!= operator.
|
inlineinherited |
|
inlineinherited |
*= operator.
|
inlineinherited |
|
inlineinherited |
+= operator.
|
inlineinherited |
|
inlineinherited |
-= operator.
|
inlineinherited |
/ operator.
|
inlineinherited |
/= operator.
== operator.
|
inlineinherited |
|
inlineinherited |
|
staticinherited |
Rotate a vector around another point.
vector | = Vector to use |
hotspot | The point around which to rotate. |
angle | = Angle to rotate. |
|
inherited |
Rotate this vector around another point.
hotspot | The point around which to rotate. |
angle | = Angle to rotate. |
Rounds all components on a vector.
Uses Asymmetric Arithmetic Rounding
vector | = Vector to use |
Rounds all components of this vector.
Uses Asymmetric Arithmetic Rounding
|
inherited |
Rounds a value for the datatype.
For doubles and floats, this function does not round.
value | = Value to round |
union { ... } |
union { ... } |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |