DzVec3 Class Reference
[Basic Objects]

A 3D vector class. More...

List of all members.

Properties

Number x
Number y
Number z

Methods

void abs ()
DzVec3 add (DzVec3 vec)
DzVec3 cross (DzVec3 vec)
DzVec3 divide (DzVec3 vec)
Number dot (DzVec3 vec)
Number getAngleTo (DzVec3 vec)
DzQuat getRotationTo (DzVec3 vec)
void identity ()
Number length ()
Number lengthSquared ()
DzVec3 multiply (DzVec3 vec)
void negate ()
void normalize ()
DzVec3 normalized ()
void setLength (Number length)
void square ()
DzVec3 subtract (DzVec3 vec)
void zero ()

Properties

 DzVec3 (DzVec3 vec)
 DzVec3 (Number x, Number y, Number z)
 DzVec3 ()


Detailed Description

A 3D vector class.


Constructor & Destructor Documentation

DzVec3::DzVec3 (  ) 

Default Constructor. Creates an uninitialized vector.

DzVec3::DzVec3 ( Number  x,
Number  y,
Number  z 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates and inititializes the vector with 3 floats.

DzVec3::DzVec3 ( DzVec3  vec  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Copy Constructor.


Member Function Documentation

void DzVec3::abs (  ) 

Takes absolute value of each component.

DzVec3 DzVec3::add ( DzVec3  vec  ) 

Returns:
The result of adding the given vector to this vector

DzVec3 DzVec3::cross ( DzVec3  vec  ) 

Returns:
The cross product of this vector and the given vector

DzVec3 DzVec3::divide ( DzVec3  vec  ) 

Returns:
The result of dividing this vector by the given vector

Number DzVec3::dot ( DzVec3  vec  ) 

Returns:
The dot product of this vector and the given vector

Number DzVec3::getAngleTo ( DzVec3  vec  ) 

Returns:
The angle between this vector and the given vector

DzQuat DzVec3::getRotationTo ( DzVec3  vec  ) 

Returns:
The rotation that will swing this vector into the given vector.

void DzVec3::identity (  ) 

Sets this vector to the identity vector (1, 1, 1)

Number DzVec3::length (  ) 

Returns:
The length of the vector.

Number DzVec3::lengthSquared (  ) 

Returns:
The length of the vector squared.

DzVec3 DzVec3::multiply ( DzVec3  vec  ) 

Returns:
The result of multiplying this vector by the given vector

void DzVec3::negate (  ) 

Negates each component of the vector.

float DzVec3::normalize (  ) 

Makes this vector unit length

DzVec3 DzVec3::normalized (  ) 

Returns:
A copy of the current vector that has been normalized.

void DzVec3::setLength ( Number  length  ) 

Sets the vector to have the length given with the current direction.

void DzVec3::square (  ) 

Squares each vector component individually.

DzVec3 DzVec3::subtract ( DzVec3  vec  ) 

Returns:
The result of subtracting the given vector to this vector

void DzVec3::zero (  ) 

Sets this vector to (0, 0, 0)


Member Data Documentation

Number DzVec3::x

The x value of the vector.

Number DzVec3::y

The y value of the vector.

Number DzVec3::z

The z value of the vector.


Generated on Thu Sep 24 12:21:16 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.