Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HOpCreateCuboid Class Reference

The HOpCreateCuboid class creates a rectangular cube. More...

#include <HOpCreateCuboid.h>

List of all members.

Public Member Functions

virtual HBaseOperatorClone ()
virtual const char * GetName ()
 HOpCreateCuboid (HBaseView *view, int DoRepeat=0, int DoCapture=1)
virtual int OnLButtonDown (HEventInfo &hevent)

Detailed Description

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.


Constructor & Destructor Documentation

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

Constructs an HOpCreateCuboid object.

Parameters:
viewA pointer to an HBaseView object.
DoRepeatAn integer denoting whether this is a repeatable operator. This parameter has been deprecated.
DoCaptureAn 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.

Member Function Documentation

virtual HBaseOperator* HOpCreateCuboid::Clone ( ) [virtual]

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.

Reimplemented from HOpConstructCuboid.

virtual const char* HOpCreateCuboid::GetName ( ) [virtual]
Returns:
A pointer to a character string denoting the name of the operator, which is 'HOpCreateCuboid'.

Reimplemented from HOpConstructCuboid.

virtual int HOpCreateCuboid::OnLButtonDown ( HEventInfo hevent) [virtual]

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:
heventAn HEventInfo object containing information about the current event.
Returns:
An HOperatorReturn indicating the status of the event.

Reimplemented from HOpConstructCuboid.


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