-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSphere.h
More file actions
32 lines (29 loc) · 860 Bytes
/
Copy pathSphere.h
File metadata and controls
32 lines (29 loc) · 860 Bytes
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
#pragma once
#include "Graphics.h"
#include <vector>
class Sphere
{
public:
Sphere(Graphics& graphics, int latDiv, int longDiv);
~Sphere();
void reset();
void draw();
void move(float x, float y, float z);
void rotate(float x, float y, float z);
void scale(float x, float y, float z);
private:
ID3D11Buffer* vertexBuffer = nullptr;
ID3D11Buffer* indexBuffer = nullptr;
ID3D11InputLayout* inputLayout = nullptr;
ID3D11Buffer* modelViewProj = nullptr;
ID3D11Device* device = nullptr;
ID3D11DeviceContext* context = nullptr;
cBufferMatrix cb;
ID3D11VertexShader* vs = nullptr;
ID3D11PixelShader* ps = nullptr;
ID3D11Debug* debug = nullptr;
DirectX::XMFLOAT3 position = {0.0f, 0.0f, 0.0f};
DirectX::XMFLOAT3 rotation = { 0.0f, 0.0f, 0.0f };
DirectX::XMFLOAT3 scaling = {1.0f, 1.0f, 1.0f};
UINT numIndices;
};