36 template <
typename Real>
85 int numFaces,
ConvexFace const* faces,
int numRays,
120 int numFaces,
SimpleFace const* faces,
int numRays,
165 template <
typename Real>
182 template <
typename Real>
185 int numRays,
Vector3<Real> const* directions,
unsigned int method)
199 template <
typename Real>
202 int numRays,
Vector3<Real> const* directions,
unsigned int method)
216 template <
typename Real>
250 template <
typename Real>
257 if (planeDistance < (Real)0)
260 if (planeAngle <= (Real)0)
267 if (planeDistance >(Real)0)
270 if (planeAngle >= (Real)0)
280 template <
typename Real>
307 for (
int k = 0; k < 3; ++k)
313 if (rtQuery(ray, triangle).intersect)
326 return insideCount > mNumRays / 2;
329 template <
typename Real>
356 size_t numVerticesM1 = face->
indices.size() - 1;
358 for (
size_t k = 1; k < numVerticesM1; ++k)
363 if (rtQuery(ray, triangle).intersect)
377 return insideCount > mNumRays / 2;
380 template <
typename Real>
407 size_t numTriangles = face->
triangles.size() / 3;
408 LogAssert(numTriangles > 0,
"Triangulation must exist.");
411 int const* currIndex = &face->
triangles[0];
412 for (
size_t t = 0;
t < numTriangles; ++
t)
415 for (
int k = 0; k < 3; ++k)
417 triangle.
v[k] =
mPoints[*currIndex++];
421 if (rtQuery(ray, triangle).intersect)
435 return insideCount > mNumRays / 2;
438 template <
typename Real>
440 unsigned int method)
const 476 basis[0] = face->
plane.normal;
482 Dot(basis[1], diff),
Dot(basis[2], diff) };
491 size_t numIndices = face->
indices.size();
493 for (
size_t k = 1; k < numIndices; ++k)
528 return insideCount > mNumRays / 2;
531 template <
typename Real>
568 basis[0] = face->
plane.normal;
574 Dot(basis[1], diff),
Dot(basis[2], diff) };
583 size_t numIndices = face->
indices.size();
585 for (
size_t k = 1; k < numIndices; ++k)
609 return insideCount > mNumRays / 2;
static bool FastNoIntersect(Ray3< Real > const &ray, Plane3< Real > const &plane)
Vector< N, Real > direction
PointInPolyhedron3(int numPoints, Vector3< Real > const *points, int numFaces, TriangleFace const *faces, int numRays, Vector3< Real > const *directions)
TriangleFace const * mTFaces
#define LogAssert(condition, message)
SimpleFace const * mSFaces
std::vector< int > indices
bool Contains(Vector3< Real > const &p) const
Vector3< Real > const * mPoints
bool Contains(Vector2< Real > const &p) const
GLfixed GLfixed GLint GLint GLfixed points
bool ContainsConvexOrderLogN(Vector2< Real > const &p) const
bool ContainsC0(Vector3< Real > const &p) const
bool ContainsT0(Vector3< Real > const &p) const
GLsizei GLenum const void * indices
Vector3< Real > const * mDirections
std::vector< int > triangles
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
bool ContainsConvexOrderN(Vector2< Real > const &p) const
bool ContainsC1C2(Vector3< Real > const &p, unsigned int method) const
std::vector< int > indices
bool ContainsS1(Vector3< Real > const &p) const
ConvexFace const * mCFaces
std::vector< Vector2< Real > > mProjVertices
Real ComputeOrthogonalComplement(int numInputs, Vector2< Real > *v, bool robust=false)
bool ContainsS0(Vector3< Real > const &p) const
std::array< Vector< N, Real >, 3 > v
GLenum GLuint GLint GLenum face