#include <TriangleOctree.h>
|
static constexpr int | CUBE_SIZE = TriangleOctreeRoot::CUBE_SIZE |
|
|
| ~TriangleOctree () |
|
| TriangleOctree (TriangleOctreeRoot *_tm, SReal _x=(SReal) -CUBE_SIZE, SReal _y=(SReal) -CUBE_SIZE, SReal _z=(SReal) -CUBE_SIZE, SReal _size=2 *CUBE_SIZE) |
|
void | draw (sofa::helper::visual::DrawTool *drawtool) |
|
int | trace (type::Vec3 origin, type::Vec3 direction, traceResult &result) |
| Find the nearest triangle intersecting the given ray, or -1 of not found. More...
|
|
void | traceAll (type::Vec3 origin, type::Vec3 direction, type::vector< traceResult > &results) |
| Find all triangles intersecting the given ray. More...
|
|
void | traceAllCandidates (type::Vec3 origin, type::Vec3 direction, std::set< int > &results) |
| Find all triangles intersecting the given ray. More...
|
|
void | bboxAllCandidates (type::Vec3 bbmin, type::Vec3 bbmax, std::set< int > &results) |
| Find all triangles intersecting the given ray. More...
|
|
|
int | trace (const type::Vec3 &origin, const type::Vec3 &direction, SReal tx0, SReal ty0, SReal tz0, SReal tx1, SReal ty1, SReal tz1, unsigned int a, unsigned int b, type::Vec3 &origin1, type::Vec3 &direction1, traceResult &result) |
|
template<class Res > |
void | traceAllStart (type::Vec3 origin, type::Vec3 direction, Res &results) |
|
template<class Res > |
void | traceAll (const type::Vec3 &origin, const type::Vec3 &direction, SReal tx0, SReal ty0, SReal tz0, SReal tx1, SReal ty1, SReal tz1, unsigned int a, unsigned int b, type::Vec3 &origin1, type::Vec3 &direction1, Res &results) |
|
template<class Res > |
void | bbAll (const type::Vec3 &bbmin, const type::Vec3 &bbmax, Res &results) |
|
int | nearestTriangle (int minIndex, const type::Vec3 &origin, const type::Vec3 &direction, traceResult &result) |
|
void | allTriangles (const type::Vec3 &origin, const type::Vec3 &direction, type::vector< traceResult > &results) |
|
void | allTriangles (const type::Vec3 &origin, const type::Vec3 &direction, std::set< int > &results) |
|
void | bbAllTriangles (const type::Vec3 &bbmin, const type::Vec3 &bbmax, std::set< int > &results) |
|
void | insert (SReal _x, SReal _y, SReal _z, SReal _inc, int t) |
|
◆ childVec
◆ CUBE_SIZE
constexpr int sofa::helper::TriangleOctree::CUBE_SIZE = TriangleOctreeRoot::CUBE_SIZE |
|
staticconstexpr |
◆ internal
bool sofa::helper::TriangleOctree::internal |
◆ is_leaf
bool sofa::helper::TriangleOctree::is_leaf |
◆ objects
◆ size
SReal sofa::helper::TriangleOctree::size |
◆ tm
◆ val
bool sofa::helper::TriangleOctree::val |
◆ visited
bool sofa::helper::TriangleOctree::visited |
SReal sofa::helper::TriangleOctree::x |
SReal sofa::helper::TriangleOctree::y |
SReal sofa::helper::TriangleOctree::z |
◆ ~TriangleOctree()
sofa::helper::TriangleOctree::~TriangleOctree |
( |
| ) |
|
◆ TriangleOctree()
◆ allTriangles() [1/2]
void sofa::helper::TriangleOctree::allTriangles |
( |
const type::Vec3 & |
origin, |
|
|
const type::Vec3 & |
direction, |
|
|
std::set< int > & |
results |
|
) |
| |
|
protected |
◆ allTriangles() [2/2]
◆ bbAll()
template<class Res >
void sofa::helper::TriangleOctree::bbAll |
( |
const type::Vec3 & |
bbmin, |
|
|
const type::Vec3 & |
bbmax, |
|
|
Res & |
results |
|
) |
| |
|
protected |
◆ bbAllTriangles()
void sofa::helper::TriangleOctree::bbAllTriangles |
( |
const type::Vec3 & |
bbmin, |
|
|
const type::Vec3 & |
bbmax, |
|
|
std::set< int > & |
results |
|
) |
| |
|
protected |
◆ bboxAllCandidates()
void sofa::helper::TriangleOctree::bboxAllCandidates |
( |
type::Vec3 |
bbmin, |
|
|
type::Vec3 |
bbmax, |
|
|
std::set< int > & |
results |
|
) |
| |
Find all triangles intersecting the given ray.
◆ draw()
◆ insert()
◆ nearestTriangle()
◆ trace() [1/2]
int sofa::helper::TriangleOctree::trace |
( |
const type::Vec3 & |
origin, |
|
|
const type::Vec3 & |
direction, |
|
|
SReal |
tx0, |
|
|
SReal |
ty0, |
|
|
SReal |
tz0, |
|
|
SReal |
tx1, |
|
|
SReal |
ty1, |
|
|
SReal |
tz1, |
|
|
unsigned int |
a, |
|
|
unsigned int |
b, |
|
|
type::Vec3 & |
origin1, |
|
|
type::Vec3 & |
direction1, |
|
|
traceResult & |
result |
|
) |
| |
|
protected |
◆ trace() [2/2]
Find the nearest triangle intersecting the given ray, or -1 of not found.
◆ traceAll() [1/2]
template<class Res >
void sofa::helper::TriangleOctree::traceAll |
( |
const type::Vec3 & |
origin, |
|
|
const type::Vec3 & |
direction, |
|
|
SReal |
tx0, |
|
|
SReal |
ty0, |
|
|
SReal |
tz0, |
|
|
SReal |
tx1, |
|
|
SReal |
ty1, |
|
|
SReal |
tz1, |
|
|
unsigned int |
a, |
|
|
unsigned int |
b, |
|
|
type::Vec3 & |
origin1, |
|
|
type::Vec3 & |
direction1, |
|
|
Res & |
results |
|
) |
| |
|
protected |
◆ traceAll() [2/2]
Find all triangles intersecting the given ray.
◆ traceAllCandidates()
void sofa::helper::TriangleOctree::traceAllCandidates |
( |
type::Vec3 |
origin, |
|
|
type::Vec3 |
direction, |
|
|
std::set< int > & |
results |
|
) |
| |
Find all triangles intersecting the given ray.
◆ traceAllStart()
template<class Res >
void sofa::helper::TriangleOctree::traceAllStart |
( |
type::Vec3 |
origin, |
|
|
type::Vec3 |
direction, |
|
|
Res & |
results |
|
) |
| |
|
protected |
◆ TriangleOctreeRoot