74 { myOptions.setOptionS(
"fileversion", version); }
76 {
return getDefaultedString(
"fileversion", storage,
""); }
78 bool isFileAtLeastVersion(
const char *
version)
const;
82 { myOptions.setOptionS(key, value); }
85 { myOptions.setOptionI(key, v); }
88 { myOptions.setOptionF(key, v); }
93 {
return myPointMap; }
97 {
return myVertexMap; }
101 {
return myPrimitiveMap; }
113 return myPrimitiveMap;
123 {
return GA_Offset(getLoadOffset(o) + load_index); }
128 return offsetFromIndex(myPointMap,
129 myPointOffset + load_index);
131 return GA_Offset(myPointOffset + load_index);
137 return offsetFromIndex(myVertexMap,
138 myVertexOffset + load_index);
140 return GA_Offset(myVertexOffset + load_index);
146 return offsetFromIndex(myPrimitiveMap,
147 myPrimitiveOffset + load_index);
149 return GA_Offset(myPrimitiveOffset + load_index);
159 return myPointOffset;
161 return myVertexOffset;
163 return myPrimitiveOffset;
185 bool addBadPrimitive(
const char *
type);
188 bool getSecondaryOffsets(
GA_Offset primary_offset,
195 bool getDefaultedBool(
const char *
name,
bool defvalue)
const;
200 const char *defvalue)
const;
210 const char *default_mask=
"*")
const
212 return getDefaultedString(
213 "geo:attributeloadmask", storage, default_mask);
220 const char *default_mask=
"*")
const
222 return getDefaultedString(
223 "geo:grouploadmask", storage, default_mask);
233 return getDefaultedBool(
"geo:loadprimitives",
true);
243 return getDefaultedBool(
"geo:loadprimitiveshared",
true);
271 void setFilename(
const char*
filename);
275 bool loadIndex(
UT_IStream* json_istream,
const char* index_pos_key,
294 SharedDataHandleMapType mySharedDataHandles;
295 PrimitiveStorageMapType myTemporaryPrimitiveStorage;
296 const char* myFilename;
299 #endif // GA_LOADMAP_H_
A class to manage an ordered array which has fixed offset handles.
const GA_IndexMap * getActivePrimitiveMap() const
GT_API const UT_StringHolder filename
GA_Offset getPointOffset(GA_Size load_index) const
Map the load_index to the actual point number in the detail.
getFileOption("OpenEXR:storage") storage
UT_StringMap< GA_SharedDataHandlePtr > SharedDataHandleMapType
GA_Offset getOffset(GA_Size load_index, GA_AttributeOwner o) const
Return the mapping of the load offset to the real offset.
bool optionLoadPrimitives() const
const GA_LoadOptions & getOptions() const
JSON reader class which handles parsing of JSON or bJSON files.
UT_StringMap< GA_Primitive * > PrimitiveStorageMapType
const char * optionAttributeLoadMask(UT_String &storage, const char *default_mask="*") const
Information necessary to lookup a secondary primitive.
void setOptionF(const char *key, fpreal v)
Set a real/float option.
UT_SharedPtr< GA_SharedDataHandle > GA_SharedDataHandlePtr
exint GA_Size
Defines the bit width for index and offset types in GA.
void setOptionI(const char *key, int v)
Set an integer option.
const char * optionGroupLoadMask(UT_String &storage, const char *default_mask="*") const
const GA_IndexMap * getActiveVertexMap() const
GA_Offset getPointOffset() const
GA_GeometryIndex * getIndex()
GA_Offset getVertexOffset(GA_Size load_index) const
Map the load_index to the actual vertex number in the detail.
GLuint const GLchar * name
GA_Offset getPrimitiveOffset() const
void setFileVersion(const char *version)
Set/get the file version.
GA_Detail & getDetail() const
Get the geometry being loaded.
bool optionLoadPrimitiveSharedData() const
GT_API const UT_StringHolder version
const GA_IndexMap * getActiveIndexMap(GA_AttributeOwner owner) const
void setOptionS(const char *key, const char *value)
Set a string option.
const char * getFileVersion(UT_String &storage) const
GA_Offset getLoadOffset(GA_AttributeOwner owner) const
GA_Offset getPrimitiveOffset(GA_Size load_index) const
Map the load_index to the actual primitive number in the detail.
Container class for all geometry.
Class to specify options for loading geometry.
GA_Offset getVertexOffset() const
const GA_IndexMap * getActivePointMap() const