[Orxonox-commit 2193] r6909 - in code/branches/lod: data/levels data/levels/templates src/orxonox src/orxonox/graphics
kolibri7 at orxonox.net
kolibri7 at orxonox.net
Mon May 17 15:21:51 CEST 2010
Author: kolibri7
Date: 2010-05-17 15:21:51 +0200 (Mon, 17 May 2010)
New Revision: 6909
Modified:
code/branches/lod/data/levels/empty_level.oxw
code/branches/lod/data/levels/gametype_asteroids.oxw
code/branches/lod/data/levels/teambasematchlevel.oxw
code/branches/lod/data/levels/teamdeathmatch.oxw
code/branches/lod/data/levels/templates/lodinformation.oxt
code/branches/lod/src/orxonox/Level.cc
code/branches/lod/src/orxonox/graphics/Model.cc
code/branches/lod/src/orxonox/graphics/Model.h
Log:
*fully functional lod implementation
*added file templates/lodinformation.oxt in many maps
*changed some settings in templates/lodinformation.oxt
Modified: code/branches/lod/data/levels/empty_level.oxw
===================================================================
--- code/branches/lod/data/levels/empty_level.oxw 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/data/levels/empty_level.oxw 2010-05-17 13:21:51 UTC (rev 6909)
@@ -1,6 +1,7 @@
<?lua
include("stats.oxo")
include("hudtemplates3.oxo")
+ include("templates/lodinformation.oxt")
?>
<?lua
@@ -12,6 +13,10 @@
name = "Sample"
description = "Just a few tests"
>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+
<Scene
ambientlight = "0.8, 0.8, 0.8"
skybox = "Orxonox/Starbox"
Modified: code/branches/lod/data/levels/gametype_asteroids.oxw
===================================================================
--- code/branches/lod/data/levels/gametype_asteroids.oxw 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/data/levels/gametype_asteroids.oxw 2010-05-17 13:21:51 UTC (rev 6909)
@@ -2,6 +2,7 @@
include("hudtemplates3.oxo")
include("stats.oxo")
include("templates/spaceship_assff.oxt")
+ include("templates/lodinformation.oxt")
?>
<Level
@@ -9,6 +10,10 @@
description = "testmap for gametype asteroid race"
gametype = Asteroids
>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+
<Scene
ambientlight = "0.5, 0.5, 0.5"
skybox = "Orxonox/Starbox"
Modified: code/branches/lod/data/levels/teambasematchlevel.oxw
===================================================================
--- code/branches/lod/data/levels/teambasematchlevel.oxw 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/data/levels/teambasematchlevel.oxw 2010-05-17 13:21:51 UTC (rev 6909)
@@ -4,6 +4,7 @@
include("teambasematchhud.oxo")
include("templates/spaceship_assff.oxt")
include("templates/spaceship_pirate.oxt")
+ include("templates/lodinformation.oxt")
?>
<Level
@@ -11,6 +12,10 @@
description = "A simple testlevel"
gametype = TeamBaseMatch
>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+
<Scene
ambientlight = "0.5, 0.5, 0.5"
skybox = "Orxonox/skypanoramagen1"
Modified: code/branches/lod/data/levels/teamdeathmatch.oxw
===================================================================
--- code/branches/lod/data/levels/teamdeathmatch.oxw 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/data/levels/teamdeathmatch.oxw 2010-05-17 13:21:51 UTC (rev 6909)
@@ -4,6 +4,7 @@
include("templates/spaceship_assff.oxt")
include("templates/spaceship_H2.oxt")
include("templates/spaceship_pirate.oxt")
+ include("templates/lodinformation.oxt")
?>
<Level
@@ -11,6 +12,10 @@
description = "Testing waypoings for AI controlled spaceships."
gametype = TeamDeathmatch
>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+
<Scene
ambientlight = "0.7, 0.6, 0.6"
skybox = "Orxonox/skypanoramagen1"
Modified: code/branches/lod/data/levels/templates/lodinformation.oxt
===================================================================
--- code/branches/lod/data/levels/templates/lodinformation.oxt 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/data/levels/templates/lodinformation.oxt 2010-05-17 13:21:51 UTC (rev 6909)
@@ -1,7 +1,8 @@
<Template name=lodtemplate_default>
<Level>
<lodinformation>
- <MeshLodInformation mesh=Carrier.mesh lodQuality=2.4 />
+ <MeshLodInformation mesh=Carrier.mesh lodQuality=1.8 />
+ <MeshLodInformation mesh=assff.mesh lodQuality=3 />
</lodinformation>
</Level>
</Template>
\ No newline at end of file
Modified: code/branches/lod/src/orxonox/Level.cc
===================================================================
--- code/branches/lod/src/orxonox/Level.cc 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/src/orxonox/Level.cc 2010-05-17 13:21:51 UTC (rev 6909)
@@ -48,6 +48,7 @@
{
RegisterObject(Level);
+
this->registerVariables();
this->xmlfilename_ = this->getFilename();
this->xmlfile_ = 0;
Modified: code/branches/lod/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/lod/src/orxonox/graphics/Model.cc 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/src/orxonox/graphics/Model.cc 2010-05-17 13:21:51 UTC (rev 6909)
@@ -48,6 +48,8 @@
this->bCastShadows_ = true;
this->registerVariables();
+ //LoD
+ this->lodLevel_=5;
}
Model::~Model()
Modified: code/branches/lod/src/orxonox/graphics/Model.h
===================================================================
--- code/branches/lod/src/orxonox/graphics/Model.h 2010-05-17 12:41:01 UTC (rev 6908)
+++ code/branches/lod/src/orxonox/graphics/Model.h 2010-05-17 13:21:51 UTC (rev 6909)
@@ -66,9 +66,9 @@
void changedShadows();
//LoD
- inline void setLodLevel(unsigned short lodLevel)
+ inline void setLodLevel(float lodLevel)
{ this->lodLevel_ = lodLevel; }
- inline unsigned short getLodLevel() const
+ inline float getLodLevel() const
{ return this->lodLevel_; }
float Model::getBiggestScale(Vector3 scale3d);
@@ -77,7 +77,7 @@
bool bCastShadows_;
//LoD
- unsigned short lodLevel_;
+ float lodLevel_;
};
}
More information about the Orxonox-commit
mailing list