|
Nebula
|
#include <point.h>
Represents a 3D point in space.
A point is a 4d vector with a fixed W coordinate of 1, which allows it to be transformed. A point implements a limited set of operators and functions, which distinguishes it from vec4, vec3 and vector.
Public Member Functions | |
| point () | |
| default constructor | |
| point (scalar x, scalar y, scalar z) | |
| construct from values | |
| point (scalar v) | |
| construct from single value | |
| point (const point &rhs) | |
| copy constructor | |
| point (const vec3 &rhs) | |
| construct from vec3 | |
| point (const vec4 &rhs) | |
| construct from vec4 | |
| point (const __m128 &rhs) | |
| construct from SSE 128 byte float array | |
| 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 | store3 (scalar *ptr) const |
| write content to 16-byte-aligned memory through the write cache | |
| void | storeu3 (scalar *ptr) const |
| write content to unaligned memory through the write cache | |
| void | operator= (const point &rhs) |
| assignment operator | |
| void | operator= (const __m128 &rhs) |
| assign an vmVector4 | |
| void | operator+= (const vector &rhs) |
| inplace add | |
| void | operator-= (const vector &rhs) |
| inplace sub | |
| bool | operator== (const point &rhs) const |
| equality operator | |
| bool | operator!= (const point &rhs) const |
| inequality operator | |
| float | operator[] (int index) const |
| float & | operator[] (int index) |
| operator vec4 () const | |
| convert to vec4 | |
| void | set (scalar x, scalar y, scalar z) |
| set content | |
Public Attributes | ||
| union { | ||
| __m128 vec | ||
| struct { | ||
| float x | ||
| float y | ||
| float z | ||
| } | ||
| }; | ||
| __forceinline Math::point::point | ( | ) |
default constructor
| __forceinline Math::point::point | ( | scalar | v | ) |
construct from single value
| __forceinline Math::point::point | ( | const point & | rhs | ) |
copy constructor
| __forceinline Math::point::point | ( | const __m128 & | rhs | ) |
construct from SSE 128 byte float array
| __forceinline void Math::point::load | ( | const scalar * | ptr | ) |
load content from 16-byte-aligned memory
Load 4 floats from 16-byte-aligned memory.
| __forceinline void Math::point::loadu | ( | const scalar * | ptr | ) |
load content from unaligned memory
Load 4 floats from unaligned memory.
| __forceinline bool Math::point::operator!= | ( | const point & | rhs | ) | const |
inequality operator
| __forceinline void Math::point::operator+= | ( | const vector & | rhs | ) |
inplace add
| __forceinline void Math::point::operator-= | ( | const vector & | rhs | ) |
inplace sub
| __forceinline void Math::point::operator= | ( | const __m128 & | rhs | ) |
assign an vmVector4
| __forceinline void Math::point::operator= | ( | const point & | rhs | ) |
assignment operator
| __forceinline bool Math::point::operator== | ( | const point & | rhs | ) | const |
equality operator
| __forceinline float & Math::point::operator[] | ( | int | index | ) |
| __forceinline float Math::point::operator[] | ( | int | index | ) | const |
| __forceinline void Math::point::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::point::store3 | ( | scalar * | ptr | ) | const |
write content to 16-byte-aligned memory through the write cache
Store to 16-byte-aligned float pointer.
| __forceinline void Math::point::storeu | ( | scalar * | ptr | ) | const |
write content to unaligned memory through the write cache
Store to non-aligned float pointer.
| __forceinline void Math::point::storeu3 | ( | scalar * | ptr | ) | const |
write content to unaligned memory through the write cache
Store to non-aligned float pointer.
| union { ... } Math::point |
| __m128 Math::point::vec |
| float Math::point::x |
| float Math::point::y |
| float Math::point::z |