Refactored Math::Point in motion classes

dev
Tomasz Kapuściński 2021-12-24 18:32:42 +01:00
parent 7bf37a3999
commit f8f3a64612
7 changed files with 12 additions and 12 deletions

View File

@ -392,7 +392,7 @@ bool CMotionAnt::EventProcess(const Event &event)
bool CMotionAnt::EventFrame(const Event &event) bool CMotionAnt::EventFrame(const Event &event)
{ {
Math::Vector dir, pos, speed; Math::Vector dir, pos, speed;
Math::Point dim; glm::vec2 dim;
float s, a, prog = 0.0f, time; float s, a, prog = 0.0f, time;
float tSt[9], tNd[9]; float tSt[9], tNd[9];
int i, ii, st, nd, action; int i, ii, st, nd, action;

View File

@ -614,7 +614,7 @@ bool CMotionHuman::EventFrame(const Event &event)
{ {
Math::Matrix* mat; Math::Matrix* mat;
Math::Vector dir, actual, pos, speed, pf; Math::Vector dir, actual, pos, speed, pf;
Math::Point center, dim, p2; glm::vec2 center, dim, p2;
float s, a, prog, rTime[2], lTime[2], time, rot, hr, hl; float s, a, prog, rTime[2], lTime[2], time, rot, hr, hl;
float al, ar, af; float al, ar, af;
float tSt[9], tNd[9]; float tSt[9], tNd[9];

View File

@ -327,7 +327,7 @@ bool CMotionSpider::EventProcess(const Event &event)
bool CMotionSpider::EventFrame(const Event &event) bool CMotionSpider::EventFrame(const Event &event)
{ {
Math::Vector dir, pos, speed; Math::Vector dir, pos, speed;
Math::Point dim; glm::vec2 dim;
float s, a, prog = 0.0f, time; float s, a, prog = 0.0f, time;
float tSt[12], tNd[12]; float tSt[12], tNd[12];
int i, ii, st, nd, action; int i, ii, st, nd, action;

View File

@ -57,7 +57,7 @@ CMotionToto::CMotionToto(COldObject* object) : CMotion(object)
m_blinkTime = 0.0f; m_blinkTime = 0.0f;
m_blinkProgress = -1.0f; m_blinkProgress = -1.0f;
m_lastMotorParticle = 0.0f; m_lastMotorParticle = 0.0f;
m_mousePos = Math::Point(0.0f, 0.0f); m_mousePos = { 0.0f, 0.0f };
} }
// Object's destructor. // Object's destructor.
@ -196,7 +196,7 @@ return;
m_progress = 0.0f; m_progress = 0.0f;
m_object->SetRotationY(0.0f); m_object->SetRotationY(0.0f);
m_mousePos = Math::Point(0.5f, 0.5f); m_mousePos = { 0.5f, 0.5f };
} }
// End of the display of informations. // End of the display of informations.
@ -209,7 +209,7 @@ void CMotionToto::StopDisplayInfo()
// Getes the position of the mouse. // Getes the position of the mouse.
void CMotionToto::SetMousePos(Math::Point pos) void CMotionToto::SetMousePos(const glm::vec2& pos)
{ {
m_mousePos = pos; m_mousePos = pos;
} }
@ -236,7 +236,7 @@ bool CMotionToto::EventFrame(const Event &event)
Math::Matrix* mat; Math::Matrix* mat;
Math::Vector eye, lookat, dir, perp, nPos, aPos, pos, speed; Math::Vector eye, lookat, dir, perp, nPos, aPos, pos, speed;
Math::Vector vibLin, vibCir, dirSpeed, aAntenna; Math::Vector vibLin, vibCir, dirSpeed, aAntenna;
Math::Point dim; glm::vec2 dim;
glm::ivec2 wDim; glm::ivec2 wDim;
Gfx::ParticleType type; Gfx::ParticleType type;
float progress, focus, distance, shift, verti, level, zoom; float progress, focus, distance, shift, verti, level, zoom;

View File

@ -21,7 +21,7 @@
#include "object/motion/motion.h" #include "object/motion/motion.h"
#include "math/point.h" #include <glm/glm.hpp>
enum MotionTotoAction enum MotionTotoAction
@ -46,7 +46,7 @@ public:
void StartDisplayInfo(); void StartDisplayInfo();
void StopDisplayInfo(); void StopDisplayInfo();
void SetMousePos(Math::Point pos); void SetMousePos(const glm::vec2& pos);
protected: protected:
bool EventFrame(const Event &event); bool EventFrame(const Event &event);
@ -64,5 +64,5 @@ protected:
float m_blinkTime; float m_blinkTime;
float m_blinkProgress; float m_blinkProgress;
int m_soundChannel; int m_soundChannel;
Math::Point m_mousePos; glm::vec2 m_mousePos;
}; };

View File

@ -1934,7 +1934,7 @@ bool CMotionVehicle::EventFrameInsect(const Event &event)
bool CMotionVehicle::EventFrameCanoni(const Event &event) bool CMotionVehicle::EventFrameCanoni(const Event &event)
{ {
Math::Vector pos, speed; Math::Vector pos, speed;
Math::Point dim; glm::vec2 dim;
float zoom, angle, factor; float zoom, angle, factor;
bool bOnBoard = false; bool bOnBoard = false;

View File

@ -232,7 +232,7 @@ bool CMotionWorm::EventFrame(const Event &event)
{ {
Math::Matrix* mat; Math::Matrix* mat;
Math::Vector pos, p, angle, speed; Math::Vector pos, p, angle, speed;
Math::Point center, pp, dim; glm::vec2 center, pp, dim;
float height[WORM_PART+2]; float height[WORM_PART+2];
float floor, a, s, px, curve, phase, h, zoom, radius; float floor, a, s, px, curve, phase, h, zoom, radius;
int i, under; int i, under;