User Tools

Site Tools


Engine Subsystem

Subsystems, along side the player object and the AnnOgreVRRenderer Object, are the core components of Annwvyn Engine.

A subsystem is an object responsible for actually running the simulation. the main engine class AnnEngine will instantiate at construct time all core subsystems after successfully getting a valid VRRender object running.

The engine user has the possibility to add it's own subsystems. They will receive per frame “update” call after all the core subsystems have been dealt with. This system is intended for you to cleanly add per-application engine features, like networking, or special peripheral supports.

User defined subsystem even have the possibility to dispatch events through the AnnEventManager

If you're interested for this, see AnnUserSpaceSubsystem

The defaults SubSystems of Annwvyn are :

All subsystems derive from the AnnSubsystem class. They must implement a constructor that will call the parent one, taking at least a std::string with their name identifier. They must also implement the following methods :

    virtual void update();
    virtual bool needUpdate();

The needUpdate method returns a boolean stating if the update() method of the subsystem needs to be called the next frame.

Before rendering each frames, AnnEngine will do a pass on the subsystem list. If a subsystem request to be updated (subsystem→needUpdate() returns `true`), the update method of the system will be called.

Some subystems needs to be always updated (the ones that manage physics or sound for example), some probably don't need to be updated at each frames (the debug console only needs to be redrawn if the debug log has new text on it) and other doesn't need to be “updated” per se. (the filesystem manager will perform disk I/O on it's own and cache data on the fly without the need of an update call)

subsystem.txt · Last modified: 2017/08/29 15:15 by ybalrid