1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file BL_ArmatureChannel.h
* \ingroup bgeconv
*/
#ifndef __BL_ARMATURECHANNEL_H__
#define __BL_ARMATURECHANNEL_H__
#include "DNA_action_types.h"
#include "CTR_HashedPtr.h"
#include "CTR_Map.h"
#include "EXP_PyObjectPlus.h"
class SCA_IObject;
class KX_GameObject;
class BL_ArmatureObject;
struct bConstraint;
struct bPoseChannel;
struct Object;
struct bPose;
class BL_ArmatureChannel : public PyObjectPlus
{
// use Py_HeaderPtr since we use generic pointer in proxy
Py_HeaderPtr;
private:
friend class BL_ArmatureObject;
struct bPoseChannel* m_posechannel;
BL_ArmatureObject* m_armature;
public:
BL_ArmatureChannel(class BL_ArmatureObject *armature,
struct bPoseChannel *posechannel);
virtual ~BL_ArmatureChannel();
inline const char *GetName()
{
return m_posechannel->name;
}
#ifdef WITH_PYTHON
// Python access
virtual PyObject *py_repr(void);
static PyObject *py_attr_getattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int py_attr_setattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject *py_attr_get_joint_rotation(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int py_attr_set_joint_rotation(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
#endif /* WITH_PYTHON */
};
/* this is a factory class to access bBone data field in the GE.
* It's not supposed to be instantiated, we only need it for the Attributes and Method array.
* The actual proxy object will be manually created using NewProxyPtr */
class BL_ArmatureBone : public PyObjectPlus
{
// use Py_HeaderPtr since we use generic pointer in proxy
Py_HeaderPtr;
private:
// make constructor private to make sure no one tries to instantiate this class
BL_ArmatureBone() {}
virtual ~BL_ArmatureBone() {}
public:
#ifdef WITH_PYTHON
static PyObject *py_bone_repr(PyObject *self);
static PyObject *py_bone_get_parent(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject *py_bone_get_children(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
#endif
};
#endif /* __BL_ARMATURECHANNEL_H__ */
|