11 #ifndef __GU_PrimVDB__
12 #define __GU_PrimVDB__
52 #if 0 //ndef SESI_OPENVDB
64 return *theDefinition;
76 static void convertVolumesToVDBs(
84 bool activate_inside =
true);
90 static void convertVDBs(
96 static void convertVDBs(
102 bool split_disjoint_volumes);
124 return GU_PrimVDB::buildFromGridAdapter(gdp, &grid,
src,
name);
132 const bool flood_sdf =
false,
133 const bool prune =
false,
134 const float tolerance = 0.0,
135 const bool activate_inside_sdf =
true);
140 static void convertPrimVolumeToPolySoup(
144 void normal(NormalComp &output)
const override;
145 void normal(NormalCompD &output)
const override;
149 void syncAttrsFromMetadata();
159 const openvdb::GridBase& grid,
162 GU_PrimVDB::createGridAttrsFromMetadataAdapter(prim, &grid, gdp);
175 const openvdb::MetaMap& meta_map,
178 GU_PrimVDB::createAttrsFromMetadataAdapter(owner, element, &meta_map, gdp);
187 openvdb::GridBase& grid,
191 GU_PrimVDB::createMetadataFromGridAttrsAdapter(&grid, prim, gdp);
201 openvdb::MetaMap& meta_map,
206 GU_PrimVDB::createMetadataFromAttrsAdapter(&meta_map, owner, element, geo);
216 void expandBorderFromPrimVolume(
224 bool split_disjoint_volumes,
225 bool &success)
const;
229 bool split_disjoint_volumes)
const;
235 bool &success)
const;
242 static void createGridAttrsFromMetadataAdapter(
246 static void createMetadataFromGridAttrsAdapter(
251 static void createAttrsFromMetadataAdapter(
254 const void* meta_map_ptr,
257 static void createMetadataFromAttrsAdapter(
266 friend class GU_PrimitiveFactory;
272 #if 0 //ndef SESI_OPENVDB
273 namespace openvdb_houdini {
278 #endif // __GU_PrimVDB__
GU_PrimVDB(GU_Detail *gdp, GA_Offset offset=GA_INVALID_OFFSET)
NOTE: This constructor should only be called via GU_PrimitiveFactory.
Definition of a geometry attribute.
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
virtual int64 getMemoryUsage() const
#define GA_INVALID_OFFSET
virtual void normal(NormalComp &output) const =0
static SYS_FORCE_INLINE void createAttrsFromMetadata(GA_AttributeOwner owner, GA_Offset element, const openvdb::MetaMap &meta_map, GEO_Detail &gdp)
Transfer any metadata associated with the given MetaMap to attributes on the given element specified ...
static SYS_FORCE_INLINE void createMetadataFromGridAttrs(openvdb::GridBase &grid, const GEO_PrimVDB &prim, const GEO_Detail &gdp)
Transfer a VDB primitive's attributes to a VDB grid as metadata.
virtual void countMemory(UT_MemoryCounter &counter) const
static SYS_FORCE_INLINE void createMetadataFromAttrs(openvdb::MetaMap &meta_map, GA_AttributeOwner owner, GA_Offset element, const GEO_Detail &geo)
Transfer attributes to VDB metadata.
GLuint const GLchar * name
static SYS_FORCE_INLINE GU_PrimVDB * buildFromGrid(GU_Detail &gdp, openvdb::GridBase::Ptr grid, const GEO_PrimVDB *src=NULL, const char *name=NULL)
const GA_PrimitiveDefinition & getTypeDef() const override
virtual GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0)=0
static SYS_FORCE_INLINE void createGridAttrsFromMetadata(const GEO_PrimVDB &prim, const openvdb::GridBase &grid, GEO_Detail &gdp)
Transfer any metadata associated with a VDB grid to primitive attributes on a VDB primitive...
Definition of a geometric primitive.
virtual GEO_Primitive * convertNew(GEO_ConvertParms &parms)=0
GEO_ConvertParms GU_ConvertParms