sl@0: /*
sl@0: * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of the License "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description: Group interface
sl@0: *
sl@0: */
sl@0: 
sl@0: #ifndef __M3G_GROUP_H__
sl@0: #define __M3G_GROUP_H__
sl@0: 
sl@0: /*!
sl@0:  * \internal
sl@0:  * \file
sl@0:  * \brief Group interface
sl@0:  */
sl@0: 
sl@0: #include "m3g_gl.h"
sl@0: #include "m3g_node.h"
sl@0: 
sl@0: typedef M3Gushort GroupDescendantCount;
sl@0: 
sl@0: struct M3GGroupImpl
sl@0: {
sl@0: 	Node node;
sl@0: 
sl@0: 	Node *firstChild;
sl@0:     
sl@0:     AABB *bbox;
sl@0:     GroupDescendantCount numRenderables, numNonCullables;
sl@0: };
sl@0: 
sl@0: /*----------------------------------------------------------------------
sl@0:  * Virtual functions
sl@0:  *--------------------------------------------------------------------*/
sl@0:  
sl@0: static void m3gDestroyGroup(Object *obj);
sl@0: static M3Gbool m3gGroupAlign(Node *self, const Node *refNode);
sl@0: static M3Gbool m3gGroupSetupRender(Node *self,
sl@0:                                    const Node *caller,
sl@0:                                    SetupRenderState *s,
sl@0:                                    RenderQueue *renderQueue);
sl@0: static M3Gint m3gGroupApplyAnimation(Object *self, M3Gint time);
sl@0: static M3Gbool m3gGroupRayIntersect(	Node *self,
sl@0: 								M3Gint mask,
sl@0: 								M3Gfloat *ray,
sl@0: 								RayIntersection *ri,
sl@0: 								Matrix *toGroup);
sl@0: static M3Gint m3gGroupDoGetReferences(Object *self, Object **references);
sl@0: static M3Gint m3gGroupGetBBox(Node *self, AABB *bbox);
sl@0: static Object *m3gGroupFindID(Object *self, M3Gint userID);
sl@0: static M3Gbool m3gGroupDuplicate(const Object *original, Object **clone, Object **pairs, M3Gint *numPairs);
sl@0: static M3Gbool m3gGroupValidate(Node *self, M3Gbitmask stateBits, M3Gint scope);
sl@0: static void m3gGroupUpdateDuplicateReferences(Node *self, Object **pairs, M3Gint numPairs);
sl@0: 
sl@0: /*----------------------------------------------------------------------
sl@0:  * Internal functions
sl@0:  *--------------------------------------------------------------------*/
sl@0: 
sl@0: static void m3gInitGroup(Interface *m3g,
sl@0:                          Group *group,
sl@0:                          M3GClass classID);
sl@0: 
sl@0: #endif /*__M3G_GROUP_H__*/