sgTools Namespace Reference

Functions

long getFileLength (FILE *file)
int traceRayTriangle (sgVector3 from, sgVector3 to, sgVector3 pos1, sgVector3 pos2, sgVector3 pos3, sgVertex *I)
void traceRayMesh (sgMesh *mesh, sgVector3 from, sgVector3 to, sgVertex *I)

Detailed Description

Tools namespace. Provides functionality for different often needed tasks.


Function Documentation

long sgTools::getFileLength ( FILE *  file  ) 

Get file length. Gets the length of a file.

Parameters:
file pointer to the FILE
Returns:
the length
void sgTools::traceRayMesh ( sgMesh mesh,
sgVector3  from,
sgVector3  to,
sgVertex I 
)

Ray mesh intersection. Checks if the given ray intersects the given mesh.

Parameters:
mesh the mesh to check intersection with
from the rays starting point
to the rays end point
I the position of the intersection
int sgTools::traceRayTriangle ( sgVector3  from,
sgVector3  to,
sgVector3  pos1,
sgVector3  pos2,
sgVector3  pos3,
sgVertex I 
)

Ray triangle intersection. Checks if the given ray intersects the given triangle.

Parameters:
from the rays starting point
to the rays end point
pos1 the first vertex position
pos2 the second vertex position
pos3 the third vertex position
I the position of the intersection
Returns:
-1 = triangle is degenerate (a segment or point) 0 = disjoint (no intersect) 1 = intersect in unique point I1 2 = are in the same plane
Generated on Thu Jun 3 13:31:04 2010 for iSDGE by  doxygen 1.6.3