213 |
|
|
214 |
}; |
}; |
215 |
|
|
216 |
|
class HierarchicalTransform { |
217 |
|
virtual int getNParams() = 0; |
218 |
|
virtual int getNDepends() = 0; |
219 |
|
virtual void setParams(const Transform *super, |
220 |
|
const Transform **depends, float *p) = 0; |
221 |
|
} |
222 |
|
|
223 |
/** A hierarchical transformation, which applies the |
/** A hierarchical transformation, which applies the |
224 |
* template argument primitive transformation to the result |
* template argument primitive transformation to the result |
225 |
* of the parent transform. |
* of the parent transform. |
226 |
*/ |
*/ |
227 |
template<class Primitive> class HierarchicalTransform : |
template<class Primitive> class PrimitiveHierarchicalTransform : |
228 |
public Transform |
public Transform , public HierarchicalTransform |
229 |
{ |
{ |
230 |
const Transform *super; |
const Transform *super; |
231 |
Transform *inverse; |
Transform *inverse; |
318 |
} |
} |
319 |
|
|
320 |
|
|
321 |
int getNParams() { |
virtual int getNParams() { |
322 |
return getNParams(&t); |
return getNParams(&t); |
323 |
} |
} |
324 |
int getNDepends() { |
virtual int getNDepends() { |
325 |
return getNDepends(t); |
return getNDepends(t); |
326 |
} |
} |
327 |
|
|