olcPixelGameEngine v2.28
The official distribution of olcPixelGameEngine, a tool used in javidx9's YouTube videos and projects
Loading...
Searching...
No Matches
olc::wire::Model Class Reference

#include <olcPGEX_Wireframe.h>

Public Member Functions

 Model ()=default
 
void Attach (Model *child, const olc::vf2d &position={ 0.0f, 0.0f }, const float angle=0.0f)
 
void SetRotation (const float angle)
 
void SetPosition (const olc::vf2d &position)
 
void UpdateInWorld (const Matrix2D &matParent)
 
olc::vf2d LocalToWorld (const olc::vf2d &local)
 
void SetMesh (const Mesh &mesh)
 
const MeshGetWorldPoints () const
 
const std::vector< Model * > & GetChildren () const
 

Static Public Attributes

static constexpr uint8_t DRAW_ORIGIN = 0x01
 
static constexpr uint8_t DRAW_NODES = 0x02
 
static constexpr uint8_t DRAW_MEASURES = 0x04
 

Protected Attributes

Mesh vLocalPoints
 
Mesh vWorldPoints
 
olc::Matrix2D matLocalTranslation
 
olc::Matrix2D matLocalRotation
 
olc::Matrix2D matLocal
 
olc::Matrix2D matWorld
 
std::vector< Model * > vChildren
 

Constructor & Destructor Documentation

◆ Model()

olc::wire::Model::Model ( )
default

Member Function Documentation

◆ Attach()

void olc::wire::Model::Attach ( Model * child,
const olc::vf2d & position = { 0.0f, 0.0f },
const float angle = 0.0f )

◆ GetChildren()

const std::vector< Model * > & olc::wire::Model::GetChildren ( ) const

◆ GetWorldPoints()

const Mesh & olc::wire::Model::GetWorldPoints ( ) const

◆ LocalToWorld()

olc::vf2d olc::wire::Model::LocalToWorld ( const olc::vf2d & local)

◆ SetMesh()

void olc::wire::Model::SetMesh ( const Mesh & mesh)

◆ SetPosition()

void olc::wire::Model::SetPosition ( const olc::vf2d & position)

◆ SetRotation()

void olc::wire::Model::SetRotation ( const float angle)

◆ UpdateInWorld()

void olc::wire::Model::UpdateInWorld ( const Matrix2D & matParent)

Member Data Documentation

◆ DRAW_MEASURES

uint8_t olc::wire::Model::DRAW_MEASURES = 0x04
staticconstexpr

◆ DRAW_NODES

uint8_t olc::wire::Model::DRAW_NODES = 0x02
staticconstexpr

◆ DRAW_ORIGIN

uint8_t olc::wire::Model::DRAW_ORIGIN = 0x01
staticconstexpr

◆ matLocal

olc::Matrix2D olc::wire::Model::matLocal
protected

◆ matLocalRotation

olc::Matrix2D olc::wire::Model::matLocalRotation
protected

◆ matLocalTranslation

olc::Matrix2D olc::wire::Model::matLocalTranslation
protected

◆ matWorld

olc::Matrix2D olc::wire::Model::matWorld
protected

◆ vChildren

std::vector<Model*> olc::wire::Model::vChildren
protected

◆ vLocalPoints

Mesh olc::wire::Model::vLocalPoints
protected

◆ vWorldPoints

Mesh olc::wire::Model::vWorldPoints
protected

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