Fixed axis alignment bug in text, which occured what text was placed on the XZ

or YZ planes.
This commit is contained in:
Robert Osfield
2003-03-25 15:45:08 +00:00
parent 0c60d14c00
commit cad1d8162b

View File

@@ -419,6 +419,16 @@ void Text::computePositions()
case BASE_LINE: _offset.set(0.0f,0.0f,0.0f); break;
}
// adjust offset for axis alignment
switch(_axisAlignment)
{
case XZ_PLANE: _offset.set(_offset.x(),-_offset.z(),_offset.y()); break;
case YZ_PLANE: _offset.set(_offset.z(),_offset.x(),_offset.y()); break;
case XY_PLANE: break; // nop - already on XY plane.
case SCREEN: break; // nop - need to account for rotation in draw as it depends on ModelView _matrix.
}
_matrix.makeTranslate(_position-_offset);
switch(_axisAlignment)