|
ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
|
Namespace containing all class definitions and functions related to the ToyMaker engine. More...
Classes | |
| class | ActionContext |
| A container for actions that make sense within a given context. More... | |
| union | ActionData |
| A union that may contain any one of SimpleActionData, OneAxisActionData, TwoAxisActionData, ThreeAxisActionData. More... | |
| struct | ActionDefinition |
| The definition of a single action, including whether it represents state or change, whether it supports negative values, and the number of axes it has. More... | |
| class | ActionDispatch |
| An object responsible for tracking action listeners for a given project. More... | |
| class | AdditionRenderStage |
| Stage responsible for combining multiple textures together. More... | |
| class | Application |
| Class that handles setup for the rest of the engine and application. More... | |
| struct | AreaCircle |
| A set of numbers representing a single circle situated somewhere in the world. More... | |
| struct | AreaTriangle |
| A set of 3 points located in the world forming a (hopefully sensible) triangle. More... | |
| class | AxisAlignedBounds |
| An object containing a coarse simplified representation, AABB, of spatially queryable objects. More... | |
| class | BaseComponentArray |
| An abstract base class for all ECS component arrays. More... | |
| class | BaseConstraint |
| Base class for constraints. More... | |
| class | BaseInstanceAllocator |
| Class that is responsible for taking an instance layout and correctly uploading it to the GPU. More... | |
| class | BaseOffscreenRenderStage |
| Base class for render stages which render to an offscreen buffer. More... | |
| class | BaseRenderStage |
| Represents a single render stage or a render step that applies to the default (window) framebuffer. More... | |
| class | BaseSceneNode |
| A CRTP template for all the scene node types present in the project. More... | |
| class | BaseSimObjectAspect |
| The base class for all aspects, providing an interface to its attached SimObject, and consequently, the engine's SceneSystem. More... | |
| class | BaseSystem |
| The base class that acts as the interface between the engine's ECS system and a particular built-in or user-defined System. More... | |
| class | BlurRenderStage |
| Multipurpose render stage which at present is used to compute a simple bloom effect from a scene's "brightCutoff" texture. More... | |
| class | BuiltinModelMatrixAllocator |
| An instance allocator initialized with the built in model matrix layout object. More... | |
| struct | BuiltinVertexData |
| The vertex data used by all this engine's in-built shader program's vertex shaders. More... | |
| struct | CameraProperties |
| Struct that encapsulates properties which define the (geometric) aspects of a scene camera. More... | |
| class | CameraSystem |
| System responsible for managing all active cameras belonging to this world, tracking and updating associated projection and view matrices. More... | |
| struct | Collision |
| Data representing everything about a collision. More... | |
| class | CollisionPair |
| Names two distinct entities participating in a collision, with their entity IDs sorted in ascending order. More... | |
| struct | ColorBufferDefinition |
| A struct containing the definition of a color buffer, using which similar color buffers can be created. More... | |
| struct | CommonActionData |
| A struct containing meta-info that will be present for all types of actions. More... | |
| class | ComponentArray |
| A class that implements BaseComponentArray specializing it for a component of type TComponent. More... | |
| struct | ComponentFromJSON |
| A struct that describes how a JSON component description is turned into a component. More... | |
| struct | 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... | |
| struct | 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... | |
| class | ComponentManager |
| An object that stores and manages updates to all the component arrays instantiated for this ECS World. More... | |
| class | Constraint |
| Any constraint storing LagrangeCount correction multipliers. More... | |
| struct | Constraint1DOFConfig |
| A collection of values defining an orientation or position constraint for a single degree of freedom. More... | |
| struct | Constraint1DOFParam |
| Parameters defining a body participating in a 2-body constraint. More... | |
| struct | ConstraintContact |
| Constraint requiring exactly two parameters representing colliding rigid bodies. More... | |
| class | ConstraintContactManifold |
| Special structure for handling collisions with multiple points of contact accumulated over several timesteps in order to improve stability. More... | |
| class | ConstraintDampingRigidbody |
| The velocity constraint responsible for applying a velocity-dependent damping force on all dynamic objects in order to eventually bring them to a stop. More... | |
| class | ConstraintDistance1D |
| Constraint where the distance between a pair of points, one from each participant, is restricted along an axis defined relative to participant 0 to a certain range. More... | |
| class | ConstraintParametrized |
| Subclass implementation for any constraint which takes data of type TParameter. More... | |
| class | ConstraintRotation1D |
| Restricts angle between 2 vectors from 2 participants around an axis defined relative to participant 0 to a certain range. More... | |
| struct | Contact |
| Object representing contact information between a pair of convex shapes from the perspective of one of those shapes. More... | |
| class | ECSWorld |
| A class that represents a set of systems, entities, and components, that are all interrelated, but isolated from other similar sets. More... | |
| class | Entity |
| The Entity is a wrapper on an entity ID, used as the primary interface between an application and the engine's ECS system. More... | |
| class | FixedActionBinding |
| A class representing the connection between an Action generated by the InputManager, and a BaseSimObjectAspect method that is interested in handling the action. More... | |
| class | Framebuffer |
| A wrapper class over OpenGL framebuffers. More... | |
| class | FramebufferFromDescription |
| Constructs a Framebuffer from its description in JSON. More... | |
| class | GeometryRenderStage |
| Render step responsible for translating mesh-material data into geometry buffers. More... | |
| class | IActionHandler |
| Class interface for systems that wish to be notified when action events occur in an action context. More... | |
| class | IHoverable |
| The interface implemented by aspects which wish to respond to pointer hover related events. More... | |
| class | ILeftClickable |
| The interface used by aspects which wish to respond to mouse left click events (or equivalent). More... | |
| struct | InputAttributesType |
| A class that, perhaps just as unnecessarily, stores a value of InputAttributesValueType. More... | |
| struct | InputCombo |
| An input combo that whose value is recorded and mapped to an (axis of an) action value of some kind. More... | |
| struct | InputFilter |
| Filter that uniquely defines ONE axis of one control of one input belonging to one device. More... | |
| class | InputManager |
| The class that acts as the main interface between the rest of the project and the input system. More... | |
| struct | InputSourceDescription |
| Identifies a single control, such as a button, trigger, or joystick, on a single device. More... | |
| struct | InstanceAttributeDescriptor |
| A struct describing the name and type of each attribute designated as an instance attribute. More... | |
| struct | InstanceLayout |
| Object representing the layout of one set of related attributes representing (presumably) one object or instance. More... | |
| class | Interpolator |
| A template class for interpolating components between simulation frames for various purposes. More... | |
| class | IResource |
| Base class of all Resource types. More... | |
| class | IResourceConstructor |
| A single way that a resource may be constructed. More... | |
| class | IResourceFactory |
| A class that holds references to all constructors for a type of Resource object. More... | |
| class | ISignal |
| The base class for any signal that an object advertises. More... | |
| class | ISignalObserver |
| class | IUsePointer |
| The interface used by aspects, objects, which cast pointer rays to interact with objects present in the world. More... | |
| struct | LightEmissionData |
| A struct, used as a component, describing the emissive properties of the light it represents per the Blinn-Phong shading model. More... | |
| class | LightingRenderStage |
| Render stage which takes geometry buffers and scene lights as inputs, and produces a lit scene as output. More... | |
| class | LightInstanceAllocator |
| The allocator associated with built in light sources used as attributes. More... | |
| struct | LightRenderUnit |
| Contains the model matrix, mesh, and light emission for a single light object being rendered this frame. More... | |
| class | Material |
| A collection of key value pairs used to control the behaviour of the rendering system when rendering a single "object.". More... | |
| class | MaterialFromDescription |
| A material resource constructor which converts a material represented in JSON to its Material equivalent. More... | |
| class | NineSlicePanel |
| Resource responsible for resizing a texture using the 9-slice technique, for use in UI elements. More... | |
| class | NineSlicePanelFromDescription |
| Resource constructor for creating new NineSlicePanel resources from their descriptions in JSON. More... | |
| struct | ObjectBounds |
| A component defining the true bounds of a spatially queryable object situated somewhere in the world. More... | |
| class | Octree |
| A data structure used for speeding up spatial queries about 3-dimensional objects in the scene. More... | |
| class | OctreeNode |
| A single node of an octree, representing a single octant of the 8 that make up its parent region. More... | |
| struct | OneAxisActionData |
| Actions that have just one axis of data, eg., the accelerator on a car. More... | |
| struct | OpaqueRenderUnit |
| An object representing a single opaque mesh-material pair, to be rendered this frame. More... | |
| struct | PhysicsState |
| Component representing the physics state of the body it's attached to at some particular point in time. More... | |
| class | PhysicsSystem |
| The physics system, an ECS system that tracks and updates the state of each physics object in the scene according to its properties. More... | |
| struct | Placement |
| A component representing the position, rotation, and scale of an entity. More... | |
| struct | Plane |
| A set of numbers describing a plane situated somewhere in the world. More... | |
| class | Polytope |
| Primitive for EPA algorithm. More... | |
| class | QueryClick |
| The aspect responsible for conducting raycasts and calling pointer event callbacks on eligible objects. More... | |
| class | RangeMapperLinear |
| A simple linear interpolation implementation between a fixed input and output range. More... | |
| struct | Ray |
| A set of numbers describing a ray with its source at some finite point in the world, projected in a direction for some positive length. More... | |
| class | RBO |
| Wrapper class over OpenGL RBOs. More... | |
| class | Registrator |
| Helper class for registering a class at program startup. More... | |
| class | RenderDebugViewer |
| A utility aspect class used to log window events and change the debug texture rendered to the viewport it manages. More... | |
| struct | RenderSet |
| A collection of shaders, render configurations, cameras, and related framebuffers used by a viewport within an ECSWorld. More... | |
| class | RenderSystem |
| The render system for a single ECSWorld, which joins together various RenderStages into a render pipeline for objects present in that world. More... | |
| class | ResizeRenderStage |
| Render stage responsible for resizing a texture to its final intended resolution. More... | |
| class | Resource |
| The base class for any type whose creation and storage should be managed by the ResourceDatabase. More... | |
| class | ResourceConstructor |
| An object representing one method for creating a resource of a given kind. More... | |
| class | ResourceDatabase |
| A database of all Resource types available for this project, and the various ResourceConstructors responsible for making them. More... | |
| class | ResourceFactory |
| Tracks pointers to all ResourceConstructors responsible for creating a resource of one type. More... | |
| class | SceneFromDescription |
| Constructs a scene tree (separate from the scene tree) based on its description in JSON. More... | |
| class | SceneFromFile |
| Constructs a scene tree from a file containing its JSON description. More... | |
| struct | SceneHierarchyData |
| Component representing hierarchical information related to this entity. More... | |
| class | SceneNode |
| The most basic vanilla flavour of scene node comprised of no more than a name and some components. More... | |
| class | SceneNodeCore |
| The core of a node in the SceneSystem, a set of components and methods overridable or usable by all types of scene nodes. More... | |
| class | SceneNodeFromDescription |
| Constructs a scene node based on its description in JSON. More... | |
| class | SceneSystem |
| The SceneSystem, a singleton System, responsible for tracking all objects in the scene, computing their Transforms, and maintaining hierarchical relationships between scene nodes. More... | |
| class | ScreenRenderStage |
| Render stage responsible for rendering any texture attached as source to the screen. More... | |
| class | ShaderProgram |
| A wrapper over OpenGL's shader programs. More... | |
| class | ShaderProgramFromFile |
| Constructs a ShaderProgram from its shader program header, found at a particular path. More... | |
| class | Signal |
| A Signal object, designed to emit signals matching some data signature to be received by all the SignalObservers subscribed to it. More... | |
| class | Signal_ |
| A class containing most of the implementation of this engine's Signal concept. More... | |
| class | SignalObserver |
| A SignalObserver object, which can subscribe to Signals matching its data signature and receive signal events from them. More... | |
| class | SignalObserver_ |
| A class containing most of the implementation for this engine's SignalObserver concept. More... | |
| class | SignalTracker |
| A signal tracker, the main interface between an object and the signal system. More... | |
| struct | SimCore |
| The component associated with the SimSystem. More... | |
| class | SimObject |
| A wrapper on entity that allows objects in the Scene to be scriptable. More... | |
| class | SimObjectAspect |
| An object containing closely related methods and data, and exposing object lifecycle and application event loops to a developer extending it. More... | |
| class | SimObjectFromDescription |
| Constructs a SimObject from its description in JSON. More... | |
| struct | Simplex |
| Primitive for GJK algorithm. More... | |
| class | SimSystem |
| The SimSystem is a system responsible for providing scriptability via SimObjects and SimObjectAspects. More... | |
| class | SkyboxRenderStage |
| Uses a skybox texture (i.e a texture with a supported cubemap format) to render a skybox behind geometry in the scene. More... | |
| class | SpatialQuerySystem |
| The spatial query system, an ECS System that tracks and updates spatial query data for objects in the scene, and which exposes spatial query methods. More... | |
| class | StaticMesh |
| A class whose current main purpose is to store geometry related info, and to upload it to GPU memory when requested. More... | |
| class | StaticMeshCuboidDimensions |
| Constructs a cuboid mesh based on its dimensions. More... | |
| class | StaticMeshFromDescription |
| Creates a static mesh based on its description in JSON. More... | |
| class | StaticMeshRectangleDimensions |
| Constructs a rectangle mesh based on its dimensions. More... | |
| class | StaticMeshSphereLatLong |
| Mesh constructor that creates a spherical mesh using a latitude-longitude method. More... | |
| class | StaticModel |
| This engine's representation of a single unrigged 3D model. More... | |
| class | StaticModelCuboidDimensions |
| Constructs a cuboid mesh based on its dimensions. More... | |
| class | StaticModelFromFile |
| A constructor method for StaticModels that loads such a model from its model file (w/ extensions such as .fbx, .obj, .gltf, and so on). More... | |
| class | StaticModelRectangleDimensions |
| Constructs a rectangle mesh using the latitude-longitude method. More... | |
| class | StaticModelSphereLatLong |
| Constructs a sphere model using the latitude-longitude method. More... | |
| class | SweepPrune |
| A class designed around finding which pairs of AABBs may be intersecting (so as to limit the number of full collision checks that need be performed). More... | |
| class | System |
| A system template that disables systems with this form of declaration. More... | |
| class | System< TSystemDerived, std::tuple< TListenedForComponents... >, std::tuple< TRequiredComponents... > > |
| The base class for any built-in or user-defined system that would like to be hooked to the engine's event cycle or have access to entities and components. More... | |
| class | SystemManager |
| Holds references to all the systems belonging to this manager's ECSWorld. More... | |
| class | TextFont |
| A wrapper class over SDL_ttf, providing methods to generate text textures from text using a font as a resource. More... | |
| class | TextFontFromFile |
| The ResourceConstructor responsible for loading a TextFont from its file path. More... | |
| class | Texture |
| The class representation of textures on this engine, which are a type of Resource used both within and outside of the engine. More... | |
| class | TextureFromColorBufferDefinition |
| Generates a texture based on its color buffer definition. More... | |
| class | TextureFromFile |
| A resource constructor which loads a texture from a supported image file located via its file path. More... | |
| struct | ThreeAxisActionData |
| Actions described by 3 axes (I can't think of any examples for this). More... | |
| class | TonemappingRenderStage |
| Takes lit scene (with bloom if it's used), and produces a tonemapped and gamma corrected version of the scene. More... | |
| struct | Transform |
| The transform component, which moves the vertices of a model to their world space coordinates during rendering. More... | |
| struct | TwoAxisActionData |
| Actions that have two axes of data. (Pointer locations, movement direction input, pitch+roll, etc.). More... | |
| class | UIButton |
| A UI component class for creating simple buttons comprised of a resizable panel and some text. More... | |
| class | UIImage |
| The aspect class responsible for displaying an image from a file scaled to some specific dimensions. More... | |
| class | UIPanel |
| UI aspect responsible for managing and rendering a NineSlicePanel texture on the UI. More... | |
| class | UIText |
| An aspect responsible for rendering text textures and displaying them on a surface in the scene. More... | |
| struct | UnmappedInputValue |
| An input state that hasn't yet been mapped to its corresponding action. More... | |
| struct | VertexAttributeDescriptor |
| The description of a single vertex attribute associated with a vertex layout, giving its size and location id. More... | |
| struct | VertexLayout |
| A list of attribute descriptors that together define the layout and size of the vertex they make up in GPU memory. More... | |
| class | ViewportNode |
| A type of node capable of and responsible for interacting sensibly with the engine's RenderSystem and ECSWorlds. More... | |
| class | ViewportNodeFromDescription |
| Constructs a ViewportNode from its description in JSON. More... | |
| struct | Volume |
| struct | VolumeBase_ |
| The base class of all spatial query volumes. More... | |
| struct | VolumeBox |
| Holds the parameters describing the spatial query volume of a simple three-dimensionsal box. More... | |
| struct | VolumeCapsule |
| Holds the parameters describing the spatial query volume of a simple three-dimensionsal capsule (or pill, or whatever you like). More... | |
| struct | VolumeSphere |
| Holds parameters describing a spherical spatial query volume. More... | |
| class | WindowContext |
| A class providing access to various window management methods and window event Signals. More... | |
Typedefs | |
| using | EntityID = std::uint64_t |
| A single unsigned integer used as a name for an entity managed by an ECS system. | |
| using | WorldID = std::uint64_t |
| An unsigned integer representing the name of an ECS world. | |
| using | UniversalEntityID = std::pair<WorldID, EntityID> |
| An ID that uniquely identifies an entity. | |
| using | ECSType = std::uint8_t |
| A number tag used to represent components and systems. | |
| using | ComponentType = ECSType |
| An unsigned integer representing the type of a component. | |
| using | SystemType = ECSType |
| An unsigned integer representing the type of a system. | |
| using | Signature = std::bitset<kMaxComponents> |
| A 255 bit number, where each enabled bit represents a relationship between an entity and some ECS related object. | |
| using | ActionName = ::std::string |
| The name of an action whose meaning is known within a specific context. | |
| using | ContextName = ::std::string |
| The name of a context which contains definitions for actions that are valid within it. | |
| typedef uint8_t | AxisFilterType |
| A type with multiple uses. | |
| typedef uint8_t | InputAttributesValueType |
| A type that is quite possibly unnecessary now that DeviceType and ControlType exist. | |
| typedef ::std::pair< DeviceType, ControlType > | InputSourceType |
| A composite type which uniquely identifies a control attached to the platform running this application. | |
| using | QualifiedActionName = ::std::pair<ContextName, ActionName> |
| An identifier that fully names one action present in the project. | |
| typedef CommonActionData | SimpleActionData |
| Actions that ultimately act like a single button value, where mActivated is the state of the button. | |
| using | LightPackedData = std::pair<std::pair<glm::vec4, glm::vec4>, LightEmissionData> |
| A version of light data where the first element represents the light's position and direction, and the second represents its emission properties. | |
| using | RenderSetID = uint32_t |
| using | TransformComponentSet = uint8_t |
| Field indicating which transform components this object would like to inherit from its parent in the scene hierarchy. | |
| using | BoxCorner = uint8_t |
| Type used to represent the name of the corner of a box. | |
| using | InteractionLayerMask = uint16_t |
| Bit field where each bit represents an interaction layer – a physics/spatial layer that can trigger or receive events from objects in other related layers. | |
Enumerations | |
| enum class | DeviceType : uint8_t { DeviceType::NA , DeviceType::MOUSE , DeviceType::KEYBOARD , DeviceType::CONTROLLER , DeviceType::TOUCH } |
| The type of input device that was responsible for creating the signal which will be mapped to an action. More... | |
| enum class | ControlType : uint8_t { ControlType::NA , ControlType::AXIS , ControlType::MOTION , ControlType::POINT , ControlType::BUTTON , ControlType::RADIO } |
| A single device may have multiple buttons and other controls, each of which will correspond to a type of input listed here. More... | |
| enum | InputAttributes : InputAttributesValueType { N_AXES =0x3 , HAS_NEGATIVE =0x4 , HAS_CHANGE_VALUE =0x8 , HAS_BUTTON_VALUE =0x10 , HAS_STATE_VALUE =0x20 , STATE_IS_LOCATION =0x40 } |
| A collection of a few important input attribute value type values and masks. More... | |
| enum | AxisFilter : AxisFilterType { SIMPLE =0x0 , X_POS =0x1 , X_NEG =0x5 , Y_POS =0x2 , Y_NEG =0x6 , Z_POS =0x3 , Z_NEG =0x7 , X_CHANGE_POS =0x9 , X_CHANGE_NEG =0xD , Y_CHANGE_POS =0xA , Y_CHANGE_NEG =0xE , Z_CHANGE_POS =0xB , Z_CHANGE_NEG =0xF } |
| Enumeration of all possible axis filter values. More... | |
| enum | AxisFilterMask : AxisFilterType { ID =0x3 , SIGN =0x4 , CHANGE =0x8 } |
| Important values used with AxisFilterType for determining the type, direction, and sign, of an input. | |
| enum class | ActionValueType : uint8_t { STATE , CHANGE } |
| The type of value associated with this action. | |
| enum class | ActionType { BUTTON , ONE_AXIS , TWO_AXIS , THREE_AXIS } |
| A seemingly redundant type that is a part of the ActionData struct and not the ActionDefinition struct. | |
| enum class | ActionTrigger : uint8_t { UPDATE , RESET } |
| Helps describe what InputCombo related event was responsible for signaling this action. | |
| enum | DefaultInstanceAttributeLocations : int { FIXED_MATRIXMODEL =7 , RUNTIME =-8 } |
| Attribute locations, per existing shaders. | |
| enum | TransformComponentOption : TransformComponentSet { TRANSFORMCOMPONENT_TRANSLATION =0x1 , TRANSFORMCOMPONENT_ROTATION =0x2 , TRANSFORMCOMPONENT_SCALE =0x4 } |
| The different kinds of values that can be inherited from a transform belonging to a parent. More... | |
| enum class | TransformInheritMode : uint8_t { TransformInheritMode::PARENT , TransformInheritMode::GLOBAL , TransformInheritMode::CAMERA } |
| The different kinds of values that can be inherited from a transform belonging to a parent. More... | |
| enum class | RelativeTo : uint8_t { PARENT =0 } |
| (Presently unused) A marker to indicate how transforms should be computed for a given scene node. More... | |
| enum | SpecialEntity : EntityID { ENTITY_NULL = kMaxEntities } |
| (Perhaps unused) Special "reserved" entity IDs which the scene system might use. More... | |
| enum | BoxCornerSpecifier : BoxCorner { RIGHT =0x1 , TOP =0x2 , FRONT =0x4 } |
| Enum values correspond to bits on a BoxCorner which help specify which side of the box on each axis is being indicated. | |
| enum | DefaultAttributeLocation { LOCATION_POSITION =0 , LOCATION_NORMAL =1 , LOCATION_TANGENT =2 , LOCATION_COLOR =3 , LOCATION_UV1 =4 , LOCATION_UV2 =5 , LOCATION_UV3 =6 } |
| Values for different attribute locations used by the engine's built-in shader programs. | |
Functions | |
| NLOHMANN_JSON_SERIALIZE_ENUM (CameraProperties::ProjectionType, { {CameraProperties::ProjectionType::FRUSTUM, "frustum"}, {CameraProperties::ProjectionType::ORTHOGRAPHIC, "orthographic"}, }) | |
| void | from_json (const nlohmann::json &json, CameraProperties &cameraProperties) |
| void | to_json (nlohmann::json &json, const CameraProperties &cameraProperties) |
| NLOHMANN_JSON_SERIALIZE_ENUM (DeviceType, { {DeviceType::NA, "na"}, {DeviceType::MOUSE, "mouse"}, {DeviceType::KEYBOARD, "keyboard"}, {DeviceType::TOUCH, "touch"}, {DeviceType::CONTROLLER, "controller"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ControlType, { {ControlType::NA, "na"}, {ControlType::AXIS, "axis"}, {ControlType::MOTION, "motion"}, {ControlType::POINT, "point"}, {ControlType::BUTTON, "button"}, {ControlType::RADIO, "radio"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (AxisFilter, { {AxisFilter::SIMPLE, "simple"}, {AxisFilter::X_POS, "+x"}, {AxisFilter::X_NEG, "-x"}, {AxisFilter::Y_POS, "+y"}, {AxisFilter::Y_NEG, "-y"}, {AxisFilter::Z_POS, "+z"}, {AxisFilter::Z_NEG, "-z"}, {AxisFilter::X_CHANGE_POS, "+dx"}, {AxisFilter::X_CHANGE_NEG, "-dx"}, {AxisFilter::Y_CHANGE_POS, "+dy"}, {AxisFilter::Y_CHANGE_NEG, "-dy"}, {AxisFilter::Z_CHANGE_POS, "+dz"}, {AxisFilter::Z_CHANGE_NEG, "-dz"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (InputCombo::Trigger, { {InputCombo::Trigger::ON_PRESS, "on-press"}, {InputCombo::Trigger::ON_RELEASE, "on-release"}, {InputCombo::Trigger::ON_CHANGE, "on-change"}, {InputCombo::Trigger::ON_BUTTON_PRESS, "on-button-press"}, {InputCombo::Trigger::ON_BUTTON_RELEASE, "on-button-release"}, {InputCombo::Trigger::ON_BUTTON_CHANGE, "on-button-change"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ActionValueType, { {ActionValueType::STATE, "state"}, {ActionValueType::CHANGE, "change"}, }) | |
| void | to_json (nlohmann::json &json, const ToyMaker::InputAttributesType &inputAttributes) |
| void | from_json (const nlohmann::json &json, ToyMaker::InputAttributesType &inputAttributes) |
| void | to_json (nlohmann::json &json, const ToyMaker::InputSourceDescription &inputSourceDescription) |
| void | from_json (const nlohmann::json &json, ToyMaker::InputSourceDescription &inputSourceDescription) |
| void | to_json (nlohmann::json &json, const ToyMaker::InputFilter &inputFilter) |
| void | from_json (const nlohmann::json &json, ToyMaker::InputFilter &inputFilter) |
| void | to_json (nlohmann::json &json, const ToyMaker::InputCombo &inputCombo) |
| void | from_json (const nlohmann::json &json, ToyMaker::InputCombo &inputCombo) |
| void | to_json (nlohmann::json &json, const ToyMaker::ActionDefinition &actionDefinition) |
| void | from_json (const nlohmann::json &json, ToyMaker::ActionDefinition &actionDefinition) |
| NLOHMANN_JSON_SERIALIZE_ENUM (LightEmissionData::LightType, { {LightEmissionData::LightType::directional, "directional"}, {LightEmissionData::LightType::point, "point"}, {LightEmissionData::LightType::spot, "spot"}, }) | |
| void | from_json (const nlohmann::json &json, LightEmissionData &lightEmissionData) |
| void | to_json (nlohmann::json &json, const LightEmissionData &lightEmissionData) |
| float | computeGeneralizedInverseMassPositional (const ObjectBounds &object, const PhysicsState &physics, const glm::vec3 &correctionPoint, const glm::vec3 &correctionGradient) |
| Computes the generalized inverse mass used for positional corrections applied by constraints. | |
| float | computeGeneralizedInverseMassRotational (const ObjectBounds &object, const PhysicsState &physics, const glm::vec3 &correctionRotational) |
| Computes the generalized inverse mass used by constraints to apply strictly rotational corrections. | |
| glm::mat3 | computeInertiaRotationalWorld (const glm::vec3 &rotationalInertiaLocal, const glm::quat &orientation) |
| Returns an objects rotation tensor in the global frame given its tensor in the local frame according to its current orientation. | |
| ObjectBounds | applyImpulseObject (ObjectBounds object, const PhysicsState &physics, const glm::vec3 &impulsePositional, const glm::vec3 &impulsePoint) |
| Returns object bounds in state it would be post application of a positional impulse. | |
| ObjectBounds | applyImpulseObject (ObjectBounds object, const PhysicsState &physics, const glm::vec3 &impulseRotational) |
| Returns object bounds in state it would be post application of a rotational impulse. | |
| PhysicsState | applyImpulsePhysics (const ObjectBounds &object, PhysicsState physics, const glm::vec3 &impulsePositional, const glm::vec3 &impulsePoint) |
| Returns new physics state after application of global impulse. | |
| PhysicsState | applyImpulsePhysics (const ObjectBounds &object, PhysicsState physics, const glm::vec3 &impulseRotational) |
| Returns new physics state after application of global angular impulse. | |
| NLOHMANN_JSON_SERIALIZE_ENUM (PhysicsState::Mode, { { PhysicsState::MODE_DYNAMIC, "dynamic" }, { PhysicsState::MODE_KINEMATIC, "kinematic" }, { PhysicsState::MODE_STATIC, "static" }, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (PhysicsState::CollisionResponse, { { PhysicsState::COLLISION_SEPARATE, "separate" }, { PhysicsState::COLLISION_SIGNAL, "signal" }, }) | |
| void | from_json (const nlohmann::json &json, PhysicsState &physics) |
| void | to_json (nlohmann::json &json, const PhysicsState &physics) |
| NLOHMANN_JSON_SERIALIZE_ENUM (TransformComponentOption, { { TransformComponentOption::TRANSFORMCOMPONENT_TRANSLATION, "translation" }, { TransformComponentOption::TRANSFORMCOMPONENT_ROTATION, "rotation" }, { TransformComponentOption::TRANSFORMCOMPONENT_SCALE, "scale" }, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (TransformInheritMode, { { TransformInheritMode::PARENT, "parent" }, { TransformInheritMode::GLOBAL, "global" }, { TransformInheritMode::CAMERA, "camera" }, }) | |
| void | from_json (const nlohmann::json &json, Placement &placement) |
| void | to_json (nlohmann::json &json, const Placement &placement) |
| void | to_json (nlohmann::json &json, const SceneHierarchyData &sceneHierarchyData) |
| void | from_json (const nlohmann::json &json, SceneHierarchyData &sceneHierarchyData) |
| void | to_json (nlohmann::json &json, const Transform &transform) |
| void | from_json (const nlohmann::json &json, Transform &transform) |
| NLOHMANN_JSON_SERIALIZE_ENUM (RelativeTo, { {RelativeTo::PARENT, "parent"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ViewportNode::RenderConfiguration::ResizeType, { {ViewportNode::RenderConfiguration::ResizeType::OFF, "off"}, {ViewportNode::RenderConfiguration::ResizeType::VIEWPORT_DIMENSIONS, "viewport-dimensions"}, {ViewportNode::RenderConfiguration::ResizeType::TEXTURE_DIMENSIONS, "texture-dimensions"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ViewportNode::RenderConfiguration::ResizeMode, { {ViewportNode::RenderConfiguration::ResizeMode::FIXED_ASPECT,"fixed-aspect"}, {ViewportNode::RenderConfiguration::ResizeMode::EXPAND_VERTICALLY, "expand-vertically"}, {ViewportNode::RenderConfiguration::ResizeMode::EXPAND_HORIZONTALLY, "expand-horizontally"}, {ViewportNode::RenderConfiguration::ResizeMode::EXPAND_FILL, "expand-fill"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ViewportNode::RenderConfiguration::UpdateMode, { {ViewportNode::RenderConfiguration::UpdateMode::NEVER, "never"}, {ViewportNode::RenderConfiguration::UpdateMode::ONCE, "once"}, {ViewportNode::RenderConfiguration::UpdateMode::ON_FETCH, "on-fetch"}, {ViewportNode::RenderConfiguration::UpdateMode::ON_RENDER, "on-render"}, {ViewportNode::RenderConfiguration::UpdateMode::ON_RENDER_CAP_FPS, "on-render-cap-fps"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ViewportNode::RenderConfiguration::RenderType, { {ViewportNode::RenderConfiguration::RenderType::BASIC_3D, "basic-3d"}, {ViewportNode::RenderConfiguration::RenderType::ADDITION, "addition"}, }) | |
| void | to_json (nlohmann::json &json, const ViewportNode::RenderConfiguration &renderConfiguration) |
| void | from_json (const nlohmann::json &json, ViewportNode::RenderConfiguration &renderConfiguration) |
| void | from_json (const nlohmann::json &json, SimCore &simCore) |
| void | to_json (nlohmann::json &json, const SimCore &simCore) |
| glm::mat3 | computeBarycentricSolver (const AreaTriangle &triangle) |
| Computes a Barycentric solver matrix based on an input triangle. | |
| std::pair< bool, glm::vec3 > | computeIntersection (const Ray &ray, const Plane &plane) |
| Returns a bool-vector pair, with bool indicating whether a point of intersection was found, and the vector containing the point of intersection. | |
| std::pair< bool, glm::vec3 > | computeIntersection (const Ray &ray, const AreaTriangle &triangle) |
| Returns a bool-vector pair, with bool indicating whether a point of intersection was found, and the vector containing the point of intersection. | |
| std::pair< uint8_t, std::pair< glm::vec3, glm::vec3 > > | computeIntersections (const Ray &ray, const AxisAlignedBounds &axisAlignedBounds) |
| Returns an unsigned int and vector-pair pair, with unsigned indicating whether any and how many points of intersection were found with the AABB, and the vector containing the points of intersection. | |
| std::pair< uint8_t, std::pair< glm::vec3, glm::vec3 > > | computeIntersections (const Ray &ray, const ObjectBounds &objectbounds) |
| Returns an unsigned int and vector pair pair, with int indicating whether and how many points of intersection were found, and the vector containing the points of intersection. | |
| bool | overlaps (const glm::vec3 &point, const ObjectBounds &bounds) |
| Returns a bool value indicating whether point is contained by bounds. | |
| bool | overlaps (const ObjectBounds &bounds, const glm::vec3 &point) |
| Returns a bool value indicating whether point is contained by bounds. | |
| bool | overlaps (const Ray &ray, const ObjectBounds &bounds) |
| Returns a bool value indicating whether the ray passes through the object volume. | |
| bool | overlaps (const ObjectBounds &bounds, const Ray &ray) |
| Returns a bool value indicating whether the ray passes through the object volume. | |
| bool | overlaps (const glm::vec3 &point, const AxisAlignedBounds &bounds) |
| Returns whether point is contained by bounds. | |
| bool | overlaps (const AxisAlignedBounds &bounds, const glm::vec3 &point) |
| Returns whether point is contained by bounds. | |
| bool | overlaps (const Ray &ray, const AxisAlignedBounds &bounds) |
| Returns whether ray overlaps with bounds. | |
| bool | overlaps (const AxisAlignedBounds &bounds, const Ray &ray) |
| Returns whether ray overlaps with bounds. | |
| bool | overlaps (const AxisAlignedBounds &one, const AxisAlignedBounds &two) |
| Returns whether one overlaps two. | |
| bool | overlaps (const ObjectBounds &one, const ObjectBounds &two) |
| Returns whether one overlaps two. | |
| bool | overlaps (const AxisAlignedBounds &one, const ObjectBounds &two) |
| Returns whether one overlaps two. | |
| bool | overlaps (const ObjectBounds &one, const AxisAlignedBounds &two) |
| Returns whether one overlaps two. | |
| Collision | checkCollisionSphereSphere (const ObjectBounds &one, const ObjectBounds &two) |
| Specialization of checkCollision() where both objects being tested are spheres. | |
| template<typename T, typename U> | |
| std::pair< bool, Simplex > | gjkOverlaps (const T &one, const U &two) |
| GJK implementation based on Casey Muratori's video lecture, which is available here. | |
| template<typename T, typename U> | |
| Polytope | buildPolytope (const T &one, const U &two, const Simplex &gjkSimplex) |
| EPA implementation, used to derive contact information for intersections between convex shapes. | |
| template<typename T, typename U> | |
| Collision | checkCollision (const T &one, const U &two) |
| Checks whether a pair of convex 3D shapes are colliding, returning information about the collision if they are. | |
| bool | contains (const glm::vec3 &point, const ObjectBounds &bounds) |
| Returns whether point is contained by bounds. | |
| bool | contains (const glm::vec3 &point, const AxisAlignedBounds &bounds) |
| Returns whether point is contained by bounds. | |
| bool | contains (const Ray &ray, const AxisAlignedBounds &bounds) |
| Returns whether ray is contained by bounds. | |
| bool | contains (const Ray &ray, const ObjectBounds &bounds) |
| Returns whether ray is contained by bounds. | |
| bool | contains (const AxisAlignedBounds &one, const AxisAlignedBounds &two) |
| Returns whether one is contained by two. | |
| bool | contains (const ObjectBounds &one, const AxisAlignedBounds &two) |
| Returns whether one is contained by two. | |
| template<typename T, typename U> | |
| glm::vec3 | minkowskiDifference (const T &one, const U &two, const glm::vec3 &along) |
| Closely associated with GJK; finds the Minkowski difference between two shapes situated somewhere in the world. | |
| template<typename T, typename U> | |
| std::tuple< glm::vec3, glm::vec3, glm::vec3 > | minkowskiDifferenceFull (const T &one, const U &two, const glm::vec3 &along) |
| Closely associated with GJK; finds the Minkowski difference between two shapes situated somewhere in the world. | |
| template<> | |
| void | SceneNodeCore::setEnabled< SpatialQuerySystem::LightBoundsComputeSystem > (bool) |
| template<> | |
| void | SceneNodeCore::setEnabled< SpatialQuerySystem::StaticModelBoundsComputeSystem > (bool) |
| std::array< AreaTriangle, 12 > | computeBoxFaceTriangles (const std::array< glm::vec3, 8 > &boxCorners) |
| Generates a list of triangles making up the surface of a box situated somewhere in the world, given the coordinates of its corners. | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ObjectBounds::TrueVolumeType, { {ObjectBounds::TrueVolumeType::BOX, "box"}, {ObjectBounds::TrueVolumeType::SPHERE, "sphere"}, {ObjectBounds::TrueVolumeType::CAPSULE, "capsule"}, }) inline void to_json(nlohmann | |
| void | from_json (const nlohmann::json &json, ObjectBounds &objectBounds) |
| void | to_json (nlohmann::json &json, const AxisAlignedBounds &axisAlignedBounds) |
| void | from_json (const nlohmann::json &json, AxisAlignedBounds &objectBounds) |
| GLenum | deduceInternalFormat (const ColorBufferDefinition &colorBufferDefinition) |
| A (quite possibly unnecessary) function to fetch the enum corresponding to the "internalFormat" argument of glTexImage2D based on some color buffer definition. | |
| GLenum | deduceExternalFormat (const ColorBufferDefinition &colorBufferDefinition) |
| A (quite possibly unnecessary) function to fetch the enum corresponding to the "format" argument of glTexImage2D based on some color buffer definition. | |
| void | to_json (nlohmann::json &json, const ColorBufferDefinition &colorBufferDefinition) |
| void | from_json (const nlohmann::json &json, ColorBufferDefinition &colorBufferDefinition) |
| NLOHMANN_JSON_SERIALIZE_ENUM (ColorBufferDefinition::CubemapLayout, { {ColorBufferDefinition::CubemapLayout::NA, "na"}, {ColorBufferDefinition::CubemapLayout::ROW, "row"}, }) | |
| glm::mat4 | buildModelMatrix (glm::vec4 position, glm::quat orientation, glm::vec3 scale=glm::vec3{1.f, 1.f, 1.f}) |
| Converts a position, orientation and scale into its model matrix equivalent. | |
| float | squareDistance (const glm::vec3 &vector) |
| Returns the square of the length of a 3 component vector. | |
| bool | isFinite (float number) |
| Tests whether a given number is finite. | |
| bool | isFinite (const glm::vec3 &vector) |
| Tests whether a set of 3 numbers is finite. | |
| bool | isPositiveStrict (float number) |
| Tests whether a number is strictly positive. | |
| bool | isPositiveStrict (const glm::vec3 &vector) |
| Tests whether a set of 3 numbers is strictly positive. | |
| bool | isNumber (float number) |
| Tests whether a float is really a number (as opposed to a special error representation). | |
| bool | isNumber (const glm::vec3 &vector) |
| Tests whether a set of 3 numbers are really numbers (as opposed to special error representations). | |
| bool | isNonNegative (float number) |
| Tests whether a number is non-negative. | |
| bool | isNonNegative (const glm::vec3 &vector) |
| Tests whether a set of numbers is non-negative. | |
| glm::quat | getRotation (const glm::vec3 &from, const glm::vec3 &to) |
| Returns the rotation between two vectors represented as a quaternion. | |
| float | getAngle (const glm::vec3 &from, const glm::vec3 &to, const glm::vec3 &axis) |
| Gets angle between two vectors about an axis vector in the range [-Pi, Pi]. | |
| glm::vec3 | getOrthogonal (const glm::vec3 &from) |
| Given some arbitrary non-zero vector, returns a normalized vector that is orthogonal to it. | |
| std::pair< glm::vec3, glm::vec3 > | getTangents (const glm::vec3 &vector) |
| Returns a pair of normalized tangents to an input vector. | |
| bool | isSensible (const glm::mat3 &matrix) |
| Determines whether a particular matrix is valid and finite. | |
| glm::mat4 | getScaleMatrix (const glm::mat4 &fromTransform) |
| Given a transform, returns scale matrix that was used to compose the transform. | |
| glm::mat4 | getRotationMatrix (const glm::mat4 &fromTransform) |
| Given a transform, returns rotation matrix that was used to compose the transform. | |
| glm::mat4 | getTranslationMatrix (const glm::mat4 &fromTransform) |
| Given a transform, returns translation matrix that was used to compose the transform. | |
| void | from_json (const nlohmann::json &json, BuiltinVertexData &builtinVertexData) |
| void | to_json (nlohmann::json &json, const BuiltinVertexData &builtinVertexData) |
| NLOHMANN_JSON_SERIALIZE_ENUM (NineSlicePanel::ScaleMode, { {NineSlicePanel::ScaleMode::STRETCH, "stretch"}, {NineSlicePanel::ScaleMode::TILE, "tile"}, }) | |
| NLOHMANN_JSON_SERIALIZE_ENUM (UIButton::State, { {UIButton::State::ACTIVE, "active"}, {UIButton::State::HOVER, "hover"}, {UIButton::State::PRESSED, "pressed"}, {UIButton::State::INACTIVE, "inactive"}, }) | |
Variables | |
| constexpr EntityID | kMaxEntities { 1000000 } |
| A user-set constant which limits the number of creatable entities in a single ECS system. | |
| constexpr ECSType | kMaxECSTypes { 255 } |
| A constant used to restrict the number of definable system and component types in a project. | |
| constexpr ComponentType | kMaxComponents { kMaxECSTypes } |
| A constant that restricts the number of definable components in a project. | |
| constexpr SystemType | kMaxSystems { kMaxECSTypes } |
| A constant that restricts the number of definable systems in a project. | |
| const ::std::map< InputSourceType, InputAttributesType > | kInputSourceTypeAttributes |
| A mapping from each type of input control to the attributes associated with it. | |
| static InstanceLayout | BuiltinModelMatrixLayout |
| The layout of the in-built model matrix instance attribute, present on pretty much every engine-defined shader. | |
| static InstanceLayout | LightInstanceLayout |
| The layout for built-in light sources when used as instance attributes. | |
| const RenderSetID | kMaxRenderSetIDs { 10000 } |
| The total number of RenderSets, per ECSWorld, that can be created. | |
| const std::string | kSceneRootName { "" } |
| Special name for the scene root, unusable by any other scene object. | |
| template<typename TSimObjectAspectDerived> | |
| Registrator< SimObjectAspect< TSimObjectAspectDerived > > & | SimObjectAspect< TSimObjectAspectDerived >::s_registrator |
| static constexpr uint8_t | kMaxIterations { 32 } |
| static constexpr float | kSimplexEpsilon { 0.0001 } |
| VertexLayout | BuiltinVertexLayout |
| The vertex layout used by most shader programs built into the engine. | |
Namespace containing all class definitions and functions related to the ToyMaker engine.
ToyMaker is a game engine developed by Zoheb Shujauddin in 2023-2025, first used to create an adaptation of a board game known as "The Game of Ur." It is built on top of well known C++ libraries such as SDL, OpenGL, assimp, nlohmann json, and glm, among others.
|
inline |
EPA implementation, used to derive contact information for intersections between convex shapes.
Given a valid GJK simplex enclosing origin, expands the polytope until it the closest Minksowski difference surface to the origin is found.
The distance between the origin and the closest difference surface gives us the "Minimum Translation Vector," which is the distance by which both shapes can be moved away from one another to remove their overlap.
|
inline |
Checks whether a pair of convex 3D shapes are colliding, returning information about the collision if they are.
It does this by:
|
inline |
GJK implementation based on Casey Muratori's video lecture, which is available here.
Computes furthest point along a given direction in one, minus furthest point along the opposite direction in shape 2. Performing this in all directions yields a surface which, if the two shapes overlap, contains origin (0, 0, 0)
GJK attempts to find a minimal tetrahedron whose points are points on the boundaries of the Minkowski difference shape which encloses (0, 0, 0)
| true | If overlap is found, with Tetrahedron enclosing origin; |
| false | If the shapes don't overlap; |
| Registrator<SimObjectAspect<TSimObjectAspectDerived> >& ToyMaker::SimObjectAspect< TSimObjectAspectDerived >::s_registrator |