| 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 <osgAnimation/Animation> |
|---|
| 16 | #include <osgAnimation/Channel> |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | #ifdef IN |
|---|
| 20 | #undef IN |
|---|
| 21 | #endif |
|---|
| 22 | #ifdef OUT |
|---|
| 23 | #undef OUT |
|---|
| 24 | #endif |
|---|
| 25 | |
|---|
| 26 | BEGIN_ENUM_REFLECTOR(osgAnimation::Animation::PlayMode) |
|---|
| 27 | I_DeclaringFile("osgAnimation/Animation"); |
|---|
| 28 | I_EnumLabel(osgAnimation::Animation::ONCE); |
|---|
| 29 | I_EnumLabel(osgAnimation::Animation::STAY); |
|---|
| 30 | I_EnumLabel(osgAnimation::Animation::LOOP); |
|---|
| 31 | I_EnumLabel(osgAnimation::Animation::PPONG); |
|---|
| 32 | END_REFLECTOR |
|---|
| 33 | |
|---|
| 34 | BEGIN_OBJECT_REFLECTOR(osgAnimation::Animation) |
|---|
| 35 | I_DeclaringFile("osgAnimation/Animation"); |
|---|
| 36 | I_BaseType(osg::Object); |
|---|
| 37 | I_Method0(osg::Object *, cloneType, |
|---|
| 38 | Properties::VIRTUAL, |
|---|
| 39 | __osg_Object_P1__cloneType, |
|---|
| 40 | "Clone the type of an object, with Object* return type. ", |
|---|
| 41 | "Must be defined by derived classes. "); |
|---|
| 42 | I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x, |
|---|
| 43 | Properties::VIRTUAL, |
|---|
| 44 | __osg_Object_P1__clone__C5_osg_CopyOp_R1, |
|---|
| 45 | "Clone an object, with Object* return type. ", |
|---|
| 46 | "Must be defined by derived classes. "); |
|---|
| 47 | I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj, |
|---|
| 48 | Properties::VIRTUAL, |
|---|
| 49 | __bool__isSameKindAs__C5_osg_Object_P1, |
|---|
| 50 | "", |
|---|
| 51 | ""); |
|---|
| 52 | I_Method0(const char *, libraryName, |
|---|
| 53 | Properties::VIRTUAL, |
|---|
| 54 | __C5_char_P1__libraryName, |
|---|
| 55 | "return the name of the object's library. ", |
|---|
| 56 | "Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. "); |
|---|
| 57 | I_Method0(const char *, className, |
|---|
| 58 | Properties::VIRTUAL, |
|---|
| 59 | __C5_char_P1__className, |
|---|
| 60 | "return the name of the object's class type. ", |
|---|
| 61 | "Must be defined by derived classes. "); |
|---|
| 62 | I_Constructor0(____Animation, |
|---|
| 63 | "", |
|---|
| 64 | ""); |
|---|
| 65 | I_Constructor2(IN, const osgAnimation::Animation &, anim, IN, const osg::CopyOp &, x, |
|---|
| 66 | ____Animation__C5_osgAnimation_Animation_R1__C5_osg_CopyOp_R1, |
|---|
| 67 | "", |
|---|
| 68 | ""); |
|---|
| 69 | I_Method1(void, addChannel, IN, osgAnimation::Channel *, pChannel, |
|---|
| 70 | Properties::NON_VIRTUAL, |
|---|
| 71 | __void__addChannel__Channel_P1, |
|---|
| 72 | "", |
|---|
| 73 | ""); |
|---|
| 74 | I_Method0(osgAnimation::ChannelList &, getChannels, |
|---|
| 75 | Properties::NON_VIRTUAL, |
|---|
| 76 | __ChannelList_R1__getChannels, |
|---|
| 77 | "Those accessors let you add and remove channels if you modify something that can change the duration you are supposed to call computeDuration or setDuration. ", |
|---|
| 78 | ""); |
|---|
| 79 | I_Method0(const osgAnimation::ChannelList &, getChannels, |
|---|
| 80 | Properties::NON_VIRTUAL, |
|---|
| 81 | __C5_ChannelList_R1__getChannels, |
|---|
| 82 | "", |
|---|
| 83 | ""); |
|---|
| 84 | I_Method1(void, setDuration, IN, double, duration, |
|---|
| 85 | Properties::NON_VIRTUAL, |
|---|
| 86 | __void__setDuration__double, |
|---|
| 87 | "Change the duration of animation then evaluate the animation in the range 0-duration it stretch the animation in time. ", |
|---|
| 88 | "see computeDuration too "); |
|---|
| 89 | I_Method0(void, computeDuration, |
|---|
| 90 | Properties::NON_VIRTUAL, |
|---|
| 91 | __void__computeDuration, |
|---|
| 92 | "Compute duration from channel and keyframes if the duration is not specified you should call this method before using it. ", |
|---|
| 93 | ""); |
|---|
| 94 | I_Method0(float, getDuration, |
|---|
| 95 | Properties::NON_VIRTUAL, |
|---|
| 96 | __float__getDuration, |
|---|
| 97 | "", |
|---|
| 98 | ""); |
|---|
| 99 | I_Method1(void, setWeight, IN, float, weight, |
|---|
| 100 | Properties::NON_VIRTUAL, |
|---|
| 101 | __void__setWeight__float, |
|---|
| 102 | "", |
|---|
| 103 | ""); |
|---|
| 104 | I_Method0(float, getWeight, |
|---|
| 105 | Properties::NON_VIRTUAL, |
|---|
| 106 | __float__getWeight, |
|---|
| 107 | "", |
|---|
| 108 | ""); |
|---|
| 109 | I_Method1(bool, update, IN, float, time, |
|---|
| 110 | Properties::NON_VIRTUAL, |
|---|
| 111 | __bool__update__float, |
|---|
| 112 | "", |
|---|
| 113 | ""); |
|---|
| 114 | I_Method0(void, resetTargets, |
|---|
| 115 | Properties::NON_VIRTUAL, |
|---|
| 116 | __void__resetTargets, |
|---|
| 117 | "", |
|---|
| 118 | ""); |
|---|
| 119 | I_Method1(void, setPlaymode, IN, osgAnimation::Animation::PlayMode, mode, |
|---|
| 120 | Properties::NON_VIRTUAL, |
|---|
| 121 | __void__setPlaymode__PlayMode, |
|---|
| 122 | "", |
|---|
| 123 | ""); |
|---|
| 124 | I_Method0(osgAnimation::Animation::PlayMode, getPlayMode, |
|---|
| 125 | Properties::NON_VIRTUAL, |
|---|
| 126 | __PlayMode__getPlayMode, |
|---|
| 127 | "", |
|---|
| 128 | ""); |
|---|
| 129 | I_Method1(void, setStartTime, IN, float, time, |
|---|
| 130 | Properties::NON_VIRTUAL, |
|---|
| 131 | __void__setStartTime__float, |
|---|
| 132 | "", |
|---|
| 133 | ""); |
|---|
| 134 | I_Method0(float, getStartTime, |
|---|
| 135 | Properties::NON_VIRTUAL, |
|---|
| 136 | __float__getStartTime, |
|---|
| 137 | "", |
|---|
| 138 | ""); |
|---|
| 139 | I_ProtectedMethod0(double, computeDurationFromChannels, |
|---|
| 140 | Properties::NON_VIRTUAL, |
|---|
| 141 | Properties::CONST, |
|---|
| 142 | __double__computeDurationFromChannels, |
|---|
| 143 | "", |
|---|
| 144 | ""); |
|---|
| 145 | I_SimpleProperty(osgAnimation::ChannelList &, Channels, |
|---|
| 146 | __ChannelList_R1__getChannels, |
|---|
| 147 | 0); |
|---|
| 148 | I_SimpleProperty(double, Duration, |
|---|
| 149 | 0, |
|---|
| 150 | __void__setDuration__double); |
|---|
| 151 | I_SimpleProperty(osgAnimation::Animation::PlayMode, PlayMode, |
|---|
| 152 | __PlayMode__getPlayMode, |
|---|
| 153 | 0); |
|---|
| 154 | I_SimpleProperty(osgAnimation::Animation::PlayMode, Playmode, |
|---|
| 155 | 0, |
|---|
| 156 | __void__setPlaymode__PlayMode); |
|---|
| 157 | I_SimpleProperty(float, StartTime, |
|---|
| 158 | __float__getStartTime, |
|---|
| 159 | __void__setStartTime__float); |
|---|
| 160 | I_SimpleProperty(float, Weight, |
|---|
| 161 | __float__getWeight, |
|---|
| 162 | __void__setWeight__float); |
|---|
| 163 | END_REFLECTOR |
|---|
| 164 | |
|---|
| 165 | TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgAnimation::Animation > >, osgAnimation::AnimationList) |
|---|
| 166 | |
|---|
| 167 | TYPE_NAME_ALIAS(std::map< std::string COMMA osg::ref_ptr< osgAnimation::Animation > >, osgAnimation::AnimationMap) |
|---|
| 168 | |
|---|
| 169 | BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgAnimation::Animation >) |
|---|
| 170 | I_DeclaringFile("osg/ref_ptr"); |
|---|
| 171 | I_Constructor0(____ref_ptr, |
|---|
| 172 | "", |
|---|
| 173 | ""); |
|---|
| 174 | I_Constructor1(IN, osgAnimation::Animation *, ptr, |
|---|
| 175 | Properties::NON_EXPLICIT, |
|---|
| 176 | ____ref_ptr__T_P1, |
|---|
| 177 | "", |
|---|
| 178 | ""); |
|---|
| 179 | I_Constructor1(IN, const osg::ref_ptr< osgAnimation::Animation > &, rp, |
|---|
| 180 | Properties::NON_EXPLICIT, |
|---|
| 181 | ____ref_ptr__C5_ref_ptr_R1, |
|---|
| 182 | "", |
|---|
| 183 | ""); |
|---|
| 184 | I_Method0(osgAnimation::Animation *, get, |
|---|
| 185 | Properties::NON_VIRTUAL, |
|---|
| 186 | __T_P1__get, |
|---|
| 187 | "", |
|---|
| 188 | ""); |
|---|
| 189 | I_Method0(bool, valid, |
|---|
| 190 | Properties::NON_VIRTUAL, |
|---|
| 191 | __bool__valid, |
|---|
| 192 | "", |
|---|
| 193 | ""); |
|---|
| 194 | I_Method0(osgAnimation::Animation *, release, |
|---|
| 195 | Properties::NON_VIRTUAL, |
|---|
| 196 | __T_P1__release, |
|---|
| 197 | "", |
|---|
| 198 | ""); |
|---|
| 199 | I_Method1(void, swap, IN, osg::ref_ptr< osgAnimation::Animation > &, rp, |
|---|
| 200 | Properties::NON_VIRTUAL, |
|---|
| 201 | __void__swap__ref_ptr_R1, |
|---|
| 202 | "", |
|---|
| 203 | ""); |
|---|
| 204 | I_SimpleProperty(osgAnimation::Animation *, , |
|---|
| 205 | __T_P1__get, |
|---|
| 206 | 0); |
|---|
| 207 | END_REFLECTOR |
|---|
| 208 | |
|---|
| 209 | STD_MAP_REFLECTOR(std::map< std::string COMMA osg::ref_ptr< osgAnimation::Animation > >) |
|---|
| 210 | |
|---|
| 211 | STD_VECTOR_REFLECTOR(std::vector< osg::ref_ptr< osgAnimation::Animation > >) |
|---|