Math::point Class Reference
#include <xna_point.h>
Inheritance diagram for Math::point:
Detailed Description
A point in homogenous space. A point describes a position in space, and has its W component set to 1.0.(C) 2007 Radon Labs GmbH
Public Member Functions | |
point () | |
default constructor | |
point (scalar x, scalar y, scalar z) | |
construct from components | |
point (const float4 &rhs) | |
construct from float4 | |
point (XMVECTOR rhs) | |
construct from XMVECTOR | |
void | operator= (const point &rhs) |
assignment operator | |
void | operator= (XMVECTOR rhs) |
assign XMVECTOR | |
void | operator+= (const vector &rhs) |
inplace add vector | |
void | operator-= (const vector &rhs) |
inplace subtract vector | |
point | operator+ (const vector &rhs) const |
add point and vector | |
point | operator- (const vector &rhs) const |
subtract vectors from point | |
vector | operator- (const point &rhs) const |
subtract point from point into a vector | |
bool | operator== (const point &rhs) const |
equality operator | |
bool | operator!= (const point &rhs) const |
inequality operator | |
void | set (scalar x, scalar y, scalar z) |
set components | |
float4 | operator- () const |
flip sign | |
float4 | operator- (const float4 &rhs) const |
subtract 2 vectors | |
void | operator+= (const float4 &rhs) |
inplace add | |
void | operator-= (const float4 &rhs) |
inplace sub | |
void | operator *= (scalar s) |
inplace scalar multiply | |
void | operator *= (const float4 &rhs) |
muliply by a vector component-wise | |
float4 | operator+ (const float4 &rhs) const |
add 2 vectors | |
float4 | operator * (scalar s) const |
multiply with scalar | |
bool | operator== (const float4 &rhs) const |
equality operator | |
bool | operator!= (const float4 &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 | load_float3 (const void *ptr, float w) |
load 3 floats into x,y,z from unaligned memory | |
void | load_ubyte4n_signed (const void *ptr, float w) |
load from UByte4N packed vector, move range to -1..+1 | |
void | set (scalar x, scalar y, scalar z, scalar w) |
set content | |
void | set_x (scalar x) |
set the x component | |
void | set_y (scalar y) |
set the y component | |
void | set_z (scalar z) |
set the z component | |
void | set_w (scalar w) |
set the w component | |
scalar & | x () |
read/write access to x component | |
scalar | x () const |
read-only access to x component | |
scalar & | y () |
read/write access to y component | |
scalar | y () const |
read-only access to y component | |
scalar & | z () |
read/write access to z component | |
scalar | z () const |
read-only access to z component | |
scalar & | w () |
read/write access to w component | |
scalar | w () const |
read-only access to w component | |
scalar | length () const |
return length of vector | |
scalar | lengthsq () const |
return squared length of vector | |
float4 | abs () const |
return compononent-wise absolute | |
Static Public Member Functions | |
static point | origin () |
return a point at the origin (0, 0, 0) | |
static float4 | reciprocal (const float4 &v) |
return 1.0 / vec | |
static float4 | multiply (const float4 &v0, const float4 &v1) |
component-wise multiplication | |
static float4 | cross3 (const float4 &v0, const float4 &v1) |
return 3-dimensional cross product | |
static scalar | dot3 (const float4 &v0, const float4 &v1) |
return 3d dot product of vectors | |
static float4 | barycentric (const float4 &v0, const float4 &v1, const float4 &v2, scalar f, scalar g) |
return point in barycentric coordinates | |
static float4 | catmullrom (const float4 &v0, const float4 &v1, const float4 &v2, const float4 &v3, scalar s) |
perform Catmull-Rom interpolation | |
static float4 | hermite (const float4 &v1, const float4 &t1, const float4 &v2, const float4 &t2, scalar s) |
perform Hermite spline interpolation | |
static float4 | lerp (const float4 &v0, const float4 &v1, scalar s) |
perform linear interpolation between 2 4d vectors | |
static float4 | maximize (const float4 &v0, const float4 &v1) |
return 4d vector made up of largest components of 2 vectors | |
static float4 | minimize (const float4 &v0, const float4 &v1) |
return 4d vector made up of smallest components of 2 vectors | |
static float4 | normalize (const float4 &v) |
return normalized version of 4d vector | |
static | __declspec (deprecated) float4 transform(__Float4Arg v |
transform 4d vector by matrix44 | |
static float4 | reflect (const float4 &normal, const float4 &incident) |
reflect a vector v | |
static float4 | clamp (__Float4Arg Clamp, __Float4Arg vMin, __Float4Arg vMax) |
clamp to min/max vector | |
static scalar | angle (__Float4Arg v0, __Float4Arg v1) |
angle between two vectors | |
static bool | less3_any (const float4 &v0, const float4 &v1) |
return true if any XYZ component is less-then | |
static bool | less3_all (const float4 &v0, const float4 &v1) |
return true if all XYZ components are less-then | |
static bool | lessequal3_any (const float4 &v0, const float4 &v1) |
return true if any XYZ component is less-or-equal | |
static bool | lessequal3_all (const float4 &v0, const float4 &v1) |
return true if all XYZ components are less-or-equal | |
static bool | greater3_any (const float4 &v0, const float4 &v1) |
return true if any XYZ component is greater | |
static bool | greater3_all (const float4 &v0, const float4 &v1) |
return true if all XYZ components are greater | |
static bool | greaterequal3_any (const float4 &v0, const float4 &v1) |
return true if any XYZ component is greater-or-equal | |
static bool | greaterequal3_all (const float4 &v0, const float4 &v1) |
return true if all XYZ components are greater-or-equal | |
static bool | equal3_any (const float4 &v0, const float4 &v1) |
return true if any XYZ component is equal | |
static bool | equal3_all (const float4 &v0, const float4 &v1) |
return true if all XYZ components are equal | |
static bool | nearequal3 (const float4 &v0, const float4 &v1, const float4 &epsilon) |
perform near equal comparison with given epsilon (3 components) | |
static bool | less4_any (const float4 &v0, const float4 &v1) |
return true if any XYZW component is less-then | |
static bool | less4_all (const float4 &v0, const float4 &v1) |
return true if all XYZW components are less-then | |
static bool | lessequal4_any (const float4 &v0, const float4 &v1) |
return true if any XYZW component is less-or-equal | |
static bool | lessequal4_all (const float4 &v0, const float4 &v1) |
return true if all XYZW components are less-or-equal | |
static bool | greater4_any (const float4 &v0, const float4 &v1) |
return true if any XYZW component is greater | |
static bool | greater4_all (const float4 &v0, const float4 &v1) |
return true if all XYZW components are greater | |
static bool | greaterequal4_any (const float4 &v0, const float4 &v1) |
return true if any XYZW component is greater-or-equal | |
static bool | greaterequal4_all (const float4 &v0, const float4 &v1) |
return true if all XYZW components are greater-or-equal | |
static bool | equal4_any (const float4 &v0, const float4 &v1) |
return true if any XYZW component is equal | |
static bool | equal4_all (const float4 &v0, const float4 &v1) |
return true if all XYZW components are equal | |
static bool | nearequal4 (const float4 &v0, const float4 &v1, const float4 &epsilon) |
perform near equal comparison with given epsilon (4 components) | |
static float | unpack_x (XMVECTOR v) |
unpack the first element from a XMVECTOR | |
static float | unpack_y (XMVECTOR v) |
unpack the second element from a XMVECTOR | |
static float | unpack_z (XMVECTOR v) |
unpack the third element from a XMVECTOR | |
static float | unpack_w (XMVECTOR v) |
unpack the fourth element from a XMVECTOR | |
static float4 | splat (scalar s) |
splat scalar into each component of a vector | |
static float4 | splat (const float4 &v, uint element) |
return a vector with all elements set to element n of v. 0 <= element <= 3 | |
static float4 | splat_x (const float4 &v) |
return a vector with all elements set to v.x | |
static float4 | splat_y (const float4 &v) |
return a vector with all elements set to v.y | |
static float4 | splat_z (const float4 &v) |
return a vector with all elements set to v.z | |
static float4 | splat_w (const float4 &v) |
return a vector with all elements set to v.w | |
static float4 | permute_control (unsigned int i0, unsigned int i1, unsigned int i2, unsigned int i3) |
return control vector for permute (see XMVectorPermuteControl for details) | |
static float4 | permute (const float4 &v0, const float4 &v1, const float4 &control) |
merge components of 2 vectors into 1 (see XMVectorPermute for details) |
Constructor & Destructor Documentation
__forceinline Math::point::point | ( | XMVECTOR | rhs | ) |
construct from XMVECTOR
!!!! copy constructor forbidden, otherwise passing point's to a function !!!! via Registers doesnt work
Member Function Documentation
__forceinline void Math::float4::load | ( | const scalar * | ptr | ) | [inherited] |
load content from 16-byte-aligned memory
Load 4 floats from 16-byte-aligned memory.
__forceinline void Math::float4::loadu | ( | const scalar * | ptr | ) | [inherited] |
load content from unaligned memory
Load 4 floats from unaligned memory.
__forceinline void Math::float4::store | ( | scalar * | ptr | ) | const [inherited] |
write content to 16-byte-aligned memory through the write cache
Store to 16-byte-aligned float pointer.
__forceinline void Math::float4::storeu | ( | scalar * | ptr | ) | const [inherited] |
write content to unaligned memory through the write cache
Store to non-aligned float pointer.