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

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

#include <TriangleSampler.h>

Inheritance diagram for Klampt::Triangle2DSampler:

Public Member Functions

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

Public Attributes

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

Detailed Description

Samples points in a list of 2d triangles.

Call InitAreas() before sampling.

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