Blender V2.61 - r43446
Public Member Functions

AUD_Vector3 Class Reference

#include <AUD_3DMath.h>

List of all members.

Public Member Functions

 AUD_Vector3 (float x=0, float y=0, float z=0)
const float & x () const
const float & y () const
const float & z () const
void get (float *destination) const
float * get ()
const float * get () const
float length () const
AUD_Vector3 cross (const AUD_Vector3 &op) const
float operator* (const AUD_Vector3 &op) const
AUD_Vector3 operator* (const float &op) const
AUD_Vector3 operator+ (const AUD_Vector3 &op) const
AUD_Vector3 operator- (const AUD_Vector3 &op) const
AUD_Vector3 operator- () const
AUD_Vector3operator-= (const AUD_Vector3 &op)

Detailed Description

This class represents a 3 dimensional vector.

Definition at line 39 of file AUD_3DMath.h.


Constructor & Destructor Documentation

AUD_Vector3::AUD_Vector3 ( float  x = 0,
float  y = 0,
float  z = 0 
) [inline]

Creates a new 3 dimensional vector.

Parameters:
xThe x component.
yThe y component.
zThe z component.

Definition at line 63 of file AUD_3DMath.h.

Referenced by cross(), operator*(), operator+(), and operator-().


Member Function Documentation

AUD_Vector3 AUD_Vector3::cross ( const AUD_Vector3 op) const [inline]

Retrieves the cross product.

Parameters:
opThe second operand.
Returns:
The cross product of the two vectors.

Definition at line 136 of file AUD_3DMath.h.

References AUD_Vector3(), m_x, m_y, and m_z.

void AUD_Vector3::get ( float *  destination) const [inline]

Retrieves the components of the vector.

Parameters:
destinationWhere the 3 float values should be saved to.

Definition at line 99 of file AUD_3DMath.h.

References m_v.

Referenced by AUD_SequencerReader::read(), AUD_OpenALDevice::setListenerLocation(), AUD_OpenALDevice::setListenerVelocity(), and KX_SoundActuator::Update().

float* AUD_Vector3::get ( ) [inline]

Retrieves the components of the vector.

Returns:
The components as float[3].

Definition at line 108 of file AUD_3DMath.h.

References m_v.

const float* AUD_Vector3::get ( ) const [inline]

Retrieves the components of the vector.

Returns:
The components as float[3].

Definition at line 117 of file AUD_3DMath.h.

References m_v.

float AUD_Vector3::length ( ) const [inline]

Retrieves the length of the vector.

Returns:
The length of the vector.

Definition at line 126 of file AUD_3DMath.h.

References m_x, m_y, m_z, and sqrt().

Referenced by AUD_SoftwareDevice::AUD_SoftwareHandle::update().

float AUD_Vector3::operator* ( const AUD_Vector3 op) const [inline]

Retrieves the dot product.

Parameters:
opThe second operand.
Returns:
The dot product of the two vectors.

Definition at line 148 of file AUD_3DMath.h.

References m_x, m_y, and m_z.

AUD_Vector3 AUD_Vector3::operator* ( const float &  op) const [inline]

Retrieves the product with a scalar.

Parameters:
opThe second operand.
Returns:
The scaled vector.

Definition at line 158 of file AUD_3DMath.h.

References AUD_Vector3(), m_x, m_y, and m_z.

AUD_Vector3 AUD_Vector3::operator+ ( const AUD_Vector3 op) const [inline]

Adds two vectors.

Parameters:
opThe second operand.
Returns:
The sum vector.

Definition at line 168 of file AUD_3DMath.h.

References AUD_Vector3(), m_x, m_y, and m_z.

AUD_Vector3 AUD_Vector3::operator- ( ) const [inline]

Negates the vector.

Returns:
The vector facing in the opposite direction.

Definition at line 187 of file AUD_3DMath.h.

References AUD_Vector3(), m_x, m_y, and m_z.

AUD_Vector3 AUD_Vector3::operator- ( const AUD_Vector3 op) const [inline]

Subtracts two vectors.

Parameters:
opThe second operand.
Returns:
The difference vector.

Definition at line 178 of file AUD_3DMath.h.

References AUD_Vector3(), m_x, m_y, and m_z.

AUD_Vector3& AUD_Vector3::operator-= ( const AUD_Vector3 op) [inline]

Subtracts the second vector.

Parameters:
opThe second operand.
Returns:
The difference vector.

Definition at line 197 of file AUD_3DMath.h.

References m_x, m_y, and m_z.

const float& AUD_Vector3::x ( ) const [inline]

Retrieves the x component of the vector.

Returns:
The x component.

Definition at line 72 of file AUD_3DMath.h.

References m_x.

Referenced by Device_get_listener_location(), Device_get_listener_velocity(), Handle_get_location(), and Handle_get_velocity().

const float& AUD_Vector3::y ( ) const [inline]

Retrieves the y component of the vector.

Returns:
The y component.

Definition at line 81 of file AUD_3DMath.h.

References m_y.

Referenced by Device_get_listener_location(), Device_get_listener_velocity(), Handle_get_location(), and Handle_get_velocity().

const float& AUD_Vector3::z ( ) const [inline]

Retrieves the z component of the vector.

Returns:
The z component.

Definition at line 90 of file AUD_3DMath.h.

References m_z.

Referenced by Device_get_listener_location(), Device_get_listener_velocity(), Handle_get_location(), and Handle_get_velocity().


Member Data Documentation

float AUD_Vector3::m_v[3]

Definition at line 47 of file AUD_3DMath.h.

Referenced by get().

Definition at line 50 of file AUD_3DMath.h.

Referenced by cross(), length(), operator*(), operator+(), operator-(), operator-=(), and x().

Definition at line 51 of file AUD_3DMath.h.

Referenced by cross(), length(), operator*(), operator+(), operator-(), operator-=(), and y().

Definition at line 52 of file AUD_3DMath.h.

Referenced by cross(), length(), operator*(), operator+(), operator-(), operator-=(), and z().


The documentation for this class was generated from the following file: