[Orxonox-commit 1341] r6059 - in code/branches/particles2: data/levels data/particle data/tcl src/orxonox src/orxonox/controllers src/orxonox/worldentities
cdaniel at orxonox.net
cdaniel at orxonox.net
Fri Nov 13 14:32:27 CET 2009
Author: cdaniel
Date: 2009-11-13 14:32:27 +0100 (Fri, 13 Nov 2009)
New Revision: 6059
Added:
code/branches/particles2/data/particle/Ogre.log
code/branches/particles2/data/particle/laser.particle
code/branches/particles2/data/particle/load.particle
code/branches/particles2/data/particle/particlecanon.particle
code/branches/particles2/data/particle/rocketfire.particle
code/branches/particles2/data/particle/smoke.particle
code/branches/particles2/data/particle/tes3.particle
code/branches/particles2/data/tcl/plane.mesh_lod0_prepshadow.log
code/branches/particles2/src/orxonox/controllers/RocketController.cc
code/branches/particles2/src/orxonox/controllers/RocketController.h
code/branches/particles2/src/orxonox/worldentities/Rocket.cc
code/branches/particles2/src/orxonox/worldentities/Rocket.h
Modified:
code/branches/particles2/data/levels/empty_level.oxw
code/branches/particles2/src/orxonox/OrxonoxPrereqs.h
code/branches/particles2/src/orxonox/controllers/CMakeLists.txt
code/branches/particles2/src/orxonox/worldentities/CMakeLists.txt
Log:
Modified: code/branches/particles2/data/levels/empty_level.oxw
===================================================================
--- code/branches/particles2/data/levels/empty_level.oxw 2009-11-13 11:06:22 UTC (rev 6058)
+++ code/branches/particles2/data/levels/empty_level.oxw 2009-11-13 13:32:27 UTC (rev 6059)
@@ -16,7 +16,22 @@
ambientlight = "0.8, 0.8, 0.8"
skybox = "Orxonox/Starbox"
>
+
+<Rocket position="-10, 3.5,800" velocity="0,0,-100">
+ <attached>
+ <Model pitch=180 position="0,0,0" scale=1.5 mesh="rocket_test.mesh" >
+ <attached>
+ <ParticleEmitter pitch=0 roll=0 position="0,5,0" source="Orxonox/laser" lifetime=2.0 loop=1 startdelay=3.0/>
+ <ParticleEmitter pitch=-90 roll=0 position="0,-5,0" source="Orxonox/particlecanon" lifetime=2.0 loop=1 startdelay=3.0/>
+ <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/rocketfire" lifetime=2.0 loop=1 startdelay=3.0 />
+ <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/smoke" lifetime=2.0 loop=1 startdelay=3.0 />
+ </attached>
+ </Model>
+ </attached>
+ </Rocket>
+
+
<Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
- <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshippirate />
+ <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshipassff />
</Scene>
</Level>
Added: code/branches/particles2/data/particle/Ogre.log
===================================================================
--- code/branches/particles2/data/particle/Ogre.log (rev 0)
+++ code/branches/particles2/data/particle/Ogre.log 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,58 @@
+13:25:05: Creating resource group General
+13:25:05: Creating resource group Internal
+13:25:05: Creating resource group Autodetect
+13:25:05: Registering ResourceManager for type Material
+13:25:05: Registering ResourceManager for type Mesh
+13:25:05: Registering ResourceManager for type Skeleton
+13:25:05: MovableObjectFactory for type 'ParticleSystem' registered.
+13:25:05: Loading library OgrePlatform.dll
+13:25:05: OverlayElementFactory for type Panel registered.
+13:25:05: OverlayElementFactory for type BorderPanel registered.
+13:25:05: OverlayElementFactory for type TextArea registered.
+13:25:05: Registering ResourceManager for type Font
+13:25:05: ArchiveFactory for archive type FileSystem registered.
+13:25:05: ArchiveFactory for archive type Zip registered.
+13:25:05: DevIL version: Developer's Image Library (DevIL) 1.6.7 Oct 28 2005
+13:25:05: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw
+13:25:05: Registering ResourceManager for type HighLevelGpuProgram
+13:25:05: Registering ResourceManager for type Compositor
+13:25:05: MovableObjectFactory for type 'Entity' registered.
+13:25:05: MovableObjectFactory for type 'Light' registered.
+13:25:05: MovableObjectFactory for type 'BillboardSet' registered.
+13:25:05: MovableObjectFactory for type 'ManualObject' registered.
+13:25:05: MovableObjectFactory for type 'BillboardChain' registered.
+13:25:05: MovableObjectFactory for type 'RibbonTrail' registered.
+13:25:05: An exception has been thrown!
+
+-----------------------------------
+Details:
+-----------------------------------
+Error #: 8
+Function: ConfigFile::load
+Description: 'plugins.cfg' file not found!.
+File: \cvs\ogrenew\OgreMain\src\OgreConfigFile.cpp
+Line: 79
+Stack unwinding: <<beginning of stack>>
+13:25:05: plugins.cfg not found, automatic plugin loading disabled.
+13:25:05: *-*-* OGRE Initialising
+13:25:05: *-*-* Version 1.3.0 (Eihort)
+13:25:05: An exception has been thrown!
+
+-----------------------------------
+Details:
+-----------------------------------
+Error #: 8
+Function: ConfigFile::load
+Description: 'resources.cfg' file not found!.
+File: \cvs\ogrenew\OgreMain\src\OgreConfigFile.cpp
+Line: 79
+Stack unwinding: <<beginning of stack>>
+13:25:10: ___Particle Editor closing down cleanly.___
+13:25:10: *-*-* OGRE Shutdown
+13:25:10: Unregistering ResourceManager for type Compositor
+13:25:10: Unregistering ResourceManager for type Font
+13:25:10: Unregistering ResourceManager for type Skeleton
+13:25:10: Unregistering ResourceManager for type Mesh
+13:25:10: Unregistering ResourceManager for type HighLevelGpuProgram
+13:25:10: Unregistering ResourceManager for type Material
+13:25:10: Unloading library OgrePlatform.dll
Added: code/branches/particles2/data/particle/laser.particle
===================================================================
--- code/branches/particles2/data/particle/laser.particle (rev 0)
+++ code/branches/particles2/data/particle/laser.particle 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,47 @@
+particle_system Orxonox/laser
+{
+ quota 200
+ material PE/point_lensflare
+ particle_width 7.08
+ particle_height 7.08
+ cull_each false
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Point
+ {
+ angle 180
+ colour 0 1 0.275862 1
+ colour_range_start 0 1 0.275862 1
+ colour_range_end 0 1 0.275862 1
+ direction 0 1 0
+ emission_rate 80
+ position 0 0 0
+ velocity 11
+ velocity_min 11
+ velocity_max 11
+ time_to_live 0.7
+ time_to_live_min 0.7
+ time_to_live_max 1
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 1.6
+ repeat_delay_min 1.6
+ repeat_delay_max 1.6
+ }
+
+ affector Scaler
+ {
+ rate -8.8
+ }
+}
Added: code/branches/particles2/data/particle/load.particle
===================================================================
--- code/branches/particles2/data/particle/load.particle (rev 0)
+++ code/branches/particles2/data/particle/load.particle 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,141 @@
+particle_system Orxonox/load
+{
+ quota 50
+ material PE/ringflare
+ particle_width 1
+ particle_height 1.3
+ cull_each false
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Point
+ {
+ angle 5
+ colour 1 1 1 1
+ colour_range_start 1 1 1 1
+ colour_range_end 1 1 1 1
+ direction 0 1 0
+ emission_rate 4
+ position 0 -5 0
+ velocity 5
+ velocity_min 5
+ velocity_max 5
+ time_to_live 1
+ time_to_live_min 1
+ time_to_live_max 1
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ }
+
+ emitter Point
+ {
+ angle 5
+ colour 1 1 1 1
+ colour_range_start 1 1 1 1
+ colour_range_end 1 1 1 1
+ direction 1 0 0
+ emission_rate 3
+ position -5 0 0
+ velocity 5
+ velocity_min 5
+ velocity_max 5
+ time_to_live 1
+ time_to_live_min 1
+ time_to_live_max 1
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ }
+
+ emitter Point
+ {
+ angle 5
+ colour 1 1 1 1
+ colour_range_start 1 1 1 1
+ colour_range_end 1 1 1 1
+ direction -1 0 0
+ emission_rate 3
+ position 5 0 0
+ velocity 5
+ velocity_min 5
+ velocity_max 5
+ time_to_live 1
+ time_to_live_min 1
+ time_to_live_max 1
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ }
+
+ emitter Point
+ {
+ angle 5
+ colour 1 1 1 1
+ colour_range_start 1 1 1 1
+ colour_range_end 1 1 1 1
+ direction 0 -1 0
+ emission_rate 4
+ position 0 5 0
+ velocity 5
+ velocity_min 5
+ velocity_max 5
+ time_to_live 1
+ time_to_live_min 1
+ time_to_live_max 1
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ }
+
+ affector Scaler
+ {
+ rate 14.4
+ }
+
+ affector ColourInterpolator
+ {
+ colour0 1 1 0.5 0
+ time0 1
+ colour1 0.5 0.5 0.5 0
+ time1 1
+ colour2 0.5 0.5 0.5 0
+ time2 1
+ colour3 0.5 0.5 0.5 0
+ time3 1
+ colour4 0.5 0.5 0.5 0
+ time4 1
+ colour5 0.5 0.5 0.5 0
+ time5 1
+ }
+
+ affector DirectionRandomiser
+ {
+ randomness 15
+ scope 0.8
+ keep_velocity false
+ }
+
+
+}
Added: code/branches/particles2/data/particle/particlecanon.particle
===================================================================
--- code/branches/particles2/data/particle/particlecanon.particle (rev 0)
+++ code/branches/particles2/data/particle/particlecanon.particle 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,43 @@
+particle_system Orxonox/particlecanon
+{
+ quota 1000
+ material PE/point_lensflare
+ particle_width 6
+ particle_height 6
+ cull_each false
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Point
+ {
+ angle 1
+ colour 0.965517 0.544828 0 1
+ colour_range_start 0.965517 0.544828 0 1
+ colour_range_end 0.965517 0.544828 0 1
+ direction 0 1 0
+ emission_rate 1220
+ position 0 0 0
+ velocity 300
+ velocity_min 300
+ velocity_max 300
+ time_to_live 0.05
+ time_to_live_min 0.05
+ time_to_live_max 0.05
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ }
+
+}
Added: code/branches/particles2/data/particle/rocketfire.particle
===================================================================
--- code/branches/particles2/data/particle/rocketfire.particle (rev 0)
+++ code/branches/particles2/data/particle/rocketfire.particle 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,50 @@
+particle_system Orxonox/rocketfire
+{
+ quota 5000
+ material PE/explosion
+ particle_width 9
+ particle_height 5
+ cull_each false
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Ellipsoid
+ {
+ angle 2
+ colour 1 0.682759 1 1
+ colour_range_start 1 0.682759 1 1
+ colour_range_end 1 0.682759 1 1
+ direction 0 1 0
+ emission_rate 600
+ position 0 0 0
+ velocity 10
+ velocity_min 10
+ velocity_max 48
+ time_to_live 0.3
+ time_to_live_min 0.3
+ time_to_live_max 0.5
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ width 1.5
+ height 1.5
+ depth 0
+ }
+
+ affector Scaler
+ {
+ rate -13.2
+ }
+}
Added: code/branches/particles2/data/particle/smoke.particle
===================================================================
--- code/branches/particles2/data/particle/smoke.particle (rev 0)
+++ code/branches/particles2/data/particle/smoke.particle 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,45 @@
+particle_system Orxonox/smoke
+{
+ quota 300
+ material PE/explosion
+ particle_width 6.94
+ particle_height 7.93
+ cull_each false
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Ellipsoid
+ {
+ angle 13
+ colour 0.156897 0.326207 1 1
+ colour_range_start 0.156897 0.326207 1 1
+ colour_range_end 0.156897 0.326207 1 1
+ direction 0 1 0
+ emission_rate 65
+ position 0 0 0
+ velocity 25
+ velocity_min 25
+ velocity_max 25
+ time_to_live 2.2
+ time_to_live_min 2.2
+ time_to_live_max 2.2
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ width 3
+ height 3
+ depth 0
+ }
+}
Added: code/branches/particles2/data/particle/tes3.particle
===================================================================
--- code/branches/particles2/data/particle/tes3.particle (rev 0)
+++ code/branches/particles2/data/particle/tes3.particle 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,59 @@
+particle_system Orxonox/tes3
+{
+ quota 500
+ material PE/lensflare
+ particle_width 10
+ particle_height 10
+ cull_each true
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type perpendicular_self
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Cylinder
+ {
+ angle 180
+ colour 1 1 1 1
+ colour_range_start 1 1 1 1
+ colour_range_end 1 1 1 1
+ direction 0 -1 0
+ emission_rate 100
+ position 0 100 0
+ velocity 26
+ velocity_min 26
+ velocity_max 26
+ time_to_live 9.6
+ time_to_live_min 9.6
+ time_to_live_max 9.6
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ width 200
+ height 200
+ depth 1
+ }
+
+ affector DeflectorPlane
+ {
+ plane_point 0 0 0
+ plane_normal 0 1 0
+ bounce 2
+ }
+
+ affector DirectionRandomiser
+ {
+ randomness 7
+ scope 1
+ keep_velocity true
+ }
+}
Added: code/branches/particles2/data/tcl/plane.mesh_lod0_prepshadow.log
===================================================================
--- code/branches/particles2/data/tcl/plane.mesh_lod0_prepshadow.log (rev 0)
+++ code/branches/particles2/data/tcl/plane.mesh_lod0_prepshadow.log 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,746 @@
+15:49:30: Edge Data
+15:49:30: ---------
+15:49:30: Triangle 0 = {indexSet=0, vertexSet=0, v0=97, v1=34, v2=98}
+15:49:30: Triangle 1 = {indexSet=0, vertexSet=0, v0=12, v1=61, v2=59}
+15:49:30: Triangle 2 = {indexSet=0, vertexSet=0, v0=12, v1=77, v2=61}
+15:49:30: Triangle 3 = {indexSet=0, vertexSet=0, v0=11, v1=70, v2=32}
+15:49:30: Triangle 4 = {indexSet=0, vertexSet=0, v0=11, v1=32, v2=82}
+15:49:30: Triangle 5 = {indexSet=0, vertexSet=0, v0=30, v1=45, v2=84}
+15:49:30: Triangle 6 = {indexSet=0, vertexSet=0, v0=42, v1=38, v2=37}
+15:49:30: Triangle 7 = {indexSet=0, vertexSet=0, v0=95, v1=80, v2=93}
+15:49:30: Triangle 8 = {indexSet=0, vertexSet=0, v0=95, v1=93, v2=5}
+15:49:30: Triangle 9 = {indexSet=0, vertexSet=0, v0=92, v1=94, v2=22}
+15:49:30: Triangle 10 = {indexSet=0, vertexSet=0, v0=92, v1=72, v2=94}
+15:49:30: Triangle 11 = {indexSet=0, vertexSet=0, v0=73, v1=76, v2=19}
+15:49:30: Triangle 12 = {indexSet=0, vertexSet=0, v0=6, v1=3, v2=9}
+15:49:30: Triangle 13 = {indexSet=0, vertexSet=0, v0=90, v1=23, v2=55}
+15:49:30: Triangle 14 = {indexSet=0, vertexSet=0, v0=90, v1=28, v2=23}
+15:49:30: Triangle 15 = {indexSet=0, vertexSet=0, v0=21, v1=52, v2=25}
+15:49:30: Triangle 16 = {indexSet=0, vertexSet=0, v0=21, v1=25, v2=14}
+15:49:30: Triangle 17 = {indexSet=0, vertexSet=0, v0=26, v1=40, v2=8}
+15:49:30: Triangle 18 = {indexSet=0, vertexSet=0, v0=54, v1=4, v2=48}
+15:49:30: Triangle 19 = {indexSet=0, vertexSet=0, v0=50, v1=7, v2=1}
+15:49:30: Triangle 20 = {indexSet=0, vertexSet=0, v0=50, v1=1, v2=17}
+15:49:30: Triangle 21 = {indexSet=0, vertexSet=0, v0=24, v1=58, v2=62}
+15:49:30: Triangle 22 = {indexSet=0, vertexSet=0, v0=24, v1=33, v2=58}
+15:49:30: Triangle 23 = {indexSet=0, vertexSet=0, v0=6, v1=10, v2=3}
+15:49:30: Triangle 24 = {indexSet=0, vertexSet=0, v0=73, v1=19, v2=43}
+15:49:30: Triangle 25 = {indexSet=0, vertexSet=0, v0=97, v1=46, v2=34}
+15:49:30: Triangle 26 = {indexSet=0, vertexSet=0, v0=81, v1=15, v2=51}
+15:49:30: Triangle 27 = {indexSet=0, vertexSet=0, v0=63, v1=66, v2=64}
+15:49:30: Triangle 28 = {indexSet=0, vertexSet=0, v0=75, v1=86, v2=74}
+15:49:30: Triangle 29 = {indexSet=0, vertexSet=0, v0=75, v1=87, v2=86}
+15:49:30: Triangle 30 = {indexSet=0, vertexSet=0, v0=89, v1=20, v2=88}
+15:49:30: Triangle 31 = {indexSet=0, vertexSet=0, v0=89, v1=88, v2=47}
+15:49:30: Triangle 32 = {indexSet=0, vertexSet=0, v0=26, v1=60, v2=40}
+15:49:30: Triangle 33 = {indexSet=0, vertexSet=0, v0=54, v1=36, v2=4}
+15:49:30: Triangle 34 = {indexSet=0, vertexSet=0, v0=16, v1=18, v2=96}
+15:49:30: Triangle 35 = {indexSet=0, vertexSet=0, v0=16, v1=96, v2=53}
+15:49:30: Triangle 36 = {indexSet=0, vertexSet=0, v0=0, v1=31, v2=35}
+15:49:30: Triangle 37 = {indexSet=0, vertexSet=0, v0=0, v1=78, v2=31}
+15:49:30: Triangle 38 = {indexSet=0, vertexSet=0, v0=63, v1=65, v2=66}
+15:49:30: Triangle 39 = {indexSet=0, vertexSet=0, v0=81, v1=51, v2=85}
+15:49:30: Triangle 40 = {indexSet=0, vertexSet=0, v0=2, v1=49, v2=83}
+15:49:30: Triangle 41 = {indexSet=0, vertexSet=0, v0=2, v1=29, v2=49}
+15:49:30: Triangle 42 = {indexSet=0, vertexSet=0, v0=56, v1=41, v2=27}
+15:49:30: Triangle 43 = {indexSet=0, vertexSet=0, v0=56, v1=27, v2=79}
+15:49:30: Triangle 44 = {indexSet=0, vertexSet=0, v0=42, v1=37, v2=57}
+15:49:30: Triangle 45 = {indexSet=0, vertexSet=0, v0=30, v1=99, v2=45}
+15:49:30: Triangle 46 = {indexSet=0, vertexSet=0, v0=68, v1=69, v2=91}
+15:49:30: Triangle 47 = {indexSet=0, vertexSet=0, v0=68, v1=91, v2=13}
+15:49:30: Triangle 48 = {indexSet=0, vertexSet=0, v0=39, v1=71, v2=44}
+15:49:30: Triangle 49 = {indexSet=0, vertexSet=0, v0=39, v1=67, v2=71}
+15:49:30: Edge Group vertexSet=0
+15:49:30: Edge 0 = {
+ tri0=0,
+ tri1=25,
+ v0=97,
+ v1=34,
+ degenerate=false
+}
+15:49:30: Edge 1 = {
+ tri0=0,
+ tri1=4294967295,
+ v0=34,
+ v1=98,
+ degenerate=true
+}
+15:49:30: Edge 2 = {
+ tri0=0,
+ tri1=4294967295,
+ v0=98,
+ v1=97,
+ degenerate=true
+}
+15:49:30: Edge 3 = {
+ tri0=1,
+ tri1=2,
+ v0=12,
+ v1=61,
+ degenerate=false
+}
+15:49:30: Edge 4 = {
+ tri0=1,
+ tri1=25,
+ v0=61,
+ v1=59,
+ degenerate=false
+}
+15:49:30: Edge 5 = {
+ tri0=1,
+ tri1=4294967295,
+ v0=59,
+ v1=12,
+ degenerate=true
+}
+15:49:30: Edge 6 = {
+ tri0=2,
+ tri1=4,
+ v0=12,
+ v1=77,
+ degenerate=false
+}
+15:49:30: Edge 7 = {
+ tri0=2,
+ tri1=4294967295,
+ v0=77,
+ v1=61,
+ degenerate=true
+}
+15:49:30: Edge 8 = {
+ tri0=3,
+ tri1=48,
+ v0=11,
+ v1=70,
+ degenerate=false
+}
+15:49:30: Edge 9 = {
+ tri0=3,
+ tri1=4294967295,
+ v0=70,
+ v1=32,
+ degenerate=true
+}
+15:49:30: Edge 10 = {
+ tri0=3,
+ tri1=4,
+ v0=32,
+ v1=11,
+ degenerate=false
+}
+15:49:30: Edge 11 = {
+ tri0=4,
+ tri1=4294967295,
+ v0=82,
+ v1=11,
+ degenerate=true
+}
+15:49:30: Edge 12 = {
+ tri0=5,
+ tri1=45,
+ v0=30,
+ v1=45,
+ degenerate=false
+}
+15:49:30: Edge 13 = {
+ tri0=5,
+ tri1=42,
+ v0=45,
+ v1=84,
+ degenerate=false
+}
+15:49:30: Edge 14 = {
+ tri0=5,
+ tri1=4294967295,
+ v0=84,
+ v1=30,
+ degenerate=true
+}
+15:49:30: Edge 15 = {
+ tri0=6,
+ tri1=24,
+ v0=42,
+ v1=38,
+ degenerate=false
+}
+15:49:30: Edge 16 = {
+ tri0=6,
+ tri1=4294967295,
+ v0=38,
+ v1=37,
+ degenerate=true
+}
+15:49:30: Edge 17 = {
+ tri0=6,
+ tri1=44,
+ v0=37,
+ v1=42,
+ degenerate=false
+}
+15:49:30: Edge 18 = {
+ tri0=7,
+ tri1=44,
+ v0=95,
+ v1=80,
+ degenerate=false
+}
+15:49:30: Edge 19 = {
+ tri0=7,
+ tri1=4294967295,
+ v0=80,
+ v1=93,
+ degenerate=true
+}
+15:49:30: Edge 20 = {
+ tri0=7,
+ tri1=8,
+ v0=93,
+ v1=95,
+ degenerate=false
+}
+15:49:30: Edge 21 = {
+ tri0=8,
+ tri1=10,
+ v0=93,
+ v1=5,
+ degenerate=false
+}
+15:49:30: Edge 22 = {
+ tri0=8,
+ tri1=22,
+ v0=5,
+ v1=95,
+ degenerate=false
+}
+15:49:30: Edge 23 = {
+ tri0=9,
+ tri1=10,
+ v0=92,
+ v1=94,
+ degenerate=false
+}
+15:49:30: Edge 24 = {
+ tri0=9,
+ tri1=4294967295,
+ v0=94,
+ v1=22,
+ degenerate=true
+}
+15:49:30: Edge 25 = {
+ tri0=9,
+ tri1=19,
+ v0=22,
+ v1=92,
+ degenerate=false
+}
+15:49:30: Edge 26 = {
+ tri0=10,
+ tri1=4294967295,
+ v0=72,
+ v1=94,
+ degenerate=true
+}
+15:49:30: Edge 27 = {
+ tri0=11,
+ tri1=13,
+ v0=73,
+ v1=76,
+ degenerate=false
+}
+15:49:30: Edge 28 = {
+ tri0=11,
+ tri1=4294967295,
+ v0=76,
+ v1=19,
+ degenerate=true
+}
+15:49:30: Edge 29 = {
+ tri0=11,
+ tri1=24,
+ v0=19,
+ v1=73,
+ degenerate=false
+}
+15:49:30: Edge 30 = {
+ tri0=12,
+ tri1=23,
+ v0=6,
+ v1=3,
+ degenerate=false
+}
+15:49:30: Edge 31 = {
+ tri0=12,
+ tri1=22,
+ v0=3,
+ v1=9,
+ degenerate=false
+}
+15:49:30: Edge 32 = {
+ tri0=12,
+ tri1=4294967295,
+ v0=9,
+ v1=6,
+ degenerate=true
+}
+15:49:30: Edge 33 = {
+ tri0=13,
+ tri1=14,
+ v0=90,
+ v1=23,
+ degenerate=false
+}
+15:49:30: Edge 34 = {
+ tri0=13,
+ tri1=15,
+ v0=55,
+ v1=90,
+ degenerate=false
+}
+15:49:30: Edge 35 = {
+ tri0=14,
+ tri1=4294967295,
+ v0=90,
+ v1=28,
+ degenerate=true
+}
+15:49:30: Edge 36 = {
+ tri0=14,
+ tri1=4294967295,
+ v0=28,
+ v1=23,
+ degenerate=true
+}
+15:49:30: Edge 37 = {
+ tri0=15,
+ tri1=4294967295,
+ v0=21,
+ v1=52,
+ degenerate=true
+}
+15:49:30: Edge 38 = {
+ tri0=15,
+ tri1=16,
+ v0=25,
+ v1=21,
+ degenerate=false
+}
+15:49:30: Edge 39 = {
+ tri0=16,
+ tri1=4294967295,
+ v0=25,
+ v1=14,
+ degenerate=true
+}
+15:49:30: Edge 40 = {
+ tri0=16,
+ tri1=4294967295,
+ v0=14,
+ v1=21,
+ degenerate=true
+}
+15:49:30: Edge 41 = {
+ tri0=17,
+ tri1=32,
+ v0=26,
+ v1=40,
+ degenerate=false
+}
+15:49:30: Edge 42 = {
+ tri0=17,
+ tri1=23,
+ v0=40,
+ v1=8,
+ degenerate=false
+}
+15:49:30: Edge 43 = {
+ tri0=17,
+ tri1=4294967295,
+ v0=8,
+ v1=26,
+ degenerate=true
+}
+15:49:30: Edge 44 = {
+ tri0=18,
+ tri1=33,
+ v0=54,
+ v1=4,
+ degenerate=false
+}
+15:49:30: Edge 45 = {
+ tri0=18,
+ tri1=30,
+ v0=4,
+ v1=48,
+ degenerate=false
+}
+15:49:30: Edge 46 = {
+ tri0=18,
+ tri1=4294967295,
+ v0=48,
+ v1=54,
+ degenerate=true
+}
+15:49:30: Edge 47 = {
+ tri0=19,
+ tri1=21,
+ v0=50,
+ v1=7,
+ degenerate=false
+}
+15:49:30: Edge 48 = {
+ tri0=19,
+ tri1=20,
+ v0=1,
+ v1=50,
+ degenerate=false
+}
+15:49:30: Edge 49 = {
+ tri0=20,
+ tri1=4294967295,
+ v0=1,
+ v1=17,
+ degenerate=true
+}
+15:49:30: Edge 50 = {
+ tri0=20,
+ tri1=41,
+ v0=17,
+ v1=50,
+ degenerate=false
+}
+15:49:30: Edge 51 = {
+ tri0=21,
+ tri1=22,
+ v0=24,
+ v1=58,
+ degenerate=false
+}
+15:49:30: Edge 52 = {
+ tri0=21,
+ tri1=26,
+ v0=62,
+ v1=24,
+ degenerate=false
+}
+15:49:30: Edge 53 = {
+ tri0=23,
+ tri1=44,
+ v0=10,
+ v1=3,
+ degenerate=false
+}
+15:49:30: Edge 54 = {
+ tri0=24,
+ tri1=32,
+ v0=43,
+ v1=73,
+ degenerate=false
+}
+15:49:30: Edge 55 = {
+ tri0=25,
+ tri1=4294967295,
+ v0=46,
+ v1=34,
+ degenerate=true
+}
+15:49:30: Edge 56 = {
+ tri0=26,
+ tri1=36,
+ v0=81,
+ v1=15,
+ degenerate=false
+}
+15:49:30: Edge 57 = {
+ tri0=26,
+ tri1=39,
+ v0=51,
+ v1=81,
+ degenerate=false
+}
+15:49:30: Edge 58 = {
+ tri0=27,
+ tri1=38,
+ v0=63,
+ v1=66,
+ degenerate=false
+}
+15:49:30: Edge 59 = {
+ tri0=27,
+ tri1=29,
+ v0=66,
+ v1=64,
+ degenerate=false
+}
+15:49:30: Edge 60 = {
+ tri0=27,
+ tri1=4294967295,
+ v0=64,
+ v1=63,
+ degenerate=true
+}
+15:49:30: Edge 61 = {
+ tri0=28,
+ tri1=29,
+ v0=75,
+ v1=86,
+ degenerate=false
+}
+15:49:30: Edge 62 = {
+ tri0=28,
+ tri1=34,
+ v0=86,
+ v1=74,
+ degenerate=false
+}
+15:49:30: Edge 63 = {
+ tri0=28,
+ tri1=4294967295,
+ v0=74,
+ v1=75,
+ degenerate=true
+}
+15:49:30: Edge 64 = {
+ tri0=29,
+ tri1=4294967295,
+ v0=87,
+ v1=86,
+ degenerate=true
+}
+15:49:30: Edge 65 = {
+ tri0=30,
+ tri1=4294967295,
+ v0=20,
+ v1=88,
+ degenerate=true
+}
+15:49:30: Edge 66 = {
+ tri0=30,
+ tri1=31,
+ v0=88,
+ v1=89,
+ degenerate=false
+}
+15:49:30: Edge 67 = {
+ tri0=31,
+ tri1=4294967295,
+ v0=88,
+ v1=47,
+ degenerate=true
+}
+15:49:30: Edge 68 = {
+ tri0=31,
+ tri1=4294967295,
+ v0=47,
+ v1=89,
+ degenerate=true
+}
+15:49:30: Edge 69 = {
+ tri0=32,
+ tri1=4294967295,
+ v0=26,
+ v1=60,
+ degenerate=true
+}
+15:49:30: Edge 70 = {
+ tri0=33,
+ tri1=35,
+ v0=54,
+ v1=36,
+ degenerate=false
+}
+15:49:30: Edge 71 = {
+ tri0=33,
+ tri1=4294967295,
+ v0=36,
+ v1=4,
+ degenerate=true
+}
+15:49:30: Edge 72 = {
+ tri0=34,
+ tri1=4294967295,
+ v0=18,
+ v1=96,
+ degenerate=true
+}
+15:49:30: Edge 73 = {
+ tri0=34,
+ tri1=35,
+ v0=96,
+ v1=16,
+ degenerate=false
+}
+15:49:30: Edge 74 = {
+ tri0=35,
+ tri1=4294967295,
+ v0=53,
+ v1=16,
+ degenerate=true
+}
+15:49:30: Edge 75 = {
+ tri0=36,
+ tri1=37,
+ v0=0,
+ v1=31,
+ degenerate=false
+}
+15:49:30: Edge 76 = {
+ tri0=36,
+ tri1=4294967295,
+ v0=35,
+ v1=0,
+ degenerate=true
+}
+15:49:30: Edge 77 = {
+ tri0=37,
+ tri1=43,
+ v0=0,
+ v1=78,
+ degenerate=false
+}
+15:49:30: Edge 78 = {
+ tri0=37,
+ tri1=4294967295,
+ v0=78,
+ v1=31,
+ degenerate=true
+}
+15:49:30: Edge 79 = {
+ tri0=38,
+ tri1=4294967295,
+ v0=63,
+ v1=65,
+ degenerate=true
+}
+15:49:30: Edge 80 = {
+ tri0=38,
+ tri1=4294967295,
+ v0=65,
+ v1=66,
+ degenerate=true
+}
+15:49:30: Edge 81 = {
+ tri0=39,
+ tri1=41,
+ v0=51,
+ v1=85,
+ degenerate=false
+}
+15:49:30: Edge 82 = {
+ tri0=39,
+ tri1=4294967295,
+ v0=85,
+ v1=81,
+ degenerate=true
+}
+15:49:30: Edge 83 = {
+ tri0=40,
+ tri1=41,
+ v0=2,
+ v1=49,
+ degenerate=false
+}
+15:49:30: Edge 84 = {
+ tri0=40,
+ tri1=4294967295,
+ v0=49,
+ v1=83,
+ degenerate=true
+}
+15:49:30: Edge 85 = {
+ tri0=40,
+ tri1=4294967295,
+ v0=83,
+ v1=2,
+ degenerate=true
+}
+15:49:30: Edge 86 = {
+ tri0=42,
+ tri1=4294967295,
+ v0=41,
+ v1=27,
+ degenerate=true
+}
+15:49:30: Edge 87 = {
+ tri0=42,
+ tri1=43,
+ v0=27,
+ v1=56,
+ degenerate=false
+}
+15:49:30: Edge 88 = {
+ tri0=43,
+ tri1=4294967295,
+ v0=79,
+ v1=56,
+ degenerate=true
+}
+15:49:30: Edge 89 = {
+ tri0=45,
+ tri1=4294967295,
+ v0=30,
+ v1=99,
+ degenerate=true
+}
+15:49:30: Edge 90 = {
+ tri0=45,
+ tri1=4294967295,
+ v0=99,
+ v1=45,
+ degenerate=true
+}
+15:49:30: Edge 91 = {
+ tri0=46,
+ tri1=4294967295,
+ v0=68,
+ v1=69,
+ degenerate=true
+}
+15:49:30: Edge 92 = {
+ tri0=46,
+ tri1=4294967295,
+ v0=69,
+ v1=91,
+ degenerate=true
+}
+15:49:30: Edge 93 = {
+ tri0=46,
+ tri1=47,
+ v0=91,
+ v1=68,
+ degenerate=false
+}
+15:49:30: Edge 94 = {
+ tri0=47,
+ tri1=49,
+ v0=91,
+ v1=13,
+ degenerate=false
+}
+15:49:30: Edge 95 = {
+ tri0=47,
+ tri1=4294967295,
+ v0=13,
+ v1=68,
+ degenerate=true
+}
+15:49:30: Edge 96 = {
+ tri0=48,
+ tri1=49,
+ v0=39,
+ v1=71,
+ degenerate=false
+}
+15:49:30: Edge 97 = {
+ tri0=48,
+ tri1=4294967295,
+ v0=44,
+ v1=39,
+ degenerate=true
+}
+15:49:30: Edge 98 = {
+ tri0=49,
+ tri1=4294967295,
+ v0=67,
+ v1=71,
+ degenerate=true
+}
Modified: code/branches/particles2/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/branches/particles2/src/orxonox/OrxonoxPrereqs.h 2009-11-13 11:06:22 UTC (rev 6058)
+++ code/branches/particles2/src/orxonox/OrxonoxPrereqs.h 2009-11-13 13:32:27 UTC (rev 6059)
@@ -85,6 +85,7 @@
class ScriptController;
class WaypointController;
class WaypointPatrolController;
+ class RocketController;
// gametypes
class Asteroids;
@@ -175,6 +176,7 @@
class StaticEntity;
class TeamSpawnPoint;
class WorldEntity;
+ class Rocket;
// worldentities, pawns
class Destroyer;
class Pawn;
Modified: code/branches/particles2/src/orxonox/controllers/CMakeLists.txt
===================================================================
--- code/branches/particles2/src/orxonox/controllers/CMakeLists.txt 2009-11-13 11:06:22 UTC (rev 6058)
+++ code/branches/particles2/src/orxonox/controllers/CMakeLists.txt 2009-11-13 13:32:27 UTC (rev 6059)
@@ -6,4 +6,5 @@
ScriptController.cc
WaypointController.cc
WaypointPatrolController.cc
+ RocketController.cc
)
Added: code/branches/particles2/src/orxonox/controllers/RocketController.cc
===================================================================
--- code/branches/particles2/src/orxonox/controllers/RocketController.cc (rev 0)
+++ code/branches/particles2/src/orxonox/controllers/RocketController.cc 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,78 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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.
+ *
+ * Author:
+ * Oli Scheuss
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "RocketController.h"
+#include "worldentities/Rocket.h"
+#include "util/Math.h"
+
+
+namespace orxonox
+{
+ CreateFactory(RocketController);
+ /**
+ @brief
+ Constructor.
+ */
+ RocketController::RocketController(BaseObject* creator) : Controller(creator)
+ {
+ // Place your code here:
+ RegisterObject(RocketController);
+ // - make sure to register the object in the factory
+ // - do any kind of initialisation
+
+ // this checks that our creator really is a Rocket
+ // and saves the pointer to the Rocket for the controlling commands
+ assert(dynamic_cast<Rocket*>(creator)!=0);
+ this->setControllableEntity(dynamic_cast<Rocket*>(creator));
+ Rocket *myRocket = static_cast<Rocket*>(this->getControllableEntity());
+ //myRocket->setVelocity(Vector3(0,0,-60));
+ }
+
+ RocketController::~RocketController()
+ {
+ }
+
+ /**
+ @brief
+ The controlling happens here. This method defines what the controller has to do each tick.
+ @param dt
+ The duration of the tick.
+ */
+ void RocketController::tick(float dt)
+ {
+ // Place your code here:
+ // - steering commands
+ //Rocket *myRocket = static_cast<Rocket*>(this->getControllableEntity());
+
+ // you can use the following commands for steering
+ // - moveFrontBack, moveRightLeft, moveUpDown
+ // - rotatePitch, rotateYaw, rotateRoll
+ // - apply the to myRocket (e.g. myRocket->rotateYaw(..) )
+
+ }
+}
Added: code/branches/particles2/src/orxonox/controllers/RocketController.h
===================================================================
--- code/branches/particles2/src/orxonox/controllers/RocketController.h (rev 0)
+++ code/branches/particles2/src/orxonox/controllers/RocketController.h 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,59 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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.
+ *
+ * Author:
+ * Oli Scheuss
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _RocketController_H__
+#define _RocketController_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "Controller.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ Controller for the Rocket of the PPS tutorial.
+ @author
+ Oli Scheuss
+ */
+ class _OrxonoxExport RocketController : public Controller, public Tickable
+ {
+ public:
+ RocketController(BaseObject* creator);
+ virtual ~RocketController();
+
+ virtual void tick(float dt); //!< The controlling happens here. This method defines what the controller has to do each tick.
+
+ protected:
+
+ private:
+ };
+}
+
+#endif /* _RocketController_H__ */
Modified: code/branches/particles2/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/particles2/src/orxonox/worldentities/CMakeLists.txt 2009-11-13 11:06:22 UTC (rev 6058)
+++ code/branches/particles2/src/orxonox/worldentities/CMakeLists.txt 2009-11-13 13:32:27 UTC (rev 6059)
@@ -4,6 +4,7 @@
MovableEntity.cc
MobileEntity.cc
ControllableEntity.cc
+ Rocket.cc
BigExplosion.cc
ExplosionChunk.cc
Added: code/branches/particles2/src/orxonox/worldentities/Rocket.cc
===================================================================
--- code/branches/particles2/src/orxonox/worldentities/Rocket.cc (rev 0)
+++ code/branches/particles2/src/orxonox/worldentities/Rocket.cc 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,183 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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.
+ *
+ * Author:
+ * Reto Grieder
+ * Co-authors:
+ * Martin Stypinski
+ *
+ */
+
+#include "Rocket.h"
+
+#include "core/XMLPort.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+namespace orxonox
+{
+ CreateFactory(Rocket); // put your code in here:
+ // create the factory for the Rocket
+
+ /**
+ @brief
+ Constructor. Registers the object and initializes some default values.
+ */
+ Rocket::Rocket(BaseObject* creator) : ControllableEntity(creator)
+ {
+ this->myController_ = 0;
+ // put your code in here:
+ RegisterObject(Rocket);// - register the Rocket class to the core
+
+ this->localLinearAcceleration_.setValue(0, 0, 0);
+ this->localAngularAcceleration_.setValue(0, 0, 0);
+ this->primaryThrust_ = 100;
+ this->auxilaryThrust_ = 100;
+ this->rotationThrust_ = 10;
+
+ this->setCollisionType(WorldEntity::Kinematic);
+
+ this->myController_ = new RocketController(static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator.
+ }
+
+ /**
+ @brief
+ Destructor. Destroys controller, if present.
+ */
+ Rocket::~Rocket()
+ {
+ if( this->myController_ != NULL )
+ this->myController_->destroy();
+ }
+
+ /**
+ @brief
+ Method for creating a Rocket through XML.
+ */
+ void Rocket::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ // this calls the XMLPort function of the parent class
+ SUPER(Rocket, XMLPort, xmlelement, mode);
+
+ // put your code in here:
+ XMLPortParam(Rocket, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
+ //XMLPortParam(Rocket, "auxilaryThrust", setAuxilaryThrust, getAuxilaryThrust, xmlelement, mode);
+ //XMLPortParam(Rocket, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
+ // make sure you add the variables primaryThrust_, auxilaryThrust_ and rotationThrust_ to xmlport
+ // make sure that the set- and get-functions exist.
+ // variables can be added by the following command
+ // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunction, getFunction, xmlelement, mode)
+
+ }
+
+ /**
+ @brief
+ Defines which actions the Rocket has to take in each tick.
+ @param dt
+ The length of the tick.
+ */
+ void Rocket::tick(float dt)
+ {
+ SUPER(Rocket, tick, dt);
+
+ //if (this->hasLocalController())
+ //{
+ this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxilaryThrust_);
+ this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxilaryThrust_);
+ if (this->localLinearAcceleration_.z() > 0)
+ this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxilaryThrust_);
+ else
+ this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
+ this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
+ this->localLinearAcceleration_.setValue(0, 0, 0);
+
+ this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
+ this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
+ this->localAngularAcceleration_.setValue(0, 0, 0);
+ //}
+ }
+
+ /**
+ @brief
+ Moves the Rocket in the negative z-direction (Front/Back) by an amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the movement.
+ */
+ void Rocket::moveFrontBack(const Vector2& value)
+ {
+ this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
+ }
+
+ /**
+ @brief
+ Moves the Rocket in the x-direction (Right/Left) by an amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the movement.
+ */
+ void Rocket::moveRightLeft(const Vector2& value)
+ {
+ this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
+ }
+
+ /**
+ @brief
+ Moves the Rocket in the y-direction (Up/Down) by an amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the movement.
+ */
+ void Rocket::moveUpDown(const Vector2& value)
+ {
+ this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
+ }
+
+ /**
+ @brief
+ Rotates the Rocket around the y-axis by the amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the angular movement.
+ */
+ void Rocket::rotateYaw(const Vector2& value)
+ {
+ this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x);
+ }
+
+ /**
+ @brief
+ Rotates the Rocket around the x-axis by the amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the angular movement.
+ */
+ void Rocket::rotatePitch(const Vector2& value)
+ {
+ this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
+ }
+
+ /**
+ @brief
+ Rotates the Rocket around the z-axis by the amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the angular movement.
+ */
+ void Rocket::rotateRoll(const Vector2& value)
+ {
+ this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
+ }
+
+}
Added: code/branches/particles2/src/orxonox/worldentities/Rocket.h
===================================================================
--- code/branches/particles2/src/orxonox/worldentities/Rocket.h (rev 0)
+++ code/branches/particles2/src/orxonox/worldentities/Rocket.h 2009-11-13 13:32:27 UTC (rev 6059)
@@ -0,0 +1,131 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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.
+ *
+ * Author:
+ * Reto Grieder
+ * Co-authors:
+ * Martin Stypinski
+ *
+ */
+
+#ifndef _Rocket_H__
+#define _Rocket_H__
+
+#include "OrxonoxPrereqs.h"
+#include "worldentities/ControllableEntity.h"
+#include "controllers/RocketController.h"
+
+namespace orxonox
+{
+
+ /**
+ @brief
+ Rocket, that is made to move upon a specified pattern.
+ This class was constructed for the PPS tutorial.
+ @author
+ Oli Scheuss
+ */
+ class _OrxonoxExport Rocket : public ControllableEntity
+ {
+ public:
+ Rocket(BaseObject* creator);
+ virtual ~Rocket();
+
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Rocket through XML.
+ virtual void tick(float dt); //!< Defines which actions the Rocket has to take in each tick.
+
+
+ virtual void moveFrontBack(const Vector2& value);
+ virtual void moveRightLeft(const Vector2& value);
+ virtual void moveUpDown(const Vector2& value);
+
+ virtual void rotateYaw(const Vector2& value);
+ virtual void rotatePitch(const Vector2& value);
+ virtual void rotateRoll(const Vector2& value);
+
+ /**
+ @brief Moves the Rocket in the Front/Back-direction by the specifed amount.
+ @param value The amount by which the Rocket is to be moved.
+ */
+ inline void moveFrontBack(float value)
+ { this->moveFrontBack(Vector2(value, 0)); }
+ /**
+ @brief Moves the Rocket in the Right/Left-direction by the specifed amount.
+ @param value The amount by which the Rocket is to be moved.
+ */
+ inline void moveRightLeft(float value)
+ { this->moveRightLeft(Vector2(value, 0)); }
+ /**
+ @brief Moves the Rocket in the Up/Down-direction by the specifed amount.
+ @param value The amount by which the Rocket is to be moved.
+ */
+ inline void moveUpDown(float value)
+ { this->moveUpDown(Vector2(value, 0)); }
+
+ /**
+ @brief Rotates the Rocket around the y-axis by the specifed amount.
+ @param value The amount by which the Rocket is to be rotated.
+ */
+ inline void rotateYaw(float value)
+ { this->rotateYaw(Vector2(value, 0)); }
+ /**
+ @brief Rotates the Rocket around the x-axis by the specifed amount.
+ @param value The amount by which the Rocket is to be rotated.
+ */
+ inline void rotatePitch(float value)
+ { this->rotatePitch(Vector2(value, 0)); }
+ /**
+ @brief Rotates the Rocket around the z-axis by the specifed amount.
+ @param value The amount by which the Rocket is to be rotated.
+ */
+ inline void rotateRoll(float value)
+ { this->rotateRoll(Vector2(value, 0)); }
+
+ /**
+ @brief Sets the primary thrust to the input amount.
+ @param thrust The amount of thrust.
+ */
+ inline void setPrimaryThrust( float thrust )
+ { this->primaryThrust_=thrust; }
+ // place your set-functions here.
+ // - hint: auxiliary thrust, rotation thrust.
+
+ /**
+ @brief Gets the primary thrust to the input amount.
+ @preturn The amount of thrust.
+ */
+ inline float getPrimaryThrust()
+ { return this->primaryThrust_; }
+ // place your get-functions here.
+
+ private:
+ RocketController *myController_; //!< The controller of the Rocket.
+
+ btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the Rocket the next tick.
+ btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the Rocket the next tick.
+ float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward.
+ float auxilaryThrust_; //!< The amount of auxilary thrust. Used for all other movements (except for rotations).
+ float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only.
+ };
+
+}
+
+#endif /* _Rocket_H__ */
More information about the Orxonox-commit
mailing list