Cortex  10.0.0-a4
SmoothSkinningData.h
1 //
3 // Copyright (c) 2010-2012, 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_SMOOTHSKINNINGDATA_H
39 #define IE_CORE_SMOOTHSKINNINGDATA_H
40 
41 #include "IECore/Export.h"
42 #include "IECore/Data.h"
43 #include "IECore/VectorTypedData.h"
44 
45 namespace IECore
46 {
47 
48 IE_CORE_FORWARDDECLARE( SmoothSkinningData )
49 
50 class IECORE_API SmoothSkinningData : public Data
90 {
91  public:
92 
93  IE_CORE_DECLAREOBJECT( SmoothSkinningData, Data );
94 
96  const StringVectorData *influenceNames() const;
97  StringVectorData *influenceNames() ;
98 
101  const M44fVectorData *influencePose() const;
102  M44fVectorData *influencePose() ;
103 
107  const IntVectorData *pointIndexOffsets() const;
108  IntVectorData *pointIndexOffsets() ;
109 
114  const IntVectorData *pointInfluenceCounts() const;
115  IntVectorData *pointInfluenceCounts() ;
116 
120  const IntVectorData *pointInfluenceIndices() const;
121  IntVectorData *pointInfluenceIndices() ;
122 
125  const FloatVectorData *pointInfluenceWeights() const;
126  FloatVectorData *pointInfluenceWeights() ;
127 
129  SmoothSkinningData( ConstStringVectorDataPtr influenceNames,
130  ConstM44fVectorDataPtr influencePose,
131  ConstIntVectorDataPtr pointIndexOffsets,
132  ConstIntVectorDataPtr pointInfluenceCounts,
133  ConstIntVectorDataPtr pointInfluenceIndices,
134  ConstFloatVectorDataPtr pointInfluenceWeights);
135 
137  SmoothSkinningData();
138 
139  ~SmoothSkinningData() override;
140 
142  void validate() const;
143 
144  private:
145 
146  static const unsigned int m_ioVersion;
147 
148  StringVectorDataPtr m_influenceNames;
149  M44fVectorDataPtr m_influencePose;
150  IntVectorDataPtr m_pointIndexOffsets;
151  IntVectorDataPtr m_pointInfluenceCounts;
152  IntVectorDataPtr m_pointInfluenceIndices;
153  FloatVectorDataPtr m_pointInfluenceWeights;
154 
155  void validateSizes() const;
156  void validateCounts() const;
157  void validateIds() const;
158  void validateOffsets() const;
159 };
160 
161 IE_CORE_DECLAREPTR( SmoothSkinningData )
162 
163 } // namespace IECore
164 
165 #endif // IE_CORE_SMOOTHSKINNINGDATA_H
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43