|
HDK
|
#include <GEO_ImplicitSurface.h>
Classes | |
| struct | DParms |
| Time derivatives of shape/operation parameters for computing dparm. More... | |
Public Types | |
| using | Float = VEXfloat< PREC > |
| using | Vec3 = VEXvec3< PREC > |
| using | Vec4 = UT_Vector4T< Float > |
| using | Quat = UT_QuaternionT< Float > |
| using | Shape = GEO_ImplicitBasicSurface< PREC > |
| using | Op = GEO_ImplicitSurfaceOp< PREC > |
| using | IntervalF = UT_IntervalT< Float > |
| using | BBox3 = UT_BoundingBoxT< Float > |
Public Member Functions | |
| GEO_ImplicitSurface ()=default | |
| GEO_ImplicitSurface (const GEO_Detail &geo) | |
| void | applyTransform (const Vec3 &translate, const Quat &rotate, Float uniform_scale) |
| void | applyIndexSpaceTransform (const GA_PrimVolumeXform &index_xform) |
| void | applyOffset (const Float offset) |
| Apply offset to the surface. More... | |
| Float | operator() (const Vec3 &P) const |
| Float | operator() (const Vec3 &P, Vec3 &grad) const |
| Float | operator() (const Vec3 &P, Vec3 &grad, Float &dparm) const |
| void | evalBatched (int npts, const Vec3 *P, Float *sdf) const |
| void | evalBatched (int npts, const Vec3 *P, Float *sdf, Vec3 *grad) const |
| void | evalBatched (int npts, const Vec3 *P, Float *sdf, Vec3 *grad, Float *dparm) const |
| void | evalBatched (int npts, const Vec3 *P, Float *sdf, int *shape_id, Vec3 *grad, Float *dparm) const |
| void | evalBatchedAttr (int npts, const Vec3 *P, Float *sdf, int *shape_id, Vec3 *grad, Float *dparm, const GA_ROHandleF &h_attr, const GA_IndexMap &ptmap, Float *attr_out) const |
| void | evalBatchedAttr (int npts, const Vec3 *P, Float *sdf, int *shape_id, Vec3 *grad, Float *dparm, const GA_ROHandleV3 &h_attr, const GA_IndexMap &ptmap, Vec3 *attr_out) const |
| void | evalBatchedVel (int npts, const Vec3 *P, Float *sdf, int *shape_id, Vec3 *grad, Float *dparm, Vec3 *rigid_vel) const |
| IntervalF | evalInterval (const BBox3 &P, UT_Array< int > &relevant_ids) const |
| Evaluate SDF over an interval region, returning relevant shape IDs. More... | |
| IntervalF | evalInterval (const BBox3 &P) const |
| Evaluate SDF over an interval region. More... | |
| IntervalF | evalInterval (const Vec3 ¢er, const Float radius) const |
| Evaluate SDF over an interval region. More... | |
| IntervalF | outputBoundAndPrune (const Vec3 ¢er, const Float radius, GEO_ImplicitSurface< PREC > &pruned) const |
| Float | offsetEstimate () |
Public Attributes | |
| UT_ValArray< Shape > | myShapes |
| UT_ValArray< Op > | myOps |
| UT_ValArray< DParms > | myDParms |
| int | myNPoints = 0 |
Compound Implicit Surface - evaluates compound SDFs built from basic shapes combined with boolean/blending operations.
Constructed from a GEO_Detail whose points carry implicit surface attributes. The evaluation uses a recursive algorithm to handle nested Begin/End groups.
Shape/operation sequence structure:
Definition at line 44 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::BBox3 = UT_BoundingBoxT<Float> |
Definition at line 68 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::Float = VEXfloat<PREC> |
Definition at line 47 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::IntervalF = UT_IntervalT<Float> |
Definition at line 67 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::Op = GEO_ImplicitSurfaceOp<PREC> |
Definition at line 52 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::Quat = UT_QuaternionT<Float> |
Definition at line 50 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::Shape = GEO_ImplicitBasicSurface<PREC> |
Definition at line 51 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::Vec3 = VEXvec3<PREC> |
Definition at line 48 of file GEO_ImplicitSurface.h.
| using GEO_ImplicitSurface< PREC >::Vec4 = UT_Vector4T<Float> |
Definition at line 49 of file GEO_ImplicitSurface.h.
|
default |
|
inline |
Construct from geometry, reading all implicit surface attributes from point data into the internal arrays.
Definition at line 80 of file GEO_ImplicitSurface.h.
|
inline |
Transform the implicit surface from world space into the index space of a VDB defined by the given GEO_PrimVolumeXform. After this call, evaluating positions in index space will produce SDF values in index-space units (multiply by voxelsize for world).
Definition at line 174 of file GEO_ImplicitSurface.h.
| void GEO_ImplicitSurface< PREC >::applyOffset | ( | const Float | offset | ) |
Apply offset to the surface.
|
inline |
Apply translation, rotation, and uniform scale to all shapes. Positions: new_pos = rotate(old_pos * uniform_scale) + translate Orientations: composed with the rotation quaternion Distance parameters: scaled by uniform_scale on shapes and ops NOTE: DParms (v, w) are not transformed by this method.
Definition at line 154 of file GEO_ImplicitSurface.h.
| void GEO_ImplicitSurface< PREC >::evalBatched | ( | int | npts, |
| const Vec3 * | P, | ||
| Float * | sdf | ||
| ) | const |
| void GEO_ImplicitSurface< PREC >::evalBatched | ( | int | npts, |
| const Vec3 * | P, | ||
| Float * | sdf, | ||
| Vec3 * | grad | ||
| ) | const |
| void GEO_ImplicitSurface< PREC >::evalBatched | ( | int | npts, |
| const Vec3 * | P, | ||
| Float * | sdf, | ||
| Vec3 * | grad, | ||
| Float * | dparm | ||
| ) | const |
| void GEO_ImplicitSurface< PREC >::evalBatched | ( | int | npts, |
| const Vec3 * | P, | ||
| Float * | sdf, | ||
| int * | shape_id, | ||
| Vec3 * | grad, | ||
| Float * | dparm | ||
| ) | const |
Same as above, but also outputs the winning shape id per point. grad/dparm may be nullptr if not needed.
| void GEO_ImplicitSurface< PREC >::evalBatchedAttr | ( | int | npts, |
| const Vec3 * | P, | ||
| Float * | sdf, | ||
| int * | shape_id, | ||
| Vec3 * | grad, | ||
| Float * | dparm, | ||
| const GA_ROHandleF & | h_attr, | ||
| const GA_IndexMap & | ptmap, | ||
| Float * | attr_out | ||
| ) | const |
Batched evaluation that also interpolates an arbitrary point attribute (float or vector) across the blended shapes.
| void GEO_ImplicitSurface< PREC >::evalBatchedAttr | ( | int | npts, |
| const Vec3 * | P, | ||
| Float * | sdf, | ||
| int * | shape_id, | ||
| Vec3 * | grad, | ||
| Float * | dparm, | ||
| const GA_ROHandleV3 & | h_attr, | ||
| const GA_IndexMap & | ptmap, | ||
| Vec3 * | attr_out | ||
| ) | const |
| void GEO_ImplicitSurface< PREC >::evalBatchedVel | ( | int | npts, |
| const Vec3 * | P, | ||
| Float * | sdf, | ||
| int * | shape_id, | ||
| Vec3 * | grad, | ||
| Float * | dparm, | ||
| Vec3 * | rigid_vel | ||
| ) | const |
Batched evaluation that also blends the per-shape rigid velocity (v + w x (P - pos)) across the blended shapes.
| IntervalF GEO_ImplicitSurface< PREC >::evalInterval | ( | const BBox3 & | P, |
| UT_Array< int > & | relevant_ids | ||
| ) | const |
Evaluate SDF over an interval region, returning relevant shape IDs.
| IntervalF GEO_ImplicitSurface< PREC >::evalInterval | ( | const BBox3 & | P | ) | const |
Evaluate SDF over an interval region.
| IntervalF GEO_ImplicitSurface< PREC >::evalInterval | ( | const Vec3 & | center, |
| const Float | radius | ||
| ) | const |
Evaluate SDF over an interval region.
|
inline |
Return a conservative estimate on the isoline offset. This is used whe we get bounding box based on the visualization geometry, we expand this bounding box by this offset to get a better estimate on a region where implicut surface is contained.
Definition at line 256 of file GEO_ImplicitSurface.h.
| Float GEO_ImplicitSurface< PREC >::operator() | ( | const Vec3 & | P | ) | const |
| Float GEO_ImplicitSurface< PREC >::operator() | ( | const Vec3 & | P, |
| Vec3 & | grad | ||
| ) | const |
| Float GEO_ImplicitSurface< PREC >::operator() | ( | const Vec3 & | P, |
| Vec3 & | grad, | ||
| Float & | dparm | ||
| ) | const |
| IntervalF GEO_ImplicitSurface< PREC >::outputBoundAndPrune | ( | const Vec3 & | center, |
| const Float | radius, | ||
| GEO_ImplicitSurface< PREC > & | pruned | ||
| ) | const |
Evaluate interval over a sphere and build a pruned surface expression. Pruning follows operation interval optimization flags and emits a new shape/op sequence equivalent on the queried sphere.
| UT_ValArray<DParms> GEO_ImplicitSurface< PREC >::myDParms |
Definition at line 73 of file GEO_ImplicitSurface.h.
| int GEO_ImplicitSurface< PREC >::myNPoints = 0 |
Definition at line 74 of file GEO_ImplicitSurface.h.
| UT_ValArray<Op> GEO_ImplicitSurface< PREC >::myOps |
Definition at line 72 of file GEO_ImplicitSurface.h.
| UT_ValArray<Shape> GEO_ImplicitSurface< PREC >::myShapes |
Definition at line 71 of file GEO_ImplicitSurface.h.