[Orxonox-commit 2165] r6881 - in code/branches/lod: data/levels data/levels/templates src/orxonox/graphics
kolibri7 at orxonox.net
kolibri7 at orxonox.net
Mon May 10 16:00:52 CEST 2010
Author: kolibri7
Date: 2010-05-10 16:00:52 +0200 (Mon, 10 May 2010)
New Revision: 6881
Modified:
code/branches/lod/data/levels/gametype_underattack.oxw
code/branches/lod/data/levels/templates/lodinformation.oxt
code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc
code/branches/lod/src/orxonox/graphics/MeshLodInformation.h
Log:
*lodLevel is a float now
*gametype_underattack.oxw includes the lodlevel template now
Modified: code/branches/lod/data/levels/gametype_underattack.oxw
===================================================================
--- code/branches/lod/data/levels/gametype_underattack.oxw 2010-05-10 13:58:08 UTC (rev 6880)
+++ code/branches/lod/data/levels/gametype_underattack.oxw 2010-05-10 14:00:52 UTC (rev 6881)
@@ -3,6 +3,7 @@
include("stats.oxo")
include("underattackhud.oxo")
include("templates/spaceship_assff.oxt")
+ include("templates/lodinformation.oxt")
?>
<Level
@@ -10,11 +11,10 @@
description = "A simple testlevel"
gametype = UnderAttack
>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
- <lodinformation>
- <MeshLodInformation mesh=Carrier.mesh lodQuality=1 />
- </lodinformation>
-
<Scene
ambientlight = "0.5, 0.5, 0.5"
skybox = "Orxonox/skypanoramagen1"
Modified: code/branches/lod/data/levels/templates/lodinformation.oxt
===================================================================
--- code/branches/lod/data/levels/templates/lodinformation.oxt 2010-05-10 13:58:08 UTC (rev 6880)
+++ code/branches/lod/data/levels/templates/lodinformation.oxt 2010-05-10 14:00:52 UTC (rev 6881)
@@ -1,7 +1,7 @@
<Template name=lodtemplate_default>
<Level>
<lodinformation>
- <MeshLodInformation mesh=ast1.mesh lodQuality=1 />
+ <MeshLodInformation mesh=Carrier.mesh lodQuality=2.4 />
</lodinformation>
</Level>
</Template>
\ No newline at end of file
Modified: code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc
===================================================================
--- code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc 2010-05-10 13:58:08 UTC (rev 6880)
+++ code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc 2010-05-10 14:00:52 UTC (rev 6881)
@@ -61,11 +61,12 @@
return MeshLodInformation::getMeshSource();
}
- void MeshLodInformation::setLodLevel(unsigned int lodLevel)
+ void MeshLodInformation::setLodLevel(float lodLevel)
{
- lodLevel_=lodLevel;
+ if(lodLevel>=0)
+ lodLevel_=lodLevel;
}
- int MeshLodInformation::getLodLevel()
+ float MeshLodInformation::getLodLevel()
{
return lodLevel_;
}
Modified: code/branches/lod/src/orxonox/graphics/MeshLodInformation.h
===================================================================
--- code/branches/lod/src/orxonox/graphics/MeshLodInformation.h 2010-05-10 13:58:08 UTC (rev 6880)
+++ code/branches/lod/src/orxonox/graphics/MeshLodInformation.h 2010-05-10 14:00:52 UTC (rev 6881)
@@ -40,17 +40,17 @@
class _OrxonoxExport MeshLodInformation : public BaseObject
{
private:
- void setLodLevel(unsigned int lodLevel);
+ void setLodLevel(float lodLevel);
void setMeshSource(std::string meshSource);
std::string getMeshSource();
std::string meshSource_;
- int lodLevel_;
+ float lodLevel_;
public:
MeshLodInformation(BaseObject* creator);
virtual ~MeshLodInformation();
- int getLodLevel();
+ float getLodLevel();
std::string getMeshName();
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
More information about the Orxonox-commit
mailing list