-
Notifications
You must be signed in to change notification settings - Fork 0
/
DrawableState.h
executable file
·52 lines (46 loc) · 1.16 KB
/
DrawableState.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#ifndef DRAWABLE_STATE_H
#define DRAWABLE_STATE_H
#include "DirectXMath\DirectXMath.h"
#include <memory>
#include "Texture2D.h"
#include "DrawableMesh.h"
class Camera;
class DistantTile;
class CityTile;
class DrawableState {
public:
DirectX::XMMATRIX mModelMatrix;
DirectX::XMFLOAT3 mPosition;
DirectX::XMFLOAT3 mRotation;
DirectX::XMFLOAT3 mScale;
DirectX::XMFLOAT3 mDiffuseColour;
DirectX::XMFLOAT3 mAmbientColour;
DirectX::XMFLOAT3 mSpecularColour;
DirectX::XMINT3 mCoords;
DirectX::XMINT3 mCamOffset;
FLOAT mSpecularExponent;
FLOAT mSpecularAmount;
std::shared_ptr<DistantTile> mDistantTile;
std::shared_ptr<CityTile> mCityTile;
void updateMatrices();
void setPosition(DOUBLE x, DOUBLE y, DOUBLE z);
FLOAT getBoundingRadius() {
//TODO: better bounds calculations
return 5 * mScale.x;
}
DOUBLE getPosX() {
return ((DOUBLE) mPosition.x) + mCoords.x;
}
DOUBLE getPosY() {
return ((DOUBLE) mPosition.y) + mCoords.y;
}
DOUBLE getPosZ() {
return ((DOUBLE) mPosition.z) + mCoords.z;
}
DrawableState();
~DrawableState();
private:
DrawableState(const DrawableState& copy);
};
#endif