37 #ifndef Alembic_AbcGeom_OPolyMesh_h
38 #define Alembic_AbcGeom_OPolyMesh_h
69 : m_positions( iPos ) {}
80 const OV2fGeomParam::Sample &iUVs = OV2fGeomParam::Sample(),
81 const ON3fGeomParam::Sample &iNormals = ON3fGeomParam::Sample() )
86 , m_normals( iNormals )
91 { m_positions = iSmp; }
96 { m_velocities = iVelocities; }
100 { m_indices = iSmp; }
108 { m_selfBounds = iBnds; }
110 const OV2fGeomParam::Sample &
getUVs()
const {
return m_uvs; }
111 void setUVs(
const OV2fGeomParam::Sample &iUVs )
114 const ON3fGeomParam::Sample &
getNormals()
const {
return m_normals; }
116 { m_normals = iNormals; }
124 m_selfBounds.makeEmpty();
126 m_velocities.reset();
133 if( !m_positions.getData() && !m_indices.getData() && !m_counts.getData() )
135 if( m_uvs.getVals() || m_normals.getVals() || m_velocities.getData() )
172 m_selectiveExport =
false;
174 m_timeSamplingIndex = 0;
219 if( m_positionsProperty.valid() )
221 return m_positionsProperty.getTimeSampling();
225 return getObject().getArchive().getTimeSampling( 0 );
236 {
return m_numSamples; }
240 void set(
const Sample &iSamp );
244 void setFromPrevious();
246 void setTimeSampling( uint32_t iIndex );
259 m_positionsProperty.reset();
260 m_velocitiesProperty.reset();
261 m_indicesProperty.reset();
262 m_countsProperty.reset();
264 m_normalsParam.reset();
276 m_positionsProperty.
valid() &&
277 m_indicesProperty.valid() &&
278 m_countsProperty.valid() ) ) ||
285 void getFaceSetNames (std::vector <std::string> & oFaceSetNames);
287 bool hasFaceSet(
const std::string &iFaceSetName );
298 void init( uint32_t iTsIdx,
bool isSparse );
303 void selectiveSet(
const Sample &iSamp );
311 std::map <std::string, OFaceSet> m_faceSets;
321 bool m_selectiveExport;
326 uint32_t m_timeSamplingIndex;
328 void createPositionsProperty();
330 void createVelocitiesProperty();
332 void createUVsProperty(
const Sample &iSamp );
334 void createNormalsProperty(
const Sample &iSamp );
virtual bool valid() const
void setFaceIndices(const Abc::Int32ArraySample &iSmp)
Util::shared_ptr< OPolyMesh > OPolyMeshPtr
OPolyMeshSchema this_type
GLsizei const GLchar *const * string
const Abc::Int32ArraySample & getFaceIndices() const
OV2fGeomParam::Sample m_uvs
Abc::V3fArraySample m_velocities
Sample(const Abc::P3fArraySample &iPos, const Abc::Int32ArraySample &iInd, const Abc::Int32ArraySample &iCnt, const OV2fGeomParam::Sample &iUVs=OV2fGeomParam::Sample(), const ON3fGeomParam::Sample &iNormals=ON3fGeomParam::Sample())
size_t getNumSamples() const
const ON3fGeomParam::Sample & getNormals() const
void setPositions(const Abc::P3fArraySample &iSmp)
const Abc::Box3d & getSelfBounds() const
const Abc::Int32ArraySample & getFaceCounts() const
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
bool isPartialSample() const
void setNormals(const ON3fGeomParam::Sample &iNormals)
#define ALEMBIC_OVERRIDE_OPERATOR_BOOL(PASS_COND)
Abc::P3fArraySample m_positions
Abc::Int32ArraySample m_counts
Box< V3d > Box3d
3D box of base type double.
OPolyMeshSchema(const OPolyMeshSchema &iCopy)
Copy constructor.
const Abc::P3fArraySample & getPositions() const
void setFaceCounts(const Abc::Int32ArraySample &iCnt)
ON3fGeomParam::Sample m_normals
Sample(const Abc::P3fArraySample &iPos)
const Abc::V3fArraySample & getVelocities() const
void setSelfBounds(const Abc::Box3d &iBnds)
void setUVs(const OV2fGeomParam::Sample &iUVs)
AbcA::TimeSamplingPtr getTimeSampling() const
Default assignment operator used.
Abc::Int32ArraySample m_indices
const OV2fGeomParam::Sample & getUVs() const
#define ALEMBIC_VERSION_NS
Abc::OSchemaObject< OPolyMeshSchema > OPolyMesh
void setVelocities(const Abc::V3fArraySample &iVelocities)
Alembic::Util::shared_ptr< CompoundPropertyWriter > CompoundPropertyWriterPtr