# NNS_G2dTraverseMCNodes

## Syntax

      #include <nnsys/g2d/g2d_MultiCellAnimation.h>

      void NNS_G2dTraverseMCNodes
      (
          NNSG2dMultiCellInstance*        pMCellInst,
          NNSG2dMCTraverseNodeCallBack    pCBFunc,
          u32                             userParamater
      );

## Arguments

`pMCellInst` | [IN] Multicell entity
`pCBFunc` | [IN] Callback function called for every node in the multicell
`userParamater` | [IN] Parameter that the user is free to use, passed to the callback function as its first argument

## Return Values

None.

## Description

Traverses the nodes that make up a multicell to collect node information, cell animation, and node numbers for each node and uses this information as arguments to call the callback function. There is another function, `NNS_G2dTraverseMCCellAnims`, which traverses the cell animations of a multicell.
The definition of `NNSG2dMCTraverseNodeCallBack` is shown below.

    typedef BOOL (*NNSG2dMCTraverseNodeCallBack)
    (
        u32                                 userParamater,
        const NNSG2dMultiCellHierarchyData* pNodeData,
        NNSG2dCellAnimation*                pCellAnim,
        u16                                 nodeIdx
    );
    To suspend the callback, set to return FALSE in the callback function.

Note: If the entity is a multicell initialized with `NNS_G2D_MCTYPE_DONOT_SHARE_CELLANIM`, the user can modify the SRT (scale, rotate, translate) information in the node information. However, the node information passed as the argument of the callback call of this function is a static data resource; therefore, the data does not reflect the changes made by the user.

## See Also

`NNS_G2dTraverseMCCellAnims`

## Revision History

2005/09/01 Initial version.

CONFIDENTIAL