r5 - 03 May 2010 - 03:41:00 - KayneHunterYou are here: Developer's TWiki >  Coding Web  > AxiomMathLibAPI



Namespace List

The namespaces specified in this document are:

Namespace Assembly
Axiom.MathLib? MathLib?
Axiom.MathLib.Collections? MathLib?

Namespace : MathLib?



MathLib? Type List

Enumerations

Type Summary
Intersection? Type of intersection detected between 2 object.
PlaneSide? The "positive side" of the plane is the half space to which the plane normal points. The "negative side" is the other half space. The flag "no side" indicates the plane itself.

Structs

Type Summary
IntersectResult? Simple struct to allow returning a complex intersection result.
Matrix3? A 3x3 matrix which can represent rotations around axes.
Matrix4? Class encapsulating a standard 4x4 homogenous matrix.
Plane? Defines a plane in 3D space.
Quaternion? Summary description for Quaternion.
Vector2? 2 dimensional vector.
Vector3? Standard 3-dimensional vector.
Vector4? 4D homogeneous vector.

Classes

Type Summary
AxisAlignedBox? A 3D box aligned with the x/y/z axes.
MathUtil? This is a class which exposes static methods for various common math functions. Currently, the methods simply wrap the methods of the System.Math class (with the exception of a few added extras). This is in case the implementation needs to be swapped out with a faster C++ implementation, if deemed that the System.Math methods are not up to far speed wise.
PlaneBoundedVolume? Represents a convex volume bounded by planes.
PositionalSpline? A Catmull-Rom spline that can be used for interpolating translation movements.
Ray? Representation of a ray in space, ie a line with an origin and direction.
RotationalSpline? A class used to interpolate orientations (rotations) along a spline using derivatives of quaternions.
Sphere? A standard sphere, used mostly for bounds checking.


MathLib? Enumerations

Intersection Enumeration

Summary

public enumeration Intersection

Type of intersection detected between 2 object.

Remarks

Type of intersection detected between 2 object.

Enumeration Members

Field Summary
Contained An object is fully contained within another object.
Contains An object fully contains another object.
None The objects are not intersecting.
Partial The objects are partially intersecting each other.

PlaneSide Enumeration

Summary

public enumeration PlaneSide?

The "positive side" of the plane is the half space to which the plane normal points. The "negative side" is the other half space. The flag "no side" indicates the plane itself.

Remarks

The "positive side" of the plane is the half space to which the plane normal points. The "negative side" is the other half space. The flag "no side" indicates the plane itself.

Enumeration Members

Field Summary
Negative
None
Positive


MathLib? Structs

Vector2 Structure

Summary

public structure Vector2

2 dimensional vector.

Remarks

2 dimensional vector.

Constructor Members

Name Access Summary
Vector2() public Constructor.

Field Members

Name Access Summary
x : Single public
y : Single public

Method Members

Name Access Summary
Add() : Vector2 public Used when a Vector2 is added to another Vector2.
Multiply() : Vector2 public Used when a Vector2 is multiplied by a scalar value.
Multiply() : Vector2 public Used when a scalar value is multiplied by a Vector2.
Negate() : Vector2 public Used to negate the elements of a vector.
Subtract() : Vector2 public Used to subtract a Vector2 from another Vector2.

Quaternion Structure

Summary

public structure Quaternion

Summary description for Quaternion.

Remarks

Summary description for Quaternion.

Constructor Members

Name Access Summary
Quaternion() public Creates a new Quaternion.

Field Members

Name Access Summary
w : Single public
x : Single public
y : Single public
z : Single public

Property Members

Name Access Summary
Identity : Quaternion public An Identity Quaternion.
Norm : Single public Squared 'length' of this quaternion.
XAxis : Vector3 public Local X-axis portion of this rotation.
YAxis : Vector3 public Local Y-axis portion of this rotation.
ZAxis : Vector3 public Local Z-axis portion of this rotation.
Zero : Quaternion public A Quaternion with all elements set to 0.0f;

Method Members

Name Access Summary
Add() : Quaternion public Used when a Quaternion is added to another Quaternion.
Dot() : Single public Performs a Dot Product operation on 2 Quaternions.
Equals() : Boolean public
Exp() : Quaternion public Calculates the Exponent of a Quaternion.
FromAngleAxis?() : Quaternion public Creates a Quaternion from a supplied angle and axis.
FromAxes?() : Void public
FromRotationMatrix?() : Void public
GetHashCode?() : Int32 public
Inverse() : Quaternion public Computes the inverse of a Quaternion.
Log() : Quaternion public Calculates the logarithm of a Quaternion.
Multiply() : Quaternion public Used to multiply 2 Quaternions together.
Multiply() : Vector3 public
Multiply() : Quaternion public Used when a Quaternion is multiplied by a float value.
Multiply() : Quaternion public Used when a float value is multiplied by a Quaternion.
Normalize() : Void public Normalizes elements of this quaterion to the range [0,1].
Slerp() : Quaternion public
Slerp() : Quaternion public
Squad() : Quaternion public
Squad() : Quaternion public Performs spherical quadratic interpolation.
ToAngleAxis?() : Void public
ToAxes?() : Void public
ToRotationMatrix?() : Matrix3 public Gets a 3x3 rotation matrix from this Quaternion.
ToString?() : String public Overrides the ToString?() method to provide a text representation of a Quaternion.

Plane Structure

Summary

public structure Plane

Defines a plane in 3D space.

Remarks

A plane is defined in 3D space by the equation Ax + By + Cz + D = 0 This equates to a vector (the normal of the plane, whose x, y and z components equate to the coefficients A, B and C respectively), and a constant (D) which is the distance along the normal you have to go to move the plane back to the origin.

Constructor Members

Name Access Summary
Plane() public
Plane() public
Plane() public Construct a plane from 3 coplanar points.
Plane() public Construct a plane through a normal, and a distance to move the plane along the normal.

Field Members

Name Access Summary
D : Single public Distance from the origin.
Normal : Vector3 public Direction the plane is facing.

Method Members

Name Access Summary
Equals() : Boolean public Object method for testing equality.
GetDistance?() : Single public This is a pseudodistance. The sign of the return value is positive if the point is on the positive side of the plane, negative if the point is on the negative side, and zero if the point is on the plane. The absolute value of the return value is the true distance only when the plane normal is a unit length vector.
GetHashCode?() : Int32 public Gets the hashcode for this Plane.
GetSide?() : PlaneSide? public
Redefine() : Void public Construct a plane from 3 coplanar points.
ToString?() : String public Returns a string representation of this Plane.

IntersectResult Structure

Summary

public structure IntersectResult?

Simple struct to allow returning a complex intersection result.

Remarks

Simple struct to allow returning a complex intersection result.

Constructor Members

Name Access Summary
IntersectResult?() public Constructor.

Field Members

Name Access Summary
Distance : Single public If Hit was true, this will hold a query specific distance value. i.e. for a Ray-Box test, the distance will be the distance from the start point of the ray to the point of intersection.
Hit : Boolean public Did the intersection test result in a hit?

Method Members

Name Access Summary

Matrix4 Structure

Summary

public structure Matrix4

Class encapsulating a standard 4x4 homogenous matrix.

Remarks

The engine uses column vectors when applying matrix multiplications, This means a vector is represented as a single column, 4-row matrix. This has the effect that the tranformations implemented by the matrices happens right-to-left e.g. if vector V is to be transformed by M1 then M2 then M3, the calculation would be M3 * M2 * M1 * V. The order that matrices are concatenated is vital since matrix multiplication is not cummatative, i.e. you can get a different result if you concatenate in the wrong order.

The use of column vectors and right-to-left ordering is the standard in most mathematical texts, and is the same as used in OpenGL?. It is, however, the opposite of Direct3D, which has inexplicably chosen to differ from the accepted standard and uses row vectors and left-to-right matrix multiplication.

The engine deals with the differences between D3D and OpenGL? etc. internally when operating through different render systems. The engine users only need to conform to standard maths conventions, i.e. right-to-left matrix multiplication, (The engine transposes matrices it passes to D3D to compensate).

The generic form M * V which shows the layout of the matrix entries is shown below:

| m[0][0] m[0][1] m[0][2] m[0][3] | {x} | m[1][0] m[1][1] m[1][2] m[1][3] | {y} | m[2][0] m[2][1] m[2][2] m[2][3] | {z} | m[3][0] m[3][1] m[3][2] m[3][3] | {1}

Constructor Members

Name Access Summary
Matrix4() public Creates a new Matrix4 with all the specified parameters.

Field Members

Name Access Summary
m00 : Single public
m01 : Single public
m02 : Single public
m03 : Single public
m10 : Single public
m11 : Single public
m12 : Single public
m13 : Single public
m20 : Single public
m21 : Single public
m22 : Single public
m23 : Single public
m30 : Single public
m31 : Single public
m32 : Single public
m33 : Single public

Property Members

Name Access Summary
ClipSpace2DToImageSpace? : Matrix4 public
Determinant : Single public Gets the determinant of this matrix.
Identity : Matrix4 public Returns a matrix with the following form: 1,0,0,0   0,1,0,0   0,0,1,0   0,0,0,1  
Item : Single public Allows the Matrix to be accessed linearly (m[0] -> m[15]).
Item : Single public Allows the Matrix to be accessed like a 2d array (i.e. matrix[2,3])
Scale : Vector3 public Gets/Sets the Translation portion of the matrix. Sx 0 0 0   0 Sy 0 0   0 0 Sz 0   0 0 0 0  
Translation : Vector3 public Gets/Sets the Translation portion of the matrix. 0 0 0 Tx   0 0 0 Ty   0 0 0 Tz   0 0 0 1  
Zero : Matrix4 public Returns a matrix with all elements set to 0.

Method Members

Name Access Summary
Add() : Matrix4 public Used to add two matrices together.
Equals() : Boolean public Compares this Matrix to another object. This should be done because the equality operators (=, ) have been overriden by this class.
FromMatrix3?() : Matrix4 public Used to allow assignment from a Matrix3 to a Matrix4 object.
GetHashCode?() : Int32 public Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (=, ) have been overriden by this class. The standard implementation is a simple XOR operation between all local member variables.
GetMatrix3?() : Matrix3 public Returns a 3x3 portion of this 4x4 matrix.
Inverse() : Matrix4 public Returns an inverted 4d matrix.
MakeFloatArray?() : Void public
Multiply() : Matrix4 public Used to multiply (concatenate) two 4x4 Matrices.
Multiply() : Plane public Transforms a plane using the specified transform.
Multiply() : Vector3 public Transforms the given 3-D vector by the matrix, projecting the result back into w = 1. This means that the initial w is considered to be 1.0, and then all the tree elements of the resulting 3-D vector are divided by the resulting w.
Subtract() : Matrix4 public Used to subtract two matrices.
ToString?() : String public Overrides the ToString?() method to provide a text representation of a Matrix4.
Transpose() : Matrix4 public Swap the rows of the matrix with the columns.

Matrix3 Structure

Summary

public structure Matrix3

A 3x3 matrix which can represent rotations around axes.

Remarks

A 3x3 matrix which can represent rotations around axes.

Constructor Members

Name Access Summary
Matrix3() public Create a new Matrix from 3 Vertex3 objects.
Matrix3() public Creates a new Matrix3 with all the specified parameters.

Field Members

Name Access Summary
m00 : Single public
m01 : Single public
m02 : Single public
m10 : Single public
m11 : Single public
m12 : Single public
m20 : Single public
m21 : Single public
m22 : Single public

Property Members

Name Access Summary
Determinant : Single public
Identity : Matrix3 public Identity Matrix
Item : Single public Allows the Matrix to be accessed linearly (m[0] -> m[8]).
Item : Single public Indexer for accessing the matrix like a 2d array (i.e. matrix[2,3]).
Zero : Matrix3 public Zero matrix.

Method Members

Name Access Summary
Add() : Matrix3 public Used to add two matrices together.
Equals() : Boolean public Compares this Matrix to another object. This should be done because the equality operators (=, ) have been overriden by this class.
FromAxes?() : Void public Creates a Matrix3 from 3 axes.
FromEulerAnglesXYZ?() : Void public Constructs this Matrix from 3 euler angles, in degrees.
GetColumn?() : Vector3 public Gets a matrix column by index.
GetHashCode?() : Int32 public Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (=, ) have been overriden by this class. The standard implementation is a simple XOR operation between all local member variables.
Multiply() : Matrix3 public Multiply (concatenate) two Matrix3 instances together.
Multiply() : Vector3 public matrix * vector [3x3 * 3x1 = 3x1]
Multiply() : Matrix3 public Multiplies all the items in the Matrix3 by a scalar value.
Multiply() : Vector3 public vector * matrix [1x3 * 3x3 = 1x3]
Multiply() : Matrix3 public Multiplies all the items in the Matrix3 by a scalar value.
Negate() : Matrix3 public Negates all the items in the Matrix.
SetColumn?() : Void public Sets one of the columns of the Matrix with a Vector3.
Subtract() : Matrix3 public Used to subtract two matrices.
ToString?() : String public Overrides the ToString?() method to provide a text representation of a Matrix4.
Transpose() : Matrix3 public Swap the rows of the matrix with the columns.

Vector4 Structure

Summary

public structure Vector4

4D homogeneous vector.

Remarks

4D homogeneous vector.

Constructor Members

Name Access Summary
Vector4() public Creates a new 4 dimensional Vector.

Field Members

Name Access Summary
w : Single public
x : Single public
y : Single public
z : Single public

Property Members

Name Access Summary
Item : Single public Used to access a Vector by index 0 = this.x, 1 = this.y, 2 = this.z, 3 = this.w.

Method Members

Name Access Summary
Dot() : Single public Calculates the dot (scalar) product of this vector with another.
Equals() : Boolean public Compares this Vector to another object. This should be done because the equality operators (=, ) have been overriden by this class.
GetHashCode?() : Int32 public Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (=, ) have been overriden by this class. The standard implementation is a simple XOR operation between all local member variables.
Multiply() : Vector4 public
ToString?() : String public Overrides the ToString?() method to provide a text representation of a Vector4.

Vector3 Structure

Summary

public structure Vector3

Standard 3-dimensional vector.

Remarks

A direction in 3D space represented as distances along the 3 orthoganal axes (x, y, z). Note that positions, directions and scaling factors can be represented by a vector, depending on how you interpret the values.

Constructor Members

Name Access Summary
Vector3() public Creates a new 3 dimensional Vector.

Field Members

Name Access Summary
x : Single public X component.
y : Single public Y component.
z : Single public Z component.

Property Members

Name Access Summary
Item : Single public Used to access a Vector by index 0 = x, 1 = y, 2 = z.
Length : Single public Gets the length (magnitude) of this Vector3. The Sqrt operation is expensive, so only use this if you need the exact length of the Vector. If vector lengths are only going to be compared, use LengthSquared? instead.
LengthSquared? : Single public Returns the length (magnitude) of the vector squared.
NegativeUnitX? : Vector3 public Gets a Vector3 with the X set to -1, and the others set to 0.
NegativeUnitY? : Vector3 public Gets a Vector3 with the Y set to -1, and the others set to 0.
NegativeUnitZ? : Vector3 public Gets a Vector3 with the Z set to -1, and the others set to 0.
UnitScale? : Vector3 public Gets a Vector3 with all components set to 1.
UnitX? : Vector3 public Gets a Vector3 with the X set to 1, and the others set to 0.
UnitY? : Vector3 public Gets a Vector3 with the Y set to 1, and the others set to 0.
UnitZ? : Vector3 public Gets a Vector3 with the Z set to 1, and the others set to 0.
Zero : Vector3 public Gets a Vector3 with all components set to 0.

Method Members

Name Access Summary
Add() : Vector3 public Used when a Vector3 is added to another Vector3.
Ceil() : Void public Compares the supplied vector and updates it's x/y/z components of they are higher in value.
Cross() : Vector3 public Performs a Cross Product operation on 2 vectors, which returns a vector that is perpendicular to the intersection of the 2 vectors. Useful for finding face normals.
Divide() : Vector3 public Used to divide a vector by a scalar value.
Dot() : Single public Performs a Dot Product operation on 2 vectors, which returns a single number obtained by multiplying corresponding axis values and adding up these products.
Equals() : Boolean public Compares this Vector to another object. This should be done because the equality operators (=, ) have been overriden by this class.
Floor() : Void public Compares the supplied vector and updates it's x/y/z components of they are lower in value.
GetHashCode?() : Int32 public Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (=, ) have been overriden by this class. The standard implementation is a simple XOR operation between all local member variables.
GetRotationTo?() : Quaternion public Gets the shortest arc quaternion to rotate this vector to the destination vector.
MidPoint?() : Vector3 public Finds the midpoint between the supplied Vector and this vector.
Multiply() : Vector3 public Used when a Vector3 is multiplied by another vector.
Multiply() : Vector3 public Used when a Vector3 is multiplied by a scalar value.
Multiply() : Vector3 public Used when a scalar value is multiplied by a Vector3.
Negate() : Vector3 public Used to negate the elements of a vector.
Normalize() : Single public Normalizes the vector.
Perpendicular() : Vector3 public Finds a vector perpendicular to this one.
RandomDeviant?() : Vector3 public
Reflect() : Vector3 public Calculates a reflection vector to the plane with the given normal.
Subtract() : Vector3 public Used to subtract a Vector3 from another Vector3.
ToString?() : String public Overrides the ToString?() method to provide a text representation of a Vector3.


MathLib? Classes

AxisAlignedBox Class

Summary

public class AxisAlignedBox? : System.ICloneable

A 3D box aligned with the x/y/z axes.

Remarks

This class represents a simple box which is aligned with the axes. Internally it only stores 2 points as the extremeties of the box, one which is the minima of all 3 axes, and the other which is the maxima of all 3 axes. This class is typically used for an axis-aligned bounding box (AABB) for collision and visibility determination.

Constructor Members

Name Access Summary
AxisAlignedBox?() public Initializes a new instance of the class.
AxisAlignedBox?() public

Property Members

Name Access Summary
Center : Vector3 public Gets the center point of this bounding box.
Corners : Vector3[] public Returns an array of 8 corner points, useful for collision vs. non-aligned objects.
IsNull? : Boolean public Gets/Sets the value of whether this box is null (i.e. not dimensions, etc).
Maximum : Vector3 public Gets/Sets the maximum corner of the box.
Minimum : Vector3 public Gets/Sets the minimum corner of the box.
Null : AxisAlignedBox? public Returns a null box

Method Members

Name Access Summary
Clone() : Object public
Intersects() : Boolean public Returns whether or not this box intersects another.
Intersects() : Boolean public
Intersects() : Boolean public Tests whether this box intersects a sphere.
Intersects() : Boolean public Tests whether the vector point is within this box.
Merge() : Void public Allows for merging two boxes together (combining).
Scale() : Void public Scales the size of the box by the supplied factor.
SetExtents?() : Void public Sets both Minimum and Maximum at once, so that UpdateCorners? only needs to be called once as well.
Transform() : Void public

RotationalSpline Class

Summary

public class RotationalSpline?

A class used to interpolate orientations (rotations) along a spline using derivatives of quaternions.

Remarks

Like the PositionalSpline? class, this class is about interpolating values smoothly over a spline. Whilst PositionalSpline? deals with positions (the normal sense we think about splines), this class interpolates orientations. The theory is identical, except we're now in 4-dimensional space instead of 3.

In positional splines, we use the points and tangents on those points to generate control points for the spline. In this case, we use quaternions and derivatives of the quaternions (i.e. the rate and direction of change at each point). This is the same as PositionalSpline? since a tangent is a derivative of a position. We effectively generate an extra quaternion in between each actual quaternion which when take with the original quaternion forms the 'tangent' of that quaternion.

Constructor Members

Name Access Summary
RotationalSpline?() public Creates a new Rotational Spline.

Property Members

Name Access Summary
AutoCalculate? : Boolean public Specifies whether or not to recalculate tangents as each control point is added.
PointCount? : Int32 public Gets the number of control points in this spline.

Method Members

Name Access Summary
AddPoint?() : Void public Adds a control point to the end of the spline.
Clear() : Void public Removes all current control points from this spline.
Interpolate() : Quaternion public
Interpolate() : Quaternion public Interpolates a single segment of the spline given a parametric value.
Interpolate() : Quaternion public
Interpolate() : Quaternion public Returns an interpolated point based on a parametric value over the whole series.
RecalculateTangents?() : Void public Recalculates the tangents associated with this spline.

Sphere Class

Summary

public class Sphere

A standard sphere, used mostly for bounds checking.

Remarks

A sphere in math texts is normally represented by the function x^2 + y^2 + z^2 = r^2 (for sphere's centered on the origin). We store spheres simply as a center point and a radius.

Constructor Members

Name Access Summary
Sphere() public Creates a unit sphere centered at the origin.
Sphere() public Creates an arbitrary spehere.

Property Members

Name Access Summary
Center : Vector3 public Gets/Sets the center of the sphere.
Radius : Single public Gets/Sets the radius of the sphere.

Method Members

Name Access Summary
Intersects() : Boolean public Returns whether or not this sphere interects a box.
Intersects() : Boolean public Returns whether or not this sphere interects a plane.
Intersects() : Boolean public Tests for intersection between this sphere and another sphere.
Intersects() : Boolean public Returns whether or not this sphere interects a Vector3.

PositionalSpline Class

Summary

public class PositionalSpline?

A Catmull-Rom spline that can be used for interpolating translation movements.

Remarks

A Catmull-Rom spline is a derivitive of the Hermite spline. The difference is that the Hermite spline allows you to specifiy 2 endpoints and 2 tangents, then the spline is generated. A Catmull-Rom spline allows you to just supply 1-n number of points and the tangents will be automatically calculated.

Derivation of the hermite polynomial can be found here: Hermite splines.

Constructor Members

Name Access Summary
PositionalSpline?() public Creates a new Positional Spline.

Property Members

Name Access Summary
AutoCalculate? : Boolean public Specifies whether or not to recalculate tangents as each control point is added.
PointCount? : Int32 public Gets the number of control points in this spline.

Method Members

Name Access Summary
AddPoint?() : Void public Adds a new control point to the end of this spline.
Clear() : Void public Removes all current control points from this spline.
GetPoint?() : Vector3 public Returns the point at the specified index.
Interpolate() : Vector3 public Interpolates a single segment of the spline given a parametric value.
Interpolate() : Vector3 public Returns an interpolated point based on a parametric value over the whole series.
RecalculateTangents?() : Void public Recalculates the tangents associated with this spline.

Ray Class

Summary

public class Ray

Representation of a ray in space, ie a line with an origin and direction.

Remarks

Representation of a ray in space, ie a line with an origin and direction.

Constructor Members

Name Access Summary
Ray() public Default constructor.
Ray() public Constructor.

Property Members

Name Access Summary
Direction : Vector3 public Gets/Sets the direction this ray is pointing.
Origin : Vector3 public Gets/Sets the origin of the ray.

Method Members

Name Access Summary
Intersects() : IntersectResult? public Tests whether this ray intersects the given box.
Intersects() : IntersectResult? public Tests whether this ray intersects the given plane.
Intersects() : IntersectResult? public Tests whether this ray intersects the given PlaneBoundedVolume?.
Intersects() : IntersectResult? public Tests whether this ray intersects the given sphere.

PlaneBoundedVolume Class

Summary

public class PlaneBoundedVolume?

Represents a convex volume bounded by planes.

Remarks

Represents a convex volume bounded by planes.

Constructor Members

Name Access Summary
PlaneBoundedVolume?() public Default constructor.
PlaneBoundedVolume?() public Constructor.

Field Members

Name Access Summary
outside : PlaneSide? public Side of the plane to be considered 'outside'.
planes : PlaneList? public Publicly accessible plane list, you can modify this direct.

Method Members

Name Access Summary
Intersects() : Boolean public Intersection test with an .
Intersects() : Boolean public Intersection test with .

MathUtil Class

Summary

public class MathUtil?

This is a class which exposes static methods for various common math functions. Currently, the methods simply wrap the methods of the System.Math class (with the exception of a few added extras). This is in case the implementation needs to be swapped out with a faster C++ implementation, if deemed that the System.Math methods are not up to far speed wise.

Remarks

Field Members

Name Access Summary
DEGREES_PER_RADIAN : Single public
PI : Single public
RADIANS_PER_DEGREE : Single public
TWO_PI : Single public

Method Members

Name Access Summary
Abs() : Single public Returns the absolute value of the supplied number.
ACos() : Single public Returns the arc cosine of the angle.
ASin() : Single public Returns the arc sine of the angle.
BuildReflectionMatrix?() : Matrix4 public Builds a reflection matrix for the specified plane.
CalculateBasicFaceNormal?() : Vector3 public Calculate a face normal, no w-information.
CalculateFaceNormal?() : Vector4 public Calculate a face normal, including the w component which is the offset from the origin.
CalculateTangentSpaceVector?() : Vector3 public Calculates the tangent space vector for a given set of positions / texture coords.
Cos() : Single public Returns the cosine of the angle.
DegreesToRadians?() : Single public Converts degrees to radians.
FloatEqual?() : Boolean public
FloatEqual?() : Boolean public Compares float values for equality, taking into consideration that floating point values should never be directly compared using ==. 2 floats could be conceptually equal, but vary by a .000001 which would fail in a direct comparison. To circumvent that, a tolerance value is used to see if the difference between the 2 floats is less than the desired amount of accuracy.
Intersects() : Intersection public Tests an intersection between two boxes.
Intersects() : Boolean public Plane/Box intersection test.
Intersects() : IntersectResult? public Tests an intersection between a ray and a box.
Intersects() : IntersectResult? public Ray/Plane intersection test.
Intersects() : IntersectResult? public Ray/PlaneBoundedVolume intersection test.
Intersects() : IntersectResult? public
Intersects() : IntersectResult? public Ray/Sphere intersection test.
Intersects() : Boolean public Sphere/Box intersection test.
Intersects() : Boolean public Sphere/Plane intersection test.
InvSqrt?() : Single public Inverse square root.
Max() : Single public Used to quickly determine the greater value between two values.
Min() : Single public Used to quickly determine the lesser value between two values.
PointInTri2D?() : Boolean public Checks wether a given point is inside a triangle, in a 2-dimensional (Cartesian) space.
RadiansToDegrees?() : Single public Converts radians to degrees.
RangeRandom?() : Single public Returns a random value between the specified min and max values.
Sin() : Single public Returns the sine of the angle.
Sqrt() : Single public Returns the square root of a number.
SymmetricRandom?() : Single public
Tan() : Single public Returns the tangent of the angle.
UnitRandom?() : Single public

Namespace : MathLib?.Collections



MathLib?.Collections Type List

Interfaces

Type Summary
QuaternionCollection.IQuaternionCollectionEnumerator Supports type-safe iteration over a .
Vector3List.IVector3ListEnumerator Supports type-safe iteration over a .

Enumerations

Type Summary
QuaternionCollection.Tag
Vector3List.Tag

Classes

Type Summary
BaseCollection Serves as a basis for strongly typed collections in the math lib.
Pair A simple container class for returning a pair of objects from a method call (similar to std::pair, minus the templates).
PlaneBoundedVolumeList Initializes a new instance of the class.
PlaneList Initializes a new instance of the class.
QuaternionCollection A strongly-typed collection of objects.
Vector3List A strongly-typed collection of objects.


MathLib?.Collections Interfaces

QuaternionCollection.IQuaternionCollectionEnumerator Interface

Summary

nestedPublic interface IQuaternionCollectionEnumerator?

Supports type-safe iteration over a .

Remarks

Supports type-safe iteration over a .

Property Members

Name Access Summary
Current : Quaternion public Gets the current element in the collection.

Method Members

Name Access Summary
MoveNext?() : Boolean public Advances the enumerator to the next element in the collection.
Reset() : Void public Sets the enumerator to its initial position, before the first element in the collection.

Vector3List.IVector3ListEnumerator Interface

Summary

nestedPublic interface Vector3List.IVector3ListEnumerator

Supports type-safe iteration over a .

Remarks

Supports type-safe iteration over a .

Property Members

Name Access Summary
Current : Vector3 public Gets the current element in the collection.

Method Members

Name Access Summary
MoveNext?() : Boolean public Advances the enumerator to the next element in the collection.
Reset() : Void public Sets the enumerator to its initial position, before the first element in the collection.


MathLib?.Collections Enumerations

QuaternionCollection.Tag Enumeration

Summary

nestedFamily enumeration QuaternionCollection?.Tag

Enumeration Members

Field Summary
Default

Vector3List.Tag Enumeration

Summary

nestedFamily enumeration Vector3List.Tag

Enumeration Members

Field Summary
Default


MathLib?.Collections Classes

Pair Class

Summary

public class Pair

A simple container class for returning a pair of objects from a method call (similar to std::pair, minus the templates).

Remarks

Constructor Members

Name Access Summary
Pair() public

Field Members

Name Access Summary
first : Object public
second : Object public

Method Members

Name Access Summary

QuaternionCollection Class

Summary

public class QuaternionCollection? : System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable, System.ICloneable

A strongly-typed collection of objects.

This type has the following attributes: SerializableAttribute?

Remarks

A strongly-typed collection of objects.

Constructor Members

Name Access Summary
QuaternionCollection?() public Initializes a new instance of the QuaternionCollection? class that is empty and has the default initial capacity.
QuaternionCollection?() public Initializes a new instance of the QuaternionCollection? class that contains elements copied from the specified QuaternionCollection?.
QuaternionCollection?() protected
QuaternionCollection?() public Initializes a new instance of the QuaternionCollection? class that contains elements copied from the specified array.
QuaternionCollection?() public Initializes a new instance of the QuaternionCollection? class that has the specified initial capacity.

Property Members

Name Access Summary
Capacity : Int32 public Gets or sets the number of elements the QuaternionCollection? can contain.
Count : Int32 public Gets the number of elements actually contained in the QuaternionCollection?.
IsFixedSize? : Boolean public Gets a value indicating whether the collection has a fixed size.
IsReadOnly? : Boolean public gets a value indicating whether the IList is read-only.
IsSynchronized? : Boolean public Gets a value indicating whether access to the collection is synchronized (thread-safe).
Item : Quaternion public Gets or sets the at the specified index.
SyncRoot? : Object public Gets an object that can be used to synchronize access to the collection.

Method Members

Name Access Summary
Add() : Int32 public Adds a to the end of the QuaternionCollection?.
AddRange?() : Int32 public Adds the elements of another QuaternionCollection? to the current QuaternionCollection?.
AddRange?() : Int32 public Adds the elements of a array to the current QuaternionCollection?.
Clear() : Void public Removes all elements from the QuaternionCollection?.
Clone() : Object public Creates a shallow copy of the .
Contains() : Boolean public Determines whether a given is in the QuaternionCollection?.
CopyTo?() : Void public Copies the entire QuaternionCollection? to a one-dimensional array.
CopyTo?() : Void public Copies the entire QuaternionCollection? to a one-dimensional array, starting at the specified index of the target array.
GetEnumerator?() : IQuaternionCollectionEnumerator? public Returns an enumerator that can iterate through the QuaternionCollection?.
IndexOf?() : Int32 public Returns the zero-based index of the first occurrence of a in the QuaternionCollection?.
Insert() : Void public Inserts an element into the QuaternionCollection? at the specified index.
ReadOnly?() : QuaternionCollection? public Creates a read-only wrapper for a QuaternionCollection? instance.
Remove() : Void public Removes the first occurrence of a specific from the QuaternionCollection?.
RemoveAt?() : Void public Removes the element at the specified index of the QuaternionCollection?.
Synchronized() : QuaternionCollection? public Creates a synchronized (thread-safe) wrapper for a QuaternionCollection? instance.
TrimToSize?() : Void public Sets the capacity to the actual number of elements.

Vector3List Class

Summary

public class Vector3List : System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable, System.ICloneable

A strongly-typed collection of objects.

This type has the following attributes: SerializableAttribute?

Remarks

A strongly-typed collection of objects.

Constructor Members

Name Access Summary
Vector3List() public Initializes a new instance of the Vector3List class that is empty and has the default initial capacity.
Vector3List() public Initializes a new instance of the Vector3List class that contains elements copied from the specified Vector3List.
Vector3List() protected
Vector3List() public Initializes a new instance of the Vector3List class that contains elements copied from the specified array.
Vector3List() public Initializes a new instance of the Vector3List class that has the specified initial capacity.

Property Members

Name Access Summary
Capacity : Int32 public Gets or sets the number of elements the Vector3List can contain.
Count : Int32 public Gets the number of elements actually contained in the Vector3List.
IsFixedSize? : Boolean public Gets a value indicating whether the collection has a fixed size.
IsReadOnly? : Boolean public gets a value indicating whether the IList is read-only.
IsSynchronized? : Boolean public Gets a value indicating whether access to the collection is synchronized (thread-safe).
Item : Vector3 public Gets or sets the at the specified index.
SyncRoot? : Object public Gets an object that can be used to synchronize access to the collection.

Method Members

Name Access Summary
Add() : Int32 public Adds a to the end of the Vector3List.
AddRange?() : Int32 public Adds the elements of another Vector3List to the current Vector3List.
AddRange?() : Int32 public Adds the elements of a array to the current Vector3List.
Clear() : Void public Removes all elements from the Vector3List.
Clone() : Object public Creates a shallow copy of the .
Contains() : Boolean public Determines whether a given is in the Vector3List.
CopyTo?() : Void public Copies the entire Vector3List to a one-dimensional array.
CopyTo?() : Void public Copies the entire Vector3List to a one-dimensional array, starting at the specified index of the target array.
GetEnumerator?() : IVector3ListEnumerator public Returns an enumerator that can iterate through the Vector3List.
IndexOf?() : Int32 public Returns the zero-based index of the first occurrence of a in the Vector3List.
Insert() : Void public Inserts an element into the Vector3List at the specified index.
ReadOnly?() : Vector3List public Creates a read-only wrapper for a Vector3List instance.
Remove() : Void public Removes the first occurrence of a specific from the Vector3List.
RemoveAt?() : Void public Removes the element at the specified index of the Vector3List.
Synchronized() : Vector3List public Creates a synchronized (thread-safe) wrapper for a Vector3List instance.
TrimToSize?() : Void public Sets the capacity to the actual number of elements.

BaseCollection Class

Summary

public abstract class BaseCollection? : System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IEnumerator

Serves as a basis for strongly typed collections in the math lib.

Remarks

Can't wait for Generics in .Net Framework 2.0!

Constructor Members

Name Access Summary
BaseCollection?() public

Field Members

Name Access Summary
objectList : ArrayList? protected

Property Members

Name Access Summary
Count : Int32 public
Current : Object public Returns the current object in the enumeration.
IsSynchronized? : Boolean public
Item : Object public
SyncRoot? : Object public

Method Members

Name Access Summary
Add() : Void protected Adds an item to the collection.
Clear() : Void public Clears all objects from the collection.
CopyTo?() : Void public
GetEnumerator?() : IEnumerator public
MoveNext?() : Boolean public Moves to the next item in the enumeration if there is one.
Remove() : Void public Removes the item from the collection.
Reset() : Void public Resets the in progress enumerator.

PlaneList Class

Summary

public class PlaneList? : ArrayList?, System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable, System.ICloneable

Constructor Members

Name Access Summary
PlaneList?() public Initializes a new instance of the class.

Property Members

Name Access Summary

Method Members

Name Access Summary
Add() : Void public

PlaneBoundedVolumeList Class

Summary

public class PlaneBoundedVolumeList? : ArrayList?, System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable, System.ICloneable

Constructor Members

Name Access Summary
PlaneBoundedVolumeList?() public Initializes a new instance of the class.

Property Members

Name Access Summary

Method Members

Name Access Summary
Add() : Void public

 

-- UpDown - 02 Feb 2007

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
 
Imaginality Developer Resources Wiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Developer's TWiki? Send feedback