So I'm making my first serious project.
Namespace structure:
A header:
#ifndef EGG_PHYSICS_WORLD_HPP
#define EGG_PHYSICS_WORLD_HPP
namespace Egg {
namespace Physics {
class Body
{
public:
Body();
const Math::Vector2& GetPosition() const;
/* ... */
};
} // namespace Physics
} // namespace Body
#endif // EGG_PHYSICS_WORLD_HPP
Questions:
Math::Vector2
) name instead of ::Egg::Math::Vector2
in ::Egg::Physics
namespace?Yes, you are overorganizing. If it is application code, I would not use namespace at all, normally. If you move code to reusable library, wrap it to namespace then, but not before. Use class names which make sense without namespace.