Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga Namespace Reference

Namespaces

namespace  anonymous_namespace{boundingBox.cpp}
 
namespace  AudioEngine
 This contains a collection of methods that interfaces with the FMOD studio API to play audio.
 
namespace  Geometry
 
namespace  Math
 
namespace  Physics
 
namespace  Systems
 
namespace  Theme_Nostalgic
 

Classes

class  App
 Manages several GameWorld. Responsible for assembling them and passing along Staged events as well as user input events. More...
 
struct  AudioEmitter
 Component for emitting sound events. More...
 
struct  AudioImplementation
 Stores data for implementing the Audio Engine. This includes various maps to fmod events and banks, as well as a reference to FMOD_STUDIO_SYSTEM. More...
 
struct  BoundingBox
 Represents a bounding box. More...
 
class  BoundingVolumeHierarchy
 A tree of bounding volumes, with leaf nodes containing a collection of triangles. Useful as a space-accelerant structure to speed up collision detection. More...
 
class  Callback
 A wrapper around a shared_ptr to a function. More...
 
struct  Camera
 Wrapper around the GraphicsEngine camera. More...
 
struct  Collider
 A boolean flag to tell if an Entity has a Collider. More...
 
struct  CollisionSystemData
 Manages data that the collision system uses. This lives in runtime on an empty entity. More...
 
class  ComponentContainer
 Container for a specific Component type. More...
 
class  ComponentGroup
 Effectively a list of tuples each entry containing an Entity and ComponentReference to each of the component type in the group. These Entity must have the specified components, or else there will be unexpected behaviour. When an Entity no longer has all the required components, it must be removed from the Group. More...
 
class  ComponentReference
 Reference to a component. Will be valid as long as that component exists on a specific Entity, even if their pointer address has changed. More...
 
class  Core
 A wrapper around App that separates it from Window, the script running the game loop. This receives user events and pass them along to App. More...
 
struct  CylinderCollider
 Model an axis-aligned cylinder collider. More...
 
struct  EllipsoidCollider
 Model an axis-aligned ellipsoid. More...
 
class  EventMap
 A mapping between events (which are ints under the hood) and callbacks. More...
 
class  GameWorld
 Maintains a game world, where Entity, Component, Systems, and MetaSystems can be added, and events such as Startup, Update, FixedUpdate, and Draw can be invoked. More...
 
class  ICallback
 Generic callback used for events. More...
 
class  IComponentContainer
 Generic container of components. More...
 
class  IComponentGroup
 Generic group of components. More...
 
class  InvokableSystemManager
 A SystemManager where stages and events can be invoked. More...
 
struct  Light
 Model a light. Wrapper around GraphicsEngine's light. Currently only support Point and Directional Lights. More...
 
struct  Material
 Wrapper around the GraphisEngine's material. More...
 
struct  Mesh
 A wrapper around a shared_ptr to a GraphicsEngine's shape. More...
 
struct  MeshCollider
 Model a mesh containing a list of triangles. More...
 
class  NavMesh
 
struct  RigidBody
 Entities with a RigidBody will be moved by the engine in FixedUpdate, and will respond to collisions. More...
 
class  SystemManager
 Manages Systems in the ECS model. Allows for System to be added, but not invoked. More...
 
struct  Transform
 A wrapper around a shared pointer to a ModelTransform. This tells object where to position themselves in a 3D scene. More...
 
class  TypeMap
 Map that has Types as key. More...
 
class  UniformGrid
 Models a uniform grid in 3D space, with the ability to insert and inspect certain cells in the grid. These cells contains a collection of objects. More...
 

Typedefs

using AudioEventInstance = FMOD_STUDIO_EVENTINSTANCE *
 An audio instance equivalent to an instance of a sound. Can be start and stop. For correct 3D positioning of an instance, make sure to update the 3D position every frame.
 
using attr = GraphicsEngine::VAOAttrib
 
using entity_type = std::uint32_t
 
using Signature = std::bitset< MAX_COMPONENTS >
 Used for determining if an object has a certain component type. Signature [i] is true if it does, and false otherwise.
 
template<typename ... DataType>
using System = std::function< void(std::shared_ptr< GameWorld >, DataType...)>
 System is a function that accepts a shared_ptr to a GameWorld, as well as extra variables.
 

Enumerations

enum  LogLevel {
  FATAL = 0 , ERROR = 1 , WARN = 2 , INFO = 3 ,
  DEBUG = 4 , TRACE = 5
}
 Define multiple levels of logging. Fatal and Error are always enabled, and debug and traced are left out of any build with SAGA_RELEASE defined. More...
 
enum class  EngineEvents { OnCollision = 1000 }
 Define specific engine events. These events start at the value ENGINE_EVENT_START_VALUE. More...
 

Functions

void reportAssertionFailed (const char *expression, const char *message, const char *file, int line,...)
 Output a message signaling that an assertion has failed. This message is of the form: Assertion Failure: #expression, message: message, in file: file, line: line
 
bool initializeLogger ()
 Initialize the logger. Neccessary to call before any logging.
 
void shutDownLogger ()
 Shut down the logger, and flush any buffered output.
 
void logOutput (LogLevel level, const char *message,...)
 Log an output.
 

Variables

const int MAX_COMPONENTS = 256
 Upper bound on number of components. This can be as high as needed, but will linearly increase the speed of ComponentGroup lookups.
 
const int ENGINE_EVENT_START_VALUE = 10000
 

Typedef Documentation

◆ attr

using Saga::attr = typedef GraphicsEngine::VAOAttrib

◆ entity_type

using Saga::entity_type = typedef std::uint32_t

◆ Signature

using Saga::Signature = typedef std::bitset<MAX_COMPONENTS>

Used for determining if an object has a certain component type. Signature [i] is true if it does, and false otherwise.

◆ System

template<typename ... DataType>
using Saga::System = typedef std::function<void(std::shared_ptr<GameWorld>, DataType...)>

System is a function that accepts a shared_ptr to a GameWorld, as well as extra variables.

Template Parameters
DataTypethe types of extra variables that a system accept

Enumeration Type Documentation

◆ EngineEvents

enum class Saga::EngineEvents
strong

Define specific engine events. These events start at the value ENGINE_EVENT_START_VALUE.

See also
ENGINE_EVENT_START_VALUE.
Enumerator
OnCollision 

◆ LogLevel

Define multiple levels of logging. Fatal and Error are always enabled, and debug and traced are left out of any build with SAGA_RELEASE defined.

Enumerator
FATAL 

Reserved for anything that would cause the core engine to crash. This should force a shutdown to prevent any data corruption or loss. Assertions raise this type of log level.

ERROR 

Reserved for anything that will cause the application to crash, or create undefined behaviour. (null references, etc).

WARN 

Anything that can cause oddities with the application's execution. This might or might not result in an error.

INFO 

Generally useful information to log, like successful initialization or completion of significant tasks.

DEBUG 

Fine-grained information events that is useful to debug the application.

TRACE 

Finer-grained information, typically targetted towards one part of the application.

Function Documentation

◆ initializeLogger()

bool Saga::initializeLogger ( )

Initialize the logger. Neccessary to call before any logging.

Returns
true
false

◆ logOutput()

void Saga::logOutput ( LogLevel  level,
const char *  message,
  ... 
)

Log an output.

Parameters
levellevel of the output.
See also
LogLevel
Parameters
messagemessage of the output, as a formatted string similar to printf.
...any arguments to the formatted string.

◆ reportAssertionFailed()

void Saga::reportAssertionFailed ( const char *  expression,
const char *  message,
const char *  file,
int  line,
  ... 
)

Output a message signaling that an assertion has failed. This message is of the form: Assertion Failure: #expression, message: message, in file: file, line: line

Parameters
expressiona string representation of the expression that failed the assertion.
messagethe message to describe the assertion failure.
filethe file the error happened in.
linethe line number the error happened in.
Here is the call graph for this function:

◆ shutDownLogger()

void Saga::shutDownLogger ( )

Shut down the logger, and flush any buffered output.

Variable Documentation

◆ ENGINE_EVENT_START_VALUE

const int Saga::ENGINE_EVENT_START_VALUE = 10000

◆ MAX_COMPONENTS

const int Saga::MAX_COMPONENTS = 256

Upper bound on number of components. This can be as high as needed, but will linearly increase the speed of ComponentGroup lookups.