generated from avadae/minigin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed position type from vec3 to vec2
- Loading branch information
1 parent
7008f4a
commit 868f563
Showing
4 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
#include "Transform.h" | ||
|
||
void Transform::SetPosition(const float x, const float y, const float z) | ||
Transform::Transform(const glm::vec2& position) | ||
: m_Position{ position } | ||
{ | ||
|
||
} | ||
|
||
void Transform::SetPosition(const float x, const float y) | ||
{ | ||
m_Position.x = x; | ||
m_Position.y = y; | ||
m_Position.z = z; | ||
} | ||
|
||
void Transform::SetPosition(const glm::vec2 position) | ||
{ | ||
m_Position = position; | ||
} | ||
|
||
/* | ||
Transform Transform::operator+(const Transform& transform1, const Transform& transform2) | ||
{ | ||
return transform1.m_Position + transform2.m_Position; | ||
} | ||
Transform Transform::operator-(const Transform& transform1, const Transform& transform2) | ||
{ | ||
return transform1.m_Position - transform2.m_Position; | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters