Kigs Framework
Doc version 0.8
Open source multi purpose Rapid Application Development framework
|
#include <CullingObject.h>
Classes | |
class | CullPlane |
structure to store a plane definition : a Origin Point3D and a Normal Vector3D More... | |
Public Types | |
enum | CULLING_RESULT |
an object can be totally outside, totally inside or partially inside | |
enum | CULLING_PLANE |
"classic" culling planes when culling object is created by a camera | |
Public Member Functions | |
DECLARE_INLINE_CONSTRUCTOR (CullingObject) | |
a culling object is a CoreModifiable | |
virtual CULLING_RESULT | Cull (Node3D *, unsigned int &cullingMask) |
test the given node | |
int | GetPlaneCount () |
return current plane count in this object More... | |
void | InitPlane (int i, const Vector3D &, const Point3D &) |
initialise plane with index i in the list with given origin and normal More... | |
void | AddPlane (const Vector3D &, const Point3D &) |
insert a new plane in the liste defined with given origin and normal More... | |
void | RemovePlane (int i) |
remove plane with index i from the list More... | |
std::vector< CullPlane > & | GetCullPlaneList () |
return the plane list 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. | |
CoreModifiableAttribute * | getAttribute (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 Attributes | |
kstl::vector< CullPlane > | mCullPlaneList |
the vector used to store the list of plane | |
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 XMLNode * | ExportToXMLNode (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... | |
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... | |
CoreModifiableAttribute * | GenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID) |
create and add dynamic attribute except arrays | |
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 | |
Base class for culling objects.
void CullingObject::AddPlane | ( | const Vector3D & | n, |
const Point3D & | o | ||
) |
insert a new plane in the liste defined with given origin and normal
Vector3D | : normal |
Point3D | : position |
|
inline |
return the plane list
|
inline |
return current plane count in this object
void CullingObject::InitPlane | ( | int | i, |
const Vector3D & | n, | ||
const Point3D & | o | ||
) |
initialise plane with index i in the list with given origin and normal
i | : index |
Vector3D | : normal |
Point3D | : position |
void CullingObject::RemovePlane | ( | int | i | ) |
remove plane with index i from the list
i | : index |