summaryrefslogtreecommitdiffstats
path: root/src/entities/Physical.h
diff options
context:
space:
mode:
author_AG <gennariarmando@outlook.com>2019-07-07 15:16:54 +0200
committer_AG <gennariarmando@outlook.com>2019-07-07 15:16:54 +0200
commitd1c6a6aaa6c17250e069d1267b27e13303d6e20f (patch)
tree76d55bfd8bcc8f72cdd4d261c0bb1eaa050e522a /src/entities/Physical.h
parentMerge branch 'master' into master (diff)
parentthe great reorganization (diff)
downloadre3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.gz
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.bz2
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.lz
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.xz
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.zst
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.zip
Diffstat (limited to '')
-rw-r--r--src/entities/Physical.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/entities/Physical.h b/src/entities/Physical.h
index 0f517cf3..81d3d649 100644
--- a/src/entities/Physical.h
+++ b/src/entities/Physical.h
@@ -81,6 +81,7 @@ public:
void AddCollisionRecord_Treadable(CEntity *ent);
bool GetHasCollidedWith(CEntity *ent);
void RemoveRefsToEntity(CEntity *ent);
+ static void PlacePhysicalRelativeToOtherPhysical(CPhysical *other, CPhysical *phys, CVector localPos);
float GetDistanceSq(void) { return m_vecMoveSpeed.MagnitudeSqr() * sq(CTimer::GetTimeStep()); }
// get speed of point p relative to entity center
@@ -104,6 +105,9 @@ public:
bIsInSafePosition = false;
}
+ const CVector &GetMoveSpeed() { return m_vecMoveSpeed; }
+ const CVector &GetTurnSpeed() { return m_vecTurnSpeed; }
+
void ApplyMoveSpeed(void);
void ApplyTurnSpeed(void);
// Force actually means Impulse here
@@ -117,7 +121,9 @@ public:
void ApplyFrictionMoveForce(const CVector &j) { ApplyFrictionMoveForce(j.x, j.y, j.z); }
void ApplyFrictionTurnForce(float jx, float jy, float jz, float rx, float ry, float rz);
void ApplyFrictionTurnForce(const CVector &j, const CVector &p) { ApplyFrictionTurnForce(j.x, j.y, j.z, p.x, p.y, p.z); }
- void ApplySpringCollision(float f1, CVector &v, CVector &p, float f2, float f3);
+ // springRatio: 1.0 fully extended, 0.0 fully compressed
+ bool ApplySpringCollision(float springConst, CVector &springDir, CVector &point, float springRatio, float bias);
+ bool ApplySpringDampening(float damping, CVector &springDir, CVector &point, CVector &speed);
void ApplyGravity(void);
void ApplyFriction(void);
void ApplyAirResistance(void);