Main Classes and Related Notes
Main Classes of the Library
- CEventHandler, CEventHandlerExt and CBasicAppObjects :
- These classes are the high level user interface classes.
- These classes exist for easier initialization and event handling in the user
application.
- Video Environment classes :
- CVideoEnv :
- This class is the main class that handles video output and user input.
- This class is currently implemented using X Window system (Xlib) only. In the
future, this class might be (re)implemented also using SVGAlib and frame buffer
(although it is unlikely).
- Multiple instance of this class can be created for the current implementation
(Xlib), but may be not with other video systems.
- Each CVideoEnv can be associated with more than than one C3DEnv class.
- CVideoStorage, a helper class that can be used to store and restore the content
(pixmap) of a CVideoEnv class instance.
- All dialog classes (controls), these classes can be used to implement simple GUI.
- Rendering (3D) Environment classes :
- C3DEnv :
- This class is the main class for rendering.
- You can have multiple instance of this class. Each instance must have exactly
one CVideoEnv class associated with.
- Even multiple instances of C3DEnv class have been created, only one of them can
be activated at a time. It is means that the current active environment will be
used for rendering. Call C3DEnv::SetAsTheActiveEnv() to activate an instance of this
class.
- CPanel3DBuffer, CSprite2D, and CCameraControl, they are the main classes for
rendering 3D world.
- Audio environment classes :
- CAudioEnv :
- This class is the main class that handles audio output.
- This class is currently supporting ALSA, OSS and dummy (NULL) audio system.
In the future, this class may also support other audio systems.
- Only exactly one instance of this class can be initialized.
- CMidiPlayer :
- This class is used for playing MIDI files.
- This class is currently supporting playback using libTiMidity and dummy (NULL)
MIDI system.
- Only exactly one instance of this class can be initialized.
- Game management related classes :
- CLuaManager, CLuaExecutionSpace and CLuaExecutable, they are the main classes
for VortexGE extension to Lua (VortexLua).
- CMediaPool, a class that can be used to manage/pool media (audio, image, etc)
resources.
- All game entity classes, these classes are meant to be used to manage game character
such as playable character, non playable character, monsters, worlds, cities, etc.
- Other classes :
- CMessageCatalog, the main classes used for supporting i18n.
- CArchiver and CDeArchiver, these classes can be used to archive and de-archive
files in a directory (without compression support).
- CCliboard, a class that can be used to interact with the system's clipboard.
- CMQServer and CMQCClient, they are the main classes for handling inter process
communication (IPC) in VortexGE
- Exception classes.
Notes when Rendering
- VortexGE uses left-handled coordinate system.
- Panel's vertices must be arranged in clockwise formation in order
to display correctly.
- When using any of the rendering functions, make sure that the
correct instance has been activated.
- Having multiple instance of this class which do rendering at the
same time is not recommended, because it may degrade performance.
High Level Application Control Model
+-------------------+
/--> | Display (Monitor) |
| +-------------------+
|
+--------------------+ |
| UserInput | |
| (keyboard & mouse) | --> CVideoEnv --> CEventHandler
+--------------------+ ^ ^ |
| | |
| | |
| | |
C3DEnv ---------/ | |
^ | |
| | events
| | |
| user's commands |
| | |
user's commands | |
| | |
| | |
************************************ |
* User's Algorithms (C++ Code) * <-------/
************************************
|
|
user's commands
|
| +-----------------+
|---> CAudioEnv --> + Sound (Speaker) |
| ^ +-----------------+
| |
| |
\---> CMidiPlayer
|
If CBasicAppObjects or CBasicApplication
class is used, one will not need to initialize the needed environments by himself, all
environment initializations will be done by the class.
However, he must still control (gives user commands) to the environments by himself.
Low Level Application Control Model
+-------------------+
/--> | Display (Monitor) |
| +-------------------+
|
+--------------------+ |
| UserInput | |
| (keyboard & mouse) | --> CVideoEnv ----------\
+--------------------+ ^ ^ |
| | |
| | |
| | |
C3DEnv ---------/ | |
^ | |
| | events
| | |
| user's commands |
| | |
user's commands | |
| | |
| | |
************************************ |
* User's Algorithms (C++ Code) * <-------/
************************************
|
|
user's commands
|
| +-----------------+
|---> CAudioEnv --> + Sound (Speaker) |
| ^ +-----------------+
| |
| |
\---> CMidiPlayer
|