Samples
Switching the pattern using dynamic polygons
Use the IMICRO3D_Figure_setPattern() method in order to specify the model pattern for the Figure structure. The number of patterns within the model data is determined when the data is created. Use the IMICRO3D_Figure_getNumPattern() method in order to obtain the number of patterns.
There is a maximum of 33 model patterns including a common set. Assume each pattern as a bit in a 32-bit data ( the common set is 0 ), and then pass it in the IMICRO3D_Figure_setPattern() method.
This sample has four appearance patterns including the common set as follows:
- Pattern 0: The face ( this is the common set to all the patterns )
- Pattern 1: The face without eyes
- Pattern 2: The face with open eyes
- Pattern 3: The face with closed eyes
The rendering output becomes as described below:
- IMICRO3D_Figure_setPattern() is a face of the common set.
- IMICRO3D_Figure_setPattern( ( 1 << 0 ) ) is a face without eyes.
- IMICRO3D_Figure_setPattern( ( 1 << 1 ) ) is a face with eyes open.
- IMICRO3D_Figure_setPattern( ( 1 << 2 ) ) is a face with eyes closed.

SampleDynamic3D screenshots ( from the left: Pattern 1, Pattern 2, and Pattern 3 )
If the model has multiple independent appearance patterns, multiple portions can be simultaneously moved, for example, by specifying the method as follows:
IMICRO3D_Figure_setPattern ( ( ( 1 << 1 ) | ( 1 << 5 ) ) )
if ( ( mask & ACTION_MASK ) != 0 )
{
if( pMe -> mc_data.pattern >= pMe -> mc_data.maxpat )
{
/* Specifying the model pattern */
if( pMe -> mc_data.pattern == 0 )
{
else
{
1 << pMe -> mc_data.pattern );
pMe -> key_mask = 0;


