HOpCreateCuboid

Functions

HOpCreateCuboid

~HOpCreateCuboid

char const *

GetName

int

OnLButtonDown

HBaseOperator *

Clone

Detailed Description

class HOpCreateCuboid : public HOpConstructCuboid

The HOpCreateCuboid class creates a rectangular cube.

HOpCreateCuboid maps the event information to the HOOPS Routine #HC_Insert_Shell. This provides the basic functionality for creating a three-dimensional, six-sided cuboid or rectangular box. The cuboid that is generated includes two square faces with the same length and width while the depth is variable. The operation consists of the following steps:

  1. Left Button Down: The first point of square base.

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

  3. Left Button Up: The base of the cuboid dimension is finalized.

  4. No Button Down and Drag: Rubberband the cuboid to the desired depth.

  5. Left Button Down: The depth of the cuboid finalized, the operation ends and a new cuboid is inserted into the model.

More Detailed Description: see event methods.

Public Functions

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

Constructs an HOpCreateCuboid 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 ~HOpCreateCuboid()
virtual char const *GetName()
Returns

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

virtual int OnLButtonDown(HEventInfo &hevent)

OnLButtonDown records the first mouse position and initiates the cuboid-drawing mechanism. It tests for the case that the mechanism has already been started such as OnLButtonDown having been called once already. In this case, OnLButtonDown finalizes the cuboid’s depth, inserts the cuboid into the HOOPS database, updates the display, and ends the operation.

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