Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Public Member Functions | Protected Member Functions | List of all members
DirectRenderingMethods Class Referenceabstract

#include <DirectRenderingMethods.h>

Inheritance diagram for DirectRenderingMethods:
CoreModifiable GenericRefCountedBaseClass

Public Member Functions

 DirectRenderingMethods (const kstl::string &name, DECLARE_CLASS_NAME_TREE_ARG)
 constructor More...
 
virtual void DrawBoundingBox (TravState *state, BBox *bbox, kfloat R=KFLOAT_CONST(1.0f), kfloat G=KFLOAT_CONST(0.0f), kfloat B=KFLOAT_CONST(.0f)) const =0
 Draw 3D bounding box in wireframe. More...
 
virtual void DrawTexturedQuad (TravState *state, Point3D Vertices[4], Point3D UV[4], kfloat R, kfloat G, kfloat B) const =0
 Draw quad with the currently bound texture. Vertex order : winded. More...
 
virtual void DrawSolidQuad (TravState *state, Point3D Vertices[4], kfloat R, kfloat G, kfloat B, bool EnableBlend=false) const =0
 Draw non-textured quad. Vertex order : winded. More...
 
virtual void DrawRoundedRectangle (TravState *state, Point3D Vertices[2], kfloat R, kfloat G, kfloat B, kfloat RBorder, kfloat GBorder, kfloat BBorder, kfloat Radius) const =0
 Draw a rounded rectangle. More...
 
- Public Member Functions inherited from CoreModifiable
void Init ()
 Modifiable managmenent.
 
void EmptyItemList ()
 remove all items (sons)
 
CMSP GetInstanceByPath (const std::string &path)
 return the instance corresponding to the given path in sons tree
 
std::string GetRuntimeID () const
 ID.
 
CoreModifiableAttributegetAttribute (KigsID labelid) const
 Attribute management.
 
u32 getNbArrayElements (KigsID attributeLabel) const
 return element count for an array type attribute
 
template<typename attribute_type , typename value_type >
attribute_type * AddDynamicAttribute (KigsID ID, const value_type &value)
 Dynamic attribute management.
 
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * GetMethods ()
 Method management.
 
bool aggregateWith (CMSP &item, ItemPosition pos=Last)
 Aggregate management.
 
void flagAsNotificationCenterRegistered ()
 Flags.
 
void InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params)
 Utility. More...
 
virtual void InitModifiable ()
 default modifiable init : set all initparams to readonly and set initflag to true More...
 
virtual void UninitModifiable ()
 called when InitModifiable has failled : reset read/write flag on all init params More...
 
virtual void ProtectedDestroy ()
 Destroy method decrement refcounter and delete instance if no more used. More...
 
virtual void addUser (CoreModifiable *user)
 add the given parent to list
 
virtual void removeUser (CoreModifiable *user)
 remove user (parent)
 
virtual bool addItem (const CMSP &item, ItemPosition pos=Last)
 add item at first or last position
 
virtual bool removeItem (const CMSP &item)
 remove item (son)
 

Protected Member Functions

virtual ~DirectRenderingMethods ()
 destructor
 
- Protected Member Functions inherited from CoreModifiable
void UpdateAggregates (const Timer &timer, void *addParam)
 Internals.
 
void Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings)
 Export. More...
 
CoreModifiableAttributeGenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID)
 create and add dynamic attribute except arrays
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreModifiable
static std::vector< CMSP > GetRootInstances (const KigsID &cid, bool exactTypeOnly=false)
 static method : return the set of all root instances of the given type
 
static void Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static XMLNodeExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More...
 
static std::string ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static CMSP Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="")
 return an new CoreModifiable instance using the description found in XML file given by name
 
static CMSP GetInstanceByGlobalPath (const std::string &path)
 static method : return the instance corresponding to the given path, and given search start
 
static void debugPrintfFullTree (int maxindent=3)
 Editor. More...
 
- Static Protected Member Functions inherited from CoreModifiable
template<typename StringType >
static CMSP Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState)
 recusrive method to add sons and attributes found in the XML file
 

Detailed Description

Base class to draw specific objects directly (in the current rendering context)

Constructor & Destructor Documentation

◆ DirectRenderingMethods()

DirectRenderingMethods::DirectRenderingMethods ( const kstl::string &  name,
DECLARE_CLASS_NAME_TREE_ARG   
)

constructor

Parameters
name: instance name
DECLARE_CLASS_NAME_TREE_ARG: list of arguments

Member Function Documentation

◆ DrawBoundingBox()

void DirectRenderingMethods::DrawBoundingBox ( TravState state,
BBox *  bbox,
kfloat  R = KFLOAT_CONST(1.0f),
kfloat  G = KFLOAT_CONST(0.0f),
kfloat  B = KFLOAT_CONST(.0f) 
) const
pure virtual

Draw 3D bounding box in wireframe.

Parameters
bbox: 3D bounding box to draw
R: red color
G: green color
B: blue color

◆ DrawRoundedRectangle()

void DirectRenderingMethods::DrawRoundedRectangle ( TravState state,
Point3D  Vertices[2],
kfloat  R,
kfloat  G,
kfloat  B,
kfloat  RBorder,
kfloat  GBorder,
kfloat  BBorder,
kfloat  Radius 
) const
pure virtual

Draw a rounded rectangle.

Parameters
Vertices: vertice position
R: red color
G: green color
B: blue color
RBorder: red color of the border
GBorder: green color of the border
BBorder: blue color of the border
Radius: corner radius

◆ DrawSolidQuad()

void DirectRenderingMethods::DrawSolidQuad ( TravState state,
Point3D  Vertices[4],
kfloat  R,
kfloat  G,
kfloat  B,
bool  EnableBlend = false 
) const
pure virtual

Draw non-textured quad. Vertex order : winded.

Parameters
Vertices: vertice position
R: red color
G: green color
B: blue color
EnableBlend: should blend

◆ DrawTexturedQuad()

void DirectRenderingMethods::DrawTexturedQuad ( TravState state,
Point3D  Vertices[4],
Point3D  UV[4],
kfloat  R,
kfloat  G,
kfloat  B 
) const
pure virtual

Draw quad with the currently bound texture. Vertex order : winded.

Parameters
Vertices: vertice position
UV: texture position
R: red color
G: green color
B: blue color

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