Refactored Math::Point in motion classes
parent
7bf37a3999
commit
f8f3a64612
|
@ -392,7 +392,7 @@ bool CMotionAnt::EventProcess(const Event &event)
|
|||
bool CMotionAnt::EventFrame(const Event &event)
|
||||
{
|
||||
Math::Vector dir, pos, speed;
|
||||
Math::Point dim;
|
||||
glm::vec2 dim;
|
||||
float s, a, prog = 0.0f, time;
|
||||
float tSt[9], tNd[9];
|
||||
int i, ii, st, nd, action;
|
||||
|
|
|
@ -614,7 +614,7 @@ bool CMotionHuman::EventFrame(const Event &event)
|
|||
{
|
||||
Math::Matrix* mat;
|
||||
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 al, ar, af;
|
||||
float tSt[9], tNd[9];
|
||||
|
|
|
@ -327,7 +327,7 @@ bool CMotionSpider::EventProcess(const Event &event)
|
|||
bool CMotionSpider::EventFrame(const Event &event)
|
||||
{
|
||||
Math::Vector dir, pos, speed;
|
||||
Math::Point dim;
|
||||
glm::vec2 dim;
|
||||
float s, a, prog = 0.0f, time;
|
||||
float tSt[12], tNd[12];
|
||||
int i, ii, st, nd, action;
|
||||
|
|
|
@ -57,7 +57,7 @@ CMotionToto::CMotionToto(COldObject* object) : CMotion(object)
|
|||
m_blinkTime = 0.0f;
|
||||
m_blinkProgress = -1.0f;
|
||||
m_lastMotorParticle = 0.0f;
|
||||
m_mousePos = Math::Point(0.0f, 0.0f);
|
||||
m_mousePos = { 0.0f, 0.0f };
|
||||
}
|
||||
|
||||
// Object's destructor.
|
||||
|
@ -196,7 +196,7 @@ return;
|
|||
m_progress = 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.
|
||||
|
@ -209,7 +209,7 @@ void CMotionToto::StopDisplayInfo()
|
|||
|
||||
// Getes the position of the mouse.
|
||||
|
||||
void CMotionToto::SetMousePos(Math::Point pos)
|
||||
void CMotionToto::SetMousePos(const glm::vec2& pos)
|
||||
{
|
||||
m_mousePos = pos;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ bool CMotionToto::EventFrame(const Event &event)
|
|||
Math::Matrix* mat;
|
||||
Math::Vector eye, lookat, dir, perp, nPos, aPos, pos, speed;
|
||||
Math::Vector vibLin, vibCir, dirSpeed, aAntenna;
|
||||
Math::Point dim;
|
||||
glm::vec2 dim;
|
||||
glm::ivec2 wDim;
|
||||
Gfx::ParticleType type;
|
||||
float progress, focus, distance, shift, verti, level, zoom;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "object/motion/motion.h"
|
||||
|
||||
#include "math/point.h"
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
|
||||
enum MotionTotoAction
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
|
||||
void StartDisplayInfo();
|
||||
void StopDisplayInfo();
|
||||
void SetMousePos(Math::Point pos);
|
||||
void SetMousePos(const glm::vec2& pos);
|
||||
|
||||
protected:
|
||||
bool EventFrame(const Event &event);
|
||||
|
@ -64,5 +64,5 @@ protected:
|
|||
float m_blinkTime;
|
||||
float m_blinkProgress;
|
||||
int m_soundChannel;
|
||||
Math::Point m_mousePos;
|
||||
glm::vec2 m_mousePos;
|
||||
};
|
||||
|
|
|
@ -1934,7 +1934,7 @@ bool CMotionVehicle::EventFrameInsect(const Event &event)
|
|||
bool CMotionVehicle::EventFrameCanoni(const Event &event)
|
||||
{
|
||||
Math::Vector pos, speed;
|
||||
Math::Point dim;
|
||||
glm::vec2 dim;
|
||||
float zoom, angle, factor;
|
||||
bool bOnBoard = false;
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ bool CMotionWorm::EventFrame(const Event &event)
|
|||
{
|
||||
Math::Matrix* mat;
|
||||
Math::Vector pos, p, angle, speed;
|
||||
Math::Point center, pp, dim;
|
||||
glm::vec2 center, pp, dim;
|
||||
float height[WORM_PART+2];
|
||||
float floor, a, s, px, curve, phase, h, zoom, radius;
|
||||
int i, under;
|
||||
|
|
Loading…
Reference in New Issue