7 #ifndef __vdb_SurfaceVDB_h__ 8 #define __vdb_SurfaceVDB_h__ 25 public SurfaceSphere::Impact,
31 #if FE_COUNTED_STORE_TRACKER 32 setName(
"SurfaceVDB::Impact");
35 virtual ~Impact(
void) {}
37 virtual I32 pointIndex0(
void)
const 38 {
return m_pointIndex0; }
39 void setPointIndex0(I32 a_pointIndex0)
40 { m_pointIndex0=a_pointIndex0; }
45 { m_vertex0=a_vertex0; }
52 using SurfaceSphere::Impact::draw;
74 using SurfaceSphere::bind;
76 virtual void bind(
Instance a_instance);
78 using SurfaceSphere::containment;
80 virtual Containment containment(
83 using SurfaceSphere::nearestPoint;
88 using SurfaceSphere::rayImpact;
93 BWORD a_anyHit)
const;
95 using SurfaceSphere::draw;
103 I32 vertexCount(
void)
const 104 {
return m_vertexCount; }
106 BWORD getVertexPoint(I32 a_index,
109 if(a_index<0 || a_index>=m_vertexCount)
113 a_rPoint=m_pVertexArray[a_index];
116 BWORD getVertexNormal(I32 a_index,
119 if(a_index<0 || a_index>=m_vertexCount)
123 a_rNormal=m_pNormalArray[a_index];
126 BWORD getVertexCpt(I32 a_index,
129 if(a_index<0 || a_index>=m_vertexCount)
133 a_rCpt=m_pCptArray[a_index];
136 BWORD getVertexValue(I32 a_index,
139 if(a_index<0 || a_index>=m_vertexCount)
143 a_rValue=m_pValueArray[a_index];
148 virtual void cache(
void);
150 virtual void resolveImpact(
sp<ImpactI> a_spImpactI)
const {}
155 I32 a_vertexIndex)
const;
157 openvdb::Vec3d spatialToIndex(
160 const openvdb::Vec3d& a_coord)
const;
163 class PointList:
public std::vector<openvdb::Vec3R>
166 using PosType = openvdb::Vec3R;
170 void getPos(
size_t n, openvdb::Vec3R& xyz)
const 171 { xyz = operator[](n); }
175 Real a_maxDistance)
const;
177 void bindGridBase(openvdb::GridBase::ConstPtr& a_gridPtr);
181 openvdb::FloatGrid::ConstPtr m_floatGridPtr;
182 openvdb::Vec3SGrid::ConstPtr m_cptGridPtr;
183 openvdb::Vec3SGrid::ConstPtr m_normalGridPtr;
184 openvdb::Vec3SGrid::ConstPtr m_uvGridPtr;
186 openvdb::tools::PointIndexGrid::Ptr m_pointGridPtr;
188 PointList m_pointList;
192 Color* m_pColorArray;
Base class providing protection counting for cp<>
Definition: Protectable.h:28
Smart pointer used with types represented by BaseType.
Definition: Instance.h:28
kernel
Definition: namespace.dox:3
Special vector for color (RGBA)
Definition: Color.h:21
VDB Surface.
Definition: SurfaceVDB.h:19
Spherical Surface.
Definition: SurfaceSphere.h:20
Automatically reference-counted string container.
Definition: String.h:128
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192