Collideables fixed

Missing returns
This commit is contained in:
Dander7BD 2013-12-04 11:42:11 +01:00
parent 1d94ed0ddc
commit 080bbf68fd
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ bool Point::Intersects( const ICollideable &target ) const
case Type_universe: return true;
case Type_point: return Utility::Intersect( *this, *(Point*)&target );
case Type_ray: return Utility::Intersect( *(Ray*)&target, *this, ((Ray*)&target)->collisionDistance );
case Type_sphere: Utility::Intersect( *(Sphere*)&target, *this );
case Type_sphere: return Utility::Intersect( *(Sphere*)&target, *this );
case Type_plane: return Utility::Intersect( *(Plane*)&target, *this );
//case Type_triangle: return false; // TODO:
case Type_box_axis_aligned: return Utility::Intersect( *(BoxAxisAligned*)&target, *this );

View File

@ -60,7 +60,7 @@ bool Ray::Contains( const ICollideable &target ) const
switch( target.type )
{
case Type_point: return Utility::Intersect( *this, *(Point*)&target, this->collisionDistance );
case Type_ray: Utility::Contains( *this, *(Ray*)&target );
case Type_ray: return Utility::Contains( *this, *(Ray*)&target );
default: return false;
}
}

View File

@ -35,7 +35,7 @@ bool Sphere::Intersects( const ICollideable &target ) const
case Type_universe: return true;
case Type_point: return Utility::Intersect( *this, *(Point*)&target );
case Type_ray: return Utility::Intersect( *this, *(Ray*)&target, ((Ray*)&target)->collisionDistance );
case Type_sphere: Utility::Intersect( *this, *(Sphere*)&target );
case Type_sphere: return Utility::Intersect( *this, *(Sphere*)&target );
case Type_plane: return Utility::Intersect( *(Plane*)&target, *this );
// case Type_triangle: return false; // TODO:
case Type_box_axis_aligned: return Utility::Intersect( *(BoxAxisAligned*)&target, *this );