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
ToyMaker::Placement Struct Reference

A component representing the position, rotation, and scale of an entity. More...

#include <scene_components.hpp>

Public Member Functions

bool operator== (const Placement &other)
 Compares this placement object to another for equality.
 
bool operator!= (const Placement &other)
 An explicit specification for the inequality operator.
 

Static Public Member Functions

static std::string getComponentTypeName ()
 Gets the component type string for this component.
 

Public Attributes

glm::vec4 mPosition {glm::vec3{ 0.f }, 1.f}
 This entity's position.
 
glm::quat mOrientation { glm::vec3{ 0.f } }
 This entity's orientation, as a glm::quat value.
 
glm::vec3 mScale { 1.f, 1.f, 1.f }
 Factors along each axis by which geometry should be multiplied and scaled.
 

Detailed Description

A component representing the position, rotation, and scale of an entity.

See also
ECSWorld::registerComponentTypes()

Member Function Documentation

◆ getComponentTypeName()

static std::string ToyMaker::Placement::getComponentTypeName ( )
inlinestatic

Gets the component type string for this component.

Returns
std::string The component type string for this object.

◆ operator!=()

bool ToyMaker::Placement::operator!= ( const Placement & other)
inline

An explicit specification for the inequality operator.

Parameters
otherThe placement this one is being compared to for inequality.
Return values
trueThese two placements are unequal.
falseThese two placements are equal.

◆ operator==()

bool ToyMaker::Placement::operator== ( const Placement & other)
inline

Compares this placement object to another for equality.

Parameters
otherThe placement this one is being compared to.
Return values
trueThese two placement objects are equal;
falseThese two placement objects are not equal;

Member Data Documentation

◆ mOrientation

glm::quat ToyMaker::Placement::mOrientation { glm::vec3{ 0.f } }

This entity's orientation, as a glm::quat value.

The forward vector for an object is found by applying this quaternion to a vector facing the -Z axis (i.e {0.0, 0.0, -1.0, 0.0}) after having applied rotation transforms of objects higher up in the scene hierarchy.


The documentation for this struct was generated from the following file: