-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransform.h
More file actions
37 lines (25 loc) · 698 Bytes
/
Transform.h
File metadata and controls
37 lines (25 loc) · 698 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
33
34
35
36
37
#pragma once
#include <DirectXMath.h>
#include <iostream>
namespace dx = DirectX;
class Transform
{
public:
Transform();
//void print();
void SetPosition(dx::XMVECTOR pos);
void SetRotation(dx::XMVECTOR rotationQuat);
void Scale(float x, float y, float z);
void RotateLocal(dx::XMVECTOR rotationQuat);
void RotateAroundPoint(dx::XMVECTOR rotationQuat, dx::XMVECTOR origin);
dx::XMMATRIX GetLocalTransform();
const dx::XMVECTOR* Position = &position;
const dx::XMVECTOR* Rotation = &rotationQuat;
const dx::XMVECTOR* Scalar = &scale;
private:
dx::XMMATRIX localTransform;
dx::XMVECTOR scale;
dx::XMVECTOR rotationQuat;
dx::XMVECTOR position;
const Transform* parent;
};