All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_KDTriQuery Class Reference

#include <UT_KDTree.h>

Public Member Functions

 UT_KDTriQuery (const UT_Vector2 &a, const UT_Vector2 &b, const UT_Vector2 &c)
float boxDist (const UT_BoundingRect &box) const
float dist (const float *P, int) const
 This distance squared needs to be exact. More...

Detailed Description

Lookup information for 2D-tree triangle queries NOTE: Distance squared here is not Euclidean distance squared, but edge-perpendicular distance squared, i.e. distance is from the incentre out, perpendicular to one of the edges, minus the incircle's radius. This avoids the need to have special cases for what would be the circular sections around each vertex. It basically indicates how far the triangle would have to be expanded (or contracted) relative to the incentre in order to hit the query point.

Definition at line 151 of file UT_KDTree.h.

Constructor & Destructor Documentation

UT_KDTriQuery::UT_KDTriQuery ( const UT_Vector2 a,
const UT_Vector2 b,
const UT_Vector2 c 

Definition at line 153 of file UT_KDTree.h.

Member Function Documentation

float UT_KDTriQuery::boxDist ( const UT_BoundingRect box) const

This can be an underestimate, but not an overestimate of the distance squared.

Definition at line 194 of file UT_KDTree.h.

float UT_KDTriQuery::dist ( const float P,
) const

This distance squared needs to be exact.

Definition at line 210 of file UT_KDTree.h.

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