Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
Vector 2D. More...
#include <Vec2.hpp>
Public Types | |
using | size_type = size_t |
using | data_type = TYPE |
Public Member Functions | |
Vector2D ()=default | |
Default constructor does nothing (for performance). More... | |
Vector2D (const Vector2D ©)=default | |
constexpr | Vector2D (data_type x_, data_type y_) noexcept |
Construct using coordinates. More... | |
constexpr auto | operator- () const noexcept |
Negate this vector. More... | |
constexpr size_type | max_size () const noexcept |
Maximum size. More... | |
auto | operator[] (size_type i) const |
Accesses element by index. More... | |
auto & | operator[] (size_type i) |
Accesses element by index. More... | |
Public Attributes | |
data_type | x |
data_type | y |
Vector 2D.
using box2d::Vector2D< TYPE >::data_type = TYPE |
using box2d::Vector2D< TYPE >::size_type = size_t |
|
default |
Default constructor does nothing (for performance).
|
default |
|
inlinenoexcept |
Construct using coordinates.
|
inlinenoexcept |
Maximum size.
This is this vector type's dimensionality.
|
inlinenoexcept |
Negate this vector.
|
inline |
Accesses element by index.
i | Index (0 for x, 1 for y). |
|
inline |
Accesses element by index.
i | Index (0 for x, 1 for y). |
data_type box2d::Vector2D< TYPE >::x |
data_type box2d::Vector2D< TYPE >::y |