Cortex  10.0.0-a4
PointSmoothSkinningOp.h
1 //
3 // Copyright (c) 2008-2011, Image Engine Design Inc. All rights reserved.
4 //
5 // Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
6 // its affiliates and/or its licensors.
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
10 // met:
11 //
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // * Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the distribution.
18 //
19 // * Neither the name of Image Engine Design nor the names of any
20 // other contributors to this software may be used to endorse or
21 // promote products derived from this software without specific prior
22 // written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
25 // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
37 
38 #ifndef IE_CORE_POINTSMOOTHSKINNINGOP_H
39 #define IE_CORE_POINTSMOOTHSKINNINGOP_H
40 
41 #include <vector>
42 
43 #include "IECore/Export.h"
44 #include "IECore/ModifyOp.h"
45 #include "IECore/NumericParameter.h"
46 #include "IECore/SimpleTypedParameter.h"
47 #include "IECore/TypedPrimitiveParameter.h"
48 #include "IECore/VectorTypedParameter.h"
49 
50 namespace IECore
51 {
52 
62 class IECORE_API PointSmoothSkinningOp : public ModifyOp
63 {
64  public:
65 
66  IE_CORE_DECLARERUNTIMETYPED( PointSmoothSkinningOp, ModifyOp );
67 
68 
69  // defines what algorithm to use when calculating the deformation
70  typedef enum
71  {
72  Linear = 0,
73  // todo: DualQuaternion = 1
74  // todo: LinearDualQuaternionMix = 2
75  } Blend;
76 
78  ~PointSmoothSkinningOp() override;
79 
82  StringParameter * positionVarParameter();
83  const StringParameter * positionVarParameter() const;
84 
87  StringParameter * normalVarParameter();
88  const StringParameter * normalVarParameter() const;
89 
91  SmoothSkinningDataParameter * smoothSkinningDataParameter();
92  const SmoothSkinningDataParameter * smoothSkinningDataParameter() const;
93 
96  M44fVectorParameter * deformationPoseParameter();
97  const M44fVectorParameter * deformationPoseParameter() const;
98 
100  BoolParameter * deformNormalsParameter();
101  const BoolParameter * deformNormalsParameter() const;
102 
104  IntParameter * blendParameter();
105  const IntParameter * blendParameter() const;
106 
108  IntVectorParameter * refIndicesParameter();
109  const IntVectorParameter * refIndicesParameter() const;
110 
111  protected:
112 
113  void modify( Object *object, const CompoundObject * operands ) override;
114 
115  private:
116 
117  StringParameterPtr m_positionVarParameter;
118  StringParameterPtr m_normalVarParameter;
119  SmoothSkinningDataParameterPtr m_smoothSkinningDataParameter;
120  IntParameterPtr m_blendParameter;
121  BoolParameterPtr m_deformNormalsParameter;
122  M44fVectorParameterPtr m_deformationPoseParameter;
123  IntVectorParameterPtr m_refIndicesParameter;
124 
125  ConstSmoothSkinningDataPtr m_prevSmoothSkinningData;
126 
127  struct DeformPositions;
128  struct DeformNormals;
129 };
130 
131 IE_CORE_DECLAREPTR( PointSmoothSkinningOp );
132 
133 
134 } // namespace IECore
135 
136 #endif // IE_CORE_POINTSMOOTHSKINNINGOP_H
Definition: PointSmoothSkinningOp.h:62
Definition: TypedParameter.h:48
Definition: Object.h:104
Definition: CompoundObject.h:46
Definition: NumericParameter.h:48
Definition: TypedObjectParameter.h:63
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43
Definition: ModifyOp.h:52