Commit 74782c9e authored by Ilya Prokhorov's avatar Ilya Prokhorov

Obsolete code removed

parent 1fead17a
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: Camera.cpp
* Author: demensdeum
*
* Created on February 19, 2017, 12:32 PM
*/
#include "Camera.h"
#include <math.h>
using namespace FlameSteelEngine::GameToolkit;
Camera::Camera()
{
position = make_shared<FSEGTVector>();
direction = make_shared<FSEGTVector>();
plane = make_shared<FSEGTVector>();
}
/*void Camera::rotate(float diff)
{
direction->rotate(diff);
plane->rotate(diff);
}*/
void Camera::setPosition(float x, float y)
{
position->x = x;
position->y = y;
}
void Camera::setRotation(float angle)
{
// euler
angle += 180; // invert
reset();
//rotate(DEGREES_TO_RADIANS(angle));
}
void Camera::reset()
{
direction->x = -1;
direction->y = 0;
plane->x = 0;
plane->y = 0.66;
}
Camera::Camera(const Camera& )
{
}
Camera::~Camera()
{
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: Camera.h
* Author: demensdeum
*
* Created on February 19, 2017, 12:32 PM
*/
#ifndef FSEGTCAMERA_H
#define FSEGTCAMERA_H
#include <FlameSteelEngineGameToolkit/Data/Components/Vector/FSEGTVector.h>
#include <FlameSteelCore/Object.h>
#include <memory>
using namespace FlameSteelCore;
namespace FlameSteelEngine
{
namespace GameToolkit
{
class Camera: Object
{
public:
Camera();
Camera(const Camera& orig);
virtual ~Camera();
shared_ptr<FSEGTVector> position;
shared_ptr<FSEGTVector> direction;
shared_ptr<FSEGTVector> plane;
//void rotate(float diff);
void setPosition(float x, float y);
void setRotation(float angle);
void reset();
private:
};
}
}
#endif /* FSEGTCAMERA_H */
......@@ -15,15 +15,6 @@ int FSEGTVector::getTileY()
return tileY;
}
/*void FSEGTVector::rotate(float diff)
{
float oldX = this->x;
this->x = this->x * cos(-diff) - this->y * sin(-diff);
this->y = oldX * sin(-diff) + this->y * cos(-diff);
}*/
shared_ptr<FSEGTVector> FSEGTVector::vectorXYZ(float x, float y, float z)
{
......
......@@ -25,9 +25,6 @@ public:
int getTileX();
int getTileY();
// void rotate(float diff);
shared_ptr<FSEGTVector> copy();
void populate(shared_ptr<FSEGTVector> vector);
static shared_ptr<FSEGTVector> vectorXYZ(float x, float y, float z);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment