HDK
|
Used to pass options and map offset values during saving. More...
#include <GA_SaveMap.h>
Public Member Functions | |
GA_SaveMap (const GA_Detail &detail, const GA_SaveOptions *options) | |
Generic save map used when saving geometry. More... | |
~GA_SaveMap () | |
Destructor. More... | |
const GA_SaveOptions & | getOptions () const |
void | setFileVersion (const char *v) |
During the loading process, the file version may be set. More... | |
const char * | getFileVersion () const |
const GA_Detail & | getDetail () const |
Get the geometry being loaded. More... | |
const GA_Range & | getPointRange () const |
Return the iterator for the points to be saved. More... | |
const GA_Range & | getVertexRange () const |
Return the iterator for the vertices to be saved. More... | |
const GA_Range & | getPrimitiveRange () const |
Return the iterator for the primitives to be saved. More... | |
const GA_Range & | getGlobalRange () const |
Return the detail iterator. More... | |
const GA_Range & | getRange (GA_AttributeOwner i) const |
Return an arbitrary iterator based on the owner type. More... | |
GA_Index | getPointIndex (GA_Offset point_offset) const |
Take a point offset and returns its offset(index) in the save file. More... | |
GA_Index | getVertexIndex (GA_Offset vertex_offset) const |
Take a vertex offset and returns its offset(index) in the save file. More... | |
GA_Index | getPrimitiveIndex (GA_Offset primitive_offset) const |
Take a primitive offset and returns its offset(index) in the save file. More... | |
GA_Index | getIndex (GA_Offset offset, GA_AttributeOwner o) const |
Return the save index associated with an element. More... | |
bool | isTrivialMap (GA_AttributeOwner owner) const |
bool | getDefaultedBool (const char *name, bool defvalue) const |
Check the save options. Return defvalue if token isn't defined. More... | |
exint | getDefaultedInt (const char *name, exint defvalue) const |
Check the save options. Return defvalue if token isn't defined. More... | |
const char * | getDefaultedString (const char *name, UT_String &storage, const char *defvalue) const |
Check the save options. Return defvalue if the token isn't defined. More... | |
bool | getSecondaryIndices (GA_Offset primary_offset, const GA_SecondaryLookupInfo &info, UT_Int64Array &secondary_prim_indices) const |
bool | optionSaveInfo () const |
"bool geo:saveinfo" Whether to save info block More... | |
const char * | optionArtistName (UT_String &s) const |
"string info:artist" String containing the artist's name More... | |
const char * | optionHostname (UT_String &s) const |
"string info:hostname" String containing the host name More... | |
const char * | optionDate (UT_String &s) const |
"string info:date" Current date (default: Y-m-d T) More... | |
const char * | optionSoftware (UT_String &s) const |
"string info:software" Software (and version) More... | |
bool | optionSaveBounds () const |
bool | optionSavePrimCount () const |
bool | optionSaveVolumeSummary () const |
bool | optionSaveAttributeSummary () const |
bool | optionSaveRenderAttributeRanges () const |
bool | optionSaveGroupSummary () const |
bool | optionSavePointGroups () const |
bool | optionSavePrimitiveGroups () const |
bool | optionSaveVertexGroups () const |
bool | optionSaveEdgeGroups () const |
bool | optionSaveBreakpointGroups () const |
bool | optionIgnoreAttributeScope () const |
const char * | optionAttributeSaveMask (UT_String &storage, const char *default_mask="*") const |
const char * | optionGroupSaveMask (UT_String &storage, const char *default_mask="*") const |
bool | hasSavedSharedData (const UT_StringRef &key) const |
void | setSavedSharedData (const UT_StringHolder &key) |
Indicate the given data has been shared. More... | |
Used to pass options and map offset values during saving.
This class is a container which stores iterators that iterate over the points/primitives/vertices to be saved. It also stores keyword arguments in the form of a UT_Options.
Definition at line 48 of file GA_SaveMap.h.
GA_SaveMap::GA_SaveMap | ( | const GA_Detail & | detail, |
const GA_SaveOptions * | options | ||
) |
Generic save map used when saving geometry.
GA_SaveMap::~GA_SaveMap | ( | ) |
Destructor.
bool GA_SaveMap::getDefaultedBool | ( | const char * | name, |
bool | defvalue | ||
) | const |
Check the save options. Return defvalue
if token isn't defined.
Check the save options. Return defvalue
if token isn't defined.
const char* GA_SaveMap::getDefaultedString | ( | const char * | name, |
UT_String & | storage, | ||
const char * | defvalue | ||
) | const |
Check the save options. Return defvalue
if the token isn't defined.
|
inline |
Get the geometry being loaded.
Definition at line 84 of file GA_SaveMap.h.
|
inline |
Definition at line 81 of file GA_SaveMap.h.
|
inline |
Return the detail iterator.
Definition at line 100 of file GA_SaveMap.h.
|
inline |
Return the save index associated with an element.
Definition at line 118 of file GA_SaveMap.h.
|
inline |
The options in the save map are used to control behaviour during saving/loading of the geometry. The user can pass any arbitrary key/value pairs. Common options (used in the baseline GA library) are:
Definition at line 77 of file GA_SaveMap.h.
Take a point offset and returns its offset(index) in the save file.
|
inline |
Return the iterator for the points to be saved.
Definition at line 87 of file GA_SaveMap.h.
Take a primitive offset and returns its offset(index) in the save file.
|
inline |
Return the iterator for the primitives to be saved.
Definition at line 97 of file GA_SaveMap.h.
|
inline |
Return an arbitrary iterator based on the owner type.
Definition at line 103 of file GA_SaveMap.h.
bool GA_SaveMap::getSecondaryIndices | ( | GA_Offset | primary_offset, |
const GA_SecondaryLookupInfo & | info, | ||
UT_Int64Array & | secondary_prim_indices | ||
) | const |
Convert the secondary primitives offsets in the given lookup object into indices.
Take a vertex offset and returns its offset(index) in the save file.
|
inline |
Return the iterator for the vertices to be saved.
Definition at line 90 of file GA_SaveMap.h.
bool GA_SaveMap::hasSavedSharedData | ( | const UT_StringRef & | key | ) | const |
Test if the data associated with the unique key has been saved The key specified should be something which is guaranteed to be unique for the given data. However, it should be the same key for each shared instance. For example, given a shared pointer to data, you might consider:
bool GA_SaveMap::isTrivialMap | ( | GA_AttributeOwner | owner | ) | const |
|
inline |
"string info:artist"
String containing the artist's name
Definition at line 164 of file GA_SaveMap.h.
|
inline |
"string geo:attributesavemask"
Specify the "mask" for attributes which should be saved. This mask is in the form used by UT_String::multiMatch().
Definition at line 262 of file GA_SaveMap.h.
|
inline |
"string info:date"
Current date (default: Y-m-d T)
Definition at line 170 of file GA_SaveMap.h.
|
inline |
"string geo:groupsavemask"
Specify the "mask" for groups which should be saved. This mask is in the form used by UT_String::multiMatch()
Definition at line 272 of file GA_SaveMap.h.
|
inline |
"string info:hostname"
String containing the host name
Definition at line 167 of file GA_SaveMap.h.
|
inline |
"bool geo:ignoreattribscope"
When saving, private attributes are not typically saved. If this option is set, the scope of attributes should be ignored The GA_OPTION_EXPORT_ON_SAVE should override this option.
Definition at line 255 of file GA_SaveMap.h.
|
inline |
"bool info:saveattributesummary"
Whether to save a summary of attributes in the info block.
Definition at line 193 of file GA_SaveMap.h.
|
inline |
"bool info:savebounds"
Whether to compute and save bounding box in the info block.
Definition at line 178 of file GA_SaveMap.h.
|
inline |
"bool geo:savebreakpointgroups"
Whether to save breakpoint groups
Definition at line 245 of file GA_SaveMap.h.
|
inline |
"bool geo:saveedgegroups"
Whether to save edge groups
Definition at line 238 of file GA_SaveMap.h.
|
inline |
"bool info:savegroupsummary"
Whether to save a summary of groups in the info block.
Definition at line 212 of file GA_SaveMap.h.
|
inline |
"bool geo:saveinfo"
Whether to save info block
Definition at line 160 of file GA_SaveMap.h.
|
inline |
"bool geo:savepointgroups"
Whether to save point groups
Definition at line 217 of file GA_SaveMap.h.
|
inline |
"bool info:saveprimcounts"
Whether to compute and save the counts of each primitive type into the info block.
Definition at line 183 of file GA_SaveMap.h.
|
inline |
"bool geo:saveprimitivegroups"
Whether to save primitive groups
Definition at line 224 of file GA_SaveMap.h.
|
inline |
"bool info:saverenderattributeranges"
Will save the ranges for velocity attributes ("v" as point/primitive) and the "width" attribute (point, primitive, detail) if they exist. These can be used by rendering procedurals to adjust the bounds to include velocity and width attributes.
This is included in the attribute summary, so for this option to work, you need to have info:saveattributesummary
enabled.
Definition at line 204 of file GA_SaveMap.h.
|
inline |
"bool geo:savevertexgroups"
Whether to save vertex groups
Definition at line 231 of file GA_SaveMap.h.
|
inline |
"bool info:savevolumesummary"
Whether to compute and save the volume info into the info block.
Definition at line 188 of file GA_SaveMap.h.
|
inline |
"string info:software"
Software (and version)
Definition at line 173 of file GA_SaveMap.h.
|
inline |
During the loading process, the file version may be set.
Definition at line 80 of file GA_SaveMap.h.
void GA_SaveMap::setSavedSharedData | ( | const UT_StringHolder & | key | ) |
Indicate the given data has been shared.