Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Szepe <HG1_public@gmx.net>2015-03-23 23:40:11 +0300
committerThomas Szepe <HG1_public@gmx.net>2015-03-23 23:40:11 +0300
commitd07c666a0e542517914dad580d1b3f4787525852 (patch)
tree4f9c2c5999817acaca97351e72e71f3f19cb7652 /source/gameengine/Converter
parent2affbb437bd3cbf3e1a502bd65a5eefb64a92b9b (diff)
BGE: Add setMistType and setMistIntensity API.
This patch adds the missing setMistType() and setMistIntensity() to the API Reviewers: campbellbarton, brecht, moguri Reviewed By: campbellbarton, brecht, moguri Subscribers: campbellbarton, dingto Differential Revision: https://developer.blender.org/D149
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BlenderWorldInfo.cpp21
-rw-r--r--source/gameengine/Converter/BlenderWorldInfo.h6
2 files changed, 27 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BlenderWorldInfo.cpp b/source/gameengine/Converter/BlenderWorldInfo.cpp
index 28e42c1cc63..5f476949616 100644
--- a/source/gameengine/Converter/BlenderWorldInfo.cpp
+++ b/source/gameengine/Converter/BlenderWorldInfo.cpp
@@ -70,8 +70,10 @@ BlenderWorldInfo::BlenderWorldInfo(struct Scene *blenderscene, struct World *ble
if (blenderworld) {
m_hasworld = true;
m_hasmist = ((blenderworld->mode) & WO_MIST ? true : false);
+ m_misttype = blenderworld->mistype;
m_miststart = blenderworld->miststa;
m_mistdistance = blenderworld->mistdist;
+ m_mistintensity = blenderworld->misi;
copy_v3_v3(m_mistcolor, &blenderworld->horr);
copy_v3_v3(m_backgroundcolor, &blenderworld->horr);
copy_v3_v3(m_ambientcolor, &blenderworld->ambr);
@@ -131,6 +133,11 @@ float BlenderWorldInfo::getAmbientColorBlue()
return m_ambientcolor[2];
}
+short BlenderWorldInfo::getMistType()
+{
+ return m_misttype;
+}
+
float BlenderWorldInfo::getMistStart()
{
return m_miststart;
@@ -141,6 +148,11 @@ float BlenderWorldInfo::getMistDistance()
return m_mistdistance;
}
+float BlenderWorldInfo::getMistIntensity()
+{
+ return m_mistintensity;
+}
+
float BlenderWorldInfo::getMistColorRed()
{
return m_mistcolor[0];
@@ -163,6 +175,11 @@ void BlenderWorldInfo::setBackColor(float r, float g, float b)
m_backgroundcolor[2] = b;
}
+void BlenderWorldInfo::setMistType(short type)
+{
+ m_misttype = type;
+}
+
void BlenderWorldInfo::setUseMist(bool enable)
{
m_hasmist = enable;
@@ -178,6 +195,10 @@ void BlenderWorldInfo::setMistDistance(float d)
m_mistdistance = d;
}
+void BlenderWorldInfo::setMistIntensity(float intensity)
+{
+ m_mistintensity = intensity;
+}
void BlenderWorldInfo::setMistColor(float r, float g, float b)
{
m_mistcolor[0] = r;
diff --git a/source/gameengine/Converter/BlenderWorldInfo.h b/source/gameengine/Converter/BlenderWorldInfo.h
index 6c67681c3bc..4184d428808 100644
--- a/source/gameengine/Converter/BlenderWorldInfo.h
+++ b/source/gameengine/Converter/BlenderWorldInfo.h
@@ -40,8 +40,10 @@ class BlenderWorldInfo : public KX_WorldInfo
float m_backgroundcolor[3];
bool m_hasmist;
+ short m_misttype;
float m_miststart;
float m_mistdistance;
+ float m_mistintensity;
float m_mistcolor[3];
float m_ambientcolor[3];
@@ -60,16 +62,20 @@ public:
float getAmbientColorGreen();
float getAmbientColorBlue();
+ short getMistType();
float getMistStart();
float getMistDistance();
+ float getMistIntensity();
float getMistColorRed();
float getMistColorGreen();
float getMistColorBlue();
void setBackColor(float r, float g, float b);
void setUseMist(bool enable);
+ void setMistType(short type);
void setMistStart(float d);
void setMistDistance(float d);
+ void setMistIntensity(float intensity);
void setMistColor(float r, float g, float b);
void setAmbientColor(float r, float g, float b);