GA/GA_Types.h File Reference

#include "GA_API.h"
#include <SYS/SYS_Types.h>
#include <SYS/SYS_TypeTraits.h>
#include <UT/UT_ValArray.h>
#include <UT/UT_IntrusivePtr.h>

Go to the source code of this file.

Defines

#define GA_MAX_ORDER   11
#define GA_PAGE_BITS   10
 Attributes may paritition their data in pages of GA_PAGE_SIZE offsets.
#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)

Typedefs

typedef exint GA_Size
 Defines the bit width for index and offset types in GA.
typedef GA_Size GA_Index
 Define the strictness of GA_Offset/GA_Index.
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
typedef UT_IntrusivePtr
< GA_AttributeProxy
GA_AttributeProxyHandle
typedef UT_IntrusivePtr< const
GA_AttributeProxy
GA_ConstAttributeProxyHandle

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
}
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
}
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 }

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).
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.
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 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 * 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 * 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 * 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).
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.
#define GA_INVALID_INTRINSIC_HANDLE   -1
typedef int GA_LocalIntrinsic
typedef int GA_GlobalIntrinsic


Define Documentation

#define GA_DEFRAGMENT_OCCUPANCY   1.00

Definition at line 183 of file GA_Types.h.

#define GA_INVALID_INDEX   GA_Index(-1)

Definition at line 347 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 358 of file GA_Types.h.

#define GA_INVALID_OFFSET   GA_Offset(-1)

#define GA_MAX_ORDER   11

Definition at line 161 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 180 of file GA_Types.h.

#define GA_PAGE_MASK   (GA_PAGE_SIZE - 1)

Definition at line 182 of file GA_Types.h.

#define GA_PAGE_SIZE   (1 << GA_PAGE_BITS)

Definition at line 181 of file GA_Types.h.


Typedef Documentation

Definition at line 507 of file GA_Types.h.

Definition at line 509 of file GA_Types.h.

typedef int GA_GlobalIntrinsic

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

Definition at line 357 of file GA_Types.h.

typedef GA_Size GA_Index

Define the strictness of GA_Offset/GA_Index.

Examples:
SOP/SOP_SParticle.C.

Definition at line 317 of file GA_Types.h.

Definition at line 350 of file GA_Types.h.

typedef int GA_LocalIntrinsic

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

Definition at line 356 of file GA_Types.h.

typedef GA_Size GA_Offset

Definition at line 351 of file GA_Types.h.

Definition at line 319 of file GA_Types.h.

Definition at line 320 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, and tetprim/GEO_PrimTetra.h.

Definition at line 192 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 

Definition at line 37 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 120 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 149 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 136 of file GA_Types.h.

Enumerator:
GA_KNOT_SPACE_UNIFORM 
GA_KNOT_SPACE_AVERAGING 

Definition at line 164 of file GA_Types.h.

Enumerator:
GA_PARAMETERIZATION_UNIFORM 
GA_PARAMETERIZATION_CHORD 
GA_PARAMETERIZATION_CENTRIPETAL 
GA_PARAMETERIZATION_APPROXARC 

Definition at line 171 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 51 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 71 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

Definition at line 83 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 341 of file GA_Types.h.

GA_PageNum GAgetPageNum ( GA_Offset  v  )  [inline]

Definition at line 326 of file GA_Types.h.

GA_PageOff GAgetPageOff ( GA_Offset  v  )  [inline]

Definition at line 330 of file GA_Types.h.

GA_API GA_GroupType GAgroupType ( const char *  owner  ) 

Lookup the owner type from the owner name.

GA_API const char* GAgroupType ( GA_GroupType  owner  ) 

Lookup the owner name from the owner type.

bool GAisFullPage ( GA_Offset  start,
GA_Offset  end 
) [inline]

Definition at line 334 of file GA_Types.h.

bool GAisValid ( GA_Size  v  )  [inline]

Definition at line 324 of file GA_Types.h.

GA_API GA_AttributeOwner GAowner ( const char *  owner  ) 

Lookup the owner type from the owner name.

GA_API const char* GAowner ( GA_AttributeOwner  owner  ) 

Lookup the owner name from the owner type.

GA_API GA_AttributeScope GAscope ( const char *  scope  ) 

Lookup the scope type from the scope name.

GA_API const char* GAscope ( GA_AttributeScope  scope  ) 

Lookup the scope name from the scope type.

GA_API unsigned GAsizeof ( GA_Storage  store  ) 

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

GA_API GA_Storage GAstorage ( const char *  store  ) 

Lookup the storage type from the storage name.

GA_API const char* GAstorage ( GA_Storage  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* GAstorageClass ( GA_StorageClass  store  ) 

Lookup the storage 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* GAstorageLabel ( GA_Storage  store  ) 

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

GA_API GA_TypeInfo GAtypeinfo ( const char *  type  ) 

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

GA_API const char* GAtypeinfo ( GA_TypeInfo  type  ) 

Lookup the type-info 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).

GA_API const char* GAtypeinfoLabel ( GA_TypeInfo  type  ) 

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


Generated on Thu Jan 31 00:28:54 2013 for HDK by  doxygen 1.5.9