Browse Source

Fixed Entity::TickGame log flood.

Added BulletCharacterController.cpp & BulletCharacterController.h stubs.
legacy
Benjamin ‘Touky’ Huet touky 12 years ago
parent
commit
284891f200
8 changed files with 101 additions and 0 deletions
  1. +6
    -0
      src/input/input.h
  2. +7
    -0
      test/BtPhysTest.vcxproj
  3. +9
    -0
      test/BtPhysTest.vcxproj.filters
  4. +2
    -0
      test/Makefile.am
  5. +37
    -0
      test/Physics/Include/BulletCharacterController.h
  6. +1
    -0
      test/Physics/Include/EasyCharacterController.h
  7. +33
    -0
      test/Physics/Src/BulletCharacterController.cpp
  8. +6
    -0
      test/Physics/Src/EasyCharacterController.cpp

+ 6
- 0
src/input/input.h View File

@@ -380,8 +380,14 @@ private:
void UpdateActionStatus(float seconds);

protected:
virtual char const * GetName()
{
return "<InputTracker>";
}
virtual void TickGame(float seconds)
{
Entity::TickGame(seconds);

UpdateActionStatus(seconds);
}



+ 7
- 0
test/BtPhysTest.vcxproj View File

@@ -37,6 +37,7 @@
<ItemGroup>
<ClInclude Include="BtPhysTest.h" />
<ClInclude Include="PhysicObject.h" />
<ClInclude Include="Physics\Include\BulletCharacterController.h" />
<ClInclude Include="Physics\Include\EasyCharacterController.h" />
<ClInclude Include="Physics\Include\EasyConstraint.h" />
<ClInclude Include="Physics\Include\EasyPhysics.h" />
@@ -45,6 +46,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="BtPhysTest.cpp" />
<ClCompile Include="Physics\Src\BulletCharacterController.cpp" />
<ClCompile Include="Physics\Src\EasyCharacterController.cpp" />
<ClCompile Include="Physics\Src\EasyConstraint.cpp" />
<ClCompile Include="Physics\Src\EasyPhysics.cpp" />
@@ -54,6 +56,11 @@
<Project>{9e62f2fe-3408-4eae-8238-fd84238ceeda}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</None>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{ee203b88-44cf-4859-9d42-7a1f43fecb52}</ProjectGuid>
<ConfigurationType>Application</ConfigurationType>


+ 9
- 0
test/BtPhysTest.vcxproj.filters View File

@@ -18,6 +18,9 @@
<ClInclude Include="Physics\Include\LolBtPhysicsIntegration.h">
<Filter>Physics\Include</Filter>
</ClInclude>
<ClInclude Include="Physics\Include\BulletCharacterController.h">
<Filter>Physics\Include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BtPhysTest.cpp" />
@@ -30,6 +33,9 @@
<ClCompile Include="Physics\Src\EasyPhysics.cpp">
<Filter>Physics\Src</Filter>
</ClCompile>
<ClCompile Include="Physics\Src\BulletCharacterController.cpp">
<Filter>Physics\Src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="generated">
@@ -45,4 +51,7 @@
<UniqueIdentifier>{7e5d19e0-b2be-46cc-8fa4-f582ecb4318d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
</ItemGroup>
</Project>

+ 2
- 0
test/Makefile.am View File

@@ -50,7 +50,9 @@ btphystest_SOURCES = BtPhysTest.cpp BtPhysTest.h \
Physics/Src/EasyPhysics.cpp Physics/Include/EasyPhysics.h \
Physics/Include/LolBtPhysicsIntegration.h Physics/Include/LolPhysics.h \
Physics/Src/EasyCharacterController.cpp Physics/Src/EasyConstraint.cpp \
Physics/Src/BulletCharacterController.cpp \
Physics/Include/EasyCharacterController.h Physics/Include/EasyConstraint.h
Physics/Src/BulletCharacterController.h \
btphystest_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@ -I$(top_builddir)/src/bullet \
-DHAVE_PHYS_USE_BULLET
btphystest_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@


+ 37
- 0
test/Physics/Include/BulletCharacterController.h View File

@@ -0,0 +1,37 @@
//
// Lol Engine
//
// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
// (c) 2009-2012 Benjamin Huet <huet.benjamin@gmail.com>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://sam.zoy.org/projects/COPYING.WTFPL for more details.
//

//
// The BulletCharacterController class
// ------------------
// This class is a equivalent of btKinematicCharacterController, but more useful for Lol.
//

#if !defined __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__
#define __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__

#ifdef HAVE_PHYS_USE_BULLET
#include "core.h"
#include "EasyPhysics.h"
#endif

namespace lol
{

namespace phys
{

} /* namespace phys */

} /* namespace lol */

#endif /* __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__ */


+ 1
- 0
test/Physics/Include/EasyCharacterController.h View File

@@ -73,6 +73,7 @@ public:
virtual void SetTransform(const lol::vec3& base_location, const lol::quat& base_rotation);
protected:
virtual void BaseTransformChanged(const lol::mat4& PreviousMatrix, const lol::mat4& NewMatrix);
virtual char const *GetName();
public:
virtual void TickGame(float seconds);



+ 33
- 0
test/Physics/Src/BulletCharacterController.cpp View File

@@ -0,0 +1,33 @@
//
// Lol Engine
//
// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
// (c) 2009-2012 Cédric Lecacheur <jordx@free.fr>
// (c) 2009-2012 Benjamin Huet <huet.benjamin@gmail.com>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://sam.zoy.org/projects/COPYING.WTFPL for more details.
//

#if defined HAVE_CONFIG_H
# include "config.h"
#endif

#include "../Include/LolBtPhysicsIntegration.h"
#include "../Include/LolPhysics.h"
#include "../Include/EasyCharacterController.h"

namespace lol
{

namespace phys
{

#ifdef HAVE_PHYS_USE_BULLET

#endif // HAVE_PHYS_USE_BULLET

} /* namespace phys */

} /* namespace lol */

+ 6
- 0
test/Physics/Src/EasyCharacterController.cpp View File

@@ -125,6 +125,12 @@ void EasyCharacterController::BaseTransformChanged(const lol::mat4& PreviousMatr
m_base_is_updating = false;
}

//---
char const *EasyCharacterController::GetName()
{
return "<EasyCharacterController>";
}

//Physic Tick
void EasyCharacterController::TickGame(float seconds)
{


Loading…
Cancel
Save