You surely should implement some kind of surface type. Think of it, how will you manage if you can climb up a ladder if you can't know if your character just collided a wall or a ladder? You could simply use OOP to manage a type hierarchy using heritage, but I would suggest you to use "categories" implemented using an enumerated type:
Here is the idea: A "Collisions" enumeration has a flag for each category. For example:
namespace Collisions
{
enum Type
{
None = 0,
Floor = 1 << 0,
Ladder = 1 << 1,
Enemy = 1 << 2,
... // And whatever else you need.
// Then, you can construct named groups of flags.
Player = Floor | Ladder | Enemy
};
}
With this method, you will be able to test if the player juste collided anything that you should manage, so your engine can call a "Collided" Method of the entity :
void Player::Collided( Collisions::Type group )
{
if ( group & Collisions::Ladder )
{
// Manage Ladder Collision
}
if ( group & Collisions::Floor )
{
// Manage Floor Collision
}
if ( group & Collisions::Enemy )
{
// Manage Enemy Collision
}
}
The method use bitwise flags and the bitwise "Or" operator to assure each group have a different value, based on category's binary value. This method works fine and is easily scalable so you can create customs collision groups. Each Entity (Player, Enemy, etc.) in your game has some bits called a "filter", which are used to determine what it can collide with. Your collision code should check to see if bits match and react accordingly, with some code that might look like:
void PhysicEngine::OnCollision(...)
{
mPhysics.AddContact( body1, body1.GetFilter(), body2, body2.GetFilter() );
}