| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | #include <osgIntrospection/ReflectionMacros> |
|---|
| 9 | #include <osgIntrospection/TypedMethodInfo> |
|---|
| 10 | #include <osgIntrospection/StaticMethodInfo> |
|---|
| 11 | #include <osgIntrospection/Attributes> |
|---|
| 12 | |
|---|
| 13 | #include <osg/CopyOp> |
|---|
| 14 | #include <osg/Object> |
|---|
| 15 | #include <osg/State> |
|---|
| 16 | #include <osg/StateAttribute> |
|---|
| 17 | #include <osg/StateAttributeCallback> |
|---|
| 18 | #include <osg/StateSet> |
|---|
| 19 | #include <osg/Texture> |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | #ifdef IN |
|---|
| 23 | #undef IN |
|---|
| 24 | #endif |
|---|
| 25 | #ifdef OUT |
|---|
| 26 | #undef OUT |
|---|
| 27 | #endif |
|---|
| 28 | |
|---|
| 29 | BEGIN_ENUM_REFLECTOR(osg::StateAttribute::Values) |
|---|
| 30 | I_DeclaringFile("osg/StateAttribute"); |
|---|
| 31 | I_EnumLabel(osg::StateAttribute::OFF); |
|---|
| 32 | I_EnumLabel(osg::StateAttribute::ON); |
|---|
| 33 | I_EnumLabel(osg::StateAttribute::OVERRIDE); |
|---|
| 34 | I_EnumLabel(osg::StateAttribute::PROTECTED); |
|---|
| 35 | I_EnumLabel(osg::StateAttribute::INHERIT); |
|---|
| 36 | END_REFLECTOR |
|---|
| 37 | |
|---|
| 38 | BEGIN_ENUM_REFLECTOR(osg::StateAttribute::Type) |
|---|
| 39 | I_DeclaringFile("osg/StateAttribute"); |
|---|
| 40 | I_EnumLabel(osg::StateAttribute::TEXTURE); |
|---|
| 41 | I_EnumLabel(osg::StateAttribute::POLYGONMODE); |
|---|
| 42 | I_EnumLabel(osg::StateAttribute::POLYGONOFFSET); |
|---|
| 43 | I_EnumLabel(osg::StateAttribute::MATERIAL); |
|---|
| 44 | I_EnumLabel(osg::StateAttribute::ALPHAFUNC); |
|---|
| 45 | I_EnumLabel(osg::StateAttribute::ANTIALIAS); |
|---|
| 46 | I_EnumLabel(osg::StateAttribute::COLORTABLE); |
|---|
| 47 | I_EnumLabel(osg::StateAttribute::CULLFACE); |
|---|
| 48 | I_EnumLabel(osg::StateAttribute::FOG); |
|---|
| 49 | I_EnumLabel(osg::StateAttribute::FRONTFACE); |
|---|
| 50 | I_EnumLabel(osg::StateAttribute::LIGHT); |
|---|
| 51 | I_EnumLabel(osg::StateAttribute::POINT); |
|---|
| 52 | I_EnumLabel(osg::StateAttribute::LINEWIDTH); |
|---|
| 53 | I_EnumLabel(osg::StateAttribute::LINESTIPPLE); |
|---|
| 54 | I_EnumLabel(osg::StateAttribute::POLYGONSTIPPLE); |
|---|
| 55 | I_EnumLabel(osg::StateAttribute::SHADEMODEL); |
|---|
| 56 | I_EnumLabel(osg::StateAttribute::TEXENV); |
|---|
| 57 | I_EnumLabel(osg::StateAttribute::TEXENVFILTER); |
|---|
| 58 | I_EnumLabel(osg::StateAttribute::TEXGEN); |
|---|
| 59 | I_EnumLabel(osg::StateAttribute::TEXMAT); |
|---|
| 60 | I_EnumLabel(osg::StateAttribute::LIGHTMODEL); |
|---|
| 61 | I_EnumLabel(osg::StateAttribute::BLENDFUNC); |
|---|
| 62 | I_EnumLabel(osg::StateAttribute::BLENDEQUATION); |
|---|
| 63 | I_EnumLabel(osg::StateAttribute::LOGICOP); |
|---|
| 64 | I_EnumLabel(osg::StateAttribute::STENCIL); |
|---|
| 65 | I_EnumLabel(osg::StateAttribute::COLORMASK); |
|---|
| 66 | I_EnumLabel(osg::StateAttribute::DEPTH); |
|---|
| 67 | I_EnumLabel(osg::StateAttribute::VIEWPORT); |
|---|
| 68 | I_EnumLabel(osg::StateAttribute::SCISSOR); |
|---|
| 69 | I_EnumLabel(osg::StateAttribute::BLENDCOLOR); |
|---|
| 70 | I_EnumLabel(osg::StateAttribute::MULTISAMPLE); |
|---|
| 71 | I_EnumLabel(osg::StateAttribute::CLIPPLANE); |
|---|
| 72 | I_EnumLabel(osg::StateAttribute::COLORMATRIX); |
|---|
| 73 | I_EnumLabel(osg::StateAttribute::VERTEXPROGRAM); |
|---|
| 74 | I_EnumLabel(osg::StateAttribute::FRAGMENTPROGRAM); |
|---|
| 75 | I_EnumLabel(osg::StateAttribute::POINTSPRITE); |
|---|
| 76 | I_EnumLabel(osg::StateAttribute::PROGRAM); |
|---|
| 77 | I_EnumLabel(osg::StateAttribute::CLAMPCOLOR); |
|---|
| 78 | I_EnumLabel(osg::StateAttribute::HINT); |
|---|
| 79 | I_EnumLabel(osg::StateAttribute::VALIDATOR); |
|---|
| 80 | I_EnumLabel(osg::StateAttribute::VIEWMATRIXEXTRACTOR); |
|---|
| 81 | I_EnumLabel(osg::StateAttribute::OSGNV_PARAMETER_BLOCK); |
|---|
| 82 | I_EnumLabel(osg::StateAttribute::OSGNVEXT_TEXTURE_SHADER); |
|---|
| 83 | I_EnumLabel(osg::StateAttribute::OSGNVEXT_VERTEX_PROGRAM); |
|---|
| 84 | I_EnumLabel(osg::StateAttribute::OSGNVEXT_REGISTER_COMBINERS); |
|---|
| 85 | I_EnumLabel(osg::StateAttribute::OSGNVCG_PROGRAM); |
|---|
| 86 | I_EnumLabel(osg::StateAttribute::OSGNVSLANG_PROGRAM); |
|---|
| 87 | I_EnumLabel(osg::StateAttribute::OSGNVPARSE_PROGRAM_PARSER); |
|---|
| 88 | END_REFLECTOR |
|---|
| 89 | |
|---|
| 90 | TYPE_NAME_ALIAS(GLenum, osg::StateAttribute::GLMode) |
|---|
| 91 | |
|---|
| 92 | TYPE_NAME_ALIAS(unsigned int, osg::StateAttribute::GLModeValue) |
|---|
| 93 | |
|---|
| 94 | TYPE_NAME_ALIAS(unsigned int, osg::StateAttribute::OverrideValue) |
|---|
| 95 | |
|---|
| 96 | TYPE_NAME_ALIAS(std::pair< osg::StateAttribute::Type COMMA unsigned int >, osg::StateAttribute::TypeMemberPair) |
|---|
| 97 | |
|---|
| 98 | TYPE_NAME_ALIAS(std::vector< osg::StateSet * >, osg::StateAttribute::ParentList) |
|---|
| 99 | |
|---|
| 100 | TYPE_NAME_ALIAS(osg::StateAttributeCallback, osg::StateAttribute::Callback) |
|---|
| 101 | |
|---|
| 102 | BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::StateAttribute) |
|---|
| 103 | I_DeclaringFile("osg/StateAttribute"); |
|---|
| 104 | I_BaseType(osg::Object); |
|---|
| 105 | I_Constructor0(____StateAttribute, |
|---|
| 106 | "", |
|---|
| 107 | ""); |
|---|
| 108 | I_ConstructorWithDefaults2(IN, const osg::StateAttribute &, sa, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, |
|---|
| 109 | ____StateAttribute__C5_StateAttribute_R1__C5_CopyOp_R1, |
|---|
| 110 | "", |
|---|
| 111 | ""); |
|---|
| 112 | I_Method0(osg::Object *, cloneType, |
|---|
| 113 | Properties::PURE_VIRTUAL, |
|---|
| 114 | __Object_P1__cloneType, |
|---|
| 115 | "Clone the type of an attribute, with Object* return type. ", |
|---|
| 116 | "Must be defined by derived classes. "); |
|---|
| 117 | I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x, |
|---|
| 118 | Properties::PURE_VIRTUAL, |
|---|
| 119 | __Object_P1__clone__C5_CopyOp_R1, |
|---|
| 120 | "Clone an attribute, with Object* return type. ", |
|---|
| 121 | "Must be defined by derived classes. "); |
|---|
| 122 | I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj, |
|---|
| 123 | Properties::VIRTUAL, |
|---|
| 124 | __bool__isSameKindAs__C5_Object_P1, |
|---|
| 125 | "Return true if this and obj are of the same kind of object. ", |
|---|
| 126 | ""); |
|---|
| 127 | I_Method0(const char *, libraryName, |
|---|
| 128 | Properties::VIRTUAL, |
|---|
| 129 | __C5_char_P1__libraryName, |
|---|
| 130 | "Return the name of the attribute's library. ", |
|---|
| 131 | ""); |
|---|
| 132 | I_Method0(const char *, className, |
|---|
| 133 | Properties::VIRTUAL, |
|---|
| 134 | __C5_char_P1__className, |
|---|
| 135 | "Return the name of the attribute's class type. ", |
|---|
| 136 | ""); |
|---|
| 137 | I_Method0(osg::Texture *, asTexture, |
|---|
| 138 | Properties::VIRTUAL, |
|---|
| 139 | __Texture_P1__asTexture, |
|---|
| 140 | "Fast alternative to dynamic_cast<> for determining if state attribute is a Texture. ", |
|---|
| 141 | ""); |
|---|
| 142 | I_Method0(const osg::Texture *, asTexture, |
|---|
| 143 | Properties::VIRTUAL, |
|---|
| 144 | __C5_Texture_P1__asTexture, |
|---|
| 145 | "Fast alternative to dynamic_cast<> for determining if state attribute is a Texture. ", |
|---|
| 146 | ""); |
|---|
| 147 | I_Method0(osg::StateAttribute::Type, getType, |
|---|
| 148 | Properties::PURE_VIRTUAL, |
|---|
| 149 | __Type__getType, |
|---|
| 150 | "Return the Type identifier of the attribute's class type. ", |
|---|
| 151 | ""); |
|---|
| 152 | I_Method0(unsigned int, getMember, |
|---|
| 153 | Properties::VIRTUAL, |
|---|
| 154 | __unsigned_int__getMember, |
|---|
| 155 | "Return the member identifier within the attribute's class type. ", |
|---|
| 156 | "Used for light number/clip plane number etc. "); |
|---|
| 157 | I_Method0(osg::StateAttribute::TypeMemberPair, getTypeMemberPair, |
|---|
| 158 | Properties::NON_VIRTUAL, |
|---|
| 159 | __TypeMemberPair__getTypeMemberPair, |
|---|
| 160 | "Return the TypeMemberPair that uniquely identifies this type member. ", |
|---|
| 161 | ""); |
|---|
| 162 | I_Method0(bool, isTextureAttribute, |
|---|
| 163 | Properties::VIRTUAL, |
|---|
| 164 | __bool__isTextureAttribute, |
|---|
| 165 | "Return true if StateAttribute is a type which controls texturing and needs to be issued w.r.t to specific texture unit. ", |
|---|
| 166 | ""); |
|---|
| 167 | I_Method1(int, compare, IN, const osg::StateAttribute &, sa, |
|---|
| 168 | Properties::PURE_VIRTUAL, |
|---|
| 169 | __int__compare__C5_StateAttribute_R1, |
|---|
| 170 | "Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ", |
|---|
| 171 | ""); |
|---|
| 172 | I_Method0(const osg::StateAttribute::ParentList &, getParents, |
|---|
| 173 | Properties::NON_VIRTUAL, |
|---|
| 174 | __C5_ParentList_R1__getParents, |
|---|
| 175 | "Get the parent list of this StateAttribute. ", |
|---|
| 176 | ""); |
|---|
| 177 | I_Method1(osg::StateSet *, getParent, IN, unsigned int, i, |
|---|
| 178 | Properties::NON_VIRTUAL, |
|---|
| 179 | __StateSet_P1__getParent__unsigned_int, |
|---|
| 180 | "", |
|---|
| 181 | ""); |
|---|
| 182 | I_Method1(const osg::StateSet *, getParent, IN, unsigned int, i, |
|---|
| 183 | Properties::NON_VIRTUAL, |
|---|
| 184 | __C5_StateSet_P1__getParent__unsigned_int, |
|---|
| 185 | "Get a single const parent of this StateAttribute. ", |
|---|
| 186 | " param i index of the parent to get. return the parent i. "); |
|---|
| 187 | I_Method0(unsigned int, getNumParents, |
|---|
| 188 | Properties::NON_VIRTUAL, |
|---|
| 189 | __unsigned_int__getNumParents, |
|---|
| 190 | "Get the number of parents of this StateAttribute. ", |
|---|
| 191 | "the number of parents of this StateAttribute. "); |
|---|
| 192 | I_Method1(bool, getModeUsage, IN, osg::StateAttribute::ModeUsage &, x, |
|---|
| 193 | Properties::VIRTUAL, |
|---|
| 194 | __bool__getModeUsage__ModeUsage_R1, |
|---|
| 195 | "Return the modes associated with this StateAttribute. ", |
|---|
| 196 | ""); |
|---|
| 197 | I_Method1(bool, checkValidityOfAssociatedModes, IN, osg::State &, x, |
|---|
| 198 | Properties::VIRTUAL, |
|---|
| 199 | __bool__checkValidityOfAssociatedModes__osg_State_R1, |
|---|
| 200 | "Check the modes associated with this StateAttribute are supported by current OpenGL drivers, and if not set the associated mode in osg::State to be black listed/invalid. ", |
|---|
| 201 | "Return true if all associated modes are valid. "); |
|---|
| 202 | I_Method1(void, setUpdateCallback, IN, osg::StateAttributeCallback *, uc, |
|---|
| 203 | Properties::NON_VIRTUAL, |
|---|
| 204 | __void__setUpdateCallback__StateAttributeCallback_P1, |
|---|
| 205 | "Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal. ", |
|---|
| 206 | ""); |
|---|
| 207 | I_Method0(osg::StateAttributeCallback *, getUpdateCallback, |
|---|
| 208 | Properties::NON_VIRTUAL, |
|---|
| 209 | __StateAttributeCallback_P1__getUpdateCallback, |
|---|
| 210 | "Get the non const UpdateCallback. ", |
|---|
| 211 | ""); |
|---|
| 212 | I_Method0(const osg::StateAttributeCallback *, getUpdateCallback, |
|---|
| 213 | Properties::NON_VIRTUAL, |
|---|
| 214 | __C5_StateAttributeCallback_P1__getUpdateCallback, |
|---|
| 215 | "Get the const UpdateCallback. ", |
|---|
| 216 | ""); |
|---|
| 217 | I_Method1(void, setEventCallback, IN, osg::StateAttributeCallback *, ec, |
|---|
| 218 | Properties::NON_VIRTUAL, |
|---|
| 219 | __void__setEventCallback__StateAttributeCallback_P1, |
|---|
| 220 | "Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal. ", |
|---|
| 221 | ""); |
|---|
| 222 | I_Method0(osg::StateAttributeCallback *, getEventCallback, |
|---|
| 223 | Properties::NON_VIRTUAL, |
|---|
| 224 | __StateAttributeCallback_P1__getEventCallback, |
|---|
| 225 | "Get the non const EventCallback. ", |
|---|
| 226 | ""); |
|---|
| 227 | I_Method0(const osg::StateAttributeCallback *, getEventCallback, |
|---|
| 228 | Properties::NON_VIRTUAL, |
|---|
| 229 | __C5_StateAttributeCallback_P1__getEventCallback, |
|---|
| 230 | "Get the const EventCallback. ", |
|---|
| 231 | ""); |
|---|
| 232 | I_Method1(void, apply, IN, osg::State &, x, |
|---|
| 233 | Properties::VIRTUAL, |
|---|
| 234 | __void__apply__State_R1, |
|---|
| 235 | "apply the OpenGL state attributes. ", |
|---|
| 236 | "The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state. "); |
|---|
| 237 | I_Method1(void, compileGLObjects, IN, osg::State &, x, |
|---|
| 238 | Properties::VIRTUAL, |
|---|
| 239 | __void__compileGLObjects__State_R1, |
|---|
| 240 | "Default to nothing to compile - all state is applied immediately. ", |
|---|
| 241 | ""); |
|---|
| 242 | I_Method1(void, resizeGLObjectBuffers, IN, unsigned, int, |
|---|
| 243 | Properties::VIRTUAL, |
|---|
| 244 | __void__resizeGLObjectBuffers__unsigned, |
|---|
| 245 | "Resize any per context GLObject buffers to specified size. ", |
|---|
| 246 | ""); |
|---|
| 247 | I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0, |
|---|
| 248 | Properties::VIRTUAL, |
|---|
| 249 | __void__releaseGLObjects__State_P1, |
|---|
| 250 | "Release OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objects for all graphics context if State object pointer NULL. ", |
|---|
| 251 | ""); |
|---|
| 252 | I_ProtectedMethod1(void, addParent, IN, osg::StateSet *, object, |
|---|
| 253 | Properties::NON_VIRTUAL, |
|---|
| 254 | Properties::NON_CONST, |
|---|
| 255 | __void__addParent__osg_StateSet_P1, |
|---|
| 256 | "", |
|---|
| 257 | ""); |
|---|
| 258 | I_ProtectedMethod1(void, removeParent, IN, osg::StateSet *, object, |
|---|
| 259 | Properties::NON_VIRTUAL, |
|---|
| 260 | Properties::NON_CONST, |
|---|
| 261 | __void__removeParent__osg_StateSet_P1, |
|---|
| 262 | "", |
|---|
| 263 | ""); |
|---|
| 264 | I_SimpleProperty(osg::StateAttributeCallback *, EventCallback, |
|---|
| 265 | __StateAttributeCallback_P1__getEventCallback, |
|---|
| 266 | __void__setEventCallback__StateAttributeCallback_P1); |
|---|
| 267 | I_SimpleProperty(unsigned int, Member, |
|---|
| 268 | __unsigned_int__getMember, |
|---|
| 269 | 0); |
|---|
| 270 | I_ArrayProperty(osg::StateSet *, Parent, |
|---|
| 271 | __StateSet_P1__getParent__unsigned_int, |
|---|
| 272 | 0, |
|---|
| 273 | __unsigned_int__getNumParents, |
|---|
| 274 | 0, |
|---|
| 275 | 0, |
|---|
| 276 | 0); |
|---|
| 277 | I_SimpleProperty(const osg::StateAttribute::ParentList &, Parents, |
|---|
| 278 | __C5_ParentList_R1__getParents, |
|---|
| 279 | 0); |
|---|
| 280 | I_SimpleProperty(osg::StateAttribute::Type, Type, |
|---|
| 281 | __Type__getType, |
|---|
| 282 | 0); |
|---|
| 283 | I_SimpleProperty(osg::StateAttribute::TypeMemberPair, TypeMemberPair, |
|---|
| 284 | __TypeMemberPair__getTypeMemberPair, |
|---|
| 285 | 0); |
|---|
| 286 | I_SimpleProperty(osg::StateAttributeCallback *, UpdateCallback, |
|---|
| 287 | __StateAttributeCallback_P1__getUpdateCallback, |
|---|
| 288 | __void__setUpdateCallback__StateAttributeCallback_P1); |
|---|
| 289 | END_REFLECTOR |
|---|
| 290 | |
|---|
| 291 | BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::StateAttribute::ModeUsage) |
|---|
| 292 | I_DeclaringFile("osg/StateAttribute"); |
|---|
| 293 | I_Constructor0(____ModeUsage, |
|---|
| 294 | "", |
|---|
| 295 | ""); |
|---|
| 296 | I_Method1(void, usesMode, IN, osg::StateAttribute::GLMode, mode, |
|---|
| 297 | Properties::PURE_VIRTUAL, |
|---|
| 298 | __void__usesMode__GLMode, |
|---|
| 299 | "", |
|---|
| 300 | ""); |
|---|
| 301 | I_Method1(void, usesTextureMode, IN, osg::StateAttribute::GLMode, mode, |
|---|
| 302 | Properties::PURE_VIRTUAL, |
|---|
| 303 | __void__usesTextureMode__GLMode, |
|---|
| 304 | "", |
|---|
| 305 | ""); |
|---|
| 306 | END_REFLECTOR |
|---|
| 307 | |
|---|
| 308 | STD_PAIR_REFLECTOR(std::pair< osg::StateAttribute::Type COMMA unsigned int >) |
|---|
| 309 | |
|---|
| 310 | STD_VECTOR_REFLECTOR(std::vector< osg::StateSet * >) |
|---|