C++ API
The C++ headers for ApertusVR are located in ApertusVR/common/include/ folder.
C++ Plugin interface
A C++ Plugin has to implement the IPlugin interface:
class IPlugin
{
public:
virtual void Init() = 0;
virtual void Run() = 0;
virtual void Step() = 0;
virtual void Stop() = 0;
virtual void Suspend() = 0;
virtual void Restart() = 0;
};Constructor
The constructor takes care of member initializations.
Ape::ApeTesterPlugin::ApeTesterPlugin()
{
mpSceneManager = Ape::ISceneManager::getSingletonPtr();
mpEventManager = Ape::IEventManager::getSingletonPtr();
mpEventManager->connectEvent(Ape::Event::Group::NODE, std::bind(&ApeTesterPlugin::eventCallBack, this, std::placeholders::_1));
mInterpolators = std::vector<std::unique_ptr<Ape::Interpolator>>();
mDemoObjectNode = Ape::NodeWeakPtr();
}Init
This method is for initializing geometries, nodes, etc. for your plugin. The following example uses Init() to create lights and the skybox:
Run
The Run() method can be used to implement loops until the Stop of the plugin. It is the place where animations, and other interactions can be used.
Last updated