FMVector4 Class Reference
[Mathematics Classes.]

A 4 dimensional vector. More...

#include <FMVector4.h>

List of all members.

Public Member Functions

 FMVector4 ()
 Creates an empty 4D vector.
 FMVector4 (const float *source, uint32 startIndex=0)
 Creates the FMVector4 from a list of floats.
 FMVector4 (const FMVector3 &v, float _w)
 Creates the FMVector4 with the coordinates given.
 FMVector4 (const FMVector2 &v1, const FMVector2 &v2)
 Creates the FMVector4 with the coordinates given.
 FMVector4 (float _x, float _y, float _z, float _w)
 Creates the FMVector4 with the coordinates given.
 FMVector4 (const FMColor &c)
 Creates the 4D vector from a given color value.
FMVector3 ToHSVColor ()
 Retrieves the HSV color value for this RGBA color value.
 operator float * ()
 Get this FMVector4 as an array of floats.
 operator const float * () const
 Get this FMVector4 as an array of floats.
FMVector4operator= (const float *v)
 Assign this FMVector4 to the given float array.
void ComponentMinimum (const FMVector4 &min)
 Update each component of this FMVector to the minimum of two FMVector4s.
void ComponentMaximum (const FMVector4 &max)
 Update each component of this FMVector to the maximum of two FMVector4s.

Static Public Member Functions

static FMVector4 FromHSVColor (float hue, float saturation, float value)
 Creates the 4D vector from a HSV color value.

Public Attributes

float x
 The first coordinate.
float y
 The second coordinate.
float z
 The third coordinate.
float w
 The fourth coordinate.

Static Public Attributes

static const FMVector4 Zero
 The 4D vector containing all zeroes.
static const FMVector4 One
 The 4D vector containing all ones.
static const FMVector4 AlphaOne


Detailed Description

A 4 dimensional vector.

Not used within FCollada.


Constructor & Destructor Documentation

FMVector4::FMVector4 const float *  source,
uint32  startIndex = 0
[inline]
 

Creates the FMVector4 from a list of floats.

It takes the first 4 floats starting from and including startIndex (0 indexing) in the array as the 4 coordinates. The first as the first coordinate, the second as the second, and the third as the third, the fourth as w

Parameters:
source The float array.
startIndex The index of the first element.

FMVector4::FMVector4 const FMVector3 v,
float  _w
[inline]
 

Creates the FMVector4 with the coordinates given.

The first three coordinates are taken from the FMVector3, where the first one is the x value, the second is that y, and the third is the z. The forth value is the float specified.

Parameters:
v The FMVector3 representing the first three coordinates.
_w The final coordinate.

FMVector4::FMVector4 const FMVector2 v1,
const FMVector2 v2
[inline]
 

Creates the FMVector4 with the coordinates given.

Parameters:
v1 The FMVector2 representing the first two coordinates.
v2 The FMVector2 representing the last two coordinates.

FMVector4::FMVector4 float  _x,
float  _y,
float  _z,
float  _w
[inline]
 

Creates the FMVector4 with the coordinates given.

Parameters:
_x The first coordinate.
_y The second coordinate.
_z The third coordinate.
_w The forth coordinate.

FMVector4::FMVector4 const FMColor c  ) 
 

Creates the 4D vector from a given color value.

Parameters:
c The color value.


Member Function Documentation

void FMVector4::ComponentMaximum const FMVector4 max  )  [inline]
 

Update each component of this FMVector to the maximum of two FMVector4s.

Updates each of the four components to be the maximum of the current value and that of the corresponding value of the given FMVector4.

Parameters:
max The FMVector to take values from.

void FMVector4::ComponentMinimum const FMVector4 min  )  [inline]
 

Update each component of this FMVector to the minimum of two FMVector4s.

Updates each of the four components to be the minimum of the current value and that of the corresponding value of the given FMVector4.

Parameters:
min The FMVector to take values from.

static FMVector4 FMVector4::FromHSVColor float  hue,
float  saturation,
float  value
[static]
 

Creates the 4D vector from a HSV color value.

HSV stands for hue, saturation and value and is a more humane way to express color values, as opposed to RGB.

Parameters:
hue The color hue. In the range [0,1].
saturation The color saturation. In the range [0,1].
value The color value. In the range [0,1].

FMVector4::operator const float *  )  const [inline]
 

Get this FMVector4 as an array of floats.

Returns:
The float array.

FMVector4::operator float *  )  [inline]
 

Get this FMVector4 as an array of floats.

Returns:
The float array.

FMVector4& FMVector4::operator= const float *  v  )  [inline]
 

Assign this FMVector4 to the given float array.

Assigns each coordinate of this FMVector4 to the elements in the float array. The first element to the first coordinate, the second to the second, and the third to the third. It returns this FMVector4.

Parameters:
v The float array to assign with.
Returns:
This FMVector4.

FMVector3 FMVector4::ToHSVColor  ) 
 

Retrieves the HSV color value for this RGBA color value.

All the color components are expected to be in the [0,1] range: no clamping will be done.

Returns:
The equivalent HSV color value. All the components will be in the [0,1] range.


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 16:58:40 2008 for FCollada by  doxygen 1.4.6-NO