Pathfinding tweaks; coldet fixes.

This was SVN commit r379.
This commit is contained in:
MarkT
2004-06-03 02:20:48 +00:00
parent 4daa183dd3
commit d32be2011f
14 changed files with 898 additions and 747 deletions
+18 -1
View File
@@ -46,7 +46,7 @@ CBoundingCircle::CBoundingCircle( float x, float y, CBoundingCircle* copy )
void CBoundingObject::setPosition( float x, float y )
{
m_pos.x = x; m_pos.y = y;
m_pos += m_offset;
m_pos -= m_offset;
}
void CBoundingCircle::setRadius( float radius )
@@ -99,6 +99,23 @@ CBoundingBox::CBoundingBox( float x, float y, const CVector2D& u, CBoundingBox*
setOrientation( u );
}
CBoundingBox::CBoundingBox( float x, float y, float orientation, float width, float height )
{
m_type = BOUND_OABB;
setPosition( x, y );
setDimensions( width, height );
setOrientation( orientation );
}
CBoundingBox::CBoundingBox( float x, float y, float orientation, CBoundingBox* copy )
{
m_type = BOUND_OABB;
m_offset = copy->m_offset;
setPosition( x, y );
setDimensions( copy->getWidth(), copy->getHeight() );
setOrientation( orientation );
}
void CBoundingBox::setDimensions( float width, float height )
{
m_w = width / 2.0f;