About engine

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
phlith

About engine

Post by phlith »

Can someone tell me why there is for example, IGUIWindow.h, CGUIWindow.cpp, and CGUIWindow.h. What do the files starting with I do? If CGUIWindow defines the class that CGUIWindow.cpp needs, why is IGUIWindow present? Does the I stand for something?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

It stands for 'Interface'. For using Irrlicht, you don't need to know about the files starting with C, it is enough using only the ones with I.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

To further enlighten you, Interfaces help make a clean interface into the library. None of the I classes are actual classes, they are all abstract base classes. You will notice you can never make an instance of one-- your compiler will complain. You can only use pointers to them.

The C classes all inherit from an I class, and when you 'addCamera' or the like, it creates an instance of a C class. The important thing, as Niko said, is that as a user of the library, you dont need to know about the C classes. You can just pretend all you have is the simple I class interface.

This makes it easy to define what part of the engine the user can touch, limiting them from messing themselves up.
a screen cap is worth 0x100000 DWORDS
Post Reply