raylib_impl 0.1.0
Vendor raylib 5.5 : IGraphic2Module / IGraphic3Module / IAudioModule
Loading...
Searching...
No Matches
RayModel Class Reference

Raylib Model class - references a RayMesh, does not own it. More...

#include <RayModel.hpp>

Inheritance diagram for RayModel:
Collaboration diagram for RayModel:

Public Member Functions

 RayModel (RayMesh &mesh)
 
 ~RayModel ()=default
 
void setTexture (graphic::ITexture *texture) override
 
void setAnimations (graphic::IAnimationSet *animations) override
 
int getAnimationsSize () const override
 
void setAnimation (int pos) override
 
int getAnimation () const override
 
bool updateAnimation () override
 
void setFrameRange (int first, int last) override
 
int getFirstFrame () const override
 
int getLastFrame () const override
 
void setFrame (int frame) override
 
int getFrame () const override
 
Vector3f getPosition () const override
 
void setPosition (Vector3f position) override
 
Vector3f getRotation () const override
 
void setRotation (Vector3f rotation) override
 
Vector3f getSize () const override
 
void setSize (Vector3f size) override
 

Friends

class RayWindow
 

Detailed Description

Raylib Model class - references a RayMesh, does not own it.

KNOWN NON-CONFORMANCE : raylib::UpdateModelAnimation() writes the pose into the mesh's own vertex buffer. Two RayModel sharing one RayMesh cannot sit on two different animation frames at the same instant - the last updateAnimation() called wins. The contract wants the opposite ; raylib is what falls short. Sharing position/rotation/size works. Deleting the model never touches the mesh, texture or animation set it was built from/bound to.

Note: raylib::UpdateModelAnimation() writes the pose into the mesh's own vertex buffer, so two RayModel instances sharing one RayMesh cannot be at two different animation frames at the same instant - a real raylib constraint, not something this wrapper works around.

Constructor & Destructor Documentation

◆ RayModel()

RayModel::RayModel ( RayMesh &  mesh)
inline

◆ ~RayModel()

RayModel::~RayModel ( )
default

Member Function Documentation

◆ getAnimation()

int RayModel::getAnimation ( ) const
inlineoverride

◆ getAnimationsSize()

int RayModel::getAnimationsSize ( ) const
inlineoverride

◆ getFirstFrame()

int RayModel::getFirstFrame ( ) const
inlineoverride

◆ getFrame()

int RayModel::getFrame ( ) const
inlineoverride

◆ getLastFrame()

int RayModel::getLastFrame ( ) const
inlineoverride

◆ getPosition()

Vector3f RayModel::getPosition ( ) const
inlineoverride

◆ getRotation()

Vector3f RayModel::getRotation ( ) const
inlineoverride

◆ getSize()

Vector3f RayModel::getSize ( ) const
inlineoverride

◆ setAnimation()

void RayModel::setAnimation ( int  pos)
inlineoverride

◆ setAnimations()

void RayModel::setAnimations ( graphic::IAnimationSet *  animations)
inlineoverride

◆ setFrame()

void RayModel::setFrame ( int  frame)
inlineoverride

◆ setFrameRange()

void RayModel::setFrameRange ( int  first,
int  last 
)
inlineoverride

◆ setPosition()

void RayModel::setPosition ( Vector3f  position)
inlineoverride

◆ setRotation()

void RayModel::setRotation ( Vector3f  rotation)
inlineoverride

◆ setSize()

void RayModel::setSize ( Vector3f  size)
inlineoverride

◆ setTexture()

void RayModel::setTexture ( graphic::ITexture *  texture)
inlineoverride

◆ updateAnimation()

bool RayModel::updateAnimation ( )
inlineoverride

Friends And Related Symbol Documentation

◆ RayWindow

friend class RayWindow
friend

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