os/graphics/m3g/m3gcore11/inc/m3g_lightmanager.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: Light manager interface
    15 *
    16 */
    17 
    18 #ifndef __M3G_LIGHTMANAGER_H__
    19 #define __M3G_LIGHTMANAGER_H__
    20 
    21 /*!
    22  * \internal
    23  * \file
    24  * \brief Light manager class for managing and selecting from a
    25  * dynamic pool of lights in RenderContext
    26  *
    27  * A LightManager is a component of a RenderContext, and can not exist
    28  * as a standalone object.
    29  * 
    30  */
    31 
    32 #include "m3g_array.h"
    33 
    34 /*!
    35  * \internal
    36  * \brief Light manager structure
    37  */
    38 typedef struct
    39 {
    40     PointerArray lights;
    41     M3Gsizei numActive;
    42 } LightManager;
    43 
    44 /*----------------------------------------------------------------------
    45  * Internal functions
    46  *--------------------------------------------------------------------*/
    47 
    48 static void     m3gClearLights2         (LightManager *mgr);
    49 static void     m3gDestroyLightManager  (LightManager *mgr, Interface *m3g);
    50 static M3Gint   m3gInsertLight          (LightManager *mgr, Light *light, const Matrix *tf, Interface *m3g);
    51 static M3Gsizei m3gLightArraySize       (const LightManager *mgr);
    52 static void     m3gReplaceLight         (LightManager *mgr, M3Gint idx, Light *light, const Matrix *tf);
    53 static void     m3gSelectGLLights       (const LightManager *mgr,
    54                                          M3Gsizei maxNum,
    55                                          M3Guint scope,
    56                                          M3Gfloat x, M3Gfloat y, M3Gfloat z);
    57 static void m3gTransformLights          (LightManager *mgr, const Matrix *mtx);
    58 static Light *m3gGetLightTransformInternal(const LightManager *mgr,
    59                                            M3Gint idx, M3GMatrix *transform);
    60 #endif /*__M3G_LIGHTMANAGER_H__*/