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: SkinnedMesh interface sl@0: * sl@0: */ sl@0: sl@0: #ifndef __M3G_SKINNEDMESH_H__ sl@0: #define __M3G_SKINNEDMESH_H__ sl@0: sl@0: /*! sl@0: * \internal sl@0: * \file sl@0: * \brief SkinnedMesh interface sl@0: */ sl@0: sl@0: #include "m3g_mesh.h" sl@0: #include "m3g_array.h" sl@0: sl@0: typedef struct BoneRecord Bone; sl@0: sl@0: struct M3GSkinnedMeshImpl sl@0: { sl@0: Mesh mesh; sl@0: sl@0: Group *skeleton; sl@0: PointerArray bones; sl@0: sl@0: M3Gint weightedVertexCount, bonesPerVertex; sl@0: sl@0: M3Gubyte *boneIndices[M3G_MAX_VERTEX_TRANSFORMS]; sl@0: M3Gubyte *boneWeights[M3G_MAX_VERTEX_TRANSFORMS]; sl@0: M3Gubyte *weightShifts; sl@0: M3Gubyte *normalizedWeights[M3G_MAX_VERTEX_TRANSFORMS]; sl@0: sl@0: /* Scale and bias transformation for morphing */ sl@0: M3Gshort scaleMatrix[9], biasVector[3]; sl@0: M3Gshort scaleExp, biasExp, scaleBiasExp; sl@0: sl@0: M3Gshort maxExp; /* total maximum exponent */ sl@0: sl@0: /*! \internal \brief internal morphed vertex buffer */ sl@0: VertexBuffer *morphedVB; sl@0: sl@0: M3Gint vbTimestamp; sl@0: M3Gshort posShift, normalShift; sl@0: sl@0: AABB bbox; sl@0: sl@0: M3Gbool weightsDirty; sl@0: }; sl@0: sl@0: /*---------------------------------------------------------------------- sl@0: * Internal functions sl@0: *--------------------------------------------------------------------*/ sl@0: sl@0: #endif /*__M3G_SKINNEDMESH_H__*/