37#ifndef Alembic_AbcGeom_ONuPatch_h
38#define Alembic_AbcGeom_ONuPatch_h
74 const int32_t &iUOrder,
75 const int32_t &iVOrder,
78 const ON3fGeomParam::Sample &iNormals = ON3fGeomParam::Sample(),
79 const OV2fGeomParam::Sample &iUVs = OV2fGeomParam::Sample(),
81 ): m_positions( iPos )
88 , m_positionWeights( iPosWeight )
89 , m_normals( iNormals )
100 , m_hasTrimCurve( false )
106 { m_positions = iSmp; }
110 {
return m_positionWeights; }
112 { m_positionWeights = iSmp; }
115 int32_t
getNu()
const {
return m_numU; }
120 int32_t
getNv()
const {
return m_numV; }
127 { m_uOrder = iUOrder; }
132 { m_vOrder = iVOrder; }
137 { m_uKnot = iUKnot; }
142 { m_vKnot = iVKnot; }
145 const OV2fGeomParam::Sample &
getUVs()
const {
return m_uvs; }
146 void setUVs(
const OV2fGeomParam::Sample &iUVs )
150 const ON3fGeomParam::Sample &
getNormals()
const {
return m_normals; }
152 { m_normals = iNormals; }
157 { m_selfBounds = iBnds; }
162 { m_velocities = iVelocities; }
176 m_trimNumLoops = i_trim_nLoops;
177 m_trimNumCurves = i_trim_nCurves;
178 m_trimNumVertices = i_trim_n;
179 m_trimOrder = i_trim_order;
180 m_trimKnot = i_trim_knot;
181 m_trimMin = i_trim_min;
182 m_trimMax = i_trim_max;
187 m_hasTrimCurve =
true;
192 {
return m_trimNumCurves; }
194 {
return m_trimNumVertices; }
196 {
return m_trimOrder; }
206 return m_hasTrimCurve;
212 m_velocities.reset();
219 m_positionWeights.reset();
222 m_selfBounds.makeEmpty();
226 m_trimNumCurves.reset();
227 m_trimNumVertices.reset();
235 m_hasTrimCurve =
false;
240 if( !m_positions.getData() )
242 if( m_uvs.getVals() || m_normals.getVals() || m_velocities.getData() )
316 m_selectiveExport =
false;
318 m_timeSamplingIndex = 0;
328 const std::string &iName,
341 const std::string &iName,
361 if( m_positionsProperty.valid() )
363 return m_positionsProperty.getTimeSampling();
367 return getObject().getArchive().getTimeSampling( 0 );
402 m_positionsProperty.reset();
403 m_positionWeightsProperty.reset();
404 m_velocitiesProperty.reset();
405 m_numUProperty.reset();
406 m_numVProperty.reset();
407 m_uOrderProperty.reset();
408 m_vOrderProperty.reset();
409 m_uKnotProperty.reset();
410 m_vKnotProperty.reset();
412 m_normalsParam.reset();
416 m_trimNumLoopsProperty.reset();
417 m_trimNumVerticesProperty.reset();
418 m_trimOrderProperty.reset();
419 m_trimKnotProperty.reset();
420 m_trimMinProperty.reset();
421 m_trimMaxProperty.reset();
422 m_trimUProperty.reset();
423 m_trimVProperty.reset();
424 m_trimWProperty.reset();
434 m_positionsProperty.
valid() ) ||
#define ALEMBIC_EXPORT_CONST
#define ALEMBIC_VERSION_NS
virtual bool valid() const
int32_t getVOrder() const
Abc::V3fArraySample m_velocities
const Abc::FloatArraySample & getUKnot() const
bool hasTrimCurve() const
int32_t getTrimNumLoops() const
void setNv(const int32_t iNv)
const Abc::Int32ArraySample & getTrimNumVertices() const
Abc::FloatArraySample m_trimU
const Abc::Box3d & getSelfBounds() const
const Abc::FloatArraySample & getTrimMax() const
Abc::FloatArraySample m_trimMin
int32_t getUOrder() const
OV2fGeomParam::Sample m_uvs
void setTrimCurve(const int32_t i_trim_nLoops, const Abc::Int32ArraySample &i_trim_nCurves, const Abc::Int32ArraySample &i_trim_n, const Abc::Int32ArraySample &i_trim_order, const Abc::FloatArraySample &i_trim_knot, const Abc::FloatArraySample &i_trim_min, const Abc::FloatArraySample &i_trim_max, const Abc::FloatArraySample &i_trim_u, const Abc::FloatArraySample &i_trim_v, const Abc::FloatArraySample &i_trim_w)
const Abc::V3fArraySample & getVelocities() const
void setVKnot(const Abc::FloatArraySample &iVKnot)
const Abc::FloatArraySample & getTrimMin() const
const Abc::FloatArraySample & getTrimV() const
const Abc::FloatArraySample & getTrimKnot() const
Abc::Int32ArraySample m_trimNumVertices
Abc::Int32ArraySample m_trimNumCurves
const ON3fGeomParam::Sample & getNormals() const
void setVOrder(const int32_t iVOrder)
const Abc::P3fArraySample & getPositions() const
Abc::FloatArraySample m_positionWeights
void setNormals(const ON3fGeomParam::Sample &iNormals)
const Abc::Int32ArraySample & getTrimNumCurves() const
Abc::FloatArraySample m_trimMax
Abc::FloatArraySample m_vKnot
Sample(const Abc::P3fArraySample &iPos, const int32_t &iNumU, const int32_t &iNumV, const int32_t &iUOrder, const int32_t &iVOrder, const Abc::FloatArraySample &iUKnot, const Abc::FloatArraySample &iVKnot, const ON3fGeomParam::Sample &iNormals=ON3fGeomParam::Sample(), const OV2fGeomParam::Sample &iUVs=OV2fGeomParam::Sample(), const Abc::FloatArraySample &iPosWeight=Abc::FloatArraySample())
ON3fGeomParam::Sample m_normals
Abc::FloatArraySample m_trimW
Abc::FloatArraySample m_trimKnot
void setUVs(const OV2fGeomParam::Sample &iUVs)
bool isPartialSample() const
void setUKnot(const Abc::FloatArraySample &iUKnot)
const Abc::FloatArraySample & getTrimU() const
void setNu(const int32_t iNu)
const Abc::FloatArraySample & getVKnot() const
const OV2fGeomParam::Sample & getUVs() const
void setPositions(const Abc::P3fArraySample &iSmp)
const Abc::FloatArraySample & getTrimW() const
bool hasKnotSampleData() const
void setSelfBounds(const Abc::Box3d &iBnds)
const Abc::Int32ArraySample & getTrimOrder() const
void setPositionWeights(const Abc::FloatArraySample &iSmp)
Abc::Int32ArraySample m_trimOrder
Abc::P3fArraySample m_positions
void setVelocities(const Abc::V3fArraySample &iVelocities)
void setUOrder(const int32_t iUOrder)
const Abc::FloatArraySample & getPositionWeights() const
Abc::FloatArraySample m_trimV
Abc::FloatArraySample m_uKnot
void setTimeSampling(AbcA::TimeSamplingPtr iTime)
ONuPatchSchema::Sample sample_type
ON3fGeomParam m_normalsParam
Abc::OInt32ArrayProperty m_trimOrderProperty
void createUVsProperty(const Sample &iSamp)
void set(const sample_type &iSamp)
Set a sample!
void createPositionWeightsProperty()
void selectiveSet(const Sample &iSamp)
Abc::OInt32Property m_uOrderProperty
void createNormalsProperty(const Sample &iSamp)
Abc::OInt32ArrayProperty m_trimNumCurvesProperty
ALEMBIC_OVERRIDE_OPERATOR_BOOL(ONuPatchSchema::valid())
Abc::OP3fArrayProperty m_positionsProperty
AbcA::TimeSamplingPtr getTimeSampling() const
ONuPatchSchema(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 createKnotProperties()
Abc::OFloatArrayProperty m_trimMinProperty
Abc::OFloatArrayProperty m_trimVProperty
Abc::OInt32Property m_trimNumLoopsProperty
void createTrimPropreties()
void setTimeSampling(uint32_t iIndex)
Abc::OInt32ArrayProperty m_trimNumVerticesProperty
void createPositionProperties()
size_t getNumSamples() const
ONuPatchSchema(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())
Abc::OInt32Property m_vOrderProperty
Abc::OFloatArrayProperty m_uKnotProperty
Abc::OFloatArrayProperty m_trimWProperty
Abc::OInt32Property m_numUProperty
Abc::OFloatArrayProperty m_trimKnotProperty
Abc::OFloatArrayProperty m_positionWeightsProperty
Abc::OV3fArrayProperty m_velocitiesProperty
Abc::OFloatArrayProperty m_vKnotProperty
Abc::OInt32Property m_numVProperty
ONuPatchSchema(const ONuPatchSchema &iCopy)
Copy constructor.
Abc::OFloatArrayProperty m_trimUProperty
void createVelocityProperty()
AbcA::index_t m_timeSamplingIndex
void init(const AbcA::index_t iTsIdx, bool isSparse)
Abc::OFloatArrayProperty m_trimMaxProperty
Alembic::Util::shared_ptr< CompoundPropertyWriter > CompoundPropertyWriterPtr
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
static ALEMBIC_EXPORT_CONST int32_t ABC_GEOM_NUPATCH_NULL_INT_VALUE(INT_MIN/4)
Abc::OSchemaObject< ONuPatchSchema > ONuPatch
Util::shared_ptr< ONuPatch > ONuPatchPtr