A SERVICE OF

logo

118
Chapter 10: Scene Graph Engines
csMorphEng Fields
csMorphEng contains the following elds:
csMFInt* count() const;
csMFInt* index() const;
csMFFloat* weight() const;
count() is an array of integer values.
Each value represents the number of input values which will be morphed based on the
corresponding weight value. If the value of count() is positive, the next coordinate is
chosen by dereferencing and incrementing the input array pointer. If the value of count()
is negative, the index of the next coordinate is chosen by dereferencing and incrementing
the index array pointer, and that index is used to choose the coordinate from the input
array.
weight() is an array of oat values.
For each weight, abs(count()) coordinates are multiplied by weight and stored in the
output array.
index() is an optional carry of indices used to index into the input array when generating
output values.
See the description of count() above for more information.
csMorphEng3f and csMorphEng4f
csMorphEng3f and csMorphEng4f are derived from csMorphEng. Their input and
output values are csMFVec3f and csMFVec4f, respectively.
Example 10-1, taken from the test program, worm.cxx, shows how to build a
csMorphEng3f engine.