Rasterfarm-SDK
Loading...
Searching...
No Matches
Engine Namespace Reference

API for creating Applications and rasterization-engines. More...

Namespaces

namespace  Raster
 
namespace  Schedule
 
namespace  Shape
 
namespace  Surface
 

Classes

class  Application
 This class abstracts-away user callbacks, events, and window-management. More...
 
class  Circulator
 
class  CommandBuffer
 
class  GraphicsPipeline
 
class  ImageMemory
 
struct  MasterLock
 
class  Memory
 
class  PrimaryCommandBuffer
 
class  Program
 
struct  Rectangle
 
class  RenderBuffer
 
class  ResourceManager
 
class  SecondaryCommandBuffer
 
class  Uniform
 
class  UniformBuffer
 
class  UniformMemory
 
class  UniformSampler
 
class  UniformValue
 
class  VertexMemory
 

Typedefs

using UniformValue1i = UniformValue< int >
 
using UniformValue1f = UniformValue< float >
 
using UniformBuffer1i = UniformBuffer< int, 1 >
 
using UniformBuffer1f = UniformBuffer< float, 1 >
 
using UniformBuffer2f = UniformBuffer< float, 2 >
 
using UniformBuffer3f = UniformBuffer< float, 3 >
 
using UniformBuffer4f = UniformBuffer< float, 4 >
 
using UniformMatrix3f = UniformBuffer< Matrix3f, 1 >
 
using UniformMatrix4f = UniformBuffer< Matrix4f, 1 >
 
template<class C >
using Initializer = std::initializer_list< C >
 
template<class C , size_t N>
using Array = std::array< C, N >
 
template<class C >
using HeapArray = std::vector< C >
 
template<class C >
using HeapArray2D = std::vector< std::vector< C > >
 
template<class C >
using List = std::list< C >
 
template<class C >
using Queue = std::queue< C >
 
template<class C >
using Stack = std::stack< C >
 
template<class C >
using UnorderedSet = std::unordered_set< C >
 
template<class C >
using Function = std::function< C >
 
using String = std::string
 
using StringStream = std::stringstream
 
using InputStringStream = std::istringstream
 
using OutputStringStream = std::ostringstream
 
using InputFfileStream = std::ifstream
 
template<class A , class B >
using Pair = std::pair< A, B >
 
template<class A , class B >
using UnorderedMap = std::unordered_map< A, B >
 
template<class A , class B >
using OrderedMap = std::map< A, B >
 
using Thread = std::thread
 
using Mutex = std::mutex
 
using RecursiveMutex = std::recursive_mutex
 
using ConditionalVariable = std::condition_variable
 
template<class C >
using UniqueLock = std::unique_lock< C >
 
typedef UnorderedSet< std::string > StringUnorderedSet
 
typedef UnorderedMap< int, bool > StateEnabledUnorderedMap
 
typedef UnorderedMap< int, bool > CapabilityUnorderedMap
 
typedef unsigned char Byte
 
typedef HeapArray< ByteByteArray
 
typedef unsigned short ushort
 
typedef uint TypeID
 
using UintRectangle = Rectangle< uint >
 
using FloatRectangle = Rectangle< float >
 
using DoubleRectangle = Rectangle< double >
 
typedef uint Handle
 
typedef Handle ArrayIndex
 

Enumerations

enum  : uint { INVALID_HANDLE = std::numeric_limits< uint >::max() }
 

Functions

template<class C >
int distance (const Circulator< C > &a, const Circulator< C > &b)
 
template<class C >
uint forwardDistance (const Circulator< C > &a, const Circulator< C > &b)
 
template<class C >
int shortestDistance (const Circulator< C > &a, const Circulator< C > &b)
 
std::string demangle (const char *str)
 
void insertAfterEach (const char *token, const char *insert, std::string &str)
 
std::vector< std::string > tokenize (const std::string &source, const char *delimiter=" ")
 
template<typename FROM , typename RETURN >
RETURN convert (const FROM &from)
 
template<typename T >
bool powerOfTwo (T value)
 
template<typename T >
bool compare (const T &v1, const T &v2, T precision)
 
template<typename T >
T clamp (T value, T lower, T upper)
 
template<typename T >
int sign (T val)
 
template<typename T >
T degreesToRadians (T angle)
 
template<typename T >
T radiansToDegrees (T radians)
 
template<class C , typename I >
C::const_iterator findIterator (const C &container, const I &item)
 
template<class C , typename I >
C::iterator findIterator (C &container, const I &item)
 
template<class C , typename I >
bool contains (const C &container, const I &item)
 
template<class M , typename K >
bool mapContains (const M &map, const K &key)
 
template<typename T >
std::vector< uint > sortIndexes (const std::vector< T > &v)
 
template<typename T >
std::vector< TgetCSV (std::string str)
 
template<class STL >
bool hasDuplicates (const STL &container)
 
template<class C , typename I >
uint getIndex (const C &container, const I &item)
 
bool doesFileExist (const char *file)
 
std::string addLineNumbers (const char *str)
 
std::string baseName (const char *str, bool removeSuffix)
 

Variables

const bool isLittleEndian = ( __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ )
 

Detailed Description

API for creating Applications and rasterization-engines.

Typedef Documentation

◆ Array

template<class C , size_t N>
using Engine::Array = std::array< C, N >

◆ ArrayIndex

◆ Byte

typedef unsigned char Engine::Byte

◆ ByteArray

◆ CapabilityUnorderedMap

◆ ConditionalVariable

using Engine::ConditionalVariable = std::condition_variable

◆ DoubleRectangle

◆ FloatRectangle

◆ Function

template<class C >
using Engine::Function = std::function< C >

◆ Handle

typedef uint Engine::Handle

◆ HeapArray

template<class C >
using Engine::HeapArray = std::vector< C >

◆ HeapArray2D

template<class C >
using Engine::HeapArray2D = std::vector< std::vector< C > >

◆ Initializer

template<class C >
using Engine::Initializer = std::initializer_list< C >

◆ InputFfileStream

using Engine::InputFfileStream = std::ifstream

◆ InputStringStream

using Engine::InputStringStream = std::istringstream

◆ List

template<class C >
using Engine::List = std::list< C >

◆ Mutex

using Engine::Mutex = std::mutex

◆ OrderedMap

template<class A , class B >
using Engine::OrderedMap = std::map< A, B >

◆ OutputStringStream

using Engine::OutputStringStream = std::ostringstream

◆ Pair

template<class A , class B >
using Engine::Pair = std::pair< A, B >

◆ Queue

template<class C >
using Engine::Queue = std::queue< C >

◆ RecursiveMutex

using Engine::RecursiveMutex = std::recursive_mutex

◆ Stack

template<class C >
using Engine::Stack = std::stack< C >

◆ StateEnabledUnorderedMap

◆ String

using Engine::String = std::string

◆ StringStream

using Engine::StringStream = std::stringstream

◆ StringUnorderedSet

typedef UnorderedSet< std::string > Engine::StringUnorderedSet

◆ Thread

using Engine::Thread = std::thread

◆ TypeID

typedef uint Engine::TypeID

◆ UintRectangle

◆ UniformBuffer1f

◆ UniformBuffer1i

◆ UniformBuffer2f

◆ UniformBuffer3f

◆ UniformBuffer4f

◆ UniformMatrix3f

◆ UniformMatrix4f

◆ UniformValue1f

◆ UniformValue1i

◆ UniqueLock

template<class C >
using Engine::UniqueLock = std::unique_lock< C >

◆ UnorderedMap

template<class A , class B >
using Engine::UnorderedMap = std::unordered_map< A, B >

◆ UnorderedSet

template<class C >
using Engine::UnorderedSet = std::unordered_set< C >

◆ ushort

typedef unsigned short Engine::ushort

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : uint
Enumerator
INVALID_HANDLE 

Function Documentation

◆ addLineNumbers()

std::string Engine::addLineNumbers ( const char * str)
inline

◆ baseName()

std::string Engine::baseName ( const char * str,
bool removeSuffix )
inline

◆ clamp()

template<typename T >
T Engine::clamp ( T value,
T lower,
T upper )
inline

◆ compare()

template<typename T >
bool Engine::compare ( const T & v1,
const T & v2,
T precision )
inline

◆ contains()

template<class C , typename I >
bool Engine::contains ( const C & container,
const I & item )

◆ convert()

template<typename FROM , typename RETURN >
RETURN Engine::convert ( const FROM & from)
inline

◆ degreesToRadians()

template<typename T >
T Engine::degreesToRadians ( T angle)
inline

◆ demangle()

std::string Engine::demangle ( const char * str)
inline

◆ distance()

template<class C >
int Engine::distance ( const Circulator< C > & a,
const Circulator< C > & b )

Gets the distance of 2 Circulators. This returns the shortest-distance regardless of order.

Returns
The shortest distance between Circulator a and b with sign indicating direction

◆ doesFileExist()

bool Engine::doesFileExist ( const char * file)
inline

◆ findIterator() [1/2]

template<class C , typename I >
C::iterator Engine::findIterator ( C & container,
const I & item )

◆ findIterator() [2/2]

template<class C , typename I >
C::const_iterator Engine::findIterator ( const C & container,
const I & item )

◆ forwardDistance()

template<class C >
uint Engine::forwardDistance ( const Circulator< C > & a,
const Circulator< C > & b )

Gets the distance of 2 Circulators. This returns the forward-distance, order implied.

Returns
The forward distance between Circulator a and b

◆ getCSV()

template<typename T >
std::vector< T > Engine::getCSV ( std::string str)

◆ getIndex()

template<class C , typename I >
uint Engine::getIndex ( const C & container,
const I & item )
inline

◆ hasDuplicates()

template<class STL >
bool Engine::hasDuplicates ( const STL & container)
inline

◆ insertAfterEach()

void Engine::insertAfterEach ( const char * token,
const char * insert,
std::string & str )
inline

◆ mapContains()

template<class M , typename K >
bool Engine::mapContains ( const M & map,
const K & key )

◆ powerOfTwo()

template<typename T >
bool Engine::powerOfTwo ( T value)

◆ radiansToDegrees()

template<typename T >
T Engine::radiansToDegrees ( T radians)
inline

◆ shortestDistance()

template<class C >
int Engine::shortestDistance ( const Circulator< C > & a,
const Circulator< C > & b )

Gets shortest-distance between 2 Circulators.

Returns
The shortest-distance with direction indicated by the sign

◆ sign()

template<typename T >
int Engine::sign ( T val)
inline

◆ sortIndexes()

template<typename T >
std::vector< uint > Engine::sortIndexes ( const std::vector< T > & v)

◆ tokenize()

std::vector< std::string > Engine::tokenize ( const std::string & source,
const char * delimiter = " " )
inline

Variable Documentation

◆ isLittleEndian

const bool Engine::isLittleEndian = ( __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ )