|
Nebula
|
#include <vec3.h>
A 3D vector.
Internally represented as a f32x4 for performance and alignment reasons.
Inherited by Game::AngularVelocity, Game::Position, Game::Scale, and Game::Velocity.
Classes | |
| union | [union].__unnamed0__ |
Public Member Functions | |
| vec3 ()=default | |
| default constructor, NOTE: does NOT setup components! | |
| vec3 (scalar x, scalar y, scalar z) | |
| construct from values | |
| vec3 (float3 f3) | |
| construct from float3 | |
| vec3 (scalar v) | |
| construct from single value | |
| vec3 (const vec3 &rhs)=default | |
| copy constructor | |
| vec3 (const f32x4 &rhs) | |
| construct from SSE 128 byte float array | |
| void | operator= (const f32x4 &rhs) |
| assign an vmVector4 | |
| void | operator+= (const vec3 &rhs) |
| inplace add | |
| void | operator-= (const vec3 &rhs) |
| inplace sub | |
| void | operator*= (scalar s) |
| inplace scalar multiply | |
| void | operator*= (const vec3 &rhs) |
| muliply by a vector component-wise | |
| void | operator/= (const vec3 &rhs) |
| divide by a vector component-wise | |
| bool | operator== (const vec3 &rhs) const |
| equality operator | |
| bool | operator!= (const vec3 &rhs) const |
| inequality operator | |
| void | load (const scalar *ptr) |
| load content from 16-byte-aligned memory | |
| void | loadu (const scalar *ptr) |
| load content from unaligned memory | |
| void | store (scalar *ptr) const |
| write content to 16-byte-aligned memory through the write cache | |
| void | storeu (scalar *ptr) const |
| write content to unaligned memory through the write cache | |
| void | stream (scalar *ptr) const |
| stream content to 16-byte-aligned memory circumventing the write-cache | |
| void | set (scalar x, scalar y, scalar z) |
| set content | |
| scalar & | operator[] (const int index) |
| read-only access to indexed component | |
| scalar | operator[] (const int index) const |
| read-only access to indexed component | |
Public Attributes | |
| union | |
|
default |
default constructor, NOTE: does NOT setup components!
|
explicit |
construct from single value
|
default |
copy constructor
| __forceinline Math::vec3::vec3 | ( | const f32x4 & | rhs | ) |
construct from SSE 128 byte float array
| __forceinline void Math::vec3::load | ( | const scalar * | ptr | ) |
load content from 16-byte-aligned memory
Load 4 floats from 16-byte-aligned memory.
| __forceinline void Math::vec3::loadu | ( | const scalar * | ptr | ) |
load content from unaligned memory
Load 4 floats from unaligned memory.
| __forceinline bool Math::vec3::operator!= | ( | const vec3 & | rhs | ) | const |
inequality operator
| __forceinline void Math::vec3::operator*= | ( | const vec3 & | rhs | ) |
muliply by a vector component-wise
| __forceinline void Math::vec3::operator*= | ( | scalar | s | ) |
inplace scalar multiply
| __forceinline void Math::vec3::operator+= | ( | const vec3 & | rhs | ) |
inplace add
| __forceinline void Math::vec3::operator-= | ( | const vec3 & | rhs | ) |
inplace sub
| __forceinline void Math::vec3::operator/= | ( | const vec3 & | rhs | ) |
divide by a vector component-wise
| __forceinline void Math::vec3::operator= | ( | const f32x4 & | rhs | ) |
assign an vmVector4
| __forceinline bool Math::vec3::operator== | ( | const vec3 & | rhs | ) | const |
equality operator
| __forceinline scalar & Math::vec3::operator[] | ( | const int | index | ) |
read-only access to indexed component
| __forceinline scalar Math::vec3::operator[] | ( | const int | index | ) | const |
read-only access to indexed component
| __forceinline void Math::vec3::store | ( | scalar * | ptr | ) | const |
write content to 16-byte-aligned memory through the write cache
Store to 16-byte-aligned float pointer.
| __forceinline void Math::vec3::storeu | ( | scalar * | ptr | ) | const |
write content to unaligned memory through the write cache
Store to non-aligned float pointer.
| __forceinline void Math::vec3::stream | ( | scalar * | ptr | ) | const |
stream content to 16-byte-aligned memory circumventing the write-cache