summaryrefslogtreecommitdiffstats
path: root/tools/statepropbuilder/apps/spbuilder/code/sp/engine/aicollisionsolveragent.hpp
diff options
context:
space:
mode:
authorSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
committerSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
commiteb4b3404aa00220d659e532151dab13d642c17a3 (patch)
tree7e1107c4995489a26c4007e41b53ea8d00ab2134 /tools/statepropbuilder/apps/spbuilder/code/sp/engine/aicollisionsolveragent.hpp
downloadThe-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.gz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.bz2
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.lz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.xz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.zst
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.zip
Diffstat (limited to 'tools/statepropbuilder/apps/spbuilder/code/sp/engine/aicollisionsolveragent.hpp')
-rw-r--r--tools/statepropbuilder/apps/spbuilder/code/sp/engine/aicollisionsolveragent.hpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/tools/statepropbuilder/apps/spbuilder/code/sp/engine/aicollisionsolveragent.hpp b/tools/statepropbuilder/apps/spbuilder/code/sp/engine/aicollisionsolveragent.hpp
new file mode 100644
index 0000000..10097a8
--- /dev/null
+++ b/tools/statepropbuilder/apps/spbuilder/code/sp/engine/aicollisionsolveragent.hpp
@@ -0,0 +1,43 @@
+#ifndef _AICOLLISIONSOLVERAGENT_HPP_
+#define _AICOLLISIONSOLVERAGENT_HPP_
+
+#include "simcommon/tlist.hpp"
+#include "simcollision/impulsebasedcollisionsolver.hpp"
+#include "simcollision/collisionanalyser.hpp"
+#include "simcollision/collisionanalyserdata.hpp"
+
+class AICollisionSolverAgent
+: public sim::CollisionSolverAgent
+{
+public:
+ AICollisionSolverAgent();
+ ~AICollisionSolverAgent();
+
+ //
+ // this method is called at the beginning before anything is done with the collision
+ // returning Solving_Aborted would cause the collision to be ignored.
+ //
+ sim::Solving_Answer PreCollisionEvent(sim::Collision& inCollision, int inPass);
+
+ //
+ // this method allows to trigger sounds, animation and modify the objects state.
+ //
+ sim::Solving_Answer CollisionEvent( sim::SimState* inSimStateA, int indexA,
+ sim::SimState* inSimStateB, int indexB,
+ const rmt::Vector& inPos, float inDvN, float inDvT);
+
+ //
+ // this is called everytime an impulse is computed, before it gets added to the objects
+ //
+ sim::Solving_Answer TestImpulse(rmt::Vector& mImpulse, sim::Collision& inCollision);
+
+ //
+ // the impulse has been added to the object's cache, testing that cache tells
+ // the consequence of adding the cache to the object's state. It is also a good
+ // time for adding the cache of the root node of an articulated object to its
+ // virtual center of mass.
+ //
+ sim::Solving_Answer EndObjectCollision(sim::SimState* inSimState, int inIndex);
+};
+
+#endif \ No newline at end of file