Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://coin3d.github.io
https://www.kongsberg.com/en/kogt/
SbTri3f Class Reference

A class that at this point in time has one purpose - figuring out if two triangles intersect each other. More...

#include <collision/SbTri3f.h>

Public Member Functions

 SbTri3f (const SbTri3f &t)
 
 SbTri3f (const SbVec3f &a, const SbVec3f &b, const SbVec3f &c)
 
SbTri3fsetValue (const SbTri3f &t)
 
SbTri3fsetValue (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
 
SbTri3foperator= (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)
 

Detailed Description

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.

Since
2002-10-22

Member Function Documentation

◆ getDistance() [1/4]

float SbTri3f::getDistance ( const SbTri3f & t) const

Returns the minimum distance from this triangle to the given triangle.

◆ getDistance() [2/4]

float SbTri3f::getDistance ( const SbVec3f & p,
const SbVec3f & p1,
const SbVec3f & p2 )
static

Returns the distance from p to the line segment p1-p2.

◆ getDistance() [3/4]

float SbTri3f::getDistance ( const SbVec3f & p) const

Returns the distance from the given point to this triangle.

◆ getDistance() [4/4]

float SbTri3f::getDistance ( const SbVec3f & p1,
const SbVec3f & p2 ) const

Returns the distance from this triangle to the given line segment.

◆ sqrDistance()

float SbTri3f::sqrDistance ( const SbVec3f & a1,
const SbVec3f & a2,
const SbVec3f & b1,
const SbVec3f & b2,
float * pfSegP0,
float * pfSegP1 )
static

Returns the distance between the two line segments.

◆ getBoundingBox()

const SbBox3f SbTri3f::getBoundingBox ( void ) const

Returns bounding box fully enclosing the triangle.


The documentation for this class was generated from the following files: