Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches

Classes

struct  ToyMaker::CameraProperties
 Struct that encapsulates properties which define the (geometric) aspects of a scene camera. More...
 
class  ToyMaker::BaseComponentArray
 An abstract base class for all ECS component arrays. More...
 
struct  ToyMaker::ComponentFromJSON< TComponent, Enable >
 A struct that describes how a JSON component description is turned into a component. More...
 
struct  ToyMaker::ComponentFromJSON< std::shared_ptr< TComponent >, Enable >
 A specialization of ComponentFromJSON that applies to components that are stored as shared pointers to components (as opposed to a value of the component type itself) More...
 
class  ToyMaker::Interpolator< T >
 A template class for interpolating components between simulation frames for various purposes. More...
 
class  ToyMaker::ComponentArray< TComponent >
 A class that implements BaseComponentArray specializing it for a component of type TComponent. More...
 
class  ToyMaker::ComponentManager
 An object that stores and manages updates to all the component arrays instantiated for this ECS World. More...
 
struct  ToyMaker::ComponentFromJSON< std::shared_ptr< TResource >, typename std::enable_if< std::is_base_of< IResource, TResource >::value >::type >
 Allows a shared pointer to a resource to be constructed as a component for an entity when loading a scene. More...
 
struct  ToyMaker::LightEmissionData
 A struct, used as a component, describing the emissive properties of the light it represents per the Blinn-Phong shading model. More...
 
class  ToyMaker::StaticModel
 This engine's representation of a single unrigged 3D model. More...
 
struct  ToyMaker::Placement
 A component representing the position, rotation, and scale of an entity. More...
 
struct  ToyMaker::Transform
 The transform component, which moves the vertices of a model to their world space coordinates during rendering. More...
 
struct  ToyMaker::SceneHierarchyData
 Component representing hierarchical information related to this entity. More...
 
struct  ToyMaker::SimCore
 The component associated with the SimSystem. More...
 
struct  ToyMaker::ColorBufferDefinition
 A struct containing the definition of a color buffer, using which similar color buffers can be created. More...
 

Typedefs

using ToyMaker::ComponentType = ECSType
 An unsigned integer representing the type of a component.
 
using ToyMaker::Signature = std::bitset<kMaxComponents>
 A 255 bit number, where each enabled bit represents a relationship between an entity and some ECS related object.
 

Functions

ToyMaker::Interpolator< T >::operator() (const T &previousState, const T &nextState, float simulationProgress=1.f) const
 Returns an interpolated value for a component between two given states.
 

Variables

constexpr ComponentType ToyMaker::kMaxComponents { kMaxECSTypes }
 A constant that restricts the number of definable components in a project.
 

Detailed Description

Typedef Documentation

◆ ComponentType

An unsigned integer representing the type of a component.

Each type of component is mapped to one such number, and the same number doubles as an index into the entity's signature.

See also
Signature

◆ Signature

using ToyMaker::Signature = std::bitset<kMaxComponents>

A 255 bit number, where each enabled bit represents a relationship between an entity and some ECS related object.

Some of its uses are described here:

  • as a representation of the set of all components that compose an entity
  • as a representation of the set of all systems the entity is eligible for
  • as a representation of the set of all systems the entity is enabled for
See also
ComponentType
SystemType

Function Documentation

◆ operator()()

template<typename T>
T ToyMaker::Interpolator< T >::operator() ( const T & previousState,
const T & nextState,
float simulationProgress = 1.f ) const

Returns an interpolated value for a component between two given states.

Step interpolation implementation, compatible with most types.

Parameters
previousStateThe old value a component had, from the previous simulation tick
nextStateThe new value which will take effect at the next simulation tick
simulationProgressProgress towards the next simulation tick in the current moment, where 0 is the start and 1 is the end.
Returns
T An interpolated value

Variable Documentation

◆ kMaxComponents

ComponentType ToyMaker::kMaxComponents { kMaxECSTypes }
constexpr

A constant that restricts the number of definable components in a project.

See also
kMaxECSTypes