HOpCreateCuttingPlane

Functions

HOpCreateCuttingPlane

char const *

GetName

int

OnLButtonDown

int

OnLButtonUp

HBaseOperator *

Clone

Detailed Description

class HOpCreateCuttingPlane : public HOpObjectTranslate

The HOpCreateCuttingPlane class provides support for construction a cutting plane and inserting it into the scene.

HOpCreateCuttingPlane implements two of the mouse button event handlers defined on the base class. In this case, the operator uses the LButtonDown event to begin the cutting plane insertion mechanism, but position info is not used. This provides the basic functionality for viewing cut-away scenes, cross-sections, and slices of models. Upon insertion, the default position of the cutting plane lies parallel to the view plane and intersects the z-value of the scene’s centerpoint. The operation consists of the following steps:

  1. Left Button Down: The cutting plane is inserted through center of the scene.

  2. Left Button Up: All geometry is deselected and the operation ends.

More Detailed Description: see event methods.

Public Functions

HOpCreateCuttingPlane(HBaseView *view, int DoRepeat = 0, int DoCapture = 1)

Constructs an HOpCreateCuttingPlane 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.

virtual char const *GetName()
Returns

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

virtual int OnLButtonDown(HEventInfo &hevent)

OnLButtonDown begins the cutting plane insertion mechanism and calculates the center of the scene. The center point’s z-value is passed internally to initiate the plane’s construction. In addition, the plane is placed in the current selection list and will be highlighted until the left mouse button is released.

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 ends the operation and removes the cutting plane from the current selection list. The function also deselects every item in the scene upon completion.

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 HOpCreateCuttingPlane object.