4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
29 #ifndef __KX_MESHPROXY
30 #define __KX_MESHPROXY
32 #include "SCA_IObject.h"
34 class KX_MeshProxy : public SCA_IObject
38 class RAS_MeshObject* m_meshobj;
40 KX_MeshProxy(class RAS_MeshObject* mesh);
41 virtual ~KX_MeshProxy();
43 void SetMeshModified(bool v);
45 // stuff for cvalue related things
46 virtual CValue* Calc(VALUE_OPERATOR op, CValue *val) ;
47 virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
48 virtual const STR_String & GetText();
49 virtual double GetNumber();
50 virtual RAS_MeshObject* GetMesh() { return m_meshobj; }
51 virtual STR_String GetName();
52 virtual void SetName(STR_String name); // Set the name of the value
53 virtual void ReplicaSetName(STR_String name);
54 virtual CValue* GetReplica();
56 // stuff for python integration
57 virtual PyObject* py_getattro(PyObject *attr);
58 KX_PYMETHOD(KX_MeshProxy,GetNumMaterials);
59 KX_PYMETHOD(KX_MeshProxy,GetMaterialName);
60 KX_PYMETHOD(KX_MeshProxy,GetTextureName);
61 KX_PYMETHOD_NOARGS(KX_MeshProxy,GetNumPolygons);
63 // both take materialid (int)
64 KX_PYMETHOD(KX_MeshProxy,GetVertexArrayLength);
65 KX_PYMETHOD(KX_MeshProxy,GetVertex);
66 KX_PYMETHOD(KX_MeshProxy,GetPolygon);
67 KX_PYMETHOD_DOC(KX_MeshProxy, reinstancePhysicsMesh);
69 static PyObject* pyattr_get_materials(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
72 #endif //__KX_MESHPROXY