synfig-core  1.0.3
Classes | Public Types | Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
synfig::Renderer Class Reference

#include <renderer.h>

Inheritance diagram for synfig::Renderer:
synfig::RendererSoftware

Classes

struct  ConvertChainEntry
struct  KeyConvert
struct  KeyCreate
class  Params
class  Primitive
class  PrimitiveBase
class  PrimitiveData
class  PrimitiveDataBase
 Base class of PrimitiveData (PrimitiveData base), NOT database. More...
class  TypesBase
class  TypesTemplate
class  TypesTemplate< RendererSoftware, Renderer::PrimitiveTypeMesh >
class  TypesTemplate< RendererSoftware, Renderer::PrimitiveTypeSurface >
class  TypesTemplateBase

Public Types

enum  PrimitiveType { PrimitiveTypeSurface, PrimitiveTypePolygon, PrimitiveTypeColoredPolygon, PrimitiveTypeMesh }
enum  { PrimitiveTypeCount = 4 }
enum  Result { ResultSuccess, ResultNotSupported, ResultFail }
typedef int RendererId
typedef PrimitiveDataBase::Handle(* FuncCreate )()
typedef PrimitiveDataBase::Handle(* FuncCopy )(PrimitiveDataBase::Handle primitive)
typedef PrimitiveDataBase::Handle(* FuncConvert )(PrimitiveDataBase::Handle primitive)
typedef KeyCreate KeyCopy
typedef std::map< KeyCreate,
FuncCreate
BookCreate
typedef std::map< KeyCopy,
FuncCopy
BookCopy
typedef std::map< KeyConvert,
FuncConvert
BookConvert
typedef std::map< KeyConvert,
ConvertChainEntry
BookConvertChain
typedef Primitive
< PrimitiveTypeSurface
PrimitiveSurface
typedef Primitive
< PrimitiveTypePolygon
PrimitivePolygon
typedef Primitive
< PrimitiveTypeColoredPolygon
PrimitiveColoredPolygon
typedef Primitive
< PrimitiveTypeMesh
PrimitiveMesh

Public Member Functions

bool is_primitive_supported (PrimitiveType primitive_type)
 Renderer ()
virtual ~Renderer ()
virtual Result render (const Params &params, const PrimitiveBase &primitive)
virtual Result render_surface (const Params &params, const Primitive< PrimitiveTypeSurface > &primitive)
virtual Result render_polygon (const Params &params, const Primitive< PrimitiveTypePolygon > &primitive)
virtual Result render_colored_polygon (const Params &params, const Primitive< PrimitiveTypeColoredPolygon > &primitive)
virtual Result render_mesh (const Params &params, const Primitive< PrimitiveTypeMesh > &primitive)

Static Protected Member Functions

static void register_renderer (int &id)
static void register_func_create (const KeyCreate &key, FuncCreate func)
static void register_func_copy (const KeyCopy &key, FuncCopy func)
static void register_func_convert (const KeyConvert &key, FuncConvert func)
static void unregister_renderer (int &id)
template<typename T >
static PrimitiveDataBase::Handle func_default_create ()
static PrimitiveDataBase::Handle func_default_convert (PrimitiveDataBase::Handle primitive)

Protected Attributes

bool supported_primitives [PrimitiveTypeCount]

Member Typedef Documentation

typedef PrimitiveDataBase::Handle(* synfig::Renderer::FuncCreate)()
typedef PrimitiveDataBase::Handle(* synfig::Renderer::FuncCopy)(PrimitiveDataBase::Handle primitive)
typedef PrimitiveDataBase::Handle(* synfig::Renderer::FuncConvert)(PrimitiveDataBase::Handle primitive)

Member Enumeration Documentation

Enumerator:
PrimitiveTypeSurface 
PrimitiveTypePolygon 
PrimitiveTypeColoredPolygon 
PrimitiveTypeMesh 
anonymous enum
Enumerator:
PrimitiveTypeCount 
Enumerator:
ResultSuccess 
ResultNotSupported 
ResultFail 

Constructor & Destructor Documentation

Renderer::Renderer ( )
Renderer::~Renderer ( )
virtual

Member Function Documentation

void Renderer::register_renderer ( int &  id)
staticprotected
void Renderer::register_func_create ( const KeyCreate key,
FuncCreate  func 
)
staticprotected
void Renderer::register_func_copy ( const KeyCopy key,
FuncCopy  func 
)
staticprotected
void Renderer::register_func_convert ( const KeyConvert key,
FuncConvert  func 
)
staticprotected
void Renderer::unregister_renderer ( int &  id)
staticprotected
template<typename T >
static PrimitiveDataBase::Handle synfig::Renderer::func_default_create ( )
inlinestaticprotected
static PrimitiveDataBase::Handle synfig::Renderer::func_default_convert ( PrimitiveDataBase::Handle  primitive)
inlinestaticprotected
bool synfig::Renderer::is_primitive_supported ( PrimitiveType  primitive_type)
inline

References supported_primitives.

Renderer::Result Renderer::render ( const Params params,
const PrimitiveBase primitive 
)
virtual
Renderer::Result Renderer::render_surface ( const Params params,
const Primitive< PrimitiveTypeSurface > &  primitive 
)
virtual

Reimplemented in synfig::RendererSoftware.

Renderer::Result Renderer::render_polygon ( const Params params,
const Primitive< PrimitiveTypePolygon > &  primitive 
)
virtual

Reimplemented in synfig::RendererSoftware.

Renderer::Result Renderer::render_colored_polygon ( const Params params,
const Primitive< PrimitiveTypeColoredPolygon > &  primitive 
)
virtual

Reimplemented in synfig::RendererSoftware.

Renderer::Result Renderer::render_mesh ( const Params params,
const Primitive< PrimitiveTypeMesh > &  primitive 
)
virtual

Reimplemented in synfig::RendererSoftware.

Member Data Documentation

bool synfig::Renderer::supported_primitives[PrimitiveTypeCount]
protected

Referenced by is_primitive_supported().


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