PERRY v1.0.0
P-E-R-R-Y/PERRY helps creating games with a bunch of tools.
Loading...
Searching...
No Matches
Raylib

Classes

class  RayEvent
 Raylib Event class. More...
 
class  RayKeyboard
 
class  RayMouse
 Raylib Mouse class. More...
 
class  RayModel
 Raylib Model class. More...
 
class  RayPolygon
 
class  RaySprite
 Raylib Sprite class. More...
 
class  RayCamera
 Raylib Camera class. More...
 
class  RayWindow
 Raylib Window class. More...
 

Functions

 RayKeyboard::RayKeyboard (graphic::IEvent *event)
 
std::vector< KeysRayKeyboard::whichKey () const override
 Be careful, this function will check every key of the keyboard and return an array of keys that are pressed it's not recommended to use this function in a loop, use isKeyPressed() instead. it's efficient for key detection & binding.
 
bool RayKeyboard::isKeyPressed (Keys key) const override
 Check if the key is pressed.
 
bool RayKeyboard::isKeyDown (Keys key) const override
 Check if the key is down.
 
bool RayKeyboard::isKeyReleased (Keys key) const override
 Check if the key is released.
 
bool RayKeyboard::isKeyUp (Keys key) const override
 Check if the key is up.
 
void RayKeyboard::update () override
 Update the keyboard.
 
 RayMouse::RayMouse (graphic::IEvent *event)
 
bool RayMouse::isButtonPressed (Buttons key) const override
 notice if a button is pressed
 
bool RayMouse::isButtonDown (Buttons key) const override
 notice if a button is down
 
bool RayMouse::isButtonReleased (Buttons key) const override
 notice if a button is released
 
bool RayMouse::isButtonUp (Buttons key) const override
 notice if a button is up
 
__v2f_t RayMouse::getPosition () const override
 get the position of the mouse
 
void RayMouse::setPosition (__v2f_t position) override
 set the position of the mouse
 
float RayMouse::GetMouseWheelMove () const override
 get the mouse wheel move
 
void RayMouse::update () override
 set the mouse wheel move
 
 RayModel::RayModel ()
 Construct a new Ray Model object.
 
__v3f_t RayModel::getPosition () const override
 
void RayModel::setPosition (__v3f_t position) override
 
 RayPolygon::RayPolygon (std::vector< __v2f_t > points)
 
bool RayPolygon::isReady () const override
 Get the Position object.
 
__v2f_t RayPolygon::getPosition () const override
 Get the Position object.
 
void RayPolygon::setPosition (__v2f_t position) override
 Set the Position object.
 
__color_t RayPolygon::getColor () const override
 Get the Color object.
 
void RayPolygon::setColor (__color_t color) override
 Set the Color object.
 
std::vector< __v2f_tRayPolygon::getPoints () const override
 Get the Points object.
 
 RaySprite::RaySprite (std::string path)
 
bool RaySprite::isReady () const override
 notice if the sprite is ready
 
__v4f_t RaySprite::getBounds () const override
 give the bounds of the sprite
 
void RaySprite::setCrop (__v4f_t rect) override
 
__v2f_t RaySprite::getPosition () const override
 Get the Position object.
 
void RaySprite::setPosition (__v2f_t position) override
 
float RaySprite::getRotation () const override
 Get the Rotation object.
 
void RaySprite::setRotation (float angle, bool isRad=false) override
 Set the Rotation object.
 
__v2f_t RaySprite::getSize () const override
 Get the Sprite size.
 
void RaySprite::setSize (__v2f_t size) override
 
graphic::IWindowcreateWindow (__int32_t screenWidth, __int32_t screenHeight, std::string title)
 create a window
 
void deleteWindow (graphic::IWindow *window)
 delete a window
 
graphic::ICameracreateCamera (__v3f_t position)
 create a camera
 
void deleteCamera (graphic::ICamera *camera)
 delete a camera
 
graphic::IEventcreateEvent ()
 Event.
 
void deleteEvent (graphic::IEvent *event)
 delete an event
 
graphic::IKeyboardcreateKeyboard (graphic::IEvent *event)
 create a keyboard
 
void deleteKeyboard (graphic::IKeyboard *keyboard)
 delete a keyboard
 
graphic::IMousecreateMouse (graphic::IEvent *event)
 create a mouse
 
void deleteMouse (graphic::IMouse *mouse)
 delete a mouse
 
graphic::IPolygoncreatePolygon (std::vector< __v2f_t > points)
 Graphics.
 
void deletePolygon (graphic::IPolygon *polygon)
 delete a polygon
 
graphic::ISpritecreateSprite (std::string sprite)
 create a sprite
 
void deleteSprite (graphic::ISprite *sprite)
 delete a sprite
 
graphic::IModelcreateModel ()
 create a model
 
void deleteModel (graphic::IModel *model)
 delete a model
 
const char * getName ()
 get the name of the library
 
const char * getType ()
 get the type of the library
 
 RayCamera::RayCamera ()
 Construct a new Ray Camera object.
 
 RayCamera::~RayCamera ()
 Destroy the Ray Camera object.
 
float RayCamera::getFov () const override
 Get the Fov object.
 
void RayCamera::setFov (float fov) override
 Set the Fov object.
 
ICamera::Mode RayCamera::getMode () const override
 Get the Mode object.
 
void RayCamera::setMode (ICamera::Mode mode) override
 Set the Mode object.
 
__v3f_t RayCamera::getPosition () const override
 Get the Position object.
 
void RayCamera::setPosition (__v3f_t position) override
 Set the Position object.
 
ICamera::Projection RayCamera::getProjection () const override
 Get the Projection object.
 
void RayCamera::setProjection (ICamera::Projection projection) override
 Set the Projection object.
 
__v3f_t RayCamera::getTarget () const override
 Get the Target object.
 
void RayCamera::setTarget (__v3f_t target) override
 Set the Target object.
 
__v3f_t RayCamera::getUp () const override
 Get the Up object.
 
void RayCamera::setUp (__v3f_t up) override
 Set the Up object.
 
 RayWindow::RayWindow (__int32_t screenWidth, __int32_t screenHeight, std::string title)
 
bool RayWindow::isOpen () override
 notice if the window is open
 
void RayWindow::close () override
 close the window
 
void RayWindow::linkEvent (graphic::IEvent *event) override
 link an event to the window
 
bool RayWindow::pollEvent () override
 poll the event
 
void RayWindow::eventClose () override
 update the window
 
void RayWindow::setFrameLimit (__int32_t limit) override
 Set the Frame Limit object.
 
__int32_t RayWindow::getDelta () override
 Get the Delta object.
 
void RayWindow::beginDraw () override
 allowing to draw 2D on the window
 
void RayWindow::endDraw () override
 end the 2D drawing
 
virtual void RayWindow::drawPoly (graphic::IPolygon *polygon) override
 draw a polygon
 
virtual void RayWindow::drawSprite (graphic::ISprite *sprite) override
 draw a sprite
 
void RayWindow::beginMode3 (graphic::ICamera *camera) override
 allowing to draw 3D on the window
 
virtual void RayWindow::drawModel (graphic::IModel *model) override
 draw a model
 
void RayWindow::endMode3 () override
 end the 3D drawing
 

Variables

const std::unordered_map< IKeyboard::Keys, int > RayKeyboard::_keys
 
Vector3 RayModel::_position
 
Vector3 RayModel::_size
 
Color RayPolygon::_color
 
Vector2 RayPolygon::_position
 
std::vector< Vector2 > RayPolygon::_points
 
std::vector< graphic::triangle_tRayPolygon::_triangles
 
Texture2D RaySprite::_texture
 
Vector2 RaySprite::_position
 
Vector2 RaySprite::_scale
 
Rectangle RaySprite::_crop
 
float RaySprite::_rotation
 
Camera RayCamera::_camera
 
CameraMode RayCamera::_mode
 

Friends

class RayKeyboard
 
class RayMouse
 
class RayWindow
 
class RayWindow
 
class RayWindow
 
class RayWindow
 
class RayWindow
 

Detailed Description

Function Documentation

◆ beginDraw()

void RayWindow::beginDraw ( )
inlineoverridevirtual

allowing to draw 2D on the window

Implements graphic::IWindow.

◆ beginMode3()

void RayWindow::beginMode3 ( graphic::ICamera * camera)
overridevirtual

allowing to draw 3D on the window

Parameters
camera

Implements graphic::IWindow.

◆ close()

void RayWindow::close ( )
inlineoverridevirtual

close the window

Implements graphic::IWindow.

◆ createCamera()

graphic::ICamera * createCamera ( __v3f_t position)

create a camera

Parameters
position
Returns
graphic::ICamera*

◆ createEvent()

graphic::IEvent * createEvent ( )

Event.

create an event

Returns
graphic::IEvent*

◆ createKeyboard()

graphic::IKeyboard * createKeyboard ( graphic::IEvent * event)

create a keyboard

Parameters
event
Returns
graphic::IKeyboard*

◆ createModel()

graphic::IModel * createModel ( )

create a model

Returns
graphic::IModel*

◆ createMouse()

graphic::IMouse * createMouse ( graphic::IEvent * event)

create a mouse

Parameters
event
Returns
graphic::IMouse*

◆ createPolygon()

graphic::IPolygon * createPolygon ( std::vector< __v2f_t > points)

Graphics.

create a polygon

Parameters
points
Returns
graphic::IPolygon*

◆ createSprite()

graphic::ISprite * createSprite ( std::string sprite)

create a sprite

Parameters
sprite
Returns
graphic::ISprite*

◆ createWindow()

graphic::IWindow * createWindow ( __int32_t screenWidth,
__int32_t screenHeight,
std::string title )

create a window

Parameters
screenWidth
screenHeight
title
Returns
graphic::IWindow*

◆ deleteCamera()

void deleteCamera ( graphic::ICamera * camera)

delete a camera

Parameters
camera

◆ deleteEvent()

void deleteEvent ( graphic::IEvent * event)

delete an event

Parameters
event

◆ deleteKeyboard()

void deleteKeyboard ( graphic::IKeyboard * keyboard)

delete a keyboard

Parameters
keyboard

◆ deleteModel()

void deleteModel ( graphic::IModel * model)

delete a model

Parameters
model

◆ deleteMouse()

void deleteMouse ( graphic::IMouse * mouse)

delete a mouse

Parameters
mouse

◆ deletePolygon()

void deletePolygon ( graphic::IPolygon * polygon)

delete a polygon

Parameters
polygon

◆ deleteSprite()

void deleteSprite ( graphic::ISprite * sprite)

delete a sprite

Parameters
sprite

◆ deleteWindow()

void deleteWindow ( graphic::IWindow * window)

delete a window

Parameters
window

◆ drawModel()

void RayWindow::drawModel ( graphic::IModel * model)
overridevirtual

draw a model

Parameters
model

Implements graphic::IWindow.

◆ drawPoly()

void RayWindow::drawPoly ( graphic::IPolygon * polygon)
overridevirtual

draw a polygon

Parameters
polygon

Implements graphic::IWindow.

◆ drawSprite()

void RayWindow::drawSprite ( graphic::ISprite * model)
overridevirtual

draw a sprite

Parameters
model

Implements graphic::IWindow.

◆ endDraw()

void RayWindow::endDraw ( )
inlineoverridevirtual

end the 2D drawing

Implements graphic::IWindow.

◆ endMode3()

void RayWindow::endMode3 ( )
overridevirtual

end the 3D drawing

Implements graphic::IWindow.

◆ eventClose()

void RayWindow::eventClose ( )
inlineoverridevirtual

update the window

Implements graphic::IWindow.

◆ getBounds()

__v4f_t RaySprite::getBounds ( ) const
inlineoverridevirtual

give the bounds of the sprite

Returns
__v4f_t

Implements graphic::ISprite.

◆ getColor()

__color_t RayPolygon::getColor ( ) const
inlineoverridevirtual

Get the Color object.

Returns
__color_t

Implements graphic::IPolygon.

◆ getDelta()

__int32_t RayWindow::getDelta ( )
inlineoverridevirtual

Get the Delta object.

Returns
__int32_t

Implements graphic::IWindow.

◆ getFov()

float RayCamera::getFov ( ) const
inlineoverridevirtual

Get the Fov object.

Returns
float

Implements graphic::ICamera.

◆ getMode()

ICamera::Mode RayCamera::getMode ( ) const
inlineoverridevirtual

Get the Mode object.

Returns
ICamera::Mode

Implements graphic::ICamera.

◆ GetMouseWheelMove()

float RayMouse::GetMouseWheelMove ( ) const
inlineoverridevirtual

get the mouse wheel move

Returns
float

Implements graphic::IMouse.

◆ getName()

const char * getName ( )

get the name of the library

Returns
const char*

◆ getPoints()

std::vector< __v2f_t > RayPolygon::getPoints ( ) const
inlineoverridevirtual

Get the Points object.

Returns
std::vector<__v2f_t>

Implements graphic::IPolygon.

◆ getPosition() [1/5]

__v3f_t RayCamera::getPosition ( ) const
inlineoverridevirtual

Get the Position object.

Returns
__v3f_t

Implements graphic::ICamera.

◆ getPosition() [2/5]

__v3f_t RayModel::getPosition ( ) const
inlineoverridevirtual

Implements graphic::IModel.

◆ getPosition() [3/5]

__v2f_t RayMouse::getPosition ( ) const
inlineoverridevirtual

get the position of the mouse

Returns
__v2f_t

Implements graphic::IMouse.

◆ getPosition() [4/5]

__v2f_t RayPolygon::getPosition ( ) const
inlineoverridevirtual

Get the Position object.

Returns
__v2f_t

Implements graphic::IPolygon.

◆ getPosition() [5/5]

__v2f_t RaySprite::getPosition ( ) const
inlineoverridevirtual

Get the Position object.

Returns
__v2f_t

Implements graphic::ISprite.

◆ getProjection()

ICamera::Projection RayCamera::getProjection ( ) const
inlineoverridevirtual

Get the Projection object.

Returns
ICamera::Projection

Implements graphic::ICamera.

◆ getRotation()

float RaySprite::getRotation ( ) const
inlineoverridevirtual

Get the Rotation object.

Returns
float

Implements graphic::ISprite.

◆ getSize()

__v2f_t RaySprite::getSize ( ) const
inlineoverridevirtual

Get the Sprite size.

Returns
__v2f_t

Implements graphic::ISprite.

◆ getTarget()

__v3f_t RayCamera::getTarget ( ) const
inlineoverridevirtual

Get the Target object.

Returns
__v3f_t

Implements graphic::ICamera.

◆ getType()

const char * getType ( )

get the type of the library

Returns
const char*

◆ getUp()

__v3f_t RayCamera::getUp ( ) const
inlineoverridevirtual

Get the Up object.

Returns
__v3f_t

Implements graphic::ICamera.

◆ isButtonDown()

bool RayMouse::isButtonDown ( Buttons key) const
inlineoverridevirtual

notice if a button is down

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ isButtonPressed()

bool RayMouse::isButtonPressed ( Buttons key) const
inlineoverridevirtual

notice if a button is pressed

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ isButtonReleased()

bool RayMouse::isButtonReleased ( Buttons key) const
inlineoverridevirtual

notice if a button is released

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ isButtonUp()

bool RayMouse::isButtonUp ( Buttons key) const
inlineoverridevirtual

notice if a button is up

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ isKeyDown()

bool RayKeyboard::isKeyDown ( Keys key) const
inlineoverridevirtual

Check if the key is down.

Parameters
key
Returns
bool

Implements graphic::IKeyboard.

◆ isKeyPressed()

bool RayKeyboard::isKeyPressed ( Keys key) const
inlineoverridevirtual

Check if the key is pressed.

Parameters
key
Returns
bool

Implements graphic::IKeyboard.

◆ isKeyReleased()

bool RayKeyboard::isKeyReleased ( Keys key) const
inlineoverridevirtual

Check if the key is released.

Parameters
key
Returns
bool

Implements graphic::IKeyboard.

◆ isKeyUp()

bool RayKeyboard::isKeyUp ( Keys key) const
inlineoverridevirtual

Check if the key is up.

Parameters
key
Returns
bool

Implements graphic::IKeyboard.

◆ isOpen()

bool RayWindow::isOpen ( )
inlineoverridevirtual

notice if the window is open

Returns
bool

Implements graphic::IWindow.

◆ isReady() [1/2]

bool RayPolygon::isReady ( ) const
inlineoverridevirtual

Get the Position object.

Returns
__v2f_t

Implements graphic::IPolygon.

◆ isReady() [2/2]

bool RaySprite::isReady ( ) const
inlineoverridevirtual

notice if the sprite is ready

Returns
bool

Implements graphic::ISprite.

◆ linkEvent()

void RayWindow::linkEvent ( graphic::IEvent * event)
inlineoverridevirtual

link an event to the window

Parameters
event

Implements graphic::IWindow.

◆ pollEvent()

bool RayWindow::pollEvent ( )
inlineoverridevirtual

poll the event

Returns
bool

Implements graphic::IWindow.

◆ setColor()

void RayPolygon::setColor ( __color_t position)
inlineoverridevirtual

Set the Color object.

Parameters
position

Implements graphic::IPolygon.

◆ setFov()

void RayCamera::setFov ( float fov)
inlineoverridevirtual

Set the Fov object.

Parameters
fov

Implements graphic::ICamera.

◆ setFrameLimit()

void RayWindow::setFrameLimit ( __int32_t limit)
inlineoverridevirtual

Set the Frame Limit object.

Parameters
limit

Implements graphic::IWindow.

◆ setMode()

void RayCamera::setMode ( ICamera::Mode mode)
inlineoverride

Set the Mode object.

Parameters
mode

◆ setPosition() [1/4]

void RayCamera::setPosition ( __v3f_t position)
inlineoverridevirtual

Set the Position object.

Parameters
position

Implements graphic::ICamera.

◆ setPosition() [2/4]

void RayModel::setPosition ( __v3f_t position)
inlineoverridevirtual

Implements graphic::IModel.

◆ setPosition() [3/4]

void RayMouse::setPosition ( __v2f_t position)
inlineoverridevirtual

set the position of the mouse

Parameters
position

Implements graphic::IMouse.

◆ setPosition() [4/4]

void RayPolygon::setPosition ( __v2f_t position)
inlineoverridevirtual

Set the Position object.

Parameters
position

Implements graphic::IPolygon.

◆ setProjection()

void RayCamera::setProjection ( ICamera::Projection projection)
inlineoverride

Set the Projection object.

Parameters
projection

◆ setRotation()

void RaySprite::setRotation ( float angle,
bool isRad = false )
inlineoverridevirtual

Set the Rotation object.

Parameters
angle
isRad

Implements graphic::ISprite.

◆ setTarget()

void RayCamera::setTarget ( __v3f_t target)
inlineoverridevirtual

Set the Target object.

Parameters
target

Implements graphic::ICamera.

◆ setUp()

void RayCamera::setUp ( __v3f_t up)
inlineoverridevirtual

Set the Up object.

Parameters
up

Implements graphic::ICamera.

◆ update() [1/2]

void RayKeyboard::update ( )
inlineoverridevirtual

Update the keyboard.

Implements graphic::IKeyboard.

◆ update() [2/2]

void RayMouse::update ( )
inlineoverridevirtual

set the mouse wheel move

Parameters
move

Implements graphic::IMouse.

◆ whichKey()

std::vector< Keys > RayKeyboard::whichKey ( ) const
inlineoverridevirtual

Be careful, this function will check every key of the keyboard and return an array of keys that are pressed it's not recommended to use this function in a loop, use isKeyPressed() instead. it's efficient for key detection & binding.

Returns
Keys*

Implements graphic::IKeyboard.