![]() |
Coin3D is Free Software, published under the BSD 3-clause license. |
https://bitbucket.org/Coin3D/ http://www.kongsberg.com/kogt/ |
A class that at this point in time has one purpose - figuring out if two triangles intersect each other.This class is so limited in functionality that it is not included in the public Coin API for now. More...
#include <collision/SbTri3f.h>
Public Member Functions | |
SbTri3f (const SbTri3f &t) | |
SbTri3f (const SbVec3f &a, const SbVec3f &b, const SbVec3f &c) | |
SbTri3f & | setValue (const SbTri3f &t) |
SbTri3f & | setValue (const SbVec3f &a, const SbVec3f &b, const SbVec3f &c) |
void | getValue (SbTri3f &t) const |
void | getValue (SbVec3f &a, SbVec3f &b, SbVec3f &c) const |
SbVec3f | getNormal () const |
float | getDistance (const SbTri3f &t) const |
float | getDistance (const SbVec3f &p) const |
float | getDistance (const SbVec3f &p1, const SbVec3f &p2) const |
float | sqrDistance (const SbVec3f &p1, float *pfSParam=NULL, float *pfTParam=NULL) const |
SbTri3f & | operator= (const SbTri3f &t) |
SbBool | intersect (const SbTri3f &triangle) const |
SbBool | intersect (const SbTri3f &triangle, float epsilon) const |
const SbBox3f | getBoundingBox (void) const |
Static Public Member Functions | |
static float | getDistance (const SbVec3f &p, const SbVec3f &p1, const SbVec3f &p2) |
static float | sqrDistance (const SbVec3f &a1, const SbVec3f &a2, const SbVec3f &b1, const SbVec3f &b2, float *linP0, float *linP1) |
A class that at this point in time has one purpose - figuring out if two triangles intersect each other.
This class is so limited in functionality that it is not included in the public Coin API for now.
The internals will probably be changed as well, as the a, b, c representation isn't very convenient for linear algebra purposes. But as a public base class, the internal representation should be fixed, and made part of the private section of the public header.
float SbTri3f::getDistance | ( | const SbTri3f & | t | ) | const |
Returns the minimum distance from this triangle to the given triangle.
Returns the distance from p to the line segment p1-p2.
float SbTri3f::getDistance | ( | const SbVec3f & | p | ) | const |
Returns the distance from the given point to this triangle.
Returns the distance from this triangle to the given line segment.
|
static |
Returns the distance between the two line segments.
const SbBox3f SbTri3f::getBoundingBox | ( | void | ) | const |
Returns bounding box fully enclosing the triangle.