HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_Options.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GA_Options.h ( GA Library, C++)
7  *
8  * COMMENTS: Common option names for attributes. These are the keys used to
9  * lookup values in the UT_Options for each attribute.
10  *
11  * Keys should only use [a-z], [A-Z], [0-9] and '_', though
12  * there's no particular rule per se.
13  */
14 
15 #ifndef __GA_Options__
16 #define __GA_Options__
17 
18 #include "GA_API.h"
19 //---------------------------------------------------------------------
20 //
21 // Attribute Creation Options
22 //
23 // These options are used when creating attributes.
24 //---------------------------------------------------------------------
25 
26 // Specify the "default" values for the attribute. The value of this default
27 // changes based on different attribute types.
28 #define GA_OPTION_DEFAULTS "defaults"
29 
30 // The "ordered_group" option can be passed into creation of groups to
31 // make the group keep order information.
32 // bool "ordered_group" true|false
33 //
34 #define GA_OPTION_ORDERED_GROUP "ordered_group"
35 
36 // The "interleaved_defaults" option can be passed into creation
37 // of indexpair attributes to indicate that the supplied defaults interleave
38 // indices and values. Primarily used for loading old .geo/.bgeo files.
39 // bool "interleaved_defaults" true|false
40 //
41 #define GA_OPTION_INTERLEAVED_DEFAULTS "interleaved_defaults"
42 
43 // The "tuple_size" option can be specified during creation of certain
44 // attributes to control the number of components.
45 // int "tuple_size" 3
46 //
47 #define GA_OPTION_TUPLE_SIZE "tuple_size"
48 
49 // The "storage" option can be specified during creation of certain
50 // attributes to control the type of storage used for the values.
51 // int "storage" GA_STORE_REAL32|GA_STORE_INT16|...
52 //
53 #define GA_OPTION_STORAGE "storage"
54 
55 // The "entry_count" option can be specified during creation of certain
56 // (e.g. indexpair) attributes to control the number of entries. Some
57 // attribute values can consist of "entry_count" tuples, each tuple with
58 // "tuple_size" components.
59 // int "entry_count" 3
60 //
61 #define GA_OPTION_ENTRY_COUNT "entry_count"
62 
63 // The "file_load_flag" option can be passed during attribute creation as
64 // a hint that a GA_AIFFile::load() call will follow. Attributes can use
65 // this hint as an opportunity to avoid any initializations that would be
66 // overridden during the load.
67 // bool "file_load_flag" true|false
68 //
69 #define GA_OPTION_FILE_LOAD_FLAG "file_load_flag"
70 
71 //---------------------------------------------------------------------
72 //
73 // Per-Attribute Options
74 //
75 // Although any option can be set on a GA_Attribute, these are some common
76 // names and their meanings.
77 //---------------------------------------------------------------------
78 
79 // The "export_on_save" option controls whether an attribute can be saved
80 // when saving a .geo/.bgeo file. The default value depends on the scope
81 // of the attribute: GA_SCOPE_PUBLIC=true, GA_SCOPE_PRIVATE=false
82 // bool "export_on_save" true|false
83 //
84 #define GA_OPTION_EXPORT_ON_SAVE "export_on_save"
85 
86 // The "export_on_merge" option controls whether an attribute will be merged.
87 // The default value depends on the scope of the attribute:
88 // GA_SCOPE_PUBLIC=true, GA_SCOPE_PRIVATE=false
89 // bool "export_on_merge" true|false
90 //
91 #define GA_OPTION_EXPORT_ON_MERGE "export_on_merge"
92 
93 // The "export_to_infoblock" option controls whether a detail attribute
94 // is saved to the meta-data of a .geo/.bgeo files. This allows it
95 // to be retrieved without loading the entire file. The default is
96 // false.
97 #define GA_OPTION_EXPORT_TO_INFOBLOCK "export_to_infoblock"
98 
99 // The "leave_on_gpu" option controls whether attributes are
100 // copied back from the gpu. If they are left on the gpu, they
101 // are never copied back even if the GPU has marked them as changed.
102 // The default is false.
103 #define GA_OPTION_LEAVE_ON_GPU "leave_on_gpu"
104 
105 // Flags the attribute as non-transforming despite being of point type
106 #define GA_OPTION_NON_TRANSFORMING "attribute:non_transforming"
107 
108 // Flags the string attribute to store a set rather than unique
109 #define GA_OPTION_STRINGSET "blob:stringset"
110 
111 // It's possible to store options on attributes to help with exporting the data
112 // to RIB. The "rsl_type" allows you to store the type information for the RIB
113 // variable. The "rsl_offset" and "rsl_length" allow you to extract a
114 // sub-component of tuples.
115 // Example: Pass an attribute as a color to RIB
116 // string "rsl_type" "uniform color"
117 // int "rsl_offset" 0
118 // int "rsl_length" 3 # Assume RiColor is 3-tuple
119 //
120 // Example: Extract the 'v' component from a 3-tuple as a scalar value
121 // string "rsl_type" "vertex float"
122 // int "rsl_offset" 1 # Extract 2nd component
123 // int "rsl_length" 1 # Force length to 1
124 //
125 #define GA_OPTION_RSL_TYPE "rsl_type"
126 #define GA_OPTION_RSL_OFFSET "rsl_offset"
127 #define GA_OPTION_RSL_LENGTH "rsl_length"
128 
129 #endif