AgateLib.Geometry.Vector3 Struct Reference

Structure which describes a vector in 3-space. More...

List of all members.

Public Member Functions

 Vector3 (float x, float y, float z)
 Constructs a Vector3 object.
 Vector3 (double x, double y, double z)
 Constructs a Vector3 object.
Vector3 Normalize ()
 Returns a vector pointing in the same direction as this one, with magnitude 1.
float DotProduct (Vector3 b)
 Computes and returns the dot product with another vector.
Vector3 CrossProduct (Vector3 b)
 Returns the cross product of two vectors.

Static Public Member Functions

static Vector3 operator+ (Vector3 a, Vector3 b)
 Adds two vectors.
static Vector3 operator- (Vector3 a, Vector3 b)
 Subtracts two vectors.
static Vector3 operator- (Vector3 a)
 Unary - operator: multiples vector by -1.
static Vector3 operator* (Vector3 a, float b)
 Scales a vector by a scalar floating point value.
static Vector3 operator/ (Vector3 a, float b)
 Divides a vector's components by a floating point value.
static float DotProduct (Vector3 a, Vector3 b)
 Computes and returns the dot product between two vectors.
static Vector3 CrossProduct (Vector3 a, Vector3 b)
 Returns the cross product of two vectors.

Static Public Attributes

static readonly Vector3 Empty = new Vector3()
 Vector representing the origin.

Properties

float X [get, set]
 X coordinate.
float Y [get, set]
 Y coordinate.
float Z [get, set]
 Z coordinate.
bool IsEmpty [get]
 Returns true if this vector's components are all zero.
float MagnitudeSquared [get]
 Returns the square of the length of the vector.
float Magnitude [get]
 Returns the length of the vector.


Detailed Description

Structure which describes a vector in 3-space.


Constructor & Destructor Documentation

AgateLib.Geometry.Vector3.Vector3 ( float  x,
float  y,
float  z 
)

Constructs a Vector3 object.

Parameters:
x 
y 
z 

AgateLib.Geometry.Vector3.Vector3 ( double  x,
double  y,
double  z 
)

Constructs a Vector3 object.

Parameters:
x 
y 
z 


Member Function Documentation

static Vector3 AgateLib.Geometry.Vector3.CrossProduct ( Vector3  a,
Vector3  b 
) [static]

Returns the cross product of two vectors.

Parameters:
a 
b 
Returns:

Vector3 AgateLib.Geometry.Vector3.CrossProduct ( Vector3  b  ) 

Returns the cross product of two vectors.

Parameters:
b 
Returns:

static float AgateLib.Geometry.Vector3.DotProduct ( Vector3  a,
Vector3  b 
) [static]

Computes and returns the dot product between two vectors.

Parameters:
a 
b 
Returns:

float AgateLib.Geometry.Vector3.DotProduct ( Vector3  b  ) 

Computes and returns the dot product with another vector.

Parameters:
b 
Returns:

Vector3 AgateLib.Geometry.Vector3.Normalize (  ) 

Returns a vector pointing in the same direction as this one, with magnitude 1.

Returns:

static Vector3 AgateLib.Geometry.Vector3.operator* ( Vector3  a,
float  b 
) [static]

Scales a vector by a scalar floating point value.

Parameters:
a 
b 
Returns:

static Vector3 AgateLib.Geometry.Vector3.operator+ ( Vector3  a,
Vector3  b 
) [static]

Adds two vectors.

Parameters:
a 
b 
Returns:

static Vector3 AgateLib.Geometry.Vector3.operator- ( Vector3  a  )  [static]

Unary - operator: multiples vector by -1.

Parameters:
a 
Returns:

static Vector3 AgateLib.Geometry.Vector3.operator- ( Vector3  a,
Vector3  b 
) [static]

Subtracts two vectors.

Parameters:
a 
b 
Returns:

static Vector3 AgateLib.Geometry.Vector3.operator/ ( Vector3  a,
float  b 
) [static]

Divides a vector's components by a floating point value.

Parameters:
a 
b 
Returns:


Member Data Documentation

readonly Vector3 AgateLib.Geometry.Vector3.Empty = new Vector3() [static]

Vector representing the origin.


Property Documentation

bool AgateLib.Geometry.Vector3.IsEmpty [get]

Returns true if this vector's components are all zero.

float AgateLib.Geometry.Vector3.Magnitude [get]

Returns the length of the vector.

float AgateLib.Geometry.Vector3.MagnitudeSquared [get]

Returns the square of the length of the vector.

float AgateLib.Geometry.Vector3.X [get, set]

X coordinate.

float AgateLib.Geometry.Vector3.Y [get, set]

Y coordinate.

float AgateLib.Geometry.Vector3.Z [get, set]

Z coordinate.


The documentation for this struct was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo