Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_WorldInfo.h
| Show All 28 Lines | |||||
| * \ingroup ketsji | * \ingroup ketsji | ||||
| */ | */ | ||||
| #ifndef __KX_WORLDINFO_H__ | #ifndef __KX_WORLDINFO_H__ | ||||
| #define __KX_WORLDINFO_H__ | #define __KX_WORLDINFO_H__ | ||||
| #include "MT_Scalar.h" | #include "MT_Scalar.h" | ||||
| #include "KX_KetsjiEngine.h" | #include "KX_KetsjiEngine.h" | ||||
| #include "RAS_IRasterizer.h" | #include "PyObjectPlus.h" | ||||
| #ifdef WITH_CXX_GUARDEDALLOC | #ifdef WITH_CXX_GUARDEDALLOC | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #endif | #endif | ||||
| #ifdef USE_MATHUTILS | |||||
| void KX_WorldInfo_Mathutils_Callback_Init(void); | |||||
| #endif | |||||
| struct Scene; | struct Scene; | ||||
| struct World; | struct World; | ||||
| const class KX_KetsjiEngine; | |||||
| const class RAS_IRasterizer; | |||||
| class KX_WorldInfo | class KX_WorldInfo : public PyObjectPlus | ||||
| { | { | ||||
| Py_Header | |||||
| STR_String m_name; | |||||
| bool m_do_color_management; | bool m_do_color_management; | ||||
| bool m_hasworld; | bool m_hasworld; | ||||
| bool m_hasmist; | bool m_hasmist; | ||||
| short m_misttype; | short m_misttype; | ||||
| float m_miststart; | float m_miststart; | ||||
| float m_mistdistance; | float m_mistdistance; | ||||
| float m_mistintensity; | float m_mistintensity; | ||||
| float m_mistcolor[3]; | float m_mistcolor[3]; | ||||
| Show All 11 Lines | enum MistType { | ||||
| KX_MIST_QUADRATIC, | KX_MIST_QUADRATIC, | ||||
| KX_MIST_LINEAR, | KX_MIST_LINEAR, | ||||
| KX_MIST_INV_QUADRATIC, | KX_MIST_INV_QUADRATIC, | ||||
| }; | }; | ||||
| KX_WorldInfo(Scene *blenderscene, World *blenderworld); | KX_WorldInfo(Scene *blenderscene, World *blenderworld); | ||||
| ~KX_WorldInfo(); | ~KX_WorldInfo(); | ||||
| const STR_String &GetName(); | |||||
| bool hasWorld(); | bool hasWorld(); | ||||
| bool hasMist(); | bool hasMist(); | ||||
| short getMistType(); | short getMistType(); | ||||
| float getMistStart(); | float getMistStart(); | ||||
| float getMistDistance(); | float getMistDistance(); | ||||
| float getMistIntensity(); | float getMistIntensity(); | ||||
| float getMistColorRed(); | float getMistColorRed(); | ||||
| float getMistColorGreen(); | float getMistColorGreen(); | ||||
| Show All 10 Lines | public: | ||||
| void setMistDistance(float d); | void setMistDistance(float d); | ||||
| void setMistIntensity(float intensity); | void setMistIntensity(float intensity); | ||||
| void setMistColor(float r, float g, float b); | void setMistColor(float r, float g, float b); | ||||
| void setBackColor(float r, float g, float b); | void setBackColor(float r, float g, float b); | ||||
| void setAmbientColor(float r, float g, float b); | void setAmbientColor(float r, float g, float b); | ||||
| void UpdateBackGround(); | void UpdateBackGround(); | ||||
| void UpdateWorldSettings(); | void UpdateWorldSettings(); | ||||
| #ifdef WITH_PYTHON | |||||
| /* attributes */ | |||||
| static PyObject *pyattr_get_mist_typeconst(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); | |||||
| static PyObject *pyattr_get_mist_color(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); | |||||
| static int pyattr_set_mist_color(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | |||||
| static PyObject *pyattr_get_back_color(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); | |||||
| static int pyattr_set_back_color(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | |||||
| static PyObject *pyattr_get_ambient_color(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); | |||||
| static int pyattr_set_ambient_color(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | |||||
| virtual PyObject *py_repr(void); | |||||
| #endif | |||||
| #ifdef WITH_CXX_GUARDEDALLOC | #ifdef WITH_CXX_GUARDEDALLOC | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_WorldInfo") | MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_WorldInfo") | ||||
| #endif | #endif | ||||
| }; | }; | ||||
| #endif /* __KX_WORLDINFO_H__ */ | #endif /* __KX_WORLDINFO_H__ */ | ||||