Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HOpCreateBoolean Class Reference

The HOpCreateBoolean class allows to perform the binary operations intersect, subtract and union on two shells in a scene. More...

#include <HOpCreateBoolean.h>

Inheritance diagram for HOpCreateBoolean:

HBaseOperator

List of all members.

Public Member Functions

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


Detailed Description

The HOpCreateBoolean class allows to perform the binary operations intersect, subtract and union on two shells in a scene.

The HOpCreateBoolean class performs either an intersection, subtraction or union on two selected shells in the scene. To determine the operation type, pass BOOLEAN_TYPE_INTERSECT, BOOLEAN_TYPE_SUBTRACT or BOOLEAN_TYPE_UNION to the constructor. If the operator type is BOOLEAN_TYPE_INTERSECT, HOOPS will find the set of points common to the two shells and removed the other areas from the scene. If the operator type is BOOLEAN_TYPE_SUBTTRACT, HOOPS will find the set of points common to the two shells and then it will remove that area from the scene as well as the the second shell that was selected. If the operator type is BOOLEAN_TYPE_UNION, HOOPS will create a shell that represents the combined area of two selected shells.

This class implements the OnLButtonDown handler to determine when an item has been selected for operation. The order of event goes as follows:

  1. Left Button Down: Finds the shell that is selected.
  2. Left Button Down: Finds the second shell that is selected. Performs the selected binary operation and returns the result.

Constructor & Destructor Documentation

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

Constructs an HOpCameraZoomBox object.

Parameters:
view A pointer to an HBaseView object.
nBooleanType The BooleanType used to compare the two selections. The values can be BOOLEAN_TYPE_INTERSECT, BOOLEAN_TYPE_SUBTRACT or BOOLEAN_TYPE_UNION.
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.


Member Function Documentation

virtual HBaseOperator* HOpCreateBoolean::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 HOpCreateBoolean object.

Reimplemented from HBaseOperator.

virtual const char* HOpCreateBoolean::GetName (  )  [virtual]

Returns:
A pointer to a character string denoting the name of the operator which is 'HOpCreateBoolean'.

Reimplemented from HBaseOperator.

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

This method get the first shell selection. If the first shell has already been selected, then it looks for the second selection. Then it performs the operation indicated by the BooleanType passed into the operation. The first object selected is the tool, the second object is the target.

Parameters:
hevent An HEventInfo object containing information about the current event.
Returns:
An HOperatorReturn indicating the status of the event.

Reimplemented from HBaseOperator.


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