#include <vec3.h>
A 3D vector.
Internally represented as a __m128 for performance and alignment reasons.
- See also
- Math::vector
-
Math::point
- Copyright
- (C) 2020 Individual contributors, see AUTHORS file
Inherited by Game::AngularVelocity, Game::Position, Game::Scale, and Game::Velocity.
|
union { | |
|
struct { | |
|
float x | |
|
float y | |
|
float z | |
|
float __w | |
|
} | | |
|
__m128 vec | |
|
float v [3] | |
|
}; | | |
|
◆ vec3() [1/6]
default constructor, NOTE: does NOT setup components!
◆ vec3() [2/6]
◆ vec3() [3/6]
__forceinline Math::vec3::vec3 |
( |
float3 | f3 | ) |
|
◆ vec3() [4/6]
__forceinline Math::vec3::vec3 |
( |
scalar | v | ) |
|
|
explicit |
construct from single value
◆ vec3() [5/6]
Math::vec3::vec3 |
( |
const vec3 & | rhs | ) |
|
|
default |
◆ vec3() [6/6]
__forceinline Math::vec3::vec3 |
( |
const __m128 & | rhs | ) |
|
construct from SSE 128 byte float array
◆ load()
__forceinline void Math::vec3::load |
( |
const scalar * | ptr | ) |
|
load content from 16-byte-aligned memory
Load 4 floats from 16-byte-aligned memory.
◆ loadu()
__forceinline void Math::vec3::loadu |
( |
const scalar * | ptr | ) |
|
load content from unaligned memory
Load 4 floats from unaligned memory.
◆ operator!=()
__forceinline bool Math::vec3::operator!= |
( |
const vec3 & | rhs | ) |
const |
◆ operator*=() [1/2]
__forceinline void Math::vec3::operator*= |
( |
const vec3 & | rhs | ) |
|
muliply by a vector component-wise
◆ operator*=() [2/2]
__forceinline void Math::vec3::operator*= |
( |
scalar | s | ) |
|
◆ operator+=()
__forceinline void Math::vec3::operator+= |
( |
const vec3 & | rhs | ) |
|
◆ operator-=()
__forceinline void Math::vec3::operator-= |
( |
const vec3 & | rhs | ) |
|
◆ operator/=()
__forceinline void Math::vec3::operator/= |
( |
const vec3 & | rhs | ) |
|
divide by a vector component-wise
◆ operator=()
__forceinline void Math::vec3::operator= |
( |
const __m128 & | rhs | ) |
|
◆ operator==()
__forceinline bool Math::vec3::operator== |
( |
const vec3 & | rhs | ) |
const |
◆ operator[]() [1/2]
__forceinline scalar & Math::vec3::operator[] |
( |
const int | index | ) |
|
read-only access to indexed component
◆ operator[]() [2/2]
__forceinline scalar Math::vec3::operator[] |
( |
const int | index | ) |
const |
read-only access to indexed component
◆ set()
◆ store()
__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.
◆ storeu()
__forceinline void Math::vec3::storeu |
( |
scalar * | ptr | ) |
const |
write content to unaligned memory through the write cache
Store to non-aligned float pointer.
◆ stream()
__forceinline void Math::vec3::stream |
( |
scalar * | ptr | ) |
const |
stream content to 16-byte-aligned memory circumventing the write-cache
◆ [union]
◆ __w
◆ vec
The documentation for this struct was generated from the following file:
- /github/workspace/code/foundation/math/vec3.h