HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_AIFIndexPair Class Referenceabstract

Generic Attribute Interface class to get/set data as index pairs. More...

#include <GA_AIFIndexPair.h>

Public Member Functions

 GA_AIFIndexPair ()
 
virtual ~GA_AIFIndexPair ()
 
virtual int getDataTupleSize (const GA_Attribute *attrib) const =0
 
virtual bool setDataTupleSize (GA_Attribute *attrib, int size) const =0
 
virtual GA_Storage getDataStorage (const GA_Attribute *attrib) const =0
 
virtual bool removeIndex (GA_Attribute *attrib, int index) const =0
 
virtual void resetEntriesToDefaults (GA_Attribute *attrib, GA_Offset ai, int start_entry=0) const =0
 
virtual int getObjectSetCount (const GA_Attribute *attrib) const =0
 
virtual void setObjectSetCount (GA_Attribute *attrib, int n) const =0
 
virtual const
GA_AIFIndexPairObjects
getObjects (const GA_Attribute *attrib, int s=0) const =0
 
virtual GA_AIFIndexPairObjectsgetObjects (GA_Attribute *attrib, int s=0) const =0
 
virtual bool hasSameProperties (const GA_Attribute *attrib, const GA_Attribute *sattrib) const =0
 
virtual bool copyProperties (GA_Attribute *attrib, const GA_Attribute *sattrib) const =0
 
virtual bool mergeObjectValues (GA_Attribute *attrib, const GA_Attribute *sattrib, UT_IntArray &new_indices) const =0
 
virtual int getEntries (const GA_Attribute *attrib) const =0
 
virtual bool setEntries (GA_Attribute *attrib, int n) const =0
 
virtual bool getIndex (const GA_Attribute *attrib, GA_Offset ai, int entry, int32 &index) const =0
 
virtual bool getData (const GA_Attribute *attrib, GA_Offset ai, int entry, fpreal32 &data, int data_component=0) const =0
 
virtual bool getData (const GA_Attribute *attrib, GA_Offset ai, int entry, fpreal64 &data, int data_component=0) const =0
 
virtual bool getData (const GA_Attribute *attrib, GA_Offset ai, int entry, int32 &data, int data_component=0) const =0
 
virtual bool getData (const GA_Attribute *attrib, GA_Offset ai, int entry, int64 &data, int data_component=0) const =0
 
virtual bool setIndex (GA_Attribute *attrib, GA_Offset ai, int entry, int32 index) const =0
 
virtual bool setData (GA_Attribute *attrib, GA_Offset ai, int entry, fpreal32 data, int data_component=0) const =0
 
virtual bool setData (GA_Attribute *attrib, GA_Offset ai, int entry, fpreal64 data, int data_component=0) const =0
 
virtual bool setData (GA_Attribute *attrib, GA_Offset ai, int entry, int32 data, int data_component=0) const =0
 
virtual bool setData (GA_Attribute *attrib, GA_Offset ai, int entry, int64 data, int data_component=0) const =0
 

Detailed Description

Generic Attribute Interface class to get/set data as index pairs.

This class provides an interface to access attribute data. Each attribute type may provide this interface if it makes sense.

Index pair data can also contain a set of primary objects corresponding to the indices. These objects should be used to hold information about the capture region for the associated index. If the object contains a string property, it should be unique (eg. capture path). Use s=0 to manipulate primary objects. For example:

// create primary object set
aif->setObjectSetCount(attrib, 1);
const GA_AIFIndexPairObjects *objects = aif->setObjects(attrib);
// create a string property for the objects called "path"
sdef.append("");
objects->addProperty("path", sdef);
// create a float16 property for the objects called "transform"
for(int i = 0; i < 16; ++i)
fdef.append((i % 5 == 0) ? 1.0 : 0.0);
objects->addProperty("transform", fdef);
// add a new object
objects->setObjectCount(1);

Index pair data can also contain a secondary set of objects for holding multiple bits of subdata per index. These objects should be used to hold supplimentary data about objects such as the individual metaballs that make up a muscle. These secondary objects should also contain an integer property identifying the index of the primary object. Use s>0 to manipulate secondary objects.

Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 121 of file GA_AIFIndexPair.h.

Constructor & Destructor Documentation

GA_AIFIndexPair::GA_AIFIndexPair ( )
virtual GA_AIFIndexPair::~GA_AIFIndexPair ( )
virtual

Member Function Documentation

virtual bool GA_AIFIndexPair::copyProperties ( GA_Attribute attrib,
const GA_Attribute sattrib 
) const
pure virtual

Query and set data about the objects each index references.

virtual bool GA_AIFIndexPair::getData ( const GA_Attribute attrib,
GA_Offset  ai,
int  entry,
fpreal32 data,
int  data_component = 0 
) const
pure virtual

Get a specific (index, data[component]) pair from a given entry at a specified offset.

virtual bool GA_AIFIndexPair::getData ( const GA_Attribute attrib,
GA_Offset  ai,
int  entry,
fpreal64 data,
int  data_component = 0 
) const
pure virtual

Get a specific (index, data[component]) pair from a given entry at a specified offset.

virtual bool GA_AIFIndexPair::getData ( const GA_Attribute attrib,
GA_Offset  ai,
int  entry,
int32 data,
int  data_component = 0 
) const
pure virtual

Get a specific (index, data[component]) pair from a given entry at a specified offset.

virtual bool GA_AIFIndexPair::getData ( const GA_Attribute attrib,
GA_Offset  ai,
int  entry,
int64 data,
int  data_component = 0 
) const
pure virtual

Get a specific (index, data[component]) pair from a given entry at a specified offset.

virtual GA_Storage GA_AIFIndexPair::getDataStorage ( const GA_Attribute attrib) const
pure virtual
virtual int GA_AIFIndexPair::getDataTupleSize ( const GA_Attribute attrib) const
pure virtual
virtual int GA_AIFIndexPair::getEntries ( const GA_Attribute attrib) const
pure virtual

Query and set the entry count.

virtual bool GA_AIFIndexPair::getIndex ( const GA_Attribute attrib,
GA_Offset  ai,
int  entry,
int32 index 
) const
pure virtual

Get a specific (index, data[component]) pair from a given entry at a specified offset.

virtual const GA_AIFIndexPairObjects* GA_AIFIndexPair::getObjects ( const GA_Attribute attrib,
int  s = 0 
) const
pure virtual

Query and set data about the objects each index references.

virtual GA_AIFIndexPairObjects* GA_AIFIndexPair::getObjects ( GA_Attribute attrib,
int  s = 0 
) const
pure virtual

Query and set data about the objects each index references.

virtual int GA_AIFIndexPair::getObjectSetCount ( const GA_Attribute attrib) const
pure virtual

Query and set the number of object types (primary and secondary).

virtual bool GA_AIFIndexPair::hasSameProperties ( const GA_Attribute attrib,
const GA_Attribute sattrib 
) const
pure virtual

Query and set data about the objects each index references.

virtual bool GA_AIFIndexPair::mergeObjectValues ( GA_Attribute attrib,
const GA_Attribute sattrib,
UT_IntArray new_indices 
) const
pure virtual

Query and set data about the objects each index references.

virtual bool GA_AIFIndexPair::removeIndex ( GA_Attribute attrib,
int  index 
) const
pure virtual

Removes all references to an index including per point references and primary and secondary objects.

virtual void GA_AIFIndexPair::resetEntriesToDefaults ( GA_Attribute attrib,
GA_Offset  ai,
int  start_entry = 0 
) const
pure virtual

Reset entries of specific offset to the default values starting at the given entry index.

virtual bool GA_AIFIndexPair::setData ( GA_Attribute attrib,
GA_Offset  ai,
int  entry,
fpreal32  data,
int  data_component = 0 
) const
pure virtual

Set a specific (index, data[component]) pair from a given entry at a specified offset.

Examples:
SOP/SOP_BouncyAgent.C.
virtual bool GA_AIFIndexPair::setData ( GA_Attribute attrib,
GA_Offset  ai,
int  entry,
fpreal64  data,
int  data_component = 0 
) const
pure virtual

Set a specific (index, data[component]) pair from a given entry at a specified offset.

virtual bool GA_AIFIndexPair::setData ( GA_Attribute attrib,
GA_Offset  ai,
int  entry,
int32  data,
int  data_component = 0 
) const
pure virtual

Set a specific (index, data[component]) pair from a given entry at a specified offset.

virtual bool GA_AIFIndexPair::setData ( GA_Attribute attrib,
GA_Offset  ai,
int  entry,
int64  data,
int  data_component = 0 
) const
pure virtual

Set a specific (index, data[component]) pair from a given entry at a specified offset.

virtual bool GA_AIFIndexPair::setDataTupleSize ( GA_Attribute attrib,
int  size 
) const
pure virtual
virtual bool GA_AIFIndexPair::setEntries ( GA_Attribute attrib,
int  n 
) const
pure virtual

Query and set the entry count.

Examples:
SOP/SOP_BouncyAgent.C.
virtual bool GA_AIFIndexPair::setIndex ( GA_Attribute attrib,
GA_Offset  ai,
int  entry,
int32  index 
) const
pure virtual

Set a specific (index, data[component]) pair from a given entry at a specified offset.

Examples:
SOP/SOP_BouncyAgent.C.
virtual void GA_AIFIndexPair::setObjectSetCount ( GA_Attribute attrib,
int  n 
) const
pure virtual

Query and set the number of object types (primary and secondary).


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