#include <cmath>
#include "NVec.h"
Go to the source code of this file.
Classes | |
struct | RAYTRI |
struct | RAYTRI::PLANE |
Macros | |
#define | EPSILON 1e-24 |
#define | CROSS(dest, v1, v2) |
#define | DOT(v1, v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) |
#define | SUB(dest, v1, v2) |
#define | PLUCKER(pline, pt1, pt2) |
#define | SIDE(p, q) (p[0]*q[4]+p[1]*q[5]+p[2]*q[3]+p[3]*q[2]+p[4]*q[0]+p[5]*q[1]) |
#define | RAYPOINT(result, start, end, dist) { result[0]=start[0]+d*(end[0]-start[0]); result[1]=start[1]+d*(end[1]-start[1]); result[2]=start[2]+d*(end[2]-start[2]); } |
#define | SMALL_NUM 1e-24 |
Functions | |
int | P_triRay (double *p, double *d, double *v0, double *v1, double *v2, Vec3D &I) |
int | c2005 (const RAYTRI *rt) |
int | intersect_ray_triangle (const Vec3D &RP0, const Vec3D &dir, Vec3D &TV0, Vec3D &TV1, Vec3D &TV2, Vec3D &I) |
int | intersect_triangle (double orig[3], double dir[3], double vert0[3], double vert1[3], double vert2[3], double *t, double *u, double *v) |
int | intersect_triangle1 (double orig[3], double dir[3], double vert0[3], double vert1[3], double vert2[3], double *t, double *u, double *v) |
int | intersect_triangle2 (double orig[3], double dir[3], double vert0[3], double vert1[3], double vert2[3], double *t, double *u, double *v) |
int | intersect_triangle3 (double orig[3], double dir[3], double vert0[3], double vert1[3], double vert2[3], double *t, double *u, double *v) |
bool | rayIntersectsTriangle (double *p, double *d, double *v0, double *v1, double *v2, Vec3D &I) |
#define CROSS | ( | dest, | |
v1, | |||
v2 | |||
) |
Definition at line 16 of file Rocon/src/ray-triangle.C.
Referenced by c2005(), intersect_triangle(), intersect_triangle1(), intersect_triangle2(), and intersect_triangle3().
#define DOT | ( | v1, | |
v2 | |||
) | (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) |
Definition at line 20 of file Rocon/src/ray-triangle.C.
Referenced by c2005(), intersect_triangle(), intersect_triangle1(), intersect_triangle2(), and intersect_triangle3().
#define EPSILON 1e-24 |
Definition at line 14 of file Rocon/src/ray-triangle.C.
Referenced by intersect_triangle(), intersect_triangle1(), intersect_triangle2(), and intersect_triangle3().
#define PLUCKER | ( | pline, | |
pt1, | |||
pt2 | |||
) |
Definition at line 25 of file Rocon/src/ray-triangle.C.
Referenced by P_triRay().
#define RAYPOINT | ( | result, | |
start, | |||
end, | |||
dist | |||
) | { result[0]=start[0]+d*(end[0]-start[0]); result[1]=start[1]+d*(end[1]-start[1]); result[2]=start[2]+d*(end[2]-start[2]); } |
Definition at line 33 of file Rocon/src/ray-triangle.C.
Referenced by c2005().
Definition at line 32 of file Rocon/src/ray-triangle.C.
Referenced by P_triRay().
#define SMALL_NUM 1e-24 |
Definition at line 273 of file Rocon/src/ray-triangle.C.
Referenced by intersect_ray_triangle().
#define SUB | ( | dest, | |
v1, | |||
v2 | |||
) |
Definition at line 21 of file Rocon/src/ray-triangle.C.
Referenced by c2005(), intersect_triangle(), intersect_triangle1(), intersect_triangle2(), and intersect_triangle3().
int c2005 | ( | const RAYTRI * | rt | ) |
Definition at line 215 of file Rocon/src/ray-triangle.C.
References CROSS, d, DOT, RAYTRI::end, nvc::norm(), RAYTRI::org, RAYPOINT, SUB, v, RAYTRI::v0, RAYTRI::v1, and RAYTRI::v2.
int intersect_ray_triangle | ( | const Vec3D & | RP0, |
const Vec3D & | dir, | ||
Vec3D & | TV0, | ||
Vec3D & | TV1, | ||
Vec3D & | TV2, | ||
Vec3D & | I | ||
) |
Definition at line 283 of file Rocon/src/ray-triangle.C.
References nvc::cross(), n, s, SMALL_NUM, and v.
int intersect_triangle | ( | double | orig[3], |
double | dir[3], | ||
double | vert0[3], | ||
double | vert1[3], | ||
double | vert2[3], | ||
double * | t, | ||
double * | u, | ||
double * | v | ||
) |
Definition at line 344 of file Rocon/src/ray-triangle.C.
int intersect_triangle1 | ( | double | orig[3], |
double | dir[3], | ||
double | vert0[3], | ||
double | vert1[3], | ||
double | vert2[3], | ||
double * | t, | ||
double * | u, | ||
double * | v | ||
) |
Definition at line 393 of file Rocon/src/ray-triangle.C.
int intersect_triangle2 | ( | double | orig[3], |
double | dir[3], | ||
double | vert0[3], | ||
double | vert1[3], | ||
double | vert2[3], | ||
double * | t, | ||
double * | u, | ||
double * | v | ||
) |
Definition at line 464 of file Rocon/src/ray-triangle.C.
int intersect_triangle3 | ( | double | orig[3], |
double | dir[3], | ||
double | vert0[3], | ||
double | vert1[3], | ||
double | vert2[3], | ||
double * | t, | ||
double * | u, | ||
double * | v | ||
) |
Definition at line 529 of file Rocon/src/ray-triangle.C.
int P_triRay | ( | double * | p, |
double * | d, | ||
double * | v0, | ||
double * | v1, | ||
double * | v2, | ||
Vec3D & | I | ||
) |
Definition at line 61 of file Rocon/src/ray-triangle.C.
References i, intersect(), PLUCKER, q, SIDE, and x.
Referenced by rayIntersectsTriangle().
bool rayIntersectsTriangle | ( | double * | p, |
double * | d, | ||
double * | v0, | ||
double * | v1, | ||
double * | v2, | ||
Vec3D & | I | ||
) |
Definition at line 586 of file Rocon/src/ray-triangle.C.
References intersect_triangle(), j, P_triRay(), and v.
Referenced by MeshBndSurf::intersection().