15 #ifndef __GA_PrimitiveFactory__
16 #define __GA_PrimitiveFactory__
53 unsigned non_factory_id_start,
int nentries_hint = 0,
54 bool isforprimarydetail =
true);
83 if (
id >= 0 &&
id < myList.size() && myList(
id))
89 static const ga_DSODefinitions &dsoDefinitions();
97 void getDefinitionIdRange(
unsigned &
first,
98 unsigned &
last)
const;
111 myDetailIntrinsics.extractNames(names);
134 myFactory = src.myFactory;
141 if (atEnd() && src.
atEnd())
143 return myFactory == src.myFactory &&
144 myCurr == src.myCurr &&
148 {
return !(*
this ==
cmp); }
150 {
return myCurr >= myEnd; }
157 myFactory->getDefinitionIdRange(
167 for (myCurr++; myCurr < myEnd; ++myCurr)
170 if (myFactory->lookupDefinition(myCurr))
175 {
return myFactory->lookupDefinition(myCurr); }
183 unsigned int myCurr, myEnd;
191 {
return myIOTable.add(io); }
192 const GA_IO *
findIO(
const char *name)
const
193 {
return myIOTable.find(name); }
195 { myIOTable.getNames(names); }
204 {
return myDetailIntrinsics; }
206 {
return myDetailIntrinsics; }
213 unsigned int myNextId;
218 UT_Lock myPrimitiveIntrinsicsMutex;
228 const bool myForPrimaryDetail;
GLuint GLsizei const GLchar * label
GA_PrimitiveTypeId getFactoryTypeId(int id) const
Given a factory type id, return the corresponding GA_PrimitiveTypeId.
Manager to keep track of global handle to name mappings.
IMATH_HOSTDEVICE constexpr int cmp(T a, T b) IMATH_NOEXCEPT
void getDetailIntrinsicNames(UT_StringArray &names) const
Container class to store GA_IO objects for a detail specialization.
bool operator!=(const iterator &cmp) const
iterator(const iterator &src)
iterator & operator=(const iterator &src)
bool isForPrimaryDetail() const
GLuint const GLchar * name
UT_ArrayStringMap< UT_StringHolder > ga_DSODefinitions
void getIONames(UT_StringArray &names) const
__hostdev__ uint64_t last(uint32_t i) const
const GA_PrimitiveDefinition * def() const
void(* GA_PrimitiveBlockConstructor)(GA_Primitive **new_prims, GA_Size nprimitives, GA_Detail &detail, GA_Offset start_offset, const GA_PrimitiveDefinition &def, bool allowed_to_parallelize)
int getPrimTypeCount() const
Container class for all geometry.
bool registerIO(GA_IO *io)
Definition of a geometric primitive.
const GA_IO * findIO(const char *name) const
bool operator==(const iterator &src) const
void addPrimTypeAddedCallback(const UT_Functor< void > &cb)
add a callback to call when a new primitive type is added
Class to traverse all primitive definitions in the factory.