HDK
|
#include <GU_IsoAdaptive.h>
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 |
GU_IsoAdaptiveSampler * | myStepSizeSampler |
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.
GU_IsoAdaptiveSampler::GU_IsoAdaptiveSampler | ( | ) |
|
inlinevirtual |
Definition at line 38 of file GU_IsoAdaptive.h.
|
pure virtual |
Computes the gradient of the implicit function.
Implemented in GU_IsoAdaptiveSamplerVolume.
|
virtual |
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 |
Returns true if pos is inside the active region.
Reimplemented in GU_IsoAdaptiveSamplerVolume.
|
pure virtual |
Returns the value of the implicit function at a given point negative is inside, positive outside.
Implemented in GU_IsoAdaptiveSamplerVolume.
To compute the curvature the gradient is sampled at nearby points. This controls the distance to do the sampling. Default is 0.01
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 |
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.
|
protectedvirtual |
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.
|
protected |
Definition at line 90 of file GU_IsoAdaptive.h.
|
protected |
Definition at line 90 of file GU_IsoAdaptive.h.
|
protected |
Definition at line 91 of file GU_IsoAdaptive.h.
|
protected |
Definition at line 90 of file GU_IsoAdaptive.h.
|
protected |
Definition at line 93 of file GU_IsoAdaptive.h.