Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ime Namespace Reference

Global namespace - Contains all namespaces, classes and functions. More...

Namespaces

 audio
 Container for all audio related classes and functions.
 
 input
 Container for all input related classes and functions.
 
 priv
 Window class forward declaration.
 
 ui
 Container for all user interface classes anf functions.
 
 utility
 Container for all utility classes and functions.
 

Classes

class  AABB
 An Axis Aligned Bounding Box (AABB) More...
 
class  AdjacencyList
 Construct a list of neighbours for each accessible node/cell in a grid. More...
 
class  Animation
 A frame based animation. More...
 
class  Animator
 Class for animating sprites. More...
 
class  BFS
 Finds a path in a TileMap using the Breadth First Search algorithm. More...
 
class  Body
 A rigid body. More...
 
struct  Borders
 Widget borders. More...
 
class  BoxCollider
 A box collider. More...
 
class  Camera
 A 2D camera that defines what region is shown on screen in a Scene. More...
 
class  CircleCollider
 A circle circle. More...
 
class  CircleShape
 A closed 2D curved shape. More...
 
class  Clock
 Class that measures time. More...
 
class  Collider
 Abstract Base class for colliders. More...
 
struct  CollisionFilterData
 Holds collision filtering data for a collider. More...
 
class  Colour
 RGBA colour. More...
 
class  ContactListener
 Subscribe to contact events. More...
 
class  ConvexShape
 A convex shape. More...
 
class  DFS
 Finds a path in a TileMap using the Depth First Search algorithm. More...
 
class  DistanceJoint
 Constrains two points on two rigid bodies to remain at a fixed distance from each other. More...
 
struct  DistanceJointDefinition
 
class  Drawable
 Window class forward declaration. More...
 
class  DrawableContainer
 A container for Drawable objects. More...
 
class  EdgeCollider
 An edge collider is a line segment. More...
 
class  Engine
 Runs the main loop. More...
 
class  Event
 Defines a system event and its parameters. More...
 
class  EventDispatcher
 A singleton class that creates a communication interface between separate parts of a program through event dispatching. More...
 
class  EventEmitter
 Class for creating and publishing events. More...
 
class  FileNotFound
 Exception class for when a file cannot be found. More...
 
class  GameObject
 Scene class forward declaration. More...
 
class  GameObjectContainer
 A container for GameObject instances. More...
 
class  GridMover
 Class for performing grid based movement on an entity in a grid. More...
 
class  GridMoverContainer
 A container for GridMover objects. More...
 
struct  Index
 Represents a position of a tile in the tilemap. More...
 
class  InvalidArgument
 Exception class for when an argument is invalid. More...
 
class  IPathFinderStrategy
 Interface for grid path finder algorithms. More...
 
class  ITransformable
 Interface for transformable entities. More...
 
class  Joint
 Interface for Joint classes. More...
 
struct  JointDefinition
 Define the properties of a Joint. More...
 
class  KeyboardGridMover
 Moves a GameObject in the grid using the keyboard as a movement trigger. More...
 
class  Object
 An abstract base class for entities in IME. More...
 
class  ObjectContainer
 A container for Object instances. More...
 
struct  Padding
 Represents the spacing between the text and the border of a widget. More...
 
class  PolygonCollider
 Solid convex polygon collider. More...
 
class  Property
 Class that can store a value of any type. More...
 
class  PropertyContainer
 A container for a group of properties. More...
 
class  RandomGridMover
 Class for moving a game object randomly in a grid. More...
 
class  Rect
 Class for manipulating 2D axis aligned rectangles. More...
 
class  RectangleShape
 A 2D shape having four sides and four corners (90 degree angles) More...
 
class  RenderLayer
 A layer for drawable entities. More...
 
class  RenderLayerContainer
 Stores and manages a scene's render layers. More...
 
class  ResourceHolder
 Class template for a resource container. More...
 
class  ResourceManager
 Class for loading and storing resources (textures, fonts, sound buffers, images and music) More...
 
class  Scene
 Abstract base class for game scenes. More...
 
class  SceneManager
 Manages game scenes. More...
 
class  Shape
 Abstract base class for geometric figures. More...
 
class  Sprite
 Drawable representation of a texture. More...
 
class  SpriteImage
 Abstract base class for image containers. More...
 
class  SpriteSheet
 Sprite class forward declaration. More...
 
class  TargetGridMover
 Class for moving a game object to a specific position in the grid. More...
 
class  Texture
 Image living on the graphics card that can be used for drawing. More...
 
class  Tile
 A Tilemap tile. More...
 
class  TileMap
 Class for creating a visual 2D grid. More...
 
class  TileMapParser
 Reads a file containing the tilemap data and returns it in grid form. More...
 
class  Time
 Represents a time value. More...
 
class  Timer
 Execute a callback after an interval/delay. More...
 
class  TimerManager
 Manages multiple Timer instances. More...
 
class  Transform
 Transform defined by a position, a rotation and a scale. More...
 
class  Vector2
 2D vector More...
 
class  Window
 Window that can serve as a target for 2D drawing. More...
 
class  WindowPassKey
 
class  World
 The World is responsible for creating, managing, colliding and updating all of the bodies within it. More...
 

Typedefs

using UIntRect = Rect< unsigned int >
 Unsigned int rect. More...
 
using IntRect = Rect< int >
 Int rect. More...
 
using FloatRect = Rect< float >
 Float rect. More...
 
using Vector2i = Vector2< int >
 2D int vector More...
 
using Vector2u = Vector2< unsigned int >
 2D unsigned int vector More...
 
using Vector2f = Vector2< float >
 2D float vector More...
 
typedef signed char Int8
 
typedef unsigned char Uint8
 
typedef signed short Int16
 
typedef unsigned short Uint16
 
typedef signed int Int32
 
typedef unsigned int Uint32
 
typedef signed long long Int64
 
typedef unsigned long long Uint64
 
template<typename... Args>
using Callback = std::function< void(Args...)>
 Event listener. More...
 
using Keyboard = ime::input::Keyboard
 
using Key = ime::input::Keyboard::Key
 
using Mouse = ime::input::Mouse
 
using Direction = Vector2i
 Direction of a game object. More...
 
using TextureHolder = ResourceHolder< Texture >
 Texture holder. More...
 
using SpriteContainer = DrawableContainer< Sprite >
 Shape object container. More...
 
using ShapeContainer = DrawableContainer< Shape >
 Sprite object container. More...
 
using Map = std::vector< std::vector< char > >
 Alias for 2D vector of chars. More...
 

Enumerations

enum  FrameArrangement { FrameArrangement::Horizontal, FrameArrangement::Vertical }
 Defines how the frames are arranged on a spritesheet. More...
 
enum  KeyboardEvent { KeyboardEvent::KeyUp, KeyboardEvent::KeyDown, KeyboardEvent::KeyHeld }
 Event class forward declaration. More...
 
enum  MouseEvent { MouseEvent::MouseDown, MouseEvent::MouseUp, MouseEvent::MouseMove, MouseEvent::MouseWheelScroll }
 Window class forward declaration. More...
 
enum  JointType { JointType::Distance }
 The types of joints. More...
 
enum  MovementTrigger { MovementTrigger::None, MovementTrigger::OnKeyDown, MovementTrigger::OnKeyUp, MovementTrigger::OnKeyHeld }
 Defines how the movement is triggered based on the state of a key. More...
 
enum  ResourceType {
  ResourceType::Texture, ResourceType::Font, ResourceType::Image, ResourceType::SoundBuffer,
  ResourceType::Music
}
 Resource identifiers (Types of resources that can be handled by resource manager) More...
 
enum  TextStyle {
  TextStyle::Regular = 0, TextStyle::Bold = 1 << 0, TextStyle::Italic = 1 << 1, TextStyle::Underlined = 1 << 2,
  TextStyle::StrikeThrough = 1 << 3
}
 Text styles. More...
 
enum  CursorType {
  CursorType::Arrow, CursorType::Text, CursorType::Hand, CursorType::SizeLeft,
  CursorType::SizeRight, CursorType::SizeTop, CursorType::SizeBottom, CursorType::SizeTopLeft,
  CursorType::SizeBottomRight, CursorType::SizeBottomLeft, CursorType::SizeTopRight, CursorType::Crosshair,
  CursorType::Help, CursorType::NotAllowed
}
 Mouse cursor types. More...
 
enum  ShowAnimationType {
  ShowAnimationType::Fade, ShowAnimationType::Scale, ShowAnimationType::SlideToRight, ShowAnimationType::SlideToLeft,
  ShowAnimationType::SlideToBottom, ShowAnimationType::SlideToTop, ShowAnimationType::SlideFromLeft = SlideToRight, ShowAnimationType::SlideFromRight = SlideToLeft,
  ShowAnimationType::SlideFromTop = SlideToBottom, ShowAnimationType::SlideFromBottom = SlideToTop
}
 

Functions

template<typename T >
Vector2< T > operator* (T left, const Vector2< T > &right)
 relates Vector2 More...
 
template<typename T >
Vector2< T > & operator*= (Vector2< T > &left, T right)
 Overload of binary operator *=. More...
 
IME_API bool operator== (const Index &lhs, const Index &rhs)
 Overload of binary operator ==. More...
 
IME_API bool operator!= (const Index &lhs, const Index &rhs)
 Overload of binary operator !=. More...
 
IME_API bool operator== (Time left, Time right)
 Overload of == operator to compare two time values. More...
 
IME_API std::string bindLeft (ui::Widget::Ptr widget)
 Bind to the x position of a widget. More...
 
IME_API std::string bindTop (ui::Widget::Ptr widget)
 Bind to the y position of the widget. More...
 
IME_API std::string bindWidth (ui::Widget::Ptr widget)
 Bind to the width of a widget. More...
 
IME_API std::string bindHeight (ui::Widget::Ptr widget)
 Bind to the height of a widget. More...
 
IME_API std::string bindRight (ui::Widget::Ptr widget)
 Bind to the right position of a widget. More...
 
IME_API std::string bindBottom (ui::Widget::Ptr widget)
 Bind to the bottom position of a widget. More...
 
IME_API std::string bindPosition (ui::Widget::Ptr widget)
 Bind to the position of the widget. More...
 
IME_API std::string bindSize (ui::Widget::Ptr widget)
 Bind to the size of the widget. More...
 
IME_API std::string bindMin (const std::string &value1, const std::string &value2)
 Bind to the minimum value of two values. More...
 
IME_API std::string bindMax (const std::string &value1, const std::string &value2)
 Bind to the maximum of two values. More...
 

Variables

static const Direction Left = {-1, 0}
 West direction. More...
 
static const Direction UpLeft = {-1, -1}
 North-West direction. More...
 
static const Direction Up = {0, -1}
 North direction. More...
 
static const Direction UpRight = {1, -1}
 North-East direction. More...
 
static const Direction Right = {1, 0}
 East direction. More...
 
static const Direction DownRight = {1, 1}
 South-East direction. More...
 
static const Direction Down = {0, 1}
 South direction. More...
 
static const Direction DownLeft = {-1, 1}
 South-West direction. More...
 
static const Direction Unknown = {0, 0}
 Unknown direction. More...
 

Detailed Description

Global namespace - Contains all namespaces, classes and functions.

Typedef Documentation

◆ Callback

template<typename... Args>
using ime::Callback = typedef std::function<void(Args...)>

Event listener.

Definition at line 38 of file EventEmitter.h.

◆ Direction

using ime::Direction = typedef Vector2i

Direction of a game object.

Definition at line 37 of file GridMover.h.

◆ FloatRect

using ime::FloatRect = typedef Rect<float>

Float rect.

Definition at line 177 of file Rect.h.

◆ IntRect

using ime::IntRect = typedef Rect<int>

Int rect.

Definition at line 176 of file Rect.h.

◆ Map

using ime::Map = typedef std::vector<std::vector<char> >

Alias for 2D vector of chars.

Definition at line 45 of file TileMap.h.

◆ ShapeContainer

Sprite object container.

Definition at line 76 of file DrawableContainer.h.

◆ SpriteContainer

Shape object container.

Definition at line 75 of file DrawableContainer.h.

◆ TextureHolder

Texture holder.

Definition at line 129 of file ResourceHolder.h.

◆ UIntRect

using ime::UIntRect = typedef Rect<unsigned int>

Unsigned int rect.

Definition at line 175 of file Rect.h.

◆ Vector2f

using ime::Vector2f = typedef Vector2<float>

2D float vector

Definition at line 297 of file Vector2.h.

◆ Vector2i

using ime::Vector2i = typedef Vector2<int>

2D int vector

Definition at line 295 of file Vector2.h.

◆ Vector2u

using ime::Vector2u = typedef Vector2<unsigned int>

2D unsigned int vector

Definition at line 296 of file Vector2.h.

Enumeration Type Documentation

◆ CursorType

enum ime::CursorType
strong

Mouse cursor types.

Enumerator
Arrow 

Arrow cursor (default)

Text 

I-beam, cursor when hovering over a text field.

Hand 

Pointing hand cursor.

SizeLeft 

Left arrow on Linux, horizontal double arrow cursor on Windows and macOS.

SizeRight 

Right arrow on Linux, horizontal double arrow cursor on Windows and macOS.

SizeTop 

Up arrow on Linux, vertical double arrow cursor on Windows and macOS.

SizeBottom 

Down arrow on Linux, vertical double arrow cursor on Windows and macOS.

SizeTopLeft 

Top-left arrow on Linux, double arrow cursor going from top-left to bottom-right on Windows and macOS.

SizeBottomRight 

Bottom-right arrow on Linux, double arrow cursor going from top-left to bottom-right on Windows and.

SizeBottomLeft 

Bottom-left arrow on Linux, double arrow cursor going from bottom-left to top-right on Windows and macOS.

SizeTopRight 

Top-right arrow on Linux, double arrow cursor going from bottom-left to top-right on Windows and macOS.

Crosshair 

Crosshair cursor.

Help 

Help cursor.

NotAllowed 

Action not allowed cursor.

Definition at line 49 of file Widget.h.

◆ FrameArrangement

enum ime::FrameArrangement
strong

Defines how the frames are arranged on a spritesheet.

Enumerator
Horizontal 

Horizontal frame alignment.

Vertical 

Vertical frame alignment.

Definition at line 42 of file Animation.h.

◆ JointType

enum ime::JointType
strong

The types of joints.

Enumerator
Distance 

Distance joint.

Definition at line 38 of file JointDefinition.h.

◆ KeyboardEvent

enum ime::KeyboardEvent
strong

Event class forward declaration.

Keyboard events

Enumerator
KeyUp 

Fired when depressed/held key is released.

KeyDown 

Fired when key is depressed for the first time.

KeyHeld 

Fired when a depressed key remains held.

Definition at line 38 of file Keyboard.h.

◆ MouseEvent

enum ime::MouseEvent
strong

Window class forward declaration.

Mouse events

Enumerator
MouseDown 

Fired when mouse is depressed.

MouseUp 

Fired when depressed mouse is released.

MouseMove 

Fired when the mouse is moved.

MouseWheelScroll 

Fired when the mouse wheel is scrolled.

Definition at line 39 of file Mouse.h.

◆ MovementTrigger

enum ime::MovementTrigger
strong

Defines how the movement is triggered based on the state of a key.

Enumerator
None 

Does not trigger any movement.

OnKeyDown 

Only triggers movement when a key goes down.

OnKeyUp 

Only triggers movement when a key is released.

OnKeyHeld 

Continues to trigger movement while key is held down.

Definition at line 35 of file KeyboardGridMover.h.

◆ ResourceType

enum ime::ResourceType
strong

Resource identifiers (Types of resources that can be handled by resource manager)

Enumerator
Texture 

Texture.

Font 

Font.

Image 

Image.

SoundBuffer 

Sound buffer.

Music 

Music.

Definition at line 48 of file ResourceManager.h.

◆ ShowAnimationType

Enumerator
Fade 

Fade widget in or out.

Scale 

Shrink to the center of the widget to hide or grow from its center to show.

SlideToRight 

Slide to the right to hide or from left to show.

SlideToLeft 

Slide to the left to hide or from right to show.

SlideToBottom 

Slide to the bottom to hide or from top to show.

SlideToTop 

Slide to the top to hide or from bottom to show.

SlideFromLeft 

Slide from left to show or to the right to hide.

SlideFromRight 

Slide from right to show or to the left to hide.

SlideFromTop 

Slide from top to show or to the bottom to hide.

SlideFromBottom 

Slide from bottom to show or to the top to hide.

Definition at line 66 of file Widget.h.

◆ TextStyle

enum ime::TextStyle
strong

Text styles.

Enumerator
Regular 

Regular characters, no style.

Bold 

Bold characters.

Italic 

Italic characters.

Underlined 

Underlined characters.

StrikeThrough 

Strike through characters.

Definition at line 61 of file IWidgetRenderer.h.

Function Documentation

◆ bindBottom()

IME_API std::string ime::bindBottom ( ui::Widget::Ptr  widget)

Bind to the bottom position of a widget.

Parameters
widgetWidget to bind to
Returns
The bound position

◆ bindHeight()

IME_API std::string ime::bindHeight ( ui::Widget::Ptr  widget)

Bind to the height of a widget.

Parameters
widgetThe widget to bind to
Returns
The bound size

◆ bindLeft()

IME_API std::string ime::bindLeft ( ui::Widget::Ptr  widget)

Bind to the x position of a widget.

Parameters
widgetWidget to bind to
Returns
The bound position

◆ bindMax()

IME_API std::string ime::bindMax ( const std::string &  value1,
const std::string &  value2 
)

Bind to the maximum of two values.

Parameters
value1The first value
value2The second value
Returns
The bound value

The values can be relative or absolute. For relative values insert the percentage (%) at the end

widget->setHeight(ime::bindMin("50, "100"); //Height will be set to 100 pixels
widget->setHeight(ime::bindMin("10%", "15%"); //Height will be set to 15% of the widgets parent height

◆ bindMin()

IME_API std::string ime::bindMin ( const std::string &  value1,
const std::string &  value2 
)

Bind to the minimum value of two values.

Parameters
value1The first value
value2The second value
Returns
The bound minimum

The values can be relative or absolute. For relative values insert the percentage (%) at the end

widget->setHeight(ime::bindMin("50, "100"); //Height will be set to 50 pixels
widget->setHeight(ime::bindMin("10%", "15%"); //Height will be set to 10% of the widgets parent height

◆ bindPosition()

IME_API std::string ime::bindPosition ( ui::Widget::Ptr  widget)

Bind to the position of the widget.

Parameters
widgetWidget to bind to
Returns
The bound position

◆ bindRight()

IME_API std::string ime::bindRight ( ui::Widget::Ptr  widget)

Bind to the right position of a widget.

Parameters
widgetWidget to bind to
Returns
The bound position

◆ bindSize()

IME_API std::string ime::bindSize ( ui::Widget::Ptr  widget)

Bind to the size of the widget.

Parameters
widgetThe widget to bind to
Returns
The bound size

◆ bindTop()

IME_API std::string ime::bindTop ( ui::Widget::Ptr  widget)

Bind to the y position of the widget.

Parameters
widgetWidget to bind to
Returns
The bound position

◆ bindWidth()

IME_API std::string ime::bindWidth ( ui::Widget::Ptr  widget)

Bind to the width of a widget.

Parameters
widgetThe widget to bind to
Returns
The bound size

◆ operator!=()

IME_API bool ime::operator!= ( const Index lhs,
const Index rhs 
)

Overload of binary operator !=.

Parameters
lhsLeft operand
rhsRight operand
Returns
True if lhs is not equal to rhs

◆ operator*()

template<typename T >
Vector2<T> ime::operator* ( left,
const Vector2< T > &  right 
)

relates Vector2

Overload of binary operator *

Parameters
leftLeft operand (a scalar value)
rightRight operand (a vector)
Returns
Memberwise multiplication by left

◆ operator*=()

template<typename T >
Vector2<T>& ime::operator*= ( Vector2< T > &  left,
right 
)

Overload of binary operator *=.

Parameters
leftLeft operand (a vector)
rightRight operand (a scalar value)
Returns
Reference to left

This operator performs a memberwise multiplication by right, and assigns the result to left.

◆ operator==() [1/2]

IME_API bool ime::operator== ( const Index lhs,
const Index rhs 
)

Overload of binary operator ==.

Parameters
lhsLeft operand
rhsRight operand
Returns
True if lhs is equal to rhs

◆ operator==() [2/2]

IME_API bool ime::operator== ( Time  left,
Time  right 
)

Overload of == operator to compare two time values.

Parameters
leftLeft operand (a time)
rightRight operand (a time)
Returns
True if left is equal to right

Variable Documentation

◆ Down

const Direction ime::Down = {0, 1}
static

South direction.

Definition at line 44 of file GridMover.h.

◆ DownLeft

const Direction ime::DownLeft = {-1, 1}
static

South-West direction.

Definition at line 45 of file GridMover.h.

◆ DownRight

const Direction ime::DownRight = {1, 1}
static

South-East direction.

Definition at line 43 of file GridMover.h.

◆ Left

const Direction ime::Left = {-1, 0}
static

West direction.

Definition at line 38 of file GridMover.h.

◆ Right

const Direction ime::Right = {1, 0}
static

East direction.

Definition at line 42 of file GridMover.h.

◆ Unknown

const Direction ime::Unknown = {0, 0}
static

Unknown direction.

Definition at line 46 of file GridMover.h.

◆ Up

const Direction ime::Up = {0, -1}
static

North direction.

Definition at line 40 of file GridMover.h.

◆ UpLeft

const Direction ime::UpLeft = {-1, -1}
static

North-West direction.

Definition at line 39 of file GridMover.h.

◆ UpRight

const Direction ime::UpRight = {1, -1}
static

North-East direction.

Definition at line 41 of file GridMover.h.

ime::bindMin
IME_API std::string bindMin(const std::string &value1, const std::string &value2)
Bind to the minimum value of two values.