A 2D column vector.
More...
#include <b2Math.h>
Default constructor does nothing (for performance).
b2Vec2 |
( |
float32 |
x, |
|
|
float32 |
y |
|
) |
| |
|
inline |
Construct using coordinates.
Does this vector contain finite coordinates?
Get the length of this vector (the norm).
float32 LengthSquared |
( |
| ) |
const |
|
inline |
Get the length squared. For performance, use this instead of b2Vec2::Length (if possible).
float32 Normalize |
( |
void |
| ) |
|
|
inline |
Convert this vector into a unit vector. Returns the length.
float32 operator() |
( |
int32 |
i | ) |
const |
|
inline |
Read from and indexed element.
float32& operator() |
( |
int32 |
i | ) |
|
|
inline |
Write to an indexed element.
void operator*= |
( |
float32 |
a | ) |
|
|
inline |
Multiply this vector by a scalar.
void operator+= |
( |
const b2Vec2 & |
v | ) |
|
|
inline |
Add a vector to this vector.
b2Vec2 operator- |
( |
void |
| ) |
const |
|
inline |
void operator-= |
( |
const b2Vec2 & |
v | ) |
|
|
inline |
Subtract a vector from this vector.
void Set |
( |
float32 |
x_, |
|
|
float32 |
y_ |
|
) |
| |
|
inline |
Set this vector to some specified coordinates.
Set this vector to all zeros.
Get the skew vector such that dot(skew_vec, other) == cross(vec, other)
The documentation for this struct was generated from the following file: