ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
Loading...
Searching...
No Matches
ToyMaker::Constraint1DOFConfig Struct Reference

A collection of values defining an orientation or position constraint for a single degree of freedom. More...

#include <types.hpp>

Public Member Functions

bool isSensible (bool isRotation=false) const
 Tests invariants for the constraint this block of data is associated with.

Public Attributes

glm::vec3 mAxis { 1.f, 0.f, 0.f }
 A non-zero vector relative to participant 0 along or about which rotation or position is constrained for both constraint participants.
float mBoundLower { 0.f }
 The lowest permissible angle or distance between the pair of vectors or points from participants 0 and 1.
float mBoundUpper { 0.f }
 The highest permissible angle between the pair of vectors from participant 0 and 1.
bool isActive { true }
 Whether the constraint associated with this configuration is in effect.

Detailed Description

A collection of values defining an orientation or position constraint for a single degree of freedom.

@TODO: Learn how to handle constraints beyond 360 degrees for rotation limits.

Member Data Documentation

◆ mBoundLower

float ToyMaker::Constraint1DOFConfig::mBoundLower { 0.f }

The lowest permissible angle or distance between the pair of vectors or points from participants 0 and 1.

For rotations, can be any value in the range (-Pi, Pi), in radians.

Must be lower than or equal to mBoundUpper.

◆ mBoundUpper

float ToyMaker::Constraint1DOFConfig::mBoundUpper { 0.f }

The highest permissible angle between the pair of vectors from participant 0 and 1.

For rotations, can be any value in the range (-Pi, Pi), in radians.

Must be greater than or equal to mBoundLower.


The documentation for this struct was generated from the following file:
  • ToyMaker_Main/include/toymaker/engine/physics/types.hpp