2018-08-20 05:27:58 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "lc_math.h"
|
|
|
|
#include <bitset>
|
|
|
|
|
|
|
|
class View;
|
|
|
|
|
|
|
|
class lcViewCube
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
lcViewCube(View* View);
|
|
|
|
|
|
|
|
void Draw();
|
|
|
|
bool OnMouseMove();
|
|
|
|
bool OnLeftButtonUp();
|
2018-09-11 22:34:59 +02:00
|
|
|
bool OnLeftButtonDown();
|
2018-09-19 21:56:45 +02:00
|
|
|
bool IsDragging() const;
|
2018-08-20 05:27:58 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
lcMatrix44 GetViewMatrix() const;
|
|
|
|
lcMatrix44 GetProjectionMatrix() const;
|
2018-09-19 22:19:01 +02:00
|
|
|
std::bitset<6> GetIntersectionFlags(lcVector3& Intersection) const;
|
2018-08-20 05:27:58 +02:00
|
|
|
|
|
|
|
View* mView;
|
|
|
|
lcVector3 mIntersection;
|
|
|
|
std::bitset<6> mIntersectionFlags;
|
2018-09-11 22:34:59 +02:00
|
|
|
int mMouseDownX;
|
|
|
|
int mMouseDownY;
|
|
|
|
bool mMouseDown;
|
2018-08-20 05:27:58 +02:00
|
|
|
};
|