10 #include <osg/AutoTransform> 12 #include <osg/Geometry> 16 #include "ProtectedGroup.h" 41 ToolGlobal(
int nVerts, osg::Array::Binding colorBind,
42 osg::PrimitiveSet* primitiveSet,
float linewidth=3.f);
51 virtual void setVertices(
const std::vector<osg::Vec3f>& source);
57 virtual void setColor(
const osg::Vec4f& color);
60 virtual const osg::Vec4f&
getColor()
const;
75 void updateGeometry();
76 void updateGeometry(osg::Geometry* geom);
101 BookmarkTool(
const osg::Vec3d &eye,
const osg::Vec3d ¢er,
const osg::Vec3d &up);
109 void setPose(
const osg::Vec3d &eye,
const osg::Vec3d ¢er,
const osg::Vec3d &up);
112 void getPose(osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up);
115 void setColorDefault();
118 void setColorSelected();
123 void updatePosition();
133 osg::AutoTransform* m_AT;
135 osg::Vec3f m_eye, m_center, m_up;
169 virtual void setColor(
const osg::Vec4f c1,
const osg::Vec4f c2,
const osg::Vec4f c3);
172 osg::AutoTransform* m_AT;
173 osg::Camera* m_camera;
190 osg::Geometry* geometry;
207 osg::Geometry* geometry;
274 void setVertices(
const osg::Vec3f ¢er,
float szX,
float szY,
float szCr,
float szAx,
275 const osg::Vec3f& centerCustom = cher::CENTER ,
277 bool selectionIsEmpty =
true);
280 void setColor(
const osg::Vec4f& color,
const osg::Vec4f& colorIntersect = cher::CANVAS_CLR_PREVIOUS);
283 void setIntersection(
const osg::Vec3f &P1,
const osg::Vec3f &P2,
const osg::Vec3f &P3,
const osg::Vec3f &P4);
287 void setColorIntersection(
const osg::Vec4f& colorIntersect);
291 void setEditable(
bool editable);
294 const osg::Geometry* getPickable()
const;
297 bool isSelected()
const;
300 virtual void moveDelta(
double du,
double dv);
303 virtual void scale(
double scaleX,
double scaleY, osg::Vec3f center);
306 virtual void scale(
double scale, osg::Vec3f center);
309 virtual void rotate(
double theta, osg::Vec3f center);
312 void initQuadGeometry(osg::Geometry* geom,
const std::string& name =
"");
313 void initLineGeometry(osg::Geometry* geom,
float lineWidth,
const std::string& name =
"");
315 void setQuadGeometry(osg::Geometry* geom,
const osg::Vec3f& P,
float szX,
float szY,
float theta = 0,
const osg::Vec3f& center = cher::CENTER);
318 void setScaleGeometry(osg::Geometry* geom,
const osg::Vec3f& P0,
const osg::Vec3f& P1,
const osg::Vec3f& P2,
const osg::Vec3f& P3);
320 void setLineGeometry(osg::Geometry* geom,
const osg::Vec3f& P1,
const osg::Vec3f& P2);
322 void setColorGeometry(osg::Geometry* geom,
const osg::Vec4f& color);
324 void moveDeltaWireGeometry(osg::Geometry*geometry,
double du,
double dv);
325 void scaleWireGeometry(osg::Geometry* geometry,
double scaleX,
double scaleY, osg::Vec3f center);
326 void scaleWireGeometry(osg::Geometry* geometry,
double scale, osg::Vec3f center);
327 void rotateWireGeometry(osg::Geometry* geometry,
double theta, osg::Vec3f center);
330 osg::Geode* m_geodeIntersect, * m_geodeNormal, * m_geodeRotation;
331 osg::Geometry* m_geomIntersect;
334 osg::Geometry * m_geomNormal1, * m_geomNormal2;
335 osg::Geometry * m_geomRotateX1, * m_geomRotateX2, * m_geomRotateY1, * m_geomRotateY2;
338 ATRGeode* m_AT_scaleUV1, * m_AT_scaleUV2, * m_AT_scaleUV3, * m_AT_scaleUV4;
346 std::vector<bool> m_visibilityState;
352 #endif // TOOLGlobal_H
Scene graph entities.
Definition: AddEntityCommand.h:17
Helper class to create non-scalable geometries that always render on top. The node has the following ...
Definition: ToolGlobal.h:197
Helper class to create non-scalable geometries, e.g., AT -> Geode -> Geometry. Used for pickable geom...
Definition: ToolGlobal.h:180
Settings is a configuration variables file for Cherish: enums, consts, defaults. Contains settings su...
A convinience class that inherits full functionality of osg::Group except the methods that allow dire...
Definition: ProtectedGroup.h:17