Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Geometry.cpp File Reference
#include "MemDebug.h"
#include "Geometry.h"

Go to the source code of this file.

Macros

#define DONT_INTERSECT   0
#define DO_INTERSECT   1
#define COLLINEAR   2

Functions

double ClosestApproachTime (const Point &loc1, const Point &vel1, const Point &loc2, const Point &vel2)
double ClosestApproachTime (const Vec3 &loc1, const Vec3 &vel1, const Vec3 &loc2, const Vec3 &vel2)
void swap_elem (double &a, double &b)
int sign (double d)
double DotProduct (const Point &a, const Point &b)
void CrossProduct (const Point &a, const Point &b, Point &out)
void MConcat (double in1[3][3], double in2[3][3], double out[3][3])
int SAME_SIGNS (double a, double b)
int lines_intersect (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double &ix, double &iy)

Macro Definition Documentation

#define COLLINEAR   2

Definition at line 622 of file Geometry.cpp.

#define DO_INTERSECT   1

Definition at line 621 of file Geometry.cpp.

#define DONT_INTERSECT   0

Definition at line 620 of file Geometry.cpp.


Function Documentation

double ClosestApproachTime ( const Point loc1,
const Point vel1,
const Point loc2,
const Point vel2 
)

Definition at line 101 of file Geometry.cpp.

double ClosestApproachTime ( const Vec3 loc1,
const Vec3 vel1,
const Vec3 loc2,
const Vec3 vel2 
)

Definition at line 166 of file Geometry.cpp.

void CrossProduct ( const Point a,
const Point b,
Point out 
)

Definition at line 557 of file Geometry.cpp.

double DotProduct ( const Point a,
const Point b 
)

Definition at line 549 of file Geometry.cpp.

int lines_intersect ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3,
double  x4,
double  y4,
double &  ix,
double &  iy 
)

Definition at line 630 of file Geometry.cpp.

void MConcat ( double  in1[3][3],
double  in2[3][3],
double  out[3][3] 
)

Definition at line 567 of file Geometry.cpp.

int SAME_SIGNS ( double  a,
double  b 
)
inline

Definition at line 624 of file Geometry.cpp.

int sign ( double  d)
inline

Definition at line 390 of file Geometry.cpp.

void swap_elem ( double &  a,
double &  b 
)
inline

Definition at line 264 of file Geometry.cpp.