API

Auto-generated documentation from Tristeon's source code/comments, combined with manually written samples and explanations.

Core

The few most important core classes are placed right inside the src folder and are very commonly used or referenced across the engine.

TObject

class Tristeon::TObject

TObject is a plain polymorphic class used as a base class for most classes in Tristeon. It's often used to be able to deduce types from void pointers by initially casting to TObject and then dynamically casting to other types.

Subclassed by Tristeon::AudioClip, Tristeon::Serializable, Tristeon::Shader, Tristeon::Texture, TristeonEditor::FileItem

Public Functions

virtual ~TObject() = default

Collector

template<typename T>
class Tristeon::Collector

Collector is a handy tool for collecting classes of a certain type.

Classes looking to be collected should add themselves in the constructor using Collector<T>::add() and remove themselves in the deconstructor Collector<T>::remove(). You may then use Collector<T>::all() to receive all collected objects.

Default engine classes that are actively tracked:

tparam T

The type of object to be collected. The collector creates a separate collection for each type, thus to be able to find collected instances, one needs to use the same type as the type that collects itself.

Public Static Functions

static void add(T *t)

Adds an object to the collector.

static void remove(T *t)

Removes the object from the collector.

static List<T*> all()

Returns a list with all the collected objects.

Usage
If a type of object wants to be collected, it is recommended to do so in its constructor and destructor:
class MyClass
{
public:
   MyClass()
   {
      Collector<MyClass>::add(this);
   }

   ~MyClass()
   {
      Collector<MyClass>::remove(this);
   }

   void doThing()
   {
      //...
   }
};

The collected objects are easily accessed like so:

//The objects can then be accessed through the all function:
auto instances = Collector<MyClass>::all();

for (auto* instance : instances) //and e.g. iterated over
{
   instance->doThing();
}

InstanceCollector

class Tristeon::InstanceCollector

InstanceCollector collects all objects with an InstanceID. It behaves in a very similar way to Collector<T>, except that it only stores InstancedSerializable objects by instanceID and uses the fast lookup of std::map to find them back.

InstancedSerializable automatically adds and removes each instance to the collector.

InstanceCollector is used for application wide reference lookups for things like finding actors, layers, behaviours, etc.

Public Static Functions

static InstancedSerializable *find(const unsigned int &id)

Returns the object with the given ID, usually obtained through json data or through InstancedSerializable::instanceID().

The function is most notably used in scene references, Actor::find() and SerializedInstance::get(), but there are other manual use cases where this function can be particularly convenient.

Since instancedSerializables set their instanceID upon deserialize(), you can not use InstancedSerializable in the deserialization phase of scene loading.

Returns

Returns the InstancedSerializable, or nullptr if no fitting InstancedSerializable exists.

Usage
InstanceCollector is used to find InstancedSerializables back in runtime by their instanceID. This can be used in for example serialization to reference objects like in this camera follow class:
class CameraFollow : public Behaviour, public IStart, public ILateUpdate
{
public:
   nlohmann::json serialize() override
   {
      json j = Behaviour::serialize();
      j["target"] = _target->instanceID(); //Store the target's instanceID in our json data
      return j;
   }

   void deserialize(nlohmann::json j) override
   {
      Behaviour::deserialize(j);
      _targetID = j.value("target", 0u); //Load the target's instanceID
      //InstanceCollector::find usually can't be used in deserialization time because objects might not have been created yet or their instanceID might not have been set yet
   }

   //Start is called when the scene and all of its objects have been fully created
   void start() override
   {
      //Now use the InstanceCollector to find the target back
      _target = InstanceCollector::find(_targetID);
   }

   //LateUpdate is called after all the other update calls, meaning that this Camera behaviour is more likely to get the right target position in case the target moves in update.
   void lateUpdate() override
   {
      //The target might not exist
      if (_target == nullptr)
            return;

      actor()->position = _target->position; //We can now use the target's actual reference for gameplay interactions
   }
private:
   unsigned int _targetID = 0;
   Actor* _target = nullptr;
}

Window

class Tristeon::Window : private Tristeon::Singleton<Window>

Window handles window creation and system input. It also contains useful information about screen and game sizes and screen to world (and back) transformations.

Window is statically accessed but it handles all functionality internally through virtual methods to accommodate for different window types when running either the editor or the non-editor build.

Subclassed by Tristeon::GameWindow

Public Functions

Window() = default
virtual ~Window() = default
DELETE_COPY(Window)
DEFAULT_MOVE(Window)

Public Static Functions

static inline unsigned int width()

The width of the window. This may potentially be different from the world/game size, because in-editor mode the game is represented using a smaller view. For rendering purposes, it is recommended to use Window::gameWidth().

static inline unsigned int height()

The height of the window. This may potentially be different from the world/game size, because in-editor mode the game is represented using a smaller view. For rendering purposes, it is recommended to use Window::gameHeight().

static inline VectorU size()

The size of the window. This may potentially be different from the world/game size, because in-editor mode the game is represented using a smaller view. For rendering purposes, it is recommended to use Window::gameSize().

static inline unsigned int gameWidth()

Returns the width of the game screen. This may not be the width of the entire Window, because in-editor mode the game is represented using a smaller view.

static inline unsigned int gameHeight()

Returns the height of the game screen. This may not be the height of the entire Window, because in-editor mode the game is represented using a smaller view.

static inline VectorU gameSize()

Returns the size of the game screen. This may not be the size of the entire Window, because in-editor mode the game is represented using a smaller view.

static inline Vector screenToWorld(const VectorU &screenPoint, Camera *camera)

Converts a screen point (Like Mouse::position() into world coordinates.

It is possible for this function to extend beyond visible coordinates in editor mode because of the smaller game view.

static inline VectorU worldToScreen(const Vector &worldPoint, Camera *camera)

Converts a world coordinate into a screen point.

static inline void close()

Closes the window and the application.

Before the application closes, the current scene is unloaded and all objects are destroyed.

static inline bool closingDown()

Returns true if the window is about to close.

static inline void setWindowTitle(const String &title)

Sets the window title to the given value.

static inline std::set<VectorU> availableResolutions()

Returns a set of the resolutions available to the current monitor.

static unsigned int numberOfDisplays()

Returns the number of displays available.

static inline unsigned int currentDisplay()

The current display that the Window is on. In fullscreen, this is usually the same as Settings::Graphics::preferredDisplay(), but it may differ if the hardware situation is different from previous runs.

In windowed mode, this function always returns 0 regardless of where the window is.

Engine

class Tristeon::Engine : private Tristeon::Singleton<Engine>

Engine is the core class of Tristeon. It owns engine subsystems such as Renderer, GameView, Physics, etc. It manages the creation and destruction of the engine subsystems. Subsystems may be accessible through their own Singleton instances.

Public Static Functions

static void setPlayMode(const bool &enabled)

Enables or disables the play-mode, this is usually changed by the editor's start/stop buttons but applications may set this variable as well.

static bool playMode()

Gets if the engine is in play-mode or not.

Settings

class Tristeon::Settings

Settings is the main interface for interacting with graphics and physics settings. Upon application startup, settings loads in the project's settings from the settings.tristeon file.

Some settings are easily adjustable and can be changed dynamically, others can only be modified using the project window. For convenience' sake, some of the settings are also available through other class interfaces like for example Grid.

Public Static Functions

static String assetPath()

The path to the asset folder. This folder contains all of the project's assets (images, scenes, etc.).

static String firstSceneName()

The first scene to be loaded in build mode. If the scene can't be found upon load time, an empty scene will be created & loaded (but not saved).

class Graphics

Public Types

enum WindowMode

The window's fullscreen settings and decoration. This only applies to built games (no editor).

Values:

enumerator Windowed

The window has a normal window with borders and open/close/maximize buttons. It can be moved and resized freely.

enumerator Borderless

Just like Windowed, but now without borders or open/close/maximize buttons. The window is always maximized (similar to fullscreen).

enumerator Fullscreen

The window is fullscreen.

Public Static Functions

static unsigned int tileWidth()

The width (size on the x-axis) of a single tile on the grid in pixels.

Tiles are un-rotated squares, defined by tileWidth() and tileHeight().

static unsigned int tileHeight()

The height (size on the y-axis) of a single tile on the grid in pixels.

Tiles are un-rotated squares, defined by tileWidth() and tileHeight().

static VectorU tileSize()

The size of a single tile on the grid in pixels.

static bool vsync()

If vertical sync is enabled.

Vertical sync limits the application's refresh rate to the screen's refresh rate (usually represented in hz). By doing so, you can prevent effects like screen tearing, but you might increase input lag and reduce the frame rate, which might be undesired by the user.

It is usually a good idea to allow users to change this in a settings menu.

static void setVsync(const bool &value)

Enable/disable vsync in the settings and for the runtime window.

Vertical sync limits the application's refresh rate to the screen's refresh rate (usually represented in hz). By doing so, you can prevent effects like screen tearing, but you might increase input lag and reduce the frame rate, which might be undesired by the user.

It is usually a good idea to allow users to change this in a settings menu. Setting this affects the settings and the runtime property.

static WindowMode windowMode()

The current window mode (fullscreen status & decoration).

static void setWindowMode(const WindowMode &value)

Set the window mode in the settings and the runtime window.

This determines the window's fullscreen status & decoration. See the WindowMode enum for more. Setting this affects the settings and the runtime property.

static VectorU preferredResolution()

The resolution that the game will take when loaded in on fullscreen.

If the game is unable to use this resolution it'll attempt to find the most suitable option.

static void setPreferredResolution(const VectorU &value)

Set the preferred resolution. The game will attempt to take this resolution when loaded in on fullscreen. If the game is unable to use this resolution it'll attempt to find the most suitable option.

Setting this affects the settings and the runtime property.

static unsigned int maxFPS()

The maximum number of frames per second. If frames render faster than this, then the update loop waits at the end of the frame until enough time has past. If the value is set to 0, the engine runs as if there were no limit.

static void setMaxFPS(const unsigned int &value)

Set the maximum number of frames per second. If frames render faster than this, then the update loop waits at the end of the frame until enough time has past. If the value is set to 0, the engine runs as if there were no limit.

Setting this affects the settings and the runtime property.

static unsigned int preferredDisplay()

The preferred display to use for borderless and fullscreen applications. The application will attempt to use this display but will default to display 0 if it can't be found.

static void setPreferredDisplay(const unsigned int &display)

Set the preferred display used for borderless and fullscreen applications. Upon loading, the application will attempt to use this monitor but will default to display 0 if it can't be found.

If called in runtime, and the monitor exists, the application will switch to the given display. Whenever the display is changed, Window::availableResolutions updates.

Setting this affects the settings and the runtime property.

class Physics

Public Static Functions

static float fixedDeltaTime()

The time between fixed frames in ms.

Fixed frames call callback functions like fixedUpdate() at this interval, regardless of the application's frame rate. For example, if this value is 20, then there are 1000 / 20 = 50 calls per second. In the event that fixedUpdate() takes longer than its own delta-time, it may skip frames to catch up.

static unsigned int pixelsPerMeter()

The number of pixels per meter. This is used by the physics engine because Box2D uses a meter-based system where Tristeon uses pixel-based sizes. To make up for this, the size of an object is divided by this value. Try to maintain a relatively accurate conversion rate to make for sensible physics interactions because Box2D uses the size in meters for mass calculations.

For example, if an object is 512 pixels tall, and pixelsPerMeter is 256, then the physics engine interprets the object as being 2 meters tall.

Animations

AnimationClip

class Tristeon::AnimationClip : public Tristeon::Serializable

An animation clip describes an animation for an animationsprite as a 2D texture split up into separate frames by dividing the texture into equally sized images using columns and rows.

Unlike Tileset, the AnimationClip doesn't own its texture but stores a filepath to it instead. This is because AnimationSprite is designed to own and load in the texture.

Public Functions

AnimationClip() = default
virtual ~AnimationClip() override = default
DELETE_COPY(AnimationClip)
DEFAULT_MOVE(AnimationClip)
virtual json serialize() override

Serialize interface that is called on derived instance of serializable to obtain json data of objects Each class that implements this function must set json["typeID"] to TRISTEON_TYPENAME(ClassType). Any other variables are optional but required for serialization purposes.

virtual void deserialize(json j) override

Deserialize interface for classes to decide how to use json data to load in data into their class

Public Members

unsigned int cols = 0

The amount of columns the animationclip has. Can otherwise be described as how many frames the animationclip is split up in horizontally.

unsigned int rows = 0

The amount of rows the animationclip has. Can otherwise be described as how many frames the animationclip is split up in vertically.

unsigned int startIndex = 0

The first frame of the animationclip. Sometimes animationclips have more frames in one texture than the ones needed for the animation, so startIndex and endIndex allow you to define where the animation starts and ends.

unsigned int endIndex = 0

The last frame of the animationclip. Sometimes animationclips have more frames in one texture than the ones needed for the animation, so startIndex and endIndex allow you to define where the animation starts and ends.

Spacing spacing

The AnimationClip spacing, in case animation frames have extra space between each other.

bool loops = false

If the animation continuously loops (starts back over once it ends) or not.

If false, the AnimationSprite will freeze on the last frame of this animationclip until a new clip is assigned.

String albedoPath

Path to the color texture.

String normalPath

Path to the normal map texture.

float normalMapStrength = 1.0f

The strength of the normal map. Normals are interpolated between (0, 0, -1) and the value read in the normal map by this value. 0 means that the the normal map will have no effect and 1 means that the normal map takes full effect.

String lightMaskPath

Path to the light mask texture.

float playbackRate = 1

A modifier for the playback rate of the animationclip. This modifier works as a multiplier in where 1 is the default speed and > 1 speeds up and < 1 slows down.

struct Spacing

Describes the spacing around and between animation frames.

Public Members

unsigned int left = 0

The spacing/cutoff in pixels on the left of the texture.

unsigned int right = 0

The spacing/cutoff in pixels on the right of the texture.

unsigned int top = 0

The spacing/cutoff in pixels on the top of the texture.

unsigned int bottom = 0

The spacing/cutoff in pixels on the bottom of the texture.

unsigned int horizontalFrame = 0

The horizontal spacing in pixels between frames.

unsigned int verticalFrame = 0

The vertical spacing in pixels between frames.

AssetManagement

Resources

class Tristeon::Resources

Public Static Functions

template<typename T>
static inline T *jsonLoad(const String &path)

summary>Expects T to contain a constructor that takes a string without having other parameters

template<typename T>
static inline T *assetLoad(const String &path)
template<typename T>
static inline T *load(const String &path)
static inline bool loaded(const String &path)

AssetDatabase

class Tristeon::AssetDatabase

Public Static Functions

static void add(String const &path)
static void remove(String const &path)
static List<String> get(String const &extension)

Gets all assets with the given extension. The extension is expected to be as follows: .extension

static String findByName(String const &name)
static String findByName(String const &name, String const &extension)
static void load()

Domain

class Tristeon::Domain

Public Functions

inline Domain(const String &domain, String (*func)())

Public Static Functions

static inline TypeMap *getMap()

Returns the full register map.

static inline String resolve(const String &path)

MetaFile

class Tristeon::MetaFile : public Tristeon::Serializable

Default meta file when file extension cannot be recognized.

Subclassed by Tristeon::AudioMetaFile, Tristeon::TextureMetaFile

Public Functions

inline virtual Unique<TObject> load()
virtual json serialize() override

Serialize interface that is called on derived instance of serializable to obtain json data of objects Each class that implements this function must set json["typeID"] to TRISTEON_TYPENAME(ClassType). Any other variables are optional but required for serialization purposes.

virtual void deserialize(json j) override

Deserialize interface for classes to decide how to use json data to load in data into their class

Public Members

String filepath
unsigned int GUID

Audio

Audio (class)

class Tristeon::Audio : private Tristeon::Singleton<Audio>

Audio manages the initialization of the Audio API, its only instance is owned and managed by the engine.

Public Functions

Audio()
~Audio()

Public Static Functions

static Handle play(const String &path, const bool &looping = false, const float &volume = 1.0f)

Play the audio file at the given filepath without attenuation. The Audio::Handle return value can be used in other static functions to interact with the temporary audio source.

static Handle play(const String &path, const Vector &position, const float &minimumRange, const float &maximumRange, const bool &looping = false, const float &volume = 1.0f)

Play the audio file at the given filepath with attenuation using the given position and range. The Audio::Handle return value can be used in other static functions to interact with the temporary audio source.

static Handle play(AudioClip *clip, const bool &looping = false, const float &volume = 1.0f)

Play the audio clip without attenuation. The Audio::Handle return value can be used in other static functions to interact with the temporary audio source.

static Handle play(AudioClip *clip, const Vector &position, const float &minimumRange, const float &maximumRange, const bool &looping = false, const float &volume = 1.0f)

Play the audio clip with attenuation using the given position and range. The Audio::Handle return value can be used in other static functions to interact with the temporary audio source.

static bool isPlaying(const Handle &handle)

Returns true if the given audio handle is currently playing.

static void stop(Handle &handle)

Stops the audio handle and deletes the internal audio source. This also sets handle.idx to 0.

static void setPosition(const Handle &handle, const Vector &position)

Sets the position of the given audio handle. This has no effect on audio handles that were played without attenuation.

struct Handle

A handle that holds a reference to a temporary audio source. Can be used in various Audio:: static functions.

Public Functions

inline bool operator==(const Handle &other) const

Public Members

ALuint idx = 0

AudioClip

class Tristeon::AudioClip : public Tristeon::TObject

Represents audio data, either loaded from a file, or user generated.

Public Functions

AudioClip()

Creates an empty audioclip.

~AudioClip()
explicit AudioClip(const String &path)

Load audio files from a given path. You may use this constructor if you only plan on using the audioclip once. If an audioclip is loaded multiple times, Resources::assetLoad is recommended.

explicit AudioClip(void *data, const unsigned int &size, const unsigned int &sampleRate)

Create an audio clip using a given buffer, size and sample rate. You may use this constructor if you wish to load or generate audio data manually.

The constructor doesn't take ownership of the supplied data and destruction still has to be done manually.

AudioListener

class Tristeon::AudioListener : public Tristeon::Behaviour, public Tristeon::Singleton<AudioListener>, public Tristeon::ILateUpdate

The AudioListener is the in-game representation of the user's ear (hence listener). Its position determines the attenuation of audiosources and their stereo representation.

Public Functions

virtual json serialize() override

Serialize interface that is called on derived instance of serializable to obtain json data of objects Each class that implements this function must set json["typeID"] to TRISTEON_TYPENAME(ClassType). Any other variables are optional but required for serialization purposes.

virtual void deserialize(json j) override

Deserialize interface for classes to decide how to use json data to load in data into their class

virtual void lateUpdate() override

lateUpdate is called once every frame, after all the other update calls.

AudioSource

class Tristeon::AudioSource : public Tristeon::Behaviour, public Tristeon::IInit, public Tristeon::ILateUpdate

AudioSource represents the physical source of a sound effect or song in-game. Audio in Tristeon uses linear attenuation to determine its volume/falloff over distance from the AudioListener. The attenuation behaviour can be tweaked through the AudioSource's fields.

Public Functions

AudioSource()
virtual ~AudioSource()
virtual json serialize() override

Serialize interface that is called on derived instance of serializable to obtain json data of objects Each class that implements this function must set json["typeID"] to TRISTEON_TYPENAME(ClassType). Any other variables are optional but required for serialization purposes.

virtual void deserialize(json j) override

Deserialize interface for classes to decide how to use json data to load in data into their class

void play()

Start playing the attached clip. If no clip is attached, nothing happens.

void pause()

Stops playing the attached clip but maintains the current audio time. When play is called again, the clip will resume where it left off.

void stop()

Stop playing the attached clip. If no clip is attached, or the source isn't playing, nothing happens.

inline float pitch() const

The pitch of a sound is how high or low the sound is. A high sound has a high pitch and a low sound has a low pitch. This value is clamped between 0.5 and 2.0

inline void setPitch(const float &p)

Set the pitch. The pitch of a sound is how high or low the sound is. A high sound has a high pitch and a low sound has a low pitch. This value is clamped between 0.5 and 2.0

inline float volume() const

The volume/gain or loudness of the audio source.

A value of 1.0 means unadjusted. Each division by 2 equals a reduction of about 6dB. Each multiplication by 2 equals an amplification of about 6dB. A value of 0.0 means the sound is entirely silent.

inline void setVolume(const float &v)

Set the volume/gain or loudness of the audio source.

A value of 1.0 means unadjusted. Each division by 2 equals a reduction of about 6dB. Each multiplication by 2 equals an amplification of about 6dB. A value of 0.0 means the sound is entirely silent.

inline float minimumRange() const

The minimum range is the distance from the center of the audio source at which the sound is still hearable at full volume.

inline void setMinimumRange(const float &r)

Set the minimum range. The minimum range is the distance from the center of the audio source at which the sound is still hearable at full volume.

inline float maximumRange() const

The maximum range is the distance from the center of the audio source at which the sound's volume reaches 0.

inline void setMaximumRange(const float &r)

Set the maximum range. The maximum range is the distance from the center of the audio source at which the sound's volume reaches 0.

inline float minimumVolume() const

The minimum volume prevents the volume from going lower than the set value, even when the listener is outside of the maximum range.

inline void setMinimumVolume(const float &mv)

Set the minimum volume. The minimum volume prevents the volume from going lower than the set value, even when the listener is outside of the maximum range.

inline bool looping() const

If true, the audio clip loops back to the start when its done and continues playing indefinitely.

inline void setLooping(const bool &l)

Set if the audio source is looping or not. If true, the audio clip loops back to the start when its done and continues playing indefinitely.

inline AudioClip *clip() const

The source's audio clip. This is the audio data that is being played from this source.

inline void setClip(AudioClip *clip)

Set the source's audio clip to the given clip. If the clip is null, the current clip is cleared and audio stops playing.

virtual void init() override

Used to implement playOnInit.

virtual void lateUpdate() override

Used to update the audio source's position.

Callbacks

ICallback

template<typename T>
class ICallback

ICallback is a base class for callback classes and simply adds/removes callback instances to collectors, enabling highly efficient callbacks, reducing realtime iteration cost.

IInit

class Tristeon::IInit : private Tristeon::ICallback<IInit>

Inherit from this class to receive an init callback.

Init is called at 2 potential moments:

  • Once a scene is fully loaded

  • When a new actor or behaviour is added to the scene / existing actor. Either way, Init is called when every object in the Scene exists and has been deserialized.

Any class can inherit from IInit to receive an init callback after the scene is initialized, however the 2nd potential moment is reserved to Actors or Behaviours.

Subclassed by Tristeon::AudioSource, Tristeon::Collider, Tristeon::PhysicsBody, Tristeon::TestBehaviour

Public Functions

virtual void init() = 0

Init is called at 2 potential moments:

  • Once a scene is fully loaded (any object may receive this callback)

  • When a new actor or behaviour is added to the scene / existing actor (only actors or behaviours can receive this callback).

IEarlyUpdate

class Tristeon::IEarlyUpdate : private Tristeon::ICallback<IEarlyUpdate>

Inherit from this class to receive earlyUpdate callbacks. earlyUpdate is called once every frame, before all update calls.

The inherited class does NOT have to be an actor or behaviour, any class will work.

Public Functions

virtual void earlyUpdate() = 0

earlyUpdate is called once every frame, before all other update calls.

IUpdate

class Tristeon::IUpdate : private Tristeon::ICallback<IUpdate>

Inherit from this class to receive update callbacks. Update is called once every frame.

The inherited class does NOT have to be an actor or behaviour, any class will work.

Subclassed by Tristeon::AnimationSprite, Tristeon::MouseFollowBehaviour, Tristeon::TestBehaviour

Public Functions

virtual void update() = 0

update is called every frame.

ILateUpdate

class Tristeon::ILateUpdate : private Tristeon::ICallback<ILateUpdate>

Inherit from this class to receive lateUpdate callbacks. lateUpdate is called once every frame, after all update calls.

The inherited class does NOT have to be an actor or behaviour, any class will work.

Subclassed by Tristeon::AudioListener, Tristeon::AudioSource, Tristeon::Collider

Public Functions

virtual void lateUpdate() = 0

lateUpdate is called once every frame, after all the other update calls.

IFixedUpdate

class Tristeon::IFixedUpdate : private Tristeon::ICallback<IFixedUpdate>

Inherit from this class to receive fixedUpdate callbacks. fixedUpdate is called a fixed amount of times a second, defined by the physics settings.

The inherited class does NOT have to be an actor or behaviour, any class will work.

Subclassed by Tristeon::PhysicsBody

Public Functions

virtual void fixedUpdate() = 0

fixedUpdate is called a fixed amount of times per second, defined by the physics settings.

IPreDestroy

class Tristeon::IPreDestroy : private Tristeon::ICallback<IPreDestroy>

Inherit from this class to receive a callback before the object is destroyed. This callback is only called on Actors and Behaviours.

Subclassed by Tristeon::Collider, Tristeon::PhysicsBody

Public Functions

virtual void preDestroy() = 0

preDestroy() is called on actors and behaviours when they're about to be destroyed.

The actor and its behaviours will still be entirely valid at this point, although references to other actors may not be.

IDrawGizmos

class Tristeon::IDrawGizmos : private Tristeon::ICallback<IDrawGizmos>

Inherit from this class to receive draw gizmo callbacks. Draw gizmos is called once per frame, gizmos are rendered at the end of the frame and cleared after.

The inherited class does NOT have to be an actor or behaviour, any class will work.

Subclassed by Tristeon::BoxCollider, Tristeon::Camera, Tristeon::CircleCollider, Tristeon::PointLight

Public Functions

virtual void drawGizmos() = 0

Draw gizmos is called once per frame, gizmos are rendered at the end of the frame and cleared after.

Use the Gizmos class in this function.

ISceneLoaded

class Tristeon::ISceneLoaded : private Tristeon::ICallback<ISceneLoaded>

Public Functions

virtual void sceneLoaded(Scene *scene) = 0

Editor

Placeholder

Environment

Placeholder 2

Game

Placeholder 3

Input

Placeholder 4

Math

Math (class)

Vector

Physics

Placeholder 6

Rendering

Render classes

Graphic

Sprite

Lighting

AmbientLight

Scenes

Scene classes

Scene

SceneManager

Actors

Actor

Behaviour

Serialization

Serialization classes

Serializable

JsonSerializer

TypeRegister

InstancedSerializable

MetaWrappers

Standard

Placeholder 10

Utils

Placeholder 11