os/graphics/m3g/m3gcore11/inc/m3g_group.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: Group interface
    15 *
    16 */
    17 
    18 #ifndef __M3G_GROUP_H__
    19 #define __M3G_GROUP_H__
    20 
    21 /*!
    22  * \internal
    23  * \file
    24  * \brief Group interface
    25  */
    26 
    27 #include "m3g_gl.h"
    28 #include "m3g_node.h"
    29 
    30 typedef M3Gushort GroupDescendantCount;
    31 
    32 struct M3GGroupImpl
    33 {
    34 	Node node;
    35 
    36 	Node *firstChild;
    37     
    38     AABB *bbox;
    39     GroupDescendantCount numRenderables, numNonCullables;
    40 };
    41 
    42 /*----------------------------------------------------------------------
    43  * Virtual functions
    44  *--------------------------------------------------------------------*/
    45  
    46 static void m3gDestroyGroup(Object *obj);
    47 static M3Gbool m3gGroupAlign(Node *self, const Node *refNode);
    48 static M3Gbool m3gGroupSetupRender(Node *self,
    49                                    const Node *caller,
    50                                    SetupRenderState *s,
    51                                    RenderQueue *renderQueue);
    52 static M3Gint m3gGroupApplyAnimation(Object *self, M3Gint time);
    53 static M3Gbool m3gGroupRayIntersect(	Node *self,
    54 								M3Gint mask,
    55 								M3Gfloat *ray,
    56 								RayIntersection *ri,
    57 								Matrix *toGroup);
    58 static M3Gint m3gGroupDoGetReferences(Object *self, Object **references);
    59 static M3Gint m3gGroupGetBBox(Node *self, AABB *bbox);
    60 static Object *m3gGroupFindID(Object *self, M3Gint userID);
    61 static M3Gbool m3gGroupDuplicate(const Object *original, Object **clone, Object **pairs, M3Gint *numPairs);
    62 static M3Gbool m3gGroupValidate(Node *self, M3Gbitmask stateBits, M3Gint scope);
    63 static void m3gGroupUpdateDuplicateReferences(Node *self, Object **pairs, M3Gint numPairs);
    64 
    65 /*----------------------------------------------------------------------
    66  * Internal functions
    67  *--------------------------------------------------------------------*/
    68 
    69 static void m3gInitGroup(Interface *m3g,
    70                          Group *group,
    71                          M3GClass classID);
    72 
    73 #endif /*__M3G_GROUP_H__*/