Klamp't  0.9.0
Public Member Functions | Public Attributes | List of all members
Klampt::Triangle3DSampler Struct Reference

Samples points in a list of 3d triangles. More...

#include <TriangleSampler.h>

Inheritance diagram for Klampt::Triangle3DSampler:

Public Member Functions

void InitAreas ()
void Clear ()
Real TotalArea () const
int SampleTri () const
void SamplePointOnTri (int tri, Vector3 &pt) const
void SamplePoint (Vector3 &pt) const
void SamplePoints (int num, std::vector< Vector3 > &pts) const
void SamplePoints (int num, std::vector< int > &tris, std::vector< Vector3 > &pts) const

Public Attributes

std::vector< Triangle3D > tris
std::vector< Real > areas
std::vector< Real > sumAreas

Detailed Description

Samples points in a list of 3d triangles.

Call InitAreas() before sampling.

The documentation for this struct was generated from the following file: