Eidolon
Public Types | Public Member Functions | Public Attributes | List of all members
CallbackIndexBuffer< Ctx > Class Template Reference

See CallbackVertexBuffer, the same concept applies here with a buffer accepting functions defined in Cython to adapt Python code. More...

#include <RenderTypes.h>

Inheritance diagram for CallbackIndexBuffer< Ctx >:
Inheritance graph
Collaboration diagram for CallbackIndexBuffer< Ctx >:
Collaboration graph

Public Types

typedef sval(* wfunc) (Ctx, int)
 
typedef sval(* ifunc) (Ctx, int, int)
 

Public Member Functions

 CallbackIndexBuffer (Ctx context, sval numindices, wfunc widthfunc, ifunc indexfunc)
 
virtual sval numIndices () const
 Returns the number of index sets. More...
 
virtual sval indexWidth (int i) const
 Returns the width of index set i, i<numIndices(). All index sets for now are assumed to be the same width. More...
 
virtual sval getIndex (int i, int w) const
 Returns the w'th value of index set i. More...
 
- Public Member Functions inherited from IndexBuffer
virtual ~IndexBuffer ()
 

Public Attributes

wfunc widthfunc
 
ifunc indexfunc
 
sval numindices
 
Ctx context
 

Detailed Description

template<typename Ctx>
class RenderTypes::CallbackIndexBuffer< Ctx >

See CallbackVertexBuffer, the same concept applies here with a buffer accepting functions defined in Cython to adapt Python code.

Member Typedef Documentation

◆ ifunc

typedef sval(* ifunc) (Ctx, int, int)

◆ wfunc

typedef sval(* wfunc) (Ctx, int)

Constructor & Destructor Documentation

◆ CallbackIndexBuffer()

CallbackIndexBuffer ( Ctx  context,
sval  numindices,
wfunc  widthfunc,
ifunc  indexfunc 
)
inline

Member Function Documentation

◆ getIndex()

virtual sval getIndex ( int  i,
int  w 
) const
inlinevirtual

Returns the w'th value of index set i.

Reimplemented from IndexBuffer.

◆ indexWidth()

virtual sval indexWidth ( int  i) const
inlinevirtual

Returns the width of index set i, i<numIndices(). All index sets for now are assumed to be the same width.

Reimplemented from IndexBuffer.

◆ numIndices()

virtual sval numIndices ( ) const
inlinevirtual

Returns the number of index sets.

Reimplemented from IndexBuffer.

Member Data Documentation

◆ context

Ctx context

◆ indexfunc

ifunc indexfunc

◆ numindices

sval numindices

◆ widthfunc

wfunc widthfunc

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