A tool to depict canvas bounding box in both its non-editable and editable states.
More...
|
| FrameTool () |
|
void | setVisibility (bool on) |
|
bool | getVisibility () const |
|
void | setVertices (const osg::Vec3f ¢er, float szX, float szY, float szCr, float szAx, const osg::Vec3f ¢erCustom=cher::CENTER, double theta=0, bool selectionIsEmpty=true) |
|
void | setColor (const osg::Vec4f &color, const osg::Vec4f &colorIntersect=cher::CANVAS_CLR_PREVIOUS) |
|
void | setIntersection (const osg::Vec3f &P1, const osg::Vec3f &P2, const osg::Vec3f &P3, const osg::Vec3f &P4) |
|
void | setEditable (bool editable) |
|
const osg::Geometry * | getPickable () const |
|
bool | isSelected () const |
|
virtual void | moveDelta (double du, double dv) |
|
virtual void | scale (double scaleX, double scaleY, osg::Vec3f center) |
|
virtual void | scale (double scale, osg::Vec3f center) |
|
virtual void | rotate (double theta, osg::Vec3f center) |
|
| ToolGlobal (int nVerts, osg::Array::Binding colorBind, osg::PrimitiveSet *primitiveSet, float linewidth=3.f) |
|
virtual void | setVertices (const std::vector< osg::Vec3f > &source) |
|
virtual const osg::Vec3Array * | getVertices () const |
|
virtual void | setColor (const osg::Vec4f &color) |
|
virtual const osg::Vec4f & | getColor () const |
|
osg::Geode * | getGeodeWire () const |
|
osg::Vec3f | getCenterLocal () const |
|
| ProtectedGroup (const ProtectedGroup &group, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) |
|
|
void | initializeSG () |
|
void | setColorIntersection (const osg::Vec4f &colorIntersect) |
|
void | initQuadGeometry (osg::Geometry *geom, const std::string &name="") |
|
void | initLineGeometry (osg::Geometry *geom, float lineWidth, const std::string &name="") |
|
void | setQuadGeometry (osg::Geometry *geom, const osg::Vec3f &P, float szX, float szY, float theta=0, const osg::Vec3f ¢er=cher::CENTER) |
|
void | setScaleGeometry (osg::Geometry *geom, const osg::Vec3f &P0, const osg::Vec3f &P1, const osg::Vec3f &P2, const osg::Vec3f &P3) |
|
void | setLineGeometry (osg::Geometry *geom, const osg::Vec3f &P1, const osg::Vec3f &P2) |
|
void | setColorGeometry (osg::Geometry *geom, const osg::Vec4f &color) |
|
void | moveDeltaWireGeometry (osg::Geometry *geometry, double du, double dv) |
|
void | scaleWireGeometry (osg::Geometry *geometry, double scaleX, double scaleY, osg::Vec3f center) |
|
void | scaleWireGeometry (osg::Geometry *geometry, double scale, osg::Vec3f center) |
|
void | rotateWireGeometry (osg::Geometry *geometry, double theta, osg::Vec3f center) |
|
void | updateGeometry () |
|
void | updateGeometry (osg::Geometry *geom) |
|
A tool to depict canvas bounding box in both its non-editable and editable states.
The canvas tool has three main modes:
- Non-editable
- 2D selection editable
- 3D position editable
Only certain scene graph elements are used within each of the canvas modes. The canvas frame tool has the following scene graph structure:
FrameTool -> Switch -> GeodeWire
|-> GeodeIntersect
|-> AT_Pickable
|-> AT_Center (scales, axis)
|-> GeodeNormal
|-> GeodeRotation
Each geode represents a single functionality / element within the canvas frame:
- GeodeWire is the non-editable canvas wire
- GeodeIntersect contains the geometry of two canvas intersection (normally would contained within the previous canvas).
- AT_Pickbale contains a selectable quad of a non-editable canvas, and it only allows changing the state of a canvas, e.g., from current to previous.
- AT_Center etc. are the quads which appear when the canvas is in 2D-editable mode and they allow to change the scale of the 2D selection of the canvas.
- GeodeNormal is the canvas normal representation which appears when the canvas is in 3D-editable mode. Dragging along the normals allows to edit canvas offset along the normal.
- GeodeRotation is a canvas wireframe representation which appears when the canvas is in 3D-editable mode. It allows changing a canvas location by rotation along local U or local V axis.