tile2d
Loading...
Searching...
No Matches
Classes | Functions
tileMap.hpp File Reference

Defines TileMap<> and TileBody<> More...

#include "body.hpp"

Go to the source code of this file.

Classes

class  TileProperties< T >
 Contains the data of a tile or multi tile. More...
 
class  PhysicsTileProperties
 Contains the physical properties of a tile, such as elasticity. More...
 
struct  _CreateTileMap
 
class  TileMap< TileType >
 
class  TileMap< TileType >::Iterator
 Allows iteration of tiles with for loops/. More...
 
class  TileBody< TileType >
 For use with a TileMap<>, allows collisions with other rigid bodies inside World<> More...
 
class  TileBody< TileType >::SpatialIndex
 A spatial index where pos may point towards a chunk or tile. More...
 
struct  CreateTileMap< TileType, TileMapAllocator, PhysicsWorld >
 

Functions

template<class TileType , class TileMapAllocator , class PhysicsWorld >
std::pair< TileMap< TileType > *, WorldBody * > createTileMap (TileMapAllocator &tileMapAllocator, PhysicsWorld &physicsWorld)
 Creates a tile map and a tile body using tileMapAllocator for the tileMap and the physicsWorld for the tile body.
 

Detailed Description

Defines TileMap<> and TileBody<>

Function Documentation

◆ createTileMap()

template<class TileType , class TileMapAllocator , class PhysicsWorld >
std::pair< TileMap< TileType > *, WorldBody * > createTileMap ( TileMapAllocator & tileMapAllocator,
PhysicsWorld & physicsWorld )

Creates a tile map and a tile body using tileMapAllocator for the tileMap and the physicsWorld for the tile body.

Parameters
tileMapAllocatorAn allocator used to create the tile map, MUST have a construct<>() method defined
physicsWorldA physicsWorld used to create the tile body, MUST be t2d::World<>
Returns
A pair pointing towards the tile map and tile body. Check if nullptr.