HOpConstructCircle

Functions

HOpConstructCircle

~HOpConstructCircle

char const *

GetName

int

OnLButtonDown

int

OnLButtonDownAndMove

int

OnLButtonUp

HBaseOperator *

Clone

Detailed Description

class HOpConstructCircle : public HBaseOperator

The HOpConstructCircle class draws a circle.

HOpConstructCircle implements three of the mouse button event handlers and uses the event information to draw a circle. This class provides the basic functionality for drawing a temporary, overlayed 2-D box outline in the view plane based on first and last pointer positions. The operation consists of the following steps:

  1. Left Button Down: Identifies the center point of the circle.

  2. Left Button Down and Drag: Rubberband circle to desired dimensions.

  3. Left Button Up: Circle finalized and the polyline primitive used to represent the circle is flushed from the scene.

More Detailed Description: see event methods.

Subclassed by HOpCreateCircle, HOpMarkupCircle

Public Functions

HOpConstructCircle(HBaseView *view, int DoRepeat = 0, int DoCapture = 1, bool UseCenterMarker = true)

Constructs an HOpConstructCircle object.

Parameters
  • view – A pointer to an HBaseView object.

  • DoRepeat – An integer denoting whether this is a repeatable operator. This parameter has been deprecated.

  • DoCapture – An integer denoting whether the mouse state should be captured, which means that all mouse events should be received after a mousedown, even if it leaves the window. This parameter has been deprecated.

  • UseCenterMarker – Pass true if you want HOOPS to draw a mark at the center.

virtual ~HOpConstructCircle()
virtual char const *GetName()
Returns

A pointer to a character string denoting the name of the operator, which is ‘HOpConstructCircle’.

virtual int OnLButtonDown(HEventInfo &hevent)

OnLButtonDown records the first mouse position and initiates the circle-drawing mechanism.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonDownAndMove(HEventInfo &hevent)

OnLButtonDownAndMove draws rubberbanded lines along the circumference of the circle centered on the first pointer position. Note that the basic dynamic drawing work is done by repeated calls to the HUtility::CreateAxisCircle while OnLButtonDownandMove keeps track the changing radius value.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonUp(HEventInfo &hevent)

OnLButtonUp finalizes the size of the circle and cleans up the geometry that was drawn under the construction key.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual HBaseOperator *Clone()

Creates a new operator which is a copy of the current operator. The user is responsible for deleting the newly created operator.

Returns

A pointer to the newly created HOpConstructCircle object.