| 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/ApplicationUsage> |
|---|
| 14 | #include <osg/Matrixd> |
|---|
| 15 | #include <osg/Node> |
|---|
| 16 | #include <osgGA/GUIActionAdapter> |
|---|
| 17 | #include <osgGA/GUIEventAdapter> |
|---|
| 18 | #include <osgGA/TerrainManipulator> |
|---|
| 19 | #include <osgUtil/SceneView> |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | #ifdef IN |
|---|
| 23 | #undef IN |
|---|
| 24 | #endif |
|---|
| 25 | #ifdef OUT |
|---|
| 26 | #undef OUT |
|---|
| 27 | #endif |
|---|
| 28 | |
|---|
| 29 | BEGIN_ENUM_REFLECTOR(osgGA::TerrainManipulator::RotationMode) |
|---|
| 30 | I_DeclaringFile("osgGA/TerrainManipulator"); |
|---|
| 31 | I_EnumLabel(osgGA::TerrainManipulator::ELEVATION_HEADING_ROLL); |
|---|
| 32 | I_EnumLabel(osgGA::TerrainManipulator::ELEVATION_HEADING); |
|---|
| 33 | END_REFLECTOR |
|---|
| 34 | |
|---|
| 35 | BEGIN_OBJECT_REFLECTOR(osgGA::TerrainManipulator) |
|---|
| 36 | I_DeclaringFile("osgGA/TerrainManipulator"); |
|---|
| 37 | I_BaseType(osgGA::MatrixManipulator); |
|---|
| 38 | I_Constructor0(____TerrainManipulator, |
|---|
| 39 | "", |
|---|
| 40 | ""); |
|---|
| 41 | I_Method0(const char *, className, |
|---|
| 42 | Properties::VIRTUAL, |
|---|
| 43 | __C5_char_P1__className, |
|---|
| 44 | "return the name of the object's class type. ", |
|---|
| 45 | "Must be defined by derived classes. "); |
|---|
| 46 | I_Method1(void, setRotationMode, IN, osgGA::TerrainManipulator::RotationMode, mode, |
|---|
| 47 | Properties::NON_VIRTUAL, |
|---|
| 48 | __void__setRotationMode__RotationMode, |
|---|
| 49 | "", |
|---|
| 50 | ""); |
|---|
| 51 | I_Method0(osgGA::TerrainManipulator::RotationMode, getRotationMode, |
|---|
| 52 | Properties::NON_VIRTUAL, |
|---|
| 53 | __RotationMode__getRotationMode, |
|---|
| 54 | "", |
|---|
| 55 | ""); |
|---|
| 56 | I_Method1(void, setByMatrix, IN, const osg::Matrixd &, matrix, |
|---|
| 57 | Properties::VIRTUAL, |
|---|
| 58 | __void__setByMatrix__C5_osg_Matrixd_R1, |
|---|
| 59 | "set the position of the matrix manipulator using a 4x4 Matrix. ", |
|---|
| 60 | ""); |
|---|
| 61 | I_Method1(void, setByInverseMatrix, IN, const osg::Matrixd &, matrix, |
|---|
| 62 | Properties::VIRTUAL, |
|---|
| 63 | __void__setByInverseMatrix__C5_osg_Matrixd_R1, |
|---|
| 64 | "set the position of the matrix manipulator using a 4x4 Matrix. ", |
|---|
| 65 | ""); |
|---|
| 66 | I_Method0(osg::Matrixd, getMatrix, |
|---|
| 67 | Properties::VIRTUAL, |
|---|
| 68 | __osg_Matrixd__getMatrix, |
|---|
| 69 | "get the position of the manipulator as 4x4 Matrix. ", |
|---|
| 70 | ""); |
|---|
| 71 | I_Method0(osg::Matrixd, getInverseMatrix, |
|---|
| 72 | Properties::VIRTUAL, |
|---|
| 73 | __osg_Matrixd__getInverseMatrix, |
|---|
| 74 | "get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix. ", |
|---|
| 75 | ""); |
|---|
| 76 | I_Method0(osgUtil::SceneView::FusionDistanceMode, getFusionDistanceMode, |
|---|
| 77 | Properties::VIRTUAL, |
|---|
| 78 | __osgUtil_SceneView_FusionDistanceMode__getFusionDistanceMode, |
|---|
| 79 | "Get the FusionDistanceMode. ", |
|---|
| 80 | "Used by SceneView for setting up stereo convergence. "); |
|---|
| 81 | I_Method0(float, getFusionDistanceValue, |
|---|
| 82 | Properties::VIRTUAL, |
|---|
| 83 | __float__getFusionDistanceValue, |
|---|
| 84 | "Get the FusionDistanceValue. ", |
|---|
| 85 | "Used by SceneView for setting up stereo convergence. "); |
|---|
| 86 | I_Method1(void, setNode, IN, osg::Node *, x, |
|---|
| 87 | Properties::VIRTUAL, |
|---|
| 88 | __void__setNode__osg_Node_P1, |
|---|
| 89 | "Attach a node to the manipulator. ", |
|---|
| 90 | "Automatically detaches previously attached node. setNode(NULL) detaches previously nodes. Is ignored by manipulators which do not require a reference model. "); |
|---|
| 91 | I_Method0(const osg::Node *, getNode, |
|---|
| 92 | Properties::VIRTUAL, |
|---|
| 93 | __C5_osg_Node_P1__getNode, |
|---|
| 94 | "Return node if attached. ", |
|---|
| 95 | ""); |
|---|
| 96 | I_Method0(osg::Node *, getNode, |
|---|
| 97 | Properties::VIRTUAL, |
|---|
| 98 | __osg_Node_P1__getNode, |
|---|
| 99 | "Return node if attached. ", |
|---|
| 100 | ""); |
|---|
| 101 | I_Method2(void, home, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, us, |
|---|
| 102 | Properties::VIRTUAL, |
|---|
| 103 | __void__home__C5_GUIEventAdapter_R1__GUIActionAdapter_R1, |
|---|
| 104 | "Move the camera to the default position. ", |
|---|
| 105 | "May be ignored by manipulators if home functionality is not appropriate. "); |
|---|
| 106 | I_Method2(void, init, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, us, |
|---|
| 107 | Properties::VIRTUAL, |
|---|
| 108 | __void__init__C5_GUIEventAdapter_R1__GUIActionAdapter_R1, |
|---|
| 109 | "Start/restart the manipulator. ", |
|---|
| 110 | ""); |
|---|
| 111 | I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, us, |
|---|
| 112 | Properties::VIRTUAL, |
|---|
| 113 | __bool__handle__C5_GUIEventAdapter_R1__GUIActionAdapter_R1, |
|---|
| 114 | "handle events, return true if handled, false otherwise. ", |
|---|
| 115 | ""); |
|---|
| 116 | I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage, |
|---|
| 117 | Properties::VIRTUAL, |
|---|
| 118 | __void__getUsage__osg_ApplicationUsage_R1, |
|---|
| 119 | "Get the keyboard and mouse usage of this manipulator. ", |
|---|
| 120 | ""); |
|---|
| 121 | I_ProtectedMethod3(bool, intersect, IN, const osg::Vec3d &, start, IN, const osg::Vec3d &, end, IN, osg::Vec3d &, intersection, |
|---|
| 122 | Properties::NON_VIRTUAL, |
|---|
| 123 | Properties::CONST, |
|---|
| 124 | __bool__intersect__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__osg_Vec3d_R1, |
|---|
| 125 | "", |
|---|
| 126 | ""); |
|---|
| 127 | I_ProtectedMethod0(void, flushMouseEventStack, |
|---|
| 128 | Properties::NON_VIRTUAL, |
|---|
| 129 | Properties::NON_CONST, |
|---|
| 130 | __void__flushMouseEventStack, |
|---|
| 131 | "Reset the internal GUIEvent stack. ", |
|---|
| 132 | ""); |
|---|
| 133 | I_ProtectedMethod1(void, addMouseEvent, IN, const osgGA::GUIEventAdapter &, ea, |
|---|
| 134 | Properties::NON_VIRTUAL, |
|---|
| 135 | Properties::NON_CONST, |
|---|
| 136 | __void__addMouseEvent__C5_GUIEventAdapter_R1, |
|---|
| 137 | "Add the current mouse GUIEvent to internal stack. ", |
|---|
| 138 | ""); |
|---|
| 139 | I_ProtectedMethod3(void, computePosition, IN, const osg::Vec3d &, eye, IN, const osg::Vec3d &, lv, IN, const osg::Vec3d &, up, |
|---|
| 140 | Properties::NON_VIRTUAL, |
|---|
| 141 | Properties::NON_CONST, |
|---|
| 142 | __void__computePosition__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1, |
|---|
| 143 | "", |
|---|
| 144 | ""); |
|---|
| 145 | I_ProtectedMethod0(bool, calcMovement, |
|---|
| 146 | Properties::NON_VIRTUAL, |
|---|
| 147 | Properties::NON_CONST, |
|---|
| 148 | __bool__calcMovement, |
|---|
| 149 | "For the give mouse movement calculate the movement of the camera. ", |
|---|
| 150 | "Return true is camera has moved and a redraw is required. "); |
|---|
| 151 | I_ProtectedMethod6(void, trackball, IN, osg::Vec3 &, axis, IN, double &, angle, IN, double, p1x, IN, double, p1y, IN, double, p2x, IN, double, p2y, |
|---|
| 152 | Properties::NON_VIRTUAL, |
|---|
| 153 | Properties::NON_CONST, |
|---|
| 154 | __void__trackball__osg_Vec3_R1__double_R1__double__double__double__double, |
|---|
| 155 | "", |
|---|
| 156 | ""); |
|---|
| 157 | I_ProtectedMethod3(double, tb_project_to_sphere, IN, double, r, IN, double, x, IN, double, y, |
|---|
| 158 | Properties::NON_VIRTUAL, |
|---|
| 159 | Properties::NON_CONST, |
|---|
| 160 | __double__tb_project_to_sphere__double__double__double, |
|---|
| 161 | "", |
|---|
| 162 | ""); |
|---|
| 163 | I_ProtectedMethod0(bool, isMouseMoving, |
|---|
| 164 | Properties::NON_VIRTUAL, |
|---|
| 165 | Properties::NON_CONST, |
|---|
| 166 | __bool__isMouseMoving, |
|---|
| 167 | "Check the speed at which the mouse is moving. ", |
|---|
| 168 | "If speed is below a threshold then return false, otherwise return true. "); |
|---|
| 169 | I_ProtectedMethod0(void, clampOrientation, |
|---|
| 170 | Properties::NON_VIRTUAL, |
|---|
| 171 | Properties::NON_CONST, |
|---|
| 172 | __void__clampOrientation, |
|---|
| 173 | "", |
|---|
| 174 | ""); |
|---|
| 175 | I_SimpleProperty(const osg::Matrixd &, ByInverseMatrix, |
|---|
| 176 | 0, |
|---|
| 177 | __void__setByInverseMatrix__C5_osg_Matrixd_R1); |
|---|
| 178 | I_SimpleProperty(const osg::Matrixd &, ByMatrix, |
|---|
| 179 | 0, |
|---|
| 180 | __void__setByMatrix__C5_osg_Matrixd_R1); |
|---|
| 181 | I_SimpleProperty(osgUtil::SceneView::FusionDistanceMode, FusionDistanceMode, |
|---|
| 182 | __osgUtil_SceneView_FusionDistanceMode__getFusionDistanceMode, |
|---|
| 183 | 0); |
|---|
| 184 | I_SimpleProperty(float, FusionDistanceValue, |
|---|
| 185 | __float__getFusionDistanceValue, |
|---|
| 186 | 0); |
|---|
| 187 | I_SimpleProperty(osg::Matrixd, InverseMatrix, |
|---|
| 188 | __osg_Matrixd__getInverseMatrix, |
|---|
| 189 | 0); |
|---|
| 190 | I_SimpleProperty(osg::Matrixd, Matrix, |
|---|
| 191 | __osg_Matrixd__getMatrix, |
|---|
| 192 | 0); |
|---|
| 193 | I_SimpleProperty(osg::Node *, Node, |
|---|
| 194 | __osg_Node_P1__getNode, |
|---|
| 195 | __void__setNode__osg_Node_P1); |
|---|
| 196 | I_SimpleProperty(osgGA::TerrainManipulator::RotationMode, RotationMode, |
|---|
| 197 | __RotationMode__getRotationMode, |
|---|
| 198 | __void__setRotationMode__RotationMode); |
|---|
| 199 | END_REFLECTOR |
|---|