Main Page | Packages | Class Hierarchy | Class List | Directories | Class Members

IDVR.Tools.Vector2 Class Reference

#include <Vector2.h>

List of all members.


Detailed Description

Class for a 2 dimensional vector.

This class is part of the basic Tools namespace and contains a couple of methods for initialization and computing various 2-element vectors (2 dimensional vectors).

For using vector with more elements (e.g. 3 or 4 elements) please see the following classes Vector3 and Vector4.

See also:
Vector3 the three dimensional vector.

Vector4 the four dimensional vector.

Author:
Bernhard Pflugfelder
Version:
1.0
Date:
02-17-2005


Public Member Functions

 Vector2 (void)
 This is the standard constructor.
 Vector2 (double n_X, double n_Y)
 Constructor initialization by two parameters.
 Vector2 (double n_Value __gc[])
 Constructor initialization by an array parameters.
__property double get_X (void)
 Returns the x element of the specific vector.
__property double get_Y (void)
 Returns the y element of the specific vector.
__property void set_X (double n_X)
 Sets the x element of the existing vector.
__property void set_Y (double n_Y)
 Sets the y-element of the existing vector.
double magnitude (void)
 Returns the magnitude of the specific vector.

Static Public Member Functions

static Vector2CreateNormalizedVector (Vector2 *v)
 This static function created a normalized vector of the specified vector parameter.
static Vector2Addition (Vector2 *v1, Vector2 *v2)
 This static function returns the sum vector of the two specified vector parameters.
static Vector2Subtraction (Vector2 *v1, Vector2 *v2)
 This static function returns the subtraction vector of the two specified vector parameters.

Public Attributes

double m_X
 The x element of the vector.
double m_Y
 The y element of the vector.


Constructor & Destructor Documentation

Vector2::Vector2 void   ) 
 

This is the standard constructor.

This standard constructor initialzed both elements with zero.

Vector2::Vector2 double  n_X,
double  n_Y
 

Constructor initialization by two parameters.

This constructor initialized both element of the vector with the specified parameters.

Parameters:
n_X the value for the x element.
n_Y the value for the y element.

Vector2::Vector2 double n_Value  __gc[]  ) 
 

Constructor initialization by an array parameters.

This constructor initialized both element of the vector with the specified array parameter.

Parameters:
n_Value a two-element array for both elements.


Member Function Documentation

Vector2 * Vector2::Addition Vector2 v1,
Vector2 v2
[static]
 

This static function returns the sum vector of the two specified vector parameters.

Parameters:
v1 the first vector for addition.
v2 the second vector for addition.
Returns:
The sum vector as a new instance.

Vector2 * Vector2::CreateNormalizedVector Vector2 v  )  [static]
 

This static function created a normalized vector of the specified vector parameter.

Parameters:
v the unnormalized vector.
Returns:
The normalized vector as a new instance.

double Vector2::get_X void   ) 
 

Returns the x element of the specific vector.

Returns:
The x element of the vector.

double Vector2::get_Y void   ) 
 

Returns the y element of the specific vector.

Returns:
The y element of the vector.

double Vector2::magnitude void   ) 
 

Returns the magnitude of the specific vector.

Returns:
The magnitude of the vector.

void Vector2::set_X double  n_X  ) 
 

Sets the x element of the existing vector.

Parameters:
n_X the x element of the vector.

void Vector2::set_Y double  n_Y  ) 
 

Sets the y-element of the existing vector.

Parameters:
n_Y the y element of the vector.

Vector2 * Vector2::Subtraction Vector2 v1,
Vector2 v2
[static]
 

This static function returns the subtraction vector of the two specified vector parameters.

Parameters:
v1 the first vector for subtraction.
v2 the second vector for subtraction.
Returns:
The subtraction vector as a new instance.


Member Data Documentation

double IDVR.Tools.Vector2.m_X
 

The x element of the vector.

The x element is the first element and is based on a double variable.

double IDVR.Tools.Vector2.m_Y
 

The y element of the vector.

The y element is the second element and is based on a double variable.


The documentation for this class was generated from the following files:
Generated on Sat Apr 9 11:51:00 2005 for RayCaster wiht Importance Driven Volume Rendering (IDVR) by  doxygen 1.4.1