Interactively draws a rectangle in normalized screen space. More...
#include <Inventor/drawers/SoRectangleScreenDrawer.h>
Public Types | |
enum | CreationMethod { CORNER_CORNER, CENTER_CORNER } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoRectangleScreenDrawer () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFEnum | method |
This class can be used to interactively draw a rectangle on screen.
When the rectangle is finished, an event is raised to notify the application (see SoPolyLineScreenDrawer::onFinish ). Points are returned as normalized coordinates in the range -1..1, which is conveniently the default view volume for an SoOrthographicCamera node.
The line color and simplification threshold are specified by fields in the parent class SoPolyLineScreenDrawer.
Please see SoPolyLineScreenDrawer for general notes and code example.
Rectangle specific notes:
[C++]
Screen drawer classes must be initialized by calling SoInteraction::init(). High level viewer init methods, like SoWin::init(), automatically do this. However, if the application is calling SoDB::init() directly, then it is usually necessary to also call SoInteraction::init() before using the screen drawer classes.
point | [] |
color | 1 0 0 |
simplificationThreshold | 0 |
isClosed | TRUE |
method | CORNER_CORNER |
SoEllipseScreenDrawer, SoLassoScreenDrawer, SoPolyLineScreenDrawer, SoPolygonScreenDrawer,
SoRectangleScreenDrawer::SoRectangleScreenDrawer | ( | ) |
Constructor.
static SoType SoRectangleScreenDrawer::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoPolyLineScreenDrawer.
virtual SoType SoRectangleScreenDrawer::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoPolyLineScreenDrawer.
Method to create rectangle.
Use enum CreationMethod. Default is CORNER_CORNER.