True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

TA::Vec4 Struct Reference

#include "TA/Common/Vector.h"


Detailed Description

A 4 dimensional vector.

Not fully documented. Prior knowledge of vector and matrix maths is assumed. It is left to the user to work out what the functions do from there names, parameters and return values.


Public Types

enum  Axis {
  AXIS_X = 0,
  AXIS_Y,
  AXIS_Z,
  AXIS_W
}

Public Member Functions

Vec4  Cross (const Vec4 &v4Value) const
float  Dot (const Vec4 &v4Value) const
float  GetMagnitude () const
float  GetMagnitudeSqrd () const
Vec4  GetNormal () const
void  Normalise ()
void  Clear ()
bool  IsNormalised () const
bool  IsZero () const
void  GetAxisOrder (int pnAxisOrder[4]) const
float  GetAxis (int nIndex) const
Initialisation
 Vec4 (const Vec4 &v4Value)
 Vec4 (float fX, float fY, float fZ, float fW)
void  Initialise (float fX, float fY, float fZ, float fW)
Casting
 operator float * ()
 operator const float * () const
Array operators
float &  operator[] (int nIndex)
const float &  operator[] (int nIndex) const
Assignment operators
Vec4 &  operator+= (const Vec4 &v4Value)
Vec4 &  operator-= (const Vec4 &v4Value)
Vec4 &  operator *= (float fValue)
Vec4 &  operator/= (float fValue)
Unary operators
Vec4  operator+ () const
Vec4  operator- () const
Binary operators
Vec4  operator+ (const Vec4 &v4Value) const
Vec4  operator- (const Vec4 &v4Value) const
Vec4  operator * (float fValue) const
Vec4  operator/ (float fValue) const
Comparison operators
bool  operator== (const Vec4 &v4Value) const
bool  operator!= (const Vec4 &v4Value) const

Static Public Member Functions

static Vec4 TAC_CALL  Cross (const Vec4 &v4A, const Vec4 &v4B)
static float TA_VEC4_CALL  Dot (const Vec4 &v4A, const Vec4 &v4B)
static float TA_VEC4_CALL  GetMagnitude (const Vec4 &v4Value)
static float TA_VEC4_CALL  GetMagnitudeSqrd (const Vec4 &v4Value)
static Vec4 TA_VEC4_CALL  GetNormal (const Vec4 &v4Value)
static const Vec4 &TA_VEC4_CALL  GetUnitVector (int nIndex)

Data Fields

float  x
float  y
float  z
float  w

Friends

Vec4 TA_VEC4_CALL  operator * (float fValue, const Vec4 &v4Value)

Related Functions

(Note that these are not member functions.)

Vector Maths
 k_v4Zero
 k_v4UnitX
 k_v4UnitY
 k_v4UnitZ


© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.