Page 3 of 3

material stuff

Posted: Thu Apr 01, 2004 10:15 am
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).

update!

Posted: Thu Apr 01, 2004 2:20 pm
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

The Links??

Posted: Sat Apr 17, 2004 9:14 pm
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

:)

Posted: Sat Apr 17, 2004 10:11 pm
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.

Thanks

Posted: Sun Apr 18, 2004 5:13 am
by Kelo
OK thanks... i'll waiting for really cool code. :)

Posted: Sun Apr 18, 2004 5:15 am
by Kelo
I mean, YOUR really cool code :wink: