Vortex Studio SDK Introduction
Vortex® Studio SDK is designed to simulate content created inside the Vortex Studio Editor. It can either run stand-alone or integrate within your existing framework.
Topics
Summary
The Vortex SDK exposes the following features.C++ SDK
Python Scripting
Vortex Architecture
Vortex Toolkit is based on the separation between content and application patterns. The application is fixed for a particular simulator, but it can load different content. As a rule of thumb, the application is created by developers and integrators, while content is created by mechanical engineers and level designers.
Content Representation
Content can be created and accessed through the Vortex SDK. All objects and extensions derive from IExtension and other specific interfaces, e.g., IDynamics for dynamics objects, IGraphic for graphics objects.
The scene is the root of the content; it is a container for mechanisms. The scene can have one or more extensions, and can consist of, for example, a digging area with vehicles.
Vortex Content Model |
A mechanism is defined by Mechanism and is the main dynamics object with Vortex. It is the representation of such real-life objects as shovel bodies and shovel buckets. It is made up of assemblies, which are an amalgamation of parts, and constraints. Each mechanism can have one or more extensions.
Extensions are additional functionalities attached to a mechanism or scene. They extend the functionalities of their parents.
Relation Between Content and Application
Now that you understand the components that make up the content model and the application model, you can see how they interact with each other and their relationships.
The content model is comprised of the scene and one or more mechanisms, along with the scene's and the mechanism's extensions. VxApplication and the modules are designed for consuming each of the extension types.
Content and Application Models |
Vortex Runtime Model
Application Object
The application (class VxApplication) is the central object that makes the simulation run. That is, it is the interface for the different executables connecting with Vortex.
The application contains simulator modules (class ISimulatorModule). At each application update, all modules are updated. Each module powers one aspect of the simulation, e.g., dynamics, graphics, sound, device.
A simulator usually has a fairly fixed set of modules, and they are generally closely related to the hardware.
The application also has extensions that are specific for a particular application, e.g., network, user interface, special graphic display.
An application without content is running empty; content is what populates the simulated world. The main objects in the content are the scene (class VxContent::Scene) and the mechanism (class VxDynamics::Mechanism). Both objects are containers for other objects, and their purpose is defined by the extensions they contain.
Modules and Extensions
The extension/module pattern is a consequence of the separation between application and content. An extension's job is related to a specific aspect of the simulation, e.g., dynamics, graphics, user interface, specific hardware, 3rd party SDK.
Each aspect is managed by a module, and implemented with an instance of ISimulatorModule. When content extensions are put in the application, each ISimulatorModule receives each IExtension and checks whether it should manage it.
For example, the graphics module interfaces with the graphics engine. It takes the information it receives from the IGraphic extensions in the content and sends it to the graphics driver for rendering at runtime.
Note An extension requires a module to be active in the simulation; it is called 'managed'. If you are creating a new basic interface for a new feature, you need to create an ISimulatorModule that manages the extensions that will manage those interfaces.
Modern C++
Vortex follows several principles and features of modern C++ and is using C++ 11 as much as possible on the supported platforms.
- First class objects support smart pointers.
nullptr
usage is encouraged.- Vortex containers follow standard library iterators.
- Standard library is used as much as possible.
Tutorials
See C++ Tutorials and Python Tutorials.