Changeset 10618 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Apr 4, 2007, 12:13:53 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 7 deleted
- 37 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 16 16 OrxonoxPlayability.kdevses 17 17 OrxonoxPlayability.kdevelop.pcs 18 orxonox.backtrace 19 orxonox.kdevses 20 orxonox.kdevelop.pcs
-
- Property svn:ignore
-
trunk/src/lib/collision_detection/cd_engine.cc
r10033 r10618 22 22 #include "model.h" 23 23 #include "world_entity.h" 24 #include " terrain.h"24 #include "environments/terrain.h" 25 25 // #include "player.h" 26 26 … … 30 30 31 31 #include "bsp/bsp_manager.h" 32 #include " bsp_entity.h"32 #include "environments/bsp_entity.h" 33 33 34 34 -
trunk/src/lib/collision_detection/obb_tree_node.cc
r10033 r10618 629 629 PRINTF(5)("s = %f, rA+rB = %f\n", fabs(t.dot(l)), rA+rB); 630 630 631 //TODO valgrind complains about uninitialised value here 631 632 if( (rA + rB) < fabs(t.dot(l))) 632 633 { -
trunk/src/lib/collision_reaction
-
Property
svn:ignore
set to
.deps
*.a
Makefile.in
Makefile
-
Property
svn:ignore
set to
-
trunk/src/lib/collision_reaction/cr_engine.h
r10013 r10618 62 62 CR_COLLISION_TYPE_AXIS_Z, //!< collision on z axis 63 63 CR_COLLISION_TYPE_AXIS_Z_NEG, //!< collision on negative z axis 64 CR_COLLISION_TYPE_WAY, //!< collision on the way from last to current position 64 65 CR_COLLISION_TYPE_OBB, //!< object aligned bounding box collide 65 66 -
trunk/src/lib/collision_reaction/cr_physics_full_walk.cc
r10013 r10618 163 163 164 164 165 case CoRe::CREngine::CR_COLLISION_TYPE_WAY: 166 // calulate the height above ground 167 height = collPos.len() - box->halfLength[1]; 168 169 170 // object is beneath the plane (ground) 171 // if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing 172 if( height < 0.0f ) 173 { 174 entity->shiftCoor(Vector(0.0f, -height + 0.5f, 0.0f)); 175 entity->setOnGround(true); 176 } 177 // object is already in the wall 178 else if( ce->isInWall()) 179 { 180 entity->setAbsCoor(entity->getLastAbsCoor()); 181 PRINTF(0)("ground collision: reset pos\n"); 182 } 183 else 184 { 185 // entity is not on ground 186 entity->setOnGround(false); 187 } 188 break; 189 190 165 191 /* collision in the Z-AXIS */ 166 192 case CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z: -
trunk/src/lib/event/key_mapper.cc
r9880 r10618 23 23 #include "event_def.h" 24 24 25 #include " globals.h"25 #include "orxonox_globals.h" 26 26 #include "parser/ini_parser/ini_parser.h" 27 27 #include "parser/preferences/preferences.h" -
trunk/src/lib/graphics/Makefile.am
r9869 r10618 25 25 26 26 noinst_HEADERS =\ 27 glincl.h \ 27 28 graphics_engine.h \ 28 29 graphics_effect.h \ … … 46 47 47 48 49 48 50 SUBDIRS = importer \ 49 51 spatial_separation -
trunk/src/lib/graphics/graphics_engine.cc
r10320 r10618 31 31 #include "text.h" 32 32 33 #include " globals.h"33 #include "orxonox_globals.h" 34 34 #include "texture.h" 35 35 -
trunk/src/lib/graphics/importer/bsp/bsp_manager.cc
r10519 r10618 30 30 #include "debug.h" 31 31 #include "material.h" 32 #include " camera.h"32 #include "tools/camera.h" 33 33 #include "vertex_array_model.h" 34 34 #include "world_entities/player.h" … … 982 982 float endDistance = end->dot(node->plane) - node->d; 983 983 float startDistance = start->dot(node->plane) - node->d; 984 985 984 986 985 if( node->isLeaf) { 987 986 leaf& curLeaf = this->bspFile->leaves[node->leafIndex]; … … 999 998 } 1000 999 1001 1000 //TODO valgrind complains about uninitialised value here 1002 1001 if (startDistance >= 0 && endDistance >= 0) // A 1003 1002 { // both points are in front of the plane … … 1102 1101 this->outputFraction = 1.0f; 1103 1102 1104 1105 1103 this->checkCollisionX(worldEntity); 1106 this->checkCollisionY(worldEntity);1107 1104 this->checkCollisionZ(worldEntity); 1105 1106 if(!(this->checkCollisionY(worldEntity))) 1107 this->checkCollisionWay(worldEntity); 1108 1108 1109 1109 … … 1288 1288 * check the collision in the x direction (forward, backward) 1289 1289 */ 1290 voidBspManager::checkCollisionX(WorldEntity* entity)1290 bool BspManager::checkCollisionX(WorldEntity* entity) 1291 1291 { 1292 1292 // Retrieve Bounding box … … 1398 1398 SolidFlag); 1399 1399 } 1400 1401 return (xCollisionBackward || xCollisionForward); 1400 1402 } 1401 1403 … … 1404 1406 * check the collision in the z direction (up, down) 1405 1407 */ 1406 voidBspManager::checkCollisionY(WorldEntity* entity)1408 bool BspManager::checkCollisionY(WorldEntity* entity) 1407 1409 { 1408 1410 … … 1546 1548 collPos, SolidFlag); 1547 1549 } 1550 1551 return (yCollisionUp || yCollisionDown); 1548 1552 } 1549 1553 … … 1554 1558 * check the collision in the z direction (left, right) 1555 1559 */ 1556 voidBspManager::checkCollisionZ(WorldEntity* entity)1560 bool BspManager::checkCollisionZ(WorldEntity* entity) 1557 1561 { 1558 1562 // Retrieve Bounding box … … 1664 1668 collPos , SolidFlag); 1665 1669 } 1670 1671 return (zCollisionLeft || zCollisionRight); 1672 1673 } 1674 1675 1676 1677 1678 /** 1679 * check wether a collision occured on the way from the last position to the current position 1680 */ 1681 bool BspManager::checkCollisionWay(WorldEntity* entity) 1682 { 1683 1684 1685 1686 plane* testPlane = NULL; //!< the collision test plane 1687 Vector to; 1688 Vector collPos; //!< the collision position 1689 1690 bool yCollisionUp = false; //!< flag true if right collision 1691 bool SolidFlag = false; //!< flag set true if solid 1692 1693 Vector from; //!< current position of the entity 1694 Vector dirY; //!< direction x 1695 1696 from = entity->getLastAbsCoor(); 1697 to = entity->getAbsCoor(); 1698 collPos = from; 1699 dirY = Vector(0.0, 1.0, 0.0); 1700 1701 1702 1703 1704 /* Y Ray up */ 1705 // init some member variables before collision check 1706 this->inputStart = from; 1707 this->inputEnd = to; 1708 this->checkCollisionRayN(this->root,0.0f,1.0f, &from, &to ); 1709 1710 if( !this->outputStartsOut ) 1711 { 1712 this->collPlane = new plane; 1713 this->collPlane->x = 0.0f; 1714 this->collPlane->y = 0.0f; 1715 this->collPlane->z = 0.0f; 1716 yCollisionUp = true; 1717 } 1718 else 1719 { 1720 if( this->outputFraction == 1.0f) 1721 { 1722 if( this->outputAllSolid ) 1723 { 1724 this->collPlane = new plane; 1725 this->collPlane->x = 0.0f; 1726 this->collPlane->y = 0.0f; 1727 this->collPlane->z = 0.0f; 1728 yCollisionUp = true; 1729 SolidFlag = true; 1730 } 1731 else 1732 { 1733 yCollisionUp = false; 1734 collPos = to; 1735 } 1736 } 1737 else 1738 { 1739 yCollisionUp = true; 1740 collPos = from + (to - from) * this->outputFraction; 1741 this->out = collPos; // why this???? 1742 } 1743 } 1744 testPlane = this->collPlane; 1745 1746 // collision registration 1747 if( yCollisionUp) 1748 { 1749 CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_WAY, 1750 entity, this->parent, 1751 Vector(testPlane->x, testPlane->y, testPlane->z), 1752 collPos, SolidFlag); 1753 } 1754 1755 return yCollisionUp; 1666 1756 1667 1757 } -
trunk/src/lib/graphics/importer/bsp/bsp_manager.h
r10519 r10618 88 88 void checkCollisionRayN(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 89 89 90 void checkCollisionX(WorldEntity* entity); 91 void checkCollisionY(WorldEntity* entity); 92 void checkCollisionZ(WorldEntity* entity); 90 bool checkCollisionX(WorldEntity* entity); 91 bool checkCollisionY(WorldEntity* entity); 92 bool checkCollisionZ(WorldEntity* entity); 93 bool checkCollisionWay(WorldEntity* entity); 93 94 94 95 void checkCollisionBox(void); -
trunk/src/lib/graphics/light.h
r9869 r10618 102 102 void setAmbientColor(GLfloat r, GLfloat g, GLfloat b); 103 103 // HACK: Assuming r = g = b values 104 inline GLfloat getAmbientColor() { return this->ambientColor[0]; } 104 // SOLVED: nobody uses it anyway 105 // inline GLfloat getAmbientColor() { return this->ambientColor[0]; } 105 106 106 107 Light* getLight(int lightNumber) const; -
trunk/src/lib/graphics/render2D/element_2d.cc
r9869 r10618 24 24 #include "state.h" 25 25 #include "p_node.h" 26 #include " camera.h"26 #include "tools/camera.h" 27 27 /////////////////////////// 28 28 -
trunk/src/lib/gui/qt/gui_audio.cc
r8145 r10618 30 30 #include <QtGui/QLCDNumber> 31 31 #include "debug.h" 32 #include " globals.h"32 #include "orxonox_globals.h" 33 33 34 34 #include "qt_gui_elements.h" -
trunk/src/lib/gui/qt/gui_control.cc
r8495 r10618 35 35 #include "lib/event/key_names.h" 36 36 37 #include " globals.h"37 #include "orxonox_globals.h" 38 38 #include "debug.h" 39 39 #include "qt_gui_elements.h" -
trunk/src/lib/gui/qt/gui_general.cc
r8145 r10618 31 31 32 32 #include "debug.h" 33 #include " globals.h"33 #include "orxonox_globals.h" 34 34 35 35 #include "qt_gui_elements.h" -
trunk/src/lib/gui/qt/gui_video.cc
r9406 r10618 28 28 29 29 #include <QtGui/QLayout> 30 #include " globals.h"30 #include "orxonox_globals.h" 31 31 #include "debug.h" 32 32 -
trunk/src/lib/lang
-
Property
svn:ignore
set to
*.a
.deps
Makefile.in
Makefile
-
Property
svn:ignore
set to
-
trunk/src/lib/math/curve.h
r10368 r10618 10 10 #define _CURVE_H 11 11 12 #include <list> 12 13 #include "vector.h" 13 14 #include "quaternion.h" 14 15 template<class T> class tList;16 template<class T> class tIterator;17 15 18 16 //! An Enumerator that defines what sort of Curves are availible … … 73 71 Curve* dirCurve; //!< The derivation-curve of this Curve. 74 72 75 tList<PathNode>* nodeList; //!< A list of all the Nodes of a Curve. 76 tIterator<PathNode>* nodeIterator; //!< An iterator that should point to the current Node 73 std::list<PathNode> nodeList; //!< A list of all the Nodes of a Curve. 77 74 PathNode* firstNode; //!< First node of the curve. 78 75 PathNode* currentNode; //!< The node we are working with (the Last node). … … 105 102 106 103 107 //! B-Spline108 /**109 class to handle b-spline in 3d space110 */111 class BSplieCurve : public Curve112 {113 114 115 };116 117 104 #endif /* _CURVE_H */ -
trunk/src/lib/parser/cmdline_parser
- Property svn:ignore
-
old new 2 2 Makefile.in 3 3 .deps 4 libORX* 4 *.a
-
- Property svn:ignore
-
trunk/src/lib/physics/physics_interface.cc
r9869 r10618 27 27 28 28 #include "string.h" 29 #include "stdincl.h"30 29 31 30 -
trunk/src/lib/script_engine
-
Property
svn:ignore
set to
*.a
Makefile.in
Makefile
.deps
-
Property
svn:ignore
set to
-
trunk/src/lib/script_engine/Makefile.am
r9916 r10618 28 28 script_method.h \ 29 29 executor_lua_state.h 30 31 32 33 34 check_PROGRAMS = example35 example_DEPENDENCIES = \36 $(MAINSRCDIR)/world_entities/libORXwe.a \37 $(libORXlibs_a_LIBRARIES_) \38 $(MAINSRCDIR)/util/libORXutils.a39 example_LDADD = \40 $(MAINSRCDIR)/util/libORXutils.a \41 $(libORXlibs_a_LIBRARIES_) \42 libORXscript.a -L../../../extern_libs @LUA_LIBS@ \43 $(MAINSRCDIR)/world_entities/libORXwe.a \44 $(libORXlibs_a_LIBRARIES_) \45 $(MAINSRCDIR)/util/libORXutils.a46 47 example_SOURCES= \48 example.cc \49 \50 ../util/executor/executor_lua.cc -
trunk/src/lib/script_engine/script_manager.cc
r9869 r10618 25 25 26 26 #include "script.h" 27 #include " script_trigger.h"27 #include "tools/script_trigger.h" 28 28 #include "luaincl.h" 29 29 #include "loading/load_param_xml.h" -
trunk/src/lib/shell/shell_input.cc
r9916 r10618 24 24 #include "compiler.h" 25 25 #include "key_names.h" 26 27 #include "game_world.h" 28 #include "state.h" 26 29 27 30 … … 284 287 { 285 288 if (this->delayed > 0.0) 286 this->delayed -= dt; 289 { 290 StoryEntity* storyEntity = State::getCurrentStoryEntity(); 291 float speed = 1; 292 if ( storyEntity && storyEntity->isA( GameWorld::staticClassID() ) ) 293 { 294 speed = ((GameWorld*)storyEntity)->getSpeed(); 295 } 296 this->delayed -= dt / speed; 297 } 287 298 else if (this->pressedKey != SDLK_FIRST ) 288 299 { -
trunk/src/lib/sound/Makefile.am
r9869 r10618 11 11 ogg_player.cc 12 12 13 noinst_HEADERS = sound_engine.h \ 14 sound_source.h \ 15 sound_buffer.h \ 16 sound_buffer_data.h \ 17 resource_sound_buffer.h \ 18 ogg_player.h 13 noinst_HEADERS = \ 14 alincl.h \ 15 sound_engine.h \ 16 sound_source.h \ 17 sound_buffer.h \ 18 sound_buffer_data.h \ 19 resource_sound_buffer.h \ 20 ogg_player.h -
trunk/src/lib/sound/ogg_player.cc
r9869 r10618 79 79 bool OggPlayer::open(const std::string& fileName) 80 80 { 81 OrxThread::MutexLock musicLock(&this->musicMutex);81 OrxThread::MutexLocker musicLock(&this->musicMutex); 82 82 // release old Ogg-File (if loaded) 83 83 if (this->state & OggPlayer::FileOpened) … … 212 212 if (this->state & OggPlayer::FileOpened) 213 213 { 214 OrxThread::MutexLock musicLock(&this->musicMutex);214 OrxThread::MutexLocker musicLock(&this->musicMutex); 215 215 ov_time_seek(&this->oggStream, timeCode); 216 216 } … … 263 263 { 264 264 { 265 OrxThread::MutexLock musicLock(&ogg->musicMutex);265 OrxThread::MutexLocker musicLock(&ogg->musicMutex); 266 266 ogg->update(); 267 267 } … … 286 286 this->state |= OggPlayer::Playing; 287 287 288 OrxThread::MutexLock musicLock(&this->musicMutex);288 OrxThread::MutexLocker musicLock(&this->musicMutex); 289 289 if(!this->stream(this->buffers[0]) || !this->stream(this->buffers[1])) 290 290 { -
trunk/src/lib/sound/ogg_player.h
r9869 r10618 13 13 #include <ogg/ogg.h> 14 14 #include <vorbis/vorbisfile.h> 15 #include "util/thread ing.h"15 #include "util/threads/mutex_locker.h" 16 16 17 17 struct File; -
trunk/src/lib/sound/sound_engine.cc
r9869 r10618 24 24 #include "debug.h" 25 25 #include "parser/preferences/preferences.h" 26 #include " globals.h"26 #include "orxonox_globals.h" 27 27 #include "resource_sound_buffer.h" 28 28 -
trunk/src/lib/sound/sound_engine.h
r9869 r10618 15 15 #include <list> 16 16 #include <stack> 17 #include "thread ing.h"17 #include "threads/mutex.h" 18 18 19 19 #define SOUND_DOPPLER_FACTOR 0.001 //!< A factor for the audible doppler effect -
trunk/src/lib/util
-
Property
svn:ignore
set to
.deps
Makefile
Makefile.in
*.a
-
Property
svn:ignore
set to
-
trunk/src/lib/util/Makefile.am
r9869 r10618 29 29 filesys/net_link.cc \ 30 30 \ 31 thread ing.cc \31 threads/thread.cc \ 32 32 timer.cc 33 33 … … 63 63 filesys/net_link.h \ 64 64 \ 65 threading.h \ 65 threads/threading.h \ 66 threads/thread.h \ 67 threads/mutex.h \ 68 threads/mutex_locker.h \ 69 \ 66 70 timer.h \ 67 71 \ … … 77 81 loading/dynamic_loader.h \ 78 82 \ 79 count_pointer.h \ 80 list.h 83 count_pointer.h -
trunk/src/lib/util/debug_buffer.cc
r9869 r10618 20 20 #include "debug.h" 21 21 #include "compiler.h" 22 #include "thread ing.h"22 #include "threads/mutex_locker.h" 23 23 24 24 /** … … 64 64 static OrxThread::Mutex DebugBuffer__bufferMutex; 65 65 66 OrxThread::MutexLock bufferLock(&DebugBuffer__bufferMutex);66 OrxThread::MutexLocker bufferLock(&DebugBuffer__bufferMutex); 67 67 68 68 va_list arguments; -
trunk/src/lib/util/filesys/net_link.cc
r9406 r10618 17 17 #include "debug.h" 18 18 19 #include "threads/mutex_locker.h" 19 20 20 21 #ifdef __OSX__ … … 45 46 int NetLink::openupInBrowser(void* url) 46 47 { 47 OrxThread::MutexLock lock(&NetLink::_mutex);48 OrxThread::MutexLocker lock(&NetLink::_mutex); 48 49 49 50 std::string URL = *(std::string*)url; … … 69 70 void NetLink::setDefaultBrowser(const std::string& browserName) 70 71 { 71 OrxThread::MutexLock lock(&NetLink::_mutex);72 OrxThread::MutexLocker lock(&NetLink::_mutex); 72 73 NetLink::_defaultBrowser = browserName; 73 74 } -
trunk/src/lib/util/filesys/net_link.h
r9406 r10618 19 19 #include <list> 20 20 21 #include "thread ing.h"21 #include "threads/mutex.h" 22 22 23 23 //! NetLink is a File and Link executer for Internet Links -
trunk/src/lib/util/loading/game_loader.cc
r9869 r10618 23 23 #include "debug.h" 24 24 #include "campaign.h" 25 #include "compiler.h" 25 26 26 27 #include "key_mapper.h" -
trunk/src/lib/util/loading/game_loader.h
r9869 r10618 9 9 //#include "stdincl.h" 10 10 #include "story_def.h" 11 #include "comincl.h"12 11 #include "event_listener.h" 13 12
Note: See TracChangeset
for help on using the changeset viewer.