Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Commit ae0c363

Browse files
committed
Bit of cleanup
1 parent 18bef5f commit ae0c363

File tree

10 files changed

+10
-148
lines changed

10 files changed

+10
-148
lines changed

splines/bistro_bar_pan.spl

Lines changed: 0 additions & 3 deletions
This file was deleted.

splines/imgui.ini

Lines changed: 0 additions & 118 deletions
This file was deleted.

splines/sponza_flythrough_0.spl

Lines changed: 0 additions & 4 deletions
This file was deleted.

splines/sponza_l1_down_hw.spl

Lines changed: 0 additions & 2 deletions
This file was deleted.

splines/sponza_l2_down_hw.spl

Lines changed: 0 additions & 2 deletions
This file was deleted.

splines/sponza_lr_downstairs.spl

Lines changed: 0 additions & 3 deletions
This file was deleted.

splines/sponza_table_flyover.spl

Lines changed: 0 additions & 3 deletions
This file was deleted.

splines/sun_fireplaces_pan.spl

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/scene_graph/node.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ namespace wr
2626
{
2727
child->SignalTransformChange();
2828
}
29-
3029
}
3130

3231
void Node::SignalUpdate(unsigned int frame_idx)
@@ -52,14 +51,14 @@ namespace wr
5251
void Node::SetRotation(DirectX::XMVECTOR roll_pitch_yaw)
5352
{
5453
m_rotation_radians = roll_pitch_yaw;
55-
m_use_quat = false;
54+
m_use_quaternion = false;
5655
SignalTransformChange();
5756
}
5857

59-
void Node::SetRotationQuat(DirectX::XMVECTOR roll_pitch_yaw)
58+
void Node::SetRotationQuaternion(DirectX::XMVECTOR rotation)
6059
{
61-
m_rotation = roll_pitch_yaw;
62-
m_use_quat = true;
60+
m_rotation = rotation;
61+
m_use_quaternion = true;
6362
SignalTransformChange();
6463
}
6564

@@ -84,8 +83,10 @@ namespace wr
8483

8584
void Node::UpdateTransform()
8685
{
87-
if (!m_use_quat)
86+
if (!m_use_quaternion)
87+
{
8888
m_rotation = DirectX::XMQuaternionRotationRollPitchYawFromVector(m_rotation_radians);
89+
}
8990

9091
DirectX::XMMATRIX translation_mat = DirectX::XMMatrixTranslationFromVector(m_position);
9192
DirectX::XMMATRIX rotation_mat = DirectX::XMMatrixRotationQuaternion(m_rotation);
@@ -98,4 +99,4 @@ namespace wr
9899
SignalChange();
99100
}
100101

101-
}
102+
} /* wr */

src/scene_graph/node.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ namespace wr
2222

2323
//Takes roll, pitch and yaw and converts it to quaternion
2424
virtual void SetRotation(DirectX::XMVECTOR roll_pitch_yaw);
25-
virtual void SetRotationQuat(DirectX::XMVECTOR roll_pitch_yaw);
26-
27-
bool m_use_quat = false;
25+
virtual void SetRotationQuaternion(DirectX::XMVECTOR rotation);
2826

2927
//Sets position
3028
virtual void SetPosition(DirectX::XMVECTOR position);
@@ -59,6 +57,7 @@ namespace wr
5957
const std::type_info& m_type_info;
6058

6159
private:
60+
bool m_use_quaternion = false;
6261

6362
std::bitset<3> m_requires_update;
6463
std::bitset<3> m_requires_transform_update;

0 commit comments

Comments
 (0)