Finding a node that an object collided with?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

material stuff

Post by schick »

Ok, here we go.

interface (what every users sees):

Code: Select all


enum EMaterialGroup
{
EMaterialDefault,
EMaterialWood
// etc
};

// in  the collisionmanager
public:
irr::s32 ICollisionManager::getMaterialGroup( EMaterialGroup _group = EMaterialDefault);

design (behind the scene):

Code: Select all


// some header file

class SMaterialDefault // singleton
{
  public:
    SMaterial* getInstance()
    {
       createGroup();
    };  
  
    void initMaterial()
    {
       // dependencies to other groups
       setup();
    } 

}

// in the scenemanager
protected:

  void initMaterials()
  {
   // first create all material
   DefaultMaterial::getInstance()
   ...
   // second step setup materials
   DefaultMaterial::setupMaterial();
  }

1. The user will never see the Materials classes only uses them.
2. There will be some docu how to add new materials, ill try to make many of them so there wont be much to add.
3. If the user (programmer) adds a Material every Material needs to be touched (else default behaviour) ,a enum-value added, initMaterials() and getMaterialGroup() changed (lots of work).
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

update!

Post by schick »

Ok, the core design should be ready by now! :-), you can have a look at the docu for any further information.

http://www.bluffel.de.vu/docu

The materials thingy was solved the hard way (maybe ill change that if i want to :-)). I should also read a *** tutorial how to reduce compile dependencies.

The next step will add some more CollisionSceneNodes, Materials and finally a Player and a PlayerCamera node.

Download the source at:

http://www.bluffel.de.vu/files

If someone has suggestions or improvements, tell me at Friedrich.Schick@web.de
Kelo
Posts: 15
Joined: Tue Jan 06, 2004 2:57 pm
Location: Argentina

The Links??

Post by Kelo »

Really nice but... i can't get the files... all the links in your posts are broken, they are not a link named "www.bluffel.de.vu/files" , it dosn't exist.

Please, fix that, beacose i really like to use your code

:)
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

Sorry, but the source is in heavy development atm and i won't publish it until the first stable (some features) version is out. Furthermore i am having my exams this week (german = abitur) so there won't be much spare time. I hope to finish that project in the next 2 weeks (with some tutorials). I promise the waiting will be recompenced.
Please send me an e-mail instead of a private message.
Kelo
Posts: 15
Joined: Tue Jan 06, 2004 2:57 pm
Location: Argentina

Thanks

Post by Kelo »

OK thanks... i'll waiting for really cool code. :)
Kelo
Posts: 15
Joined: Tue Jan 06, 2004 2:57 pm
Location: Argentina

Post by Kelo »

I mean, YOUR really cool code :wink:
Post Reply