Eidolon
Public Member Functions | Protected Attributes | List of all members
DataSet Class Reference

#include <RenderTypes.h>

Inheritance diagram for DataSet:
Inheritance graph
Collaboration diagram for DataSet:
Collaboration graph

Public Member Functions

 DataSet (const char *name)
 
const char * getName () const
 
virtual DataSetclone (const char *name, bool cloneNodes=false)
 
virtual Vec3MatrixgetNodes () const
 
virtual void setNodes (Vec3Matrix *nodes)
 
virtual std::vector< std::string > getIndexNames () const
 Lists the names of index matrices stored. More...
 
virtual void setIndexNames (std::vector< std::string > names)
 Sets the internal list of index names, should be used to update name list whenever setIndexSet is called. More...
 
virtual IndexMatrixgetIndexSet (const char *name) const
 Get the index matrix of the given name, or NULL if not found. More...
 
virtual bool hasIndexSet (const char *name) const
 Returns true if an index matrix of the given name is stored. More...
 
virtual void setIndexSet (IndexMatrix *indices, const char *alias=NULL)
 Add a new index matrix to the data set using its internal name or the supplied name, replaces an existing stored matrix. More...
 
virtual std::vector< std::string > getFieldNames () const
 Lists the names of field matrices stored. More...
 
virtual void setFieldNames (std::vector< std::string > names)
 Sets the internal list of field names, should be used to update name list whenever setDataField is called. More...
 
virtual RealMatrixgetDataField (const char *name) const
 Get the field matrix of the given name, or NULL if not found. More...
 
virtual bool hasDataField (const char *name) const
 Returns true if a field matrix of the given name is stored. More...
 
virtual void setDataField (RealMatrix *field, const char *alias=NULL)
 Add a new field matrix to the data set using its internal name or the supplied name, replaces an existing stored matrix. More...
 
- Public Member Functions inherited from MetaType
bool hasMetaKey (const char *key) const
 Returns true if a key-value pair with the given key is present. More...
 
std::vector< std::string > getMetaKeys () const
 
std::string meta () const
 
const char * meta (const char *key) const
 Returns the value associated with the given key or the empty string if none is stored. More...
 
void meta (const char *key, const char *val)
 Add the given key-value pair to the metadata, or overwrite an existing if present. Does nothing if either argument is NULL. More...
 
void meta (const MetaType *m)
 Copy all the metadata from `m' to `this'. More...
 
std::string serializeMeta () const
 Turn all metadata name-value pairs into one string suitable for pickling. More...
 
void deserializeMeta (const std::string &s)
 Break a string generated by the above back into name-value pairs and store in `this'. More...
 

Protected Attributes

std::string name
 
std::vector< std::string > indexnames
 
std::vector< std::string > fieldnames
 
- Protected Attributes inherited from MetaType
metamap _meta
 

Additional Inherited Members

- Protected Types inherited from MetaType
typedef std::map< std::string, std::string > metamap
 
typedef metamap::iterator iter
 
typedef metamap::const_iterator citer
 

Detailed Description

DataSet objects store a Vec3Matrix, IndexMatrix instances which represent node properties or topologies which use the given nodes, and RealMatrix instances which represent field values for the nodes and/or for the topologies. This is the main data structure passed around as the object encapsulating all the information about a model loaded from external sources, or render data generated by algorithms. These must be implemented in Python so that the ownership of the matrices remains in Python-space for garbage collection reasons. Matrices added to a PyDataSet object will be associated with it for the lifetime of the of the data set, this ensures that they are only collected when needed and do not leak if their ownership was transferred to C++.

Constructor & Destructor Documentation

◆ DataSet()

DataSet ( const char *  name)
inline

Member Function Documentation

◆ clone()

virtual DataSet* clone ( const char *  name,
bool  cloneNodes = false 
)
inlinevirtual

◆ getDataField()

virtual RealMatrix* getDataField ( const char *  name) const
inlinevirtual

Get the field matrix of the given name, or NULL if not found.

Here is the caller graph for this function:

◆ getFieldNames()

virtual std::vector<std::string> getFieldNames ( ) const
inlinevirtual

Lists the names of field matrices stored.

Here is the caller graph for this function:

◆ getIndexNames()

virtual std::vector<std::string> getIndexNames ( ) const
inlinevirtual

Lists the names of index matrices stored.

◆ getIndexSet()

virtual IndexMatrix* getIndexSet ( const char *  name) const
inlinevirtual

Get the index matrix of the given name, or NULL if not found.

◆ getName()

const char* getName ( ) const
inline
Here is the caller graph for this function:

◆ getNodes()

virtual Vec3Matrix* getNodes ( ) const
inlinevirtual
Here is the caller graph for this function:

◆ hasDataField()

virtual bool hasDataField ( const char *  name) const
inlinevirtual

Returns true if a field matrix of the given name is stored.

◆ hasIndexSet()

virtual bool hasIndexSet ( const char *  name) const
inlinevirtual

Returns true if an index matrix of the given name is stored.

◆ setDataField()

virtual void setDataField ( RealMatrix field,
const char *  alias = NULL 
)
inlinevirtual

Add a new field matrix to the data set using its internal name or the supplied name, replaces an existing stored matrix.

◆ setFieldNames()

virtual void setFieldNames ( std::vector< std::string >  names)
inlinevirtual

Sets the internal list of field names, should be used to update name list whenever setDataField is called.

◆ setIndexNames()

virtual void setIndexNames ( std::vector< std::string >  names)
inlinevirtual

Sets the internal list of index names, should be used to update name list whenever setIndexSet is called.

◆ setIndexSet()

virtual void setIndexSet ( IndexMatrix indices,
const char *  alias = NULL 
)
inlinevirtual

Add a new index matrix to the data set using its internal name or the supplied name, replaces an existing stored matrix.

◆ setNodes()

virtual void setNodes ( Vec3Matrix nodes)
inlinevirtual

Member Data Documentation

◆ fieldnames

std::vector<std::string> fieldnames
protected

◆ indexnames

std::vector<std::string> indexnames
protected

◆ name

std::string name
protected

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