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;
184 const std::string &iName,
197 const std::string &iName,
219 if( m_positionsProperty.valid() )
221 return m_positionsProperty.getTimeSampling();
225 return getObject().getArchive().getTimeSampling( 0 );
236 {
return m_numSamples; }
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() ) ) ||
298 void init( uint32_t iTsIdx,
bool isSparse );
303 void selectiveSet(
const Sample &iSamp );
311 std::map <std::string, OFaceSet> m_faceSets;
317 std::string m_uvSourceName;
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 );
#define ALEMBIC_VERSION_NS
virtual bool valid() const
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())
bool isPartialSample() const
Sample(const Abc::P3fArraySample &iPos)
void setFaceCounts(const Abc::Int32ArraySample &iCnt)
const ON3fGeomParam::Sample & getNormals() const
const Abc::Int32ArraySample & getFaceIndices() const
const Abc::P3fArraySample & getPositions() const
const Abc::Int32ArraySample & getFaceCounts() const
void setNormals(const ON3fGeomParam::Sample &iNormals)
const Abc::V3fArraySample & getVelocities() const
OV2fGeomParam::Sample m_uvs
void setFaceIndices(const Abc::Int32ArraySample &iSmp)
void setUVs(const OV2fGeomParam::Sample &iUVs)
const Abc::Box3d & getSelfBounds() const
void setPositions(const Abc::P3fArraySample &iSmp)
Abc::Int32ArraySample m_counts
ON3fGeomParam::Sample m_normals
void setSelfBounds(const Abc::Box3d &iBnds)
Abc::P3fArraySample m_positions
const OV2fGeomParam::Sample & getUVs() const
void setVelocities(const Abc::V3fArraySample &iVelocities)
Abc::V3fArraySample m_velocities
Abc::Int32ArraySample m_indices
AbcA::TimeSamplingPtr getTimeSampling() const
Default assignment operator used.
OPolyMeshSchema(const OPolyMeshSchema &iCopy)
Copy constructor.
OFaceSet & createFaceSet(const std::string &iFaceSetName)
size_t getNumSamples() const
void getFaceSetNames(std::vector< std::string > &oFaceSetNames)
Appends the names of any FaceSets for this PolyMesh.
void set(const Sample &iSamp)
OFaceSet getFaceSet(const std::string &iFaceSetName)
void setUVSourceName(const std::string &iName)
void setTimeSampling(AbcA::TimeSamplingPtr iTime)
OPolyMeshSchema this_type
OPolyMeshSchema(AbcA::CompoundPropertyWriterPtr iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument(), const Abc::Argument &iArg2=Abc::Argument(), const Abc::Argument &iArg3=Abc::Argument())
void setTimeSampling(uint32_t iIndex)
ALEMBIC_OVERRIDE_OPERATOR_BOOL(OPolyMeshSchema::valid())
bool hasFaceSet(const std::string &iFaceSetName)
OPolyMeshSchema(Abc::OCompoundProperty iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument(), const Abc::Argument &iArg2=Abc::Argument())
Alembic::Util::shared_ptr< CompoundPropertyWriter > CompoundPropertyWriterPtr
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
Abc::OSchemaObject< OPolyMeshSchema > OPolyMesh
Util::shared_ptr< OPolyMesh > OPolyMeshPtr