Sparkle Helper Library
[Sparkle Library]

Collaboration diagram for Sparkle Helper Library:


Classes

struct  sparkle::VecXY
 Vector like struct of doubles. More...
class  sparkle::Vector< T >
 A proper 3D geometric vector implementation. More...
class  sparkle::Timer
 System clock timer class. More...

Functions

Vector< double > sparkle::intersection (Vector< double > pos1, Vector< double > dir1, Vector< double > pos2, Vector< double > dir2)
 2D intersection
double sparkle::momentOfInertia (std::vector< double > x, std::vector< double > y, double mass)
 Calculate the moment of inertia of a 2D polygon.
double sparkle::dAbs (double value)
 Return absolute value of a double.

Detailed Description

Small helper library

Function Documentation

Vector<double> sparkle::intersection Vector< double >  pos1,
Vector< double >  dir1,
Vector< double >  pos2,
Vector< double >  dir2
 

2D intersection

Parameters:
pos1 Position of first vector
dir1 Vector 1
pos2 Position of second vector
dir2 Vector 1
Returns:
A vector describing the point of intersection. Will return Vector<double>::isReal() == false if no intersection.

double sparkle::momentOfInertia std::vector< double >  x,
std::vector< double >  y,
double  mass
 

Calculate the moment of inertia of a 2D polygon.

Parameters:
x List of x-coords of polygon relative to axis of rotation
y List of y-coords of polygon relative to axis of rotation
mass Mass of polygon
Returns:
Moment of inertia

double sparkle::dAbs double  value  ) 
 

Return absolute value of a double.

Parameters:
value Input value
Returns:
The absolute value of value


Hosted by SourceForge.net Logo Generated on Sat Sep 16 01:51:09 2006 for Sparkle by Doxygen 1.4.6.