37 #ifndef Alembic_AbcGeom_ONuPatch_h
38 #define Alembic_AbcGeom_ONuPatch_h
54 int32_t ABC_GEOM_NUPATCH_NULL_INT_VALUE( -536870912 );
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 )
91 , m_trimNumLoops( ABC_GEOM_NUPATCH_NULL_INT_VALUE )
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();
213 m_numU = ABC_GEOM_NUPATCH_NULL_INT_VALUE;
214 m_numV = ABC_GEOM_NUPATCH_NULL_INT_VALUE;
215 m_uOrder = ABC_GEOM_NUPATCH_NULL_INT_VALUE;
216 m_vOrder = ABC_GEOM_NUPATCH_NULL_INT_VALUE;
219 m_positionWeights.reset();
222 m_selfBounds.makeEmpty();
225 m_trimNumLoops = ABC_GEOM_NUPATCH_NULL_INT_VALUE;
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() )
253 if( (m_numU != ABC_GEOM_NUPATCH_NULL_INT_VALUE) ||
254 (m_numV != ABC_GEOM_NUPATCH_NULL_INT_VALUE) ||
255 (m_uOrder != ABC_GEOM_NUPATCH_NULL_INT_VALUE) ||
256 (m_vOrder != ABC_GEOM_NUPATCH_NULL_INT_VALUE) ||
316 m_selectiveExport =
false;
318 m_timeSamplingIndex = 0;
361 if( m_positionsProperty.valid() )
363 return m_positionsProperty.getTimeSampling();
367 return getObject().getArchive().getTimeSampling( 0 );
371 void setTimeSampling( uint32_t iIndex );
386 void set(
const sample_type &iSamp );
390 void setFromPrevious();
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() ) ||
448 void selectiveSet(
const Sample &iSamp );
459 void createPositionProperties();
460 void createKnotProperties();
461 void createVelocityProperty();
462 void createUVsProperty(
const Sample &iSamp );
463 void createNormalsProperty(
const Sample &iSamp );
464 void createPositionWeightsProperty();
465 void createTrimPropreties();
Abc::FloatArraySample m_positionWeights
Abc::OFloatArrayProperty m_uKnotProperty
Abc::OFloatArrayProperty m_vKnotProperty
const Abc::FloatArraySample & getPositionWeights() const
virtual bool valid() const
Abc::FloatArraySample m_trimMax
void setSelfBounds(const Abc::Box3d &iBnds)
Abc::OP3fArrayProperty m_positionsProperty
void setNv(const int32_t iNv)
GLsizei const GLchar *const * string
const Abc::V3fArraySample & getVelocities() const
const Abc::FloatArraySample & getTrimV() const
AbcA::TimeSamplingPtr getTimeSampling() const
void setVOrder(const int32_t iVOrder)
int32_t getUOrder() const
bool isPartialSample() const
Abc::OFloatArrayProperty m_trimVProperty
Abc::V3fArraySample m_velocities
Abc::OInt32Property m_numVProperty
Abc::OFloatArrayProperty m_trimKnotProperty
void setVelocities(const Abc::V3fArraySample &iVelocities)
Abc::FloatArraySample m_trimKnot
const Abc::FloatArraySample & getVKnot() const
Abc::OInt32Property m_trimNumLoopsProperty
Abc::FloatArraySample m_trimU
const Abc::FloatArraySample & getTrimKnot() const
const Abc::FloatArraySample & getTrimMin() const
AbcA::index_t m_timeSamplingIndex
Abc::OSchemaObject< ONuPatchSchema > ONuPatch
ON3fGeomParam::Sample m_normals
Abc::P3fArraySample m_positions
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
Abc::FloatArraySample m_trimMin
int32_t getTrimNumLoops() const
void setNormals(const ON3fGeomParam::Sample &iNormals)
void setPositions(const Abc::P3fArraySample &iSmp)
Abc::OInt32ArrayProperty m_trimNumVerticesProperty
void setUVs(const OV2fGeomParam::Sample &iUVs)
Abc::OV3fArrayProperty m_velocitiesProperty
#define ALEMBIC_EXPORT_CONST
Abc::FloatArraySample m_trimV
#define ALEMBIC_OVERRIDE_OPERATOR_BOOL(PASS_COND)
Abc::FloatArraySample m_trimW
const Abc::FloatArraySample & getTrimMax() const
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 m_normalsParam
void setNu(const int32_t iNu)
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)
Abc::Int32ArraySample m_trimNumVertices
const Abc::FloatArraySample & getTrimW() const
Abc::OInt32ArrayProperty m_trimOrderProperty
const Abc::Int32ArraySample & getTrimNumCurves() const
Abc::OInt32ArrayProperty m_trimNumCurvesProperty
const ON3fGeomParam::Sample & getNormals() const
Box< V3d > Box3d
3D box of base type double.
Abc::OInt32Property m_vOrderProperty
const Abc::P3fArraySample & getPositions() const
ONuPatchSchema::Sample sample_type
int32_t getVOrder() const
const Abc::Box3d & getSelfBounds() const
Abc::OFloatArrayProperty m_trimMaxProperty
Util::shared_ptr< ONuPatch > ONuPatchPtr
Abc::OInt32Property m_uOrderProperty
Abc::FloatArraySample m_uKnot
const OV2fGeomParam::Sample & getUVs() const
const Abc::FloatArraySample & getTrimU() const
void setPositionWeights(const Abc::FloatArraySample &iSmp)
const Abc::FloatArraySample & getUKnot() const
const Abc::Int32ArraySample & getTrimNumVertices() const
Abc::OInt32Property m_numUProperty
Abc::OFloatArrayProperty m_trimUProperty
Abc::Int32ArraySample m_trimOrder
const Abc::Int32ArraySample & getTrimOrder() const
Abc::OFloatArrayProperty m_trimWProperty
void setVKnot(const Abc::FloatArraySample &iVKnot)
ONuPatchSchema(const ONuPatchSchema &iCopy)
Copy constructor.
Abc::OFloatArrayProperty m_trimMinProperty
void setUOrder(const int32_t iUOrder)
OV2fGeomParam::Sample m_uvs
Abc::Int32ArraySample m_trimNumCurves
Abc::OFloatArrayProperty m_positionWeightsProperty
#define ALEMBIC_VERSION_NS
bool hasTrimCurve() const
Abc::FloatArraySample m_vKnot
void setUKnot(const Abc::FloatArraySample &iUKnot)
size_t getNumSamples() const
Alembic::Util::shared_ptr< CompoundPropertyWriter > CompoundPropertyWriterPtr
bool hasKnotSampleData() const