#include <HOpConstructCircle.h>
Public Member Functions | |
virtual HBaseOperator * | Clone () |
virtual const char * | GetName () |
HOpConstructCircle (HBaseView *view, int DoRepeat=0, int DoCapture=1, bool UseCenterMarker=true) | |
virtual int | OnLButtonDown (HEventInfo &hevent) |
virtual int | OnLButtonDownAndMove (HEventInfo &hevent) |
virtual int | OnLButtonUp (HEventInfo &hevent) |
Protected Attributes | |
HPoint | m_ptCircle [2] |
The first and last points in the circle which are stored in window space. | |
float | m_radius |
The radius of the 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:
HOpConstructCircle::HOpConstructCircle | ( | HBaseView * | view, | |
int | DoRepeat = 0 , |
|||
int | DoCapture = 1 , |
|||
bool | UseCenterMarker = true | |||
) |
Constructs an HOpConstructCircle object.
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 HBaseOperator* HOpConstructCircle::Clone | ( | ) | [virtual] |
Creates a new operator which is a copy of the current operator. The user is responsible for deleting the newly created operator.
Reimplemented from HBaseOperator.
Reimplemented in HOpCreateCircle, and HOpMarkupCircle.
virtual const char* HOpConstructCircle::GetName | ( | ) | [virtual] |
Reimplemented from HBaseOperator.
Reimplemented in HOpCreateCircle, and HOpMarkupCircle.
virtual int HOpConstructCircle::OnLButtonDown | ( | HEventInfo & | hevent | ) | [virtual] |
OnLButtonDown records the first mouse position and initiates the circle-drawing mechanism.
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HBaseOperator.
virtual int HOpConstructCircle::OnLButtonDownAndMove | ( | HEventInfo & | hevent | ) | [virtual] |
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.
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HBaseOperator.
virtual int HOpConstructCircle::OnLButtonUp | ( | HEventInfo & | hevent | ) | [virtual] |
OnLButtonUp finalizes the size of the circle and cleans up the geometry that was drawn under the construction key.
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HBaseOperator.
Reimplemented in HOpCreateCircle, and HOpMarkupCircle.