SoRectangleScreenDrawer Class Reference

VSG extension Interactively draws a rectangle in normalized screen space. More...

#include <Inventor/drawers/SoRectangleScreenDrawer.h>

Inheritance diagram for SoRectangleScreenDrawer:
SoPolyLineScreenDrawer SoScreenDrawer SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  CreationMethod {

Public Member Functions

virtual SoType getTypeId () const
 SoRectangleScreenDrawer ()
virtual void reset ()

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFEnum method

Detailed Description

VSG extension Interactively draws a rectangle in normalized screen space.

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:

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.




SoEllipseScreenDrawer, SoLassoScreenDrawer, SoPolyLineScreenDrawer, SoPolygonScreenDrawer,

See related examples:

CustomScreenDrawer, MedicalFreeHandCutting

Member Enumeration Documentation

Methods to create rectangle.


Initial point is a corner, current point is a corner.


Initial point is the center, current point is a corner.

Constructor & Destructor Documentation

SoRectangleScreenDrawer::SoRectangleScreenDrawer (  ) 


Member Function Documentation

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.

virtual void SoRectangleScreenDrawer::reset (  )  [virtual]

Clears the points in the line and resets internal state to initial values. This cancels any current drawing. Since Open Inventor 10.7.3

Reimplemented from SoPolyLineScreenDrawer.

Member Data Documentation

Method to create rectangle.

Use enum CreationMethod. Default is CORNER_CORNER.

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.