A quick (I hope!) question regarding a player class for a game:
I want to define a player as a collection of related data eg. a mesh, player name details etc.
I would also use this class to refer to a particular onscreen model eg to change its animation .
class Player
{
public:
Player(string pName);
~Player();
string getName();
bool setName(string pName);
bool setAnimatedMeshSceneNode(scene::IAnimatedMeshSceneNode* playerMesh);
scene::IAnimatedMeshSceneNode* ptrPlayerNode;
private:
string name;
scene::IBillboardSceneNode* myBillBoardNode;
};
AS you can see, I have placed a pointer to the animatedmeshscenenode in the public section, as there seemed to be a lot of accessor functions needed if it were placed in the private section. However, I am into my Object Oriented Principles(

Many thanks
Gezmo