Graphics/Sprite: Fix origin not being initialized/copied
Former-commit-id: bdb43791a34e6f696029a2f0fdcc7e0a80e37d1a [formerly 429e69fda21a4b7493f992f02bda057ae3f5255c] [formerly 7ecf3ada43b2574b2a70162f2bdc258430ce30f6 [formerly cfb4bb3d609add7a370ff5bd54239632e20c6e9c]] Former-commit-id: 1b46fd8b1dd2ee8a0dc2317ef7bd8750b28f63b8 [formerly b11b682a76bec2160531d460043cd01e725d7c39] Former-commit-id: 225928240477469cc45aec70ccb1f51ae25736a8
This commit is contained in:
parent
5d13fa664b
commit
8a9ec2883a
|
|
@ -14,9 +14,9 @@ namespace Nz
|
||||||
|
|
||||||
inline Sprite::Sprite() :
|
inline Sprite::Sprite() :
|
||||||
m_color(Color::White),
|
m_color(Color::White),
|
||||||
m_origin(Nz::Vector3f::Zero()),
|
|
||||||
m_textureCoords(0.f, 0.f, 1.f, 1.f),
|
m_textureCoords(0.f, 0.f, 1.f, 1.f),
|
||||||
m_size(64.f, 64.f)
|
m_size(64.f, 64.f),
|
||||||
|
m_origin(Nz::Vector3f::Zero())
|
||||||
{
|
{
|
||||||
SetDefaultMaterial();
|
SetDefaultMaterial();
|
||||||
}
|
}
|
||||||
|
|
@ -26,11 +26,8 @@ namespace Nz
|
||||||
*
|
*
|
||||||
* \param material Reference to a material
|
* \param material Reference to a material
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline Sprite::Sprite(MaterialRef material) :
|
inline Sprite::Sprite(MaterialRef material) :
|
||||||
m_color(Color::White),
|
Sprite()
|
||||||
m_textureCoords(0.f, 0.f, 1.f, 1.f),
|
|
||||||
m_size(64.f, 64.f)
|
|
||||||
{
|
{
|
||||||
SetMaterial(std::move(material), true);
|
SetMaterial(std::move(material), true);
|
||||||
}
|
}
|
||||||
|
|
@ -42,9 +39,7 @@ namespace Nz
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline Sprite::Sprite(Texture* texture) :
|
inline Sprite::Sprite(Texture* texture) :
|
||||||
m_color(Color::White),
|
Sprite()
|
||||||
m_textureCoords(0.f, 0.f, 1.f, 1.f),
|
|
||||||
m_size(64.f, 64.f)
|
|
||||||
{
|
{
|
||||||
SetTexture(texture, true);
|
SetTexture(texture, true);
|
||||||
}
|
}
|
||||||
|
|
@ -60,7 +55,8 @@ namespace Nz
|
||||||
m_color(sprite.m_color),
|
m_color(sprite.m_color),
|
||||||
m_material(sprite.m_material),
|
m_material(sprite.m_material),
|
||||||
m_textureCoords(sprite.m_textureCoords),
|
m_textureCoords(sprite.m_textureCoords),
|
||||||
m_size(sprite.m_size)
|
m_size(sprite.m_size),
|
||||||
|
m_origin(sprite.m_origin)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -270,6 +266,7 @@ namespace Nz
|
||||||
|
|
||||||
m_color = sprite.m_color;
|
m_color = sprite.m_color;
|
||||||
m_material = sprite.m_material;
|
m_material = sprite.m_material;
|
||||||
|
m_origin = sprite.m_origin;
|
||||||
m_textureCoords = sprite.m_textureCoords;
|
m_textureCoords = sprite.m_textureCoords;
|
||||||
m_size = sprite.m_size;
|
m_size = sprite.m_size;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue