All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_IsoAdaptiveSampler Class Referenceabstract

#include <GU_IsoAdaptive.h>

+ Inheritance diagram for GU_IsoAdaptiveSampler:

Public Member Functions

 GU_IsoAdaptiveSampler ()
virtual ~GU_IsoAdaptiveSampler ()
virtual float sample (const UT_Vector3 &pos)=0
virtual UT_Vector3 gradient (const UT_Vector3 &pos)=0
 Computes the gradient of the implicit function. More...
virtual bool settle (UT_Vector3 &pos, float tol)
virtual bool hingeSettle (UT_Vector3 &result, UT_Vector3 center, UT_Vector3 stepdir, UT_Vector3 normal, float stepsize, float tol)
float stepsize (const UT_Vector3 &pos)
 Reports the ideal step size for any location in space. More...
void setStepScale (float minstep, float maxstep, float stepscale)
void setStepSizeSampler (GU_IsoAdaptiveSampler *sampler)
void setCurvatureTestDist (float querydist)
virtual bool isInside (const UT_Vector3 &pos)
 Returns true if pos is inside the active region. More...

Protected Member Functions

virtual float stepsizeSubclass (const UT_Vector3 &pos)

Protected Attributes

float myMinStep
float myMaxStep
float myStepScale
float myQueryDist

Detailed Description

This sampler base class is used by the adaptive sampler to query the implicit function. Because some operations may be accelerated with special knowledge of your implicit function, some higher level tools are present here as virtuals.

Definition at line 34 of file GU_IsoAdaptive.h.

Constructor & Destructor Documentation

GU_IsoAdaptiveSampler::GU_IsoAdaptiveSampler ( )
virtual GU_IsoAdaptiveSampler::~GU_IsoAdaptiveSampler ( )

Definition at line 38 of file GU_IsoAdaptive.h.

Member Function Documentation

virtual UT_Vector3 GU_IsoAdaptiveSampler::gradient ( const UT_Vector3 pos)
pure virtual

Computes the gradient of the implicit function.

Implemented in GU_IsoAdaptiveSamplerVolume.

virtual bool GU_IsoAdaptiveSampler::hingeSettle ( UT_Vector3 result,
UT_Vector3  center,
UT_Vector3  stepdir,
UT_Vector3  normal,
float  stepsize,
float  tol 

Does a hinge settle. First we run a normal settle, but if it fails or is too far we switch to a search on the circle described by the direction, normal, and distance.

virtual bool GU_IsoAdaptiveSampler::isInside ( const UT_Vector3 pos)

Returns true if pos is inside the active region.

Reimplemented in GU_IsoAdaptiveSamplerVolume.

virtual float GU_IsoAdaptiveSampler::sample ( const UT_Vector3 pos)
pure virtual

Returns the value of the implicit function at a given point negative is inside, positive outside.

Implemented in GU_IsoAdaptiveSamplerVolume.

void GU_IsoAdaptiveSampler::setCurvatureTestDist ( float  querydist)

To compute the curvature the gradient is sampled at nearby points. This controls the distance to do the sampling. Default is 0.01

void GU_IsoAdaptiveSampler::setStepScale ( float  minstep,
float  maxstep,
float  stepscale 

The subclass stepsize will be multiplied by the scale and clamped to the given min/max.

void GU_IsoAdaptiveSampler::setStepSizeSampler ( GU_IsoAdaptiveSampler sampler)

Overloads the curvature based step calcuation with another sampler, it will invoke the given sampler to determine the step size.

virtual bool GU_IsoAdaptiveSampler::settle ( UT_Vector3 pos,
float  tol 

Settles the given point onto the iso surface. The base class does a search along the normal until an opposite signed value is found, then a brent search is done from there. Returns false if failed to settle

float GU_IsoAdaptiveSampler::stepsize ( const UT_Vector3 pos)

Reports the ideal step size for any location in space.

virtual float GU_IsoAdaptiveSampler::stepsizeSubclass ( const UT_Vector3 pos)

Computes the ideal step size at this location. Step size should be a smooth function over space. It must be fine enough to capture any sudden changes in direction or thin connections. The default will use a curvature computation by computing the gradient at small offsets in the non-normal directions. The result is scaled by the global stepsize scale and clamped by the min/max step sizes.

Member Data Documentation

float GU_IsoAdaptiveSampler::myMaxStep

Definition at line 90 of file GU_IsoAdaptive.h.

float GU_IsoAdaptiveSampler::myMinStep

Definition at line 90 of file GU_IsoAdaptive.h.

float GU_IsoAdaptiveSampler::myQueryDist

Definition at line 91 of file GU_IsoAdaptive.h.

float GU_IsoAdaptiveSampler::myStepScale

Definition at line 90 of file GU_IsoAdaptive.h.

GU_IsoAdaptiveSampler* GU_IsoAdaptiveSampler::myStepSizeSampler

Definition at line 93 of file GU_IsoAdaptive.h.

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