HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_Types.h File Reference
#include "GA_API.h"
#include <UT/UT_Assert.h>
#include <UT/UT_ValArray.h>
#include <SYS/SYS_Math.h>
#include <SYS/SYS_Types.h>
+ Include dependency graph for GA_Types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __GA_Types__
 
#define GA_MAX_ORDER   11
 
#define GA_PAGE_BITS   10
 Attributes may paritition their data in pages of GA_PAGE_SIZE offsets. More...
 
#define GA_PAGE_SIZE   (1 << GA_PAGE_BITS)
 
#define GA_PAGE_MASK   (GA_PAGE_SIZE - 1)
 
#define GA_DEFRAGMENT_OCCUPANCY   1.00
 
#define GA_INVALID_INDEX   GA_Index(-1)
 
#define GA_INVALID_OFFSET   GA_Offset(-1)
 
#define GA_DETAIL_INDEX   GA_Index(0)
 Details are always at index and offset zero in their own detail index map. More...
 
#define GA_DETAIL_OFFSET   GA_Offset(0)
 

Typedefs

typedef exint GA_Size
 Defines the bit width for index and offset types in GA. More...
 
typedef GA_Size GA_Index
 Define the strictness of GA_Offset/GA_Index. More...
 
typedef GA_Size GA_Offset
 
typedef GA_Size GA_PageNum
 
typedef GA_Size GA_PageOff
 
typedef UT_ValArray< GA_IndexGA_IndexArray
 
typedef UT_ValArray< GA_OffsetGA_OffsetArray
 

Enumerations

enum  GA_AttributeOwner {
  GA_ATTRIB_VERTEX, GA_ATTRIB_POINT, GA_ATTRIB_PRIMITIVE, GA_ATTRIB_GLOBAL,
  GA_ATTRIB_OWNER_N, GA_ATTRIB_DETAIL = GA_ATTRIB_GLOBAL, GA_ATTRIB_INVALID = -1
}
 
enum  GA_Storage {
  GA_STORE_INVALID =-1, GA_STORE_BOOL, GA_STORE_UINT8, GA_STORE_INT8,
  GA_STORE_INT16, GA_STORE_INT32, GA_STORE_INT64, GA_STORE_REAL16,
  GA_STORE_REAL32, GA_STORE_REAL64, GA_STORE_STRING
}
 
enum  GA_StorageClass {
  GA_STORECLASS_INVALID = -1, GA_STORECLASS_INT, GA_STORECLASS_REAL, GA_STORECLASS_FLOAT = GA_STORECLASS_REAL,
  GA_STORECLASS_STRING, GA_STORECLASS_OTHER
}
 
enum  GA_TypeInfo {
  GA_TYPE_VOID = -1, GA_TYPE_POINT, GA_TYPE_HPOINT, GA_TYPE_VECTOR,
  GA_TYPE_NORMAL, GA_TYPE_COLOR, GA_TYPE_TRANSFORM, GA_TYPE_QUATERNION,
  GA_TYPE_INDEXPAIR, GA_TYPE_NONARITHMETIC_INTEGER, GA_TYPE_ARITHMETIC_INTEGER, GA_TYPE_TEXTURE_COORD
}
 
enum  GA_AttributeScope { GA_SCOPE_INVALID = -1, GA_SCOPE_PUBLIC, GA_SCOPE_PRIVATE, GA_SCOPE_GROUP }
 
enum  GA_GroupType {
  GA_GROUP_INVALID = -1, GA_GROUP_POINT = 0, GA_GROUP_PRIMITIVE = 1, GA_GROUP_EDGE = 2,
  GA_GROUP_BREAKPOINT = 3, GA_GROUP_VERTEX = 4, GA_GROUP_N
}
 An ordinal enum for the different types of groups in GA. More...
 
enum  GA_GroupMaskType {
  GA_GMASK_NONE = 0, GA_GMASK_POINT = 1 << GA_GROUP_POINT, GA_GMASK_PRIMITIVE = 1 << GA_GROUP_PRIMITIVE, GA_GMASK_EDGE = 1 << GA_GROUP_EDGE,
  GA_GMASK_BREAKPOINT = 1 << GA_GROUP_BREAKPOINT, GA_GMASK_VERTEX = 1 << GA_GROUP_VERTEX, GA_GMASK_FULL_MASK = ((1 << GA_GROUP_N)-1)
}
 
enum  GA_KnotSpaceType { GA_KNOT_SPACE_UNIFORM, GA_KNOT_SPACE_AVERAGING }
 
enum  GA_ParameterizationType { GA_PARAMETERIZATION_UNIFORM, GA_PARAMETERIZATION_CHORD, GA_PARAMETERIZATION_CENTRIPETAL, GA_PARAMETERIZATION_APPROXARC }
 
enum  GA_DataIdStrategy { GA_DATA_ID_BUMP = 0, GA_DATA_ID_CLONE = 1 }
 

Functions

bool GAisValid (GA_Size v)
 
GA_PageNum GAgetPageNum (GA_Offset v)
 
GA_PageOff GAgetPageOff (GA_Offset v)
 
bool GAisFullPage (GA_Offset start, GA_Offset end)
 
GA_Offset GAgetPageBoundary (const GA_Offset &start, const GA_Offset &end)
 
GA_API unsigned GAsizeof (GA_Storage store)
 Lookup the size in bytes of a storage type (inaccurate for bool) More...
 
GA_API int GAcomparePrecision (GA_Storage a, GA_Storage b)
 
GA_API const char * GAowner (GA_AttributeOwner owner)
 Lookup the owner name from the owner type. More...
 
GA_API GA_AttributeOwner GAowner (const char *owner)
 Lookup the owner type from the owner name. More...
 
GA_API const char * GAscope (GA_AttributeScope scope)
 Lookup the scope name from the scope type. More...
 
GA_API GA_AttributeScope GAscope (const char *scope)
 Lookup the scope type from the scope name. More...
 
GA_API const char * GAstorage (GA_Storage store)
 Lookup the storage name from the storage type. More...
 
GA_API GA_Storage GAstorage (const char *store)
 Lookup the storage type from the storage name. More...
 
GA_API const char * GAstorageLabel (GA_Storage store)
 Lookup the storage label (descriptive name) from the storage type. More...
 
GA_API GA_Storage GAstorageLabel (const char *store)
 Lookup the storage type from the storage label. More...
 
GA_API const char * GAstorageClass (GA_StorageClass store)
 Lookup the storage name from the storage type. More...
 
GA_API GA_StorageClass GAstorageClass (const char *store)
 Lookup the intrinsic storage type from the storage name. More...
 
GA_API const char * GAtypeinfo (GA_TypeInfo type)
 Lookup the type-info name from the type-info type. More...
 
GA_API GA_TypeInfo GAtypeinfo (const char *type)
 Lookup the type-info type from the type-info name. More...
 
GA_API const char * GAtypeinfoLabel (GA_TypeInfo type)
 Lookup the type-info label (descriptive name) from the type-info type. More...
 
GA_API GA_TypeInfo GAtypeinfoLabel (const char *type)
 Lookup the type-info type from the type-info label (descriptive name) More...
 
GA_API const char * GAgroupType (GA_GroupType owner)
 Lookup the owner name from the owner type. More...
 
GA_API GA_GroupType GAgroupType (const char *owner)
 Lookup the owner type from the owner name. More...
 
#define GA_INVALID_INTRINSIC_HANDLE   -1
 
typedef int GA_LocalIntrinsic
 
typedef int GA_GlobalIntrinsic
 

Macro Definition Documentation

#define __GA_Types__

Definition at line 14 of file GA_Types.h.

#define GA_DEFRAGMENT_OCCUPANCY   1.00

Definition at line 202 of file GA_Types.h.

#define GA_DETAIL_INDEX   GA_Index(0)

Details are always at index and offset zero in their own detail index map.

Definition at line 657 of file GA_Types.h.

#define GA_DETAIL_OFFSET   GA_Offset(0)

Definition at line 658 of file GA_Types.h.

#define GA_INVALID_INDEX   GA_Index(-1)

Definition at line 653 of file GA_Types.h.

#define GA_INVALID_INTRINSIC_HANDLE   -1

At the current time, intrinsic handles are an integer. This may change in the future.

Definition at line 668 of file GA_Types.h.

#define GA_INVALID_OFFSET   GA_Offset(-1)
#define GA_MAX_ORDER   11

Definition at line 163 of file GA_Types.h.

#define GA_PAGE_BITS   10

Attributes may paritition their data in pages of GA_PAGE_SIZE offsets.

Definition at line 199 of file GA_Types.h.

#define GA_PAGE_MASK   (GA_PAGE_SIZE - 1)

Definition at line 201 of file GA_Types.h.

#define GA_PAGE_SIZE   (1 << GA_PAGE_BITS)
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 200 of file GA_Types.h.

Typedef Documentation

At the current time, intrinsic handles are an integer. This may change in the future.

Definition at line 667 of file GA_Types.h.

typedef GA_Size GA_Index

Define the strictness of GA_Offset/GA_Index.

GA_Index is a contiguous index into an element in a GA_Detail structure. Since the list of elements can contain gaps, the index should be translated into a GA_Offset prior to lookup. The index remains constant if the element list is defragmented, but will be invalid if an element, prior to a given index, is inserted or deleted.

See Also
GA_Detail::pointOffset, GA_Detail::pointIndex,
GA_Detail::primitiveOffset, GA_Detail::primitiveIndex
GA_Detail::vertexOffset, GA_Detail::vertexIndex
Examples:
RAY/RAY_DemoSprite.C, SOP/SOP_CopRaster.C, SOP/SOP_PrimVOP.C, SOP/SOP_Surface.C, and tetprim/GR_PrimTetra.C.

Definition at line 611 of file GA_Types.h.

Definition at line 660 of file GA_Types.h.

At the current time, intrinsic handles are an integer. This may change in the future.

Definition at line 666 of file GA_Types.h.

typedef GA_Size GA_Offset

GA_Offset is a, possibly, non-contiguous offset to an element in a GA_Detail structure. GA_Offsets remain constant even if an element prior to it is deleted, but will be invalidated if an element is inserted prior to it, or if the element list is defragmented.

Examples:
euclid/SOP_Euclid.C, SOP/SOP_BrushHairLen.C, SOP/SOP_DetailAttrib.C, and tetprim/GEO_PrimTetra.C.

Definition at line 617 of file GA_Types.h.

Definition at line 661 of file GA_Types.h.

Definition at line 620 of file GA_Types.h.

Definition at line 621 of file GA_Types.h.

typedef exint GA_Size

Defines the bit width for index and offset types in GA.

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 211 of file GA_Types.h.

Enumeration Type Documentation

The GA_AttributeOwner enum is used to differentiate between the different types of attribute arrays stored in a GA_Detail. The different classes represent

  1. unique point attribute data (one per vertex on a primitive)
  2. shared point attribute data (attributes shared multiple vertices)
  3. per-primitive attribute data (one per primitive)
  4. attribute data stored on the detail itself (single value)
Enumerator
GA_ATTRIB_VERTEX 
GA_ATTRIB_POINT 
GA_ATTRIB_PRIMITIVE 
GA_ATTRIB_GLOBAL 
GA_ATTRIB_OWNER_N 
GA_ATTRIB_DETAIL 
GA_ATTRIB_INVALID 

Definition at line 33 of file GA_Types.h.

Scope qualifiers on attributes. Each valid scope has its own namespace, along with other consequences.

Enumerator
GA_SCOPE_INVALID 

Data has no numeric representation.

GA_SCOPE_PUBLIC 

Standard user attribute level.

GA_SCOPE_PRIVATE 
GA_SCOPE_GROUP 

Definition at line 121 of file GA_Types.h.

Strategies that may be used for attribute data IDs, usually when merging or copying attributes.

Note
Most functions with a parameter of this type typically treat it as a hint, and may ignore it when the requested strategy is not appropriate.
Enumerator
GA_DATA_ID_BUMP 

The default strategy, where the caller does not have to explicitly worry about attribute data IDs.

GA_DATA_ID_CLONE 

Attributes should inherit the data IDs from their corresponding source attribute. The caller will typically call GA_Attribute::bumpDataId() on any attributes that they later modify.

Definition at line 186 of file GA_Types.h.

Currently SOP_Node::parseAllGroups takes a mask of different types of groups. This enum allows group types to be packed into a bit field.

Enumerator
GA_GMASK_NONE 
GA_GMASK_POINT 
GA_GMASK_PRIMITIVE 
GA_GMASK_EDGE 
GA_GMASK_BREAKPOINT 
GA_GMASK_VERTEX 
GA_GMASK_FULL_MASK 

Definition at line 151 of file GA_Types.h.

An ordinal enum for the different types of groups in GA.

Enumerator
GA_GROUP_INVALID 
GA_GROUP_POINT 
GA_GROUP_PRIMITIVE 
GA_GROUP_EDGE 
GA_GROUP_BREAKPOINT 
GA_GROUP_VERTEX 
GA_GROUP_N 

Definition at line 138 of file GA_Types.h.

Enumerator
GA_KNOT_SPACE_UNIFORM 
GA_KNOT_SPACE_AVERAGING 

Definition at line 166 of file GA_Types.h.

Enumerator
GA_PARAMETERIZATION_UNIFORM 
GA_PARAMETERIZATION_CHORD 
GA_PARAMETERIZATION_CENTRIPETAL 
GA_PARAMETERIZATION_APPROXARC 

Definition at line 173 of file GA_Types.h.

enum GA_Storage

Attributes (and other data) may be stored with different precision and storage types.

Enumerator
GA_STORE_INVALID 
GA_STORE_BOOL 
GA_STORE_UINT8 
GA_STORE_INT8 
GA_STORE_INT16 
GA_STORE_INT32 
GA_STORE_INT64 
GA_STORE_REAL16 
GA_STORE_REAL32 
GA_STORE_REAL64 
GA_STORE_STRING 

Definition at line 48 of file GA_Types.h.

Often one does not care about the precision. In this case the storage class gives a good idea which AIFs will be supported.

Enumerator
GA_STORECLASS_INVALID 
GA_STORECLASS_INT 
GA_STORECLASS_REAL 
GA_STORECLASS_FLOAT 
GA_STORECLASS_STRING 
GA_STORECLASS_OTHER 

Definition at line 68 of file GA_Types.h.

Type qualifiers on attributes. These qualifiers can help to interpret the data associated with an attribute, but are not required.

Enumerator
GA_TYPE_VOID 

Data has no numeric representation.

GA_TYPE_POINT 

Data represents a position in space. Token "point".

GA_TYPE_HPOINT 

Data represents a position and homogeneous coordinate. The position is stored in non-homogeneous space (i.e. the w coordinate is not multiplied through). Token "hpoint"

GA_TYPE_VECTOR 

Data represents a direction vector. Token "vector".

GA_TYPE_NORMAL 

Data represents a normal vector. Token "normal".

GA_TYPE_COLOR 

Data represents a color. Token "color".

GA_TYPE_TRANSFORM 

Data represents a transform matrix. Token "matrix".

GA_TYPE_QUATERNION 

Data represents a quaternion. Token "quaternion".

GA_TYPE_INDEXPAIR 

Data represents an index-pair. Token "indexpair".

GA_TYPE_NONARITHMETIC_INTEGER 

When a numeric attribute is created with integer storage, the attribute will be tagged as a non-arithmetic integer. This means that mathematical operations will not typically be performed (i.e. integer values will not be averaged). This works well for most cases of integers under Houdini.

GA_TYPE_ARITHMETIC_INTEGER 

Arithmetic integers will be modified under arithmetic operations. Their values will be averaged etc.

Note
This is not the default behaviour for numeric attributes
GA_TYPE_TEXTURE_COORD 

Data represents a coordinate in texture space, a.k.a. uv/uvw, but not a primitive uv/uvw.

Definition at line 80 of file GA_Types.h.

Function Documentation

GA_API int GAcomparePrecision ( GA_Storage  a,
GA_Storage  b 
)

Compare precision of GA_Storage types. The function will return: -2 invalid comparison (i.e. comparing a string to a float) -1 if a is less precise than b 0 if a and be have the same precision 1 if a is more precise than b

GA_Offset GAgetPageBoundary ( const GA_Offset start,
const GA_Offset end 
)
inline

Definition at line 647 of file GA_Types.h.

GA_PageNum GAgetPageNum ( GA_Offset  v)
inline

Definition at line 632 of file GA_Types.h.

GA_PageOff GAgetPageOff ( GA_Offset  v)
inline

Definition at line 636 of file GA_Types.h.

GA_API const char* GAgroupType ( GA_GroupType  owner)

Lookup the owner name from the owner type.

GA_API GA_GroupType GAgroupType ( const char *  owner)

Lookup the owner type from the owner name.

bool GAisFullPage ( GA_Offset  start,
GA_Offset  end 
)
inline

Definition at line 640 of file GA_Types.h.

bool GAisValid ( GA_Size  v)
inline
GA_API const char* GAowner ( GA_AttributeOwner  owner)

Lookup the owner name from the owner type.

GA_API GA_AttributeOwner GAowner ( const char *  owner)

Lookup the owner type from the owner name.

GA_API const char* GAscope ( GA_AttributeScope  scope)

Lookup the scope name from the scope type.

GA_API GA_AttributeScope GAscope ( const char *  scope)

Lookup the scope type from the scope name.

GA_API unsigned GAsizeof ( GA_Storage  store)

Lookup the size in bytes of a storage type (inaccurate for bool)

GA_API const char* GAstorage ( GA_Storage  store)

Lookup the storage name from the storage type.

GA_API GA_Storage GAstorage ( const char *  store)

Lookup the storage type from the storage name.

GA_API const char* GAstorageClass ( GA_StorageClass  store)

Lookup the storage name from the storage type.

GA_API GA_StorageClass GAstorageClass ( const char *  store)

Lookup the intrinsic storage type from the storage name.

GA_API const char* GAstorageLabel ( GA_Storage  store)

Lookup the storage label (descriptive name) from the storage type.

GA_API GA_Storage GAstorageLabel ( const char *  store)

Lookup the storage type from the storage label.

GA_API const char* GAtypeinfo ( GA_TypeInfo  type)

Lookup the type-info name from the type-info type.

GA_API GA_TypeInfo GAtypeinfo ( const char *  type)

Lookup the type-info type from the type-info name.

GA_API const char* GAtypeinfoLabel ( GA_TypeInfo  type)

Lookup the type-info label (descriptive name) from the type-info type.

GA_API GA_TypeInfo GAtypeinfoLabel ( const char *  type)

Lookup the type-info type from the type-info label (descriptive name)