B
brekehan
//---------------------------------------------------------------------------------
TextureCoordRect::TextureCoordRect(D3DXVECTOR2 topLeft, D3DXVECTOR2
bottomRight)
{
if( topLeft.x < 0.0f || topLeft.x > 1.0f || topLeft.y < 0.0f ||
topLeft.y > 1.0f ||
bottomRight.x < 0.0f || bottomRight.x > 1.0f || bottomRight.y < 0.0f
|| bottomRight.y > 1.0f)
throw Error("Attempting to create texture coordinate rect with
invalid coordinates", "TextureCoordRect::TextureCoordRect(D3DXVECTOR2
topLeft, D3DXVECTOR2 bottomRight)", "Font2D.cpp");
m_topLeft = topLeft;
m_bottomRight = bottomRight;
}
//---------------------------------------------------------------------------------
TextureCoordRect::TextureCoordRect(float topLeft_u, float topLeft_v,
float bottomRight_u, float bottomRight_v)
{
D3DXVECTOR2 topLeft(topLeft_u, topLeft_v);
D3DXVECTOR2 bottomRight(bottomRight_u, bottomRight_v);
// Someway to call the constructor that takes D3DXVECTOR arguments
now?
}
TextureCoordRect::TextureCoordRect(D3DXVECTOR2 topLeft, D3DXVECTOR2
bottomRight)
{
if( topLeft.x < 0.0f || topLeft.x > 1.0f || topLeft.y < 0.0f ||
topLeft.y > 1.0f ||
bottomRight.x < 0.0f || bottomRight.x > 1.0f || bottomRight.y < 0.0f
|| bottomRight.y > 1.0f)
throw Error("Attempting to create texture coordinate rect with
invalid coordinates", "TextureCoordRect::TextureCoordRect(D3DXVECTOR2
topLeft, D3DXVECTOR2 bottomRight)", "Font2D.cpp");
m_topLeft = topLeft;
m_bottomRight = bottomRight;
}
//---------------------------------------------------------------------------------
TextureCoordRect::TextureCoordRect(float topLeft_u, float topLeft_v,
float bottomRight_u, float bottomRight_v)
{
D3DXVECTOR2 topLeft(topLeft_u, topLeft_v);
D3DXVECTOR2 bottomRight(bottomRight_u, bottomRight_v);
// Someway to call the constructor that takes D3DXVECTOR arguments
now?
}