14# include <opensubdiv/far/patchMap.h>
15# include <opensubdiv/far/patchTableFactory.h>
16# include <opensubdiv/far/primvarRefiner.h>
17# include <opensubdiv/far/topologyRefinerFactory.h>
22namespace Far = OpenSubdiv::Far;
23namespace Sdc = OpenSubdiv::Sdc;
30template<
typename T>
struct OsdValue {
35 void Clear(
void *unused =
nullptr)
38 memset((
void *)&value, 0,
sizeof(
T));
41 void AddWithWeight(OsdValue<T>
const &src,
float weight)
43 value += src.value * weight;
61 vector<MergedFVar> merged_fvars;
63 explicit OsdMesh(
Mesh &mesh) : mesh(mesh) {}
65 Sdc::Options sdc_options();
66 bool use_smooth_fvar(
const Attribute &attr)
const;
67 bool use_smooth_fvar()
const;
73 unique_ptr<Far::TopologyRefiner> refiner;
74 unique_ptr<Far::PatchTable> patch_table;
75 unique_ptr<Far::PatchMap> patch_map;
76 vector<OsdValue<float3>> refined_verts;
78 void build(OsdMesh &osd_mesh);
86 explicit OsdPatch(OsdData &
data) : osd_data(
data) {}
BMesh const char void * data
ATTR_WARN_UNUSED_RESULT const BMVert * v
void build(btStridingMeshInterface *triangles, bool useQuantizedAabbCompression, const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax)
virtual void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, const float u, float v) const =0
#define CCL_NAMESPACE_END
VecBase< float, 3 > float3