HBaseView

Types

HAnimateMode

Fields

HAnimateScene

bool(*)(unsigned int, int &)

GetKeyStateCallback

void(*)(HIC_Rendition const *nr)

GetEventCheckerCallback

int const

MaxLights

Functions

HBaseView

void

RebindView

~HBaseView

void

Init

void

FitWorld

void

FitWorldExact

void

ZoomToExtents

void

ZoomToInitialCamera

void

FitSegment

void

FitSelection

void

FitItemByPath

void

RenderAntialiasing

void

InitAntialiasing

HUtilityAntialiasing *

GetAntialiasing

HMarkupManager *

GetMarkupManager

bool

HaveMarkupManager

void

SetMarkupManager

void

RenderWireframe

void

RenderSilhouette

void

RenderHiddenLine

void

RenderHiddenLineFast

void

RenderFlat

void

RenderGooch

void

RenderGouraud

void

RenderPhong

void

RenderWireframeWithSilhouette

void

RenderShadedWireframe

void

RenderVertices

void

RenderShadedVertices

void

RenderFakeHiddenLine

void

RenderBRepHiddenLine

void

RenderBRepHiddenLineFast

void

RenderBRepWireframe

void

RenderShaded

void

RenderShadedWithLines

void

RenderGouraudWithLines

void

RenderLOD1

void

RenderLOD2

void

RemoveTransforms

void

Update

void

ForceUpdate

HFileIOResult

FileInput

HFileIOResult

FileInput

HFileIOResult

FileOutput

HFileIOResult

FileOutput

char const *

GetDriverPath

char const *

GetDriverType

void

UpdateHighlighting

HSelectionSet *

GetSelection

void

SetSelection

HBaseModel *

GetModel

HC_KEY

GetModelKey

HRenderMode

GetRenderMode

ViewMode

GetViewMode

void

SetViewMode

bool

GetCPLineVisibility

bool

GetCPFaceVisibility

void

SetCPGeomVisibility

bool

GetCuttingPlanesExist

void

SetCuttingPlanesExist

bool

GetCuttingPlanesVisibility

void

SetCuttingPlanesVisibility

HConstantFrameRate *

GetConstantFrameRateObject

void

SetConstantFrameRateObject

void

SetEventCheckerCallback

void

SetKeyStateCallback

void

SetOcclusionCullingMode

HandednessMode

GetHandedness

void

SetHandedness

void

SetHandednessFromMessage

bool

SetHandednessFromModel

void

SetFontSize

void

SetFontSizeFromMessage

bool

GetBackplaneCulling

void

SetBackplaneCulling

ProjMode

GetProjMode

void

SetProjMode

DisplayListType

GetDisplayListType

void

SetDisplayListType

bool

GetDisplayListMode

void

SetDisplayListMode

HandednessMode

GetPolygonHandednessMode

void

SetPolygonHandednessMode

bool

GetLodMode

void

SetLodMode

bool

GetSpritingMode

void

SetSpritingMode

int

GetLodThreshold

void

SetLodThreshold

HC_KEY

GetViewKey

void

SetViewKey

HC_KEY

GetIncludeLinkKey

void

SetIncludeLinkKey

HC_KEY

GetSceneKey

void

SetSceneKey

HC_KEY

GetOverwriteKey

HC_KEY

GetShadowMapSegmentKey

HC_KEY

GetLightsKey

void

SetLightsKey

float

GetZoomLimit

void

SetZoomLimit

void

SetZoomLimit

HC_KEY

GetWindowspaceKey

void

SetWindowspaceKey

HC_KEY

GetConstructionKey

void

SetConstructionKey

HC_KEY

GetBBoxGeometryKey

void

SetBBoxGeometryKey

HC_KEY

GetCuttingPlanesKey

void

SetCuttingPlanesKey

HC_KEY

GetCuttingPlaneGeomKey

void

SetCuttingPlaneGeomKey

HC_KEY

GetIntersectPolylinesKey

void

SetIntersectPolylinesKey

HC_KEY

GetProgressBarKey

void

SetProgressBarKey

int

GetUpdateInterrupted

void

SetUpdateInterrupted

float

GetIdleTime

void

ResetIdleTime

HQuickMovesMethod

GetQuickMovesMethod

class HDebugZBuffer *

GetDebugZBuffer

void

SetDebugZBuffer

AxisMode

GetAxisMode

void

SetAxisMode

void

OnSetAxisMode

void

UpdateAxisTriad

void

AdjustAxisWindow

HShadowMode

GetShadowMode

void

SetShadowMode

void

SetReflectionPlane

HC_KEY

GetDefaultLightKey

bool

GetTransparentSelectionBoxMode

void

SetTransparentSelectionBoxMode

void

DeleteSelectionList

void

RotateOnUpdate

void

SetWindowColor

void

SetWindowColor

void

SetWindowColorRange

void

SetWindowMaterial

void

SetWindowColorFromMessage

void

GetWindowColor

void

GetWindowColor

void

GetWindowColor

void

GetWindowMaterial

void

SetOperator

void

SetCurrentOperator

HBaseOperator *

GetOperator

HBaseOperator *

GetCurrentOperator

HC_KEY

GetAxisTriadKey

bool

GetHideOverlappedText

void

SetHideOverlappedText

void

SetNavCube

bool

GetSmoothTransition

void

SetSmoothTransition

void

SetSmoothTransitionDuration

float

GetSmoothTransitionDuration

bool

IsLightFollowCamera

void

SetLightFollowsCamera

void

SetLightCount

int

GetLightCount

void

CameraPositionChanged

void

PrepareForCameraChange

void

SetCamera

void

SetInitialCamera

void

GetCamera

void

SetCamera

void

GetCamera

void

SetCameraFromMessage

void

InsertHSFData

void

InsertHSFDataFromMessage

void

EmitHSFData

void

SetRenderMode

void

SetRenderModeFromMessage

void

EmitFlushMessage

void

FlushFromMessage

void

Flush

void

SetEmitMessageFunction

bool

EmittingMessages

HBaseViewEmitMessageFunction

GetEmitMessageFunction

void *

GetEmitMessageFunctionUserData

void

EmitSelectMessage

void

SelectFromMessage

void

EmitDeSelectAllMessage

void

EmitDeleteSelectionListMessage

void

DeleteSelectionListFromMessage

void

DeSelectAllFromMessage

void

EmitSetModellingMatrixMessage

void

EmitSetModellingMatrixMessage

void

EmitSegment

void

EmitDeleteByKeyMessage

void

DeleteByKeyFromMessage

void

SetModellingMatrixFromMessage

HSharedKey *

GetSharedKey

void

StartSharedKey

void

Animate

void

SetGeometryChanged

bool

GetSceneBoundingSet

void

SetSceneBounding

void

InvalidateSceneBounding

void

SetFastMarkerDrawing

bool

GetFastMarkerDrawing

void

SetDoubleBuffering

void

ClearGeometryChanged

bool

GeometryChanged

unsigned long

SetSignalNotify

void

UnSetSignalNotify

void

SetColorInterpolation

void

SetColorIndexInterpolation

bool

GetColorIndexInterpolation

bool

GetFrameBufferEffectsOptions

void

Notify

int

UpdateEvent

bool

GetUpdateRequested

void

RequestUpdate

void

ClearUpdateRequest

void

SetSuppressUpdate

bool

GetSuppressUpdate

void

SetSuppressUpdateTick

bool

GetSuppressUpdateTick

void

SetViewUpdateMode

ViewUpdateMode

GetViewUpdateMode

void

FlushProgressBar

HUndoManager *

GetUndoManager

HEventManager *

GetEventManager

HObjectManager *

GetHObjectManager

bool

GetDynamicHighlighting

void

SetDynamicHighlighting

int

OnNoButtonDownAndMove

int

OnLButtonDownAndMove

int

OnLButtonDblClk

int

OnRButtonDownAndMove

int

OnMButtonDownAndMove

int

OnLRButtonDownAndMove

int

OnLButtonDown

int

OnMouseMove

int

OnLButtonUp

int

OnMouseWheel

bool

ComputeReasonableTarget

void

ComputeNewField

int

OnKeyDown

int

OnKeyUp

void

SetShadowColor

void

SetShadowLightDirection

bool

GetShadowLightDirection

void

SetShadowIgnoresTransparency

bool

GetShadowIgnoresTransparency

void

DoDynamicHighlighting

void

SetShadowResolution

void

SetShadowBlurring

void

InternalUpdate

void

SetShadowRegenerationMode

void

SetShadowRegenerationToggle

bool

GetCuttingPlaneRegenerationMode

void

SetCuttingPlaneRegenerationMode

bool

GetShadowRegenerationMode

void

SetCameraChanged

bool

GetCameraChanged

void

SetInvertMouseWheelZoom

bool

GetInvertMouseWheelZoom

void

SetAxisManipulateOperator

void

SetVisibilitySelectionMode

bool

GetVisibilitySelectionMode

void

SetRelatedSelectionLimit

int

GetRelatedSelectionLimit

void

SetDetailSelection

bool

GetDetailSelectionMode

void

SetRespectSelectionCulling

bool

GetRespectSelectionCulling

void

SmartFilterCircumcuboid

int

SetupHandlesEvent

bool

GetHasObjects

void

SetHasObjects

void

SetHandleOperator

HBaseOperator *

GetHandleOperator

float

GetDefaultSelectionProximity

void

SetDefaultSelectionProximity

bool

GetAllowInteractiveShadows

void

SetAllowInteractiveShadows

HShadowRenderingMode

GetShadowRenderingMode

void

SetShadowRenderingMode

bool

GetAllowInteractiveCutGeometry

void

SetAllowInteractiveCutGeometry

HCutGeometryVisibility

GetCutGeometryVisibility

void

SetCutGeometryVisibility

void *

GetWindowHandle

bool

GetInitialCameraSet

int

ObjectMovedEvent

void

SetRecordCamera

bool

GetRecordMode

void

InjectEvent

void

SetForceFastHiddenLine

bool

GetForceFastHiddenLine

void

SetTransparency

void

SetLineAntialiasing

bool

GetLineAntialiasing

void

SetTextAntialiasing

void

SetDepthOfField

void

SetDepthOfFieldRange

bool

GetTextAntialiasing

void

SetIsoDefault

ViewMode

GetIsoDefault

void

SetCullingThreshold

int

GetCullingThreshold

void

SetHardExtent

int

GetHardExtent

void

BeginShellSelection

void

EndShellSelection

HSelectionSet *

GetHighlightSelection

void

SetViewAxis

void

GetViewAxis

void

SetDefaultHSRA

void

SetMaximumUpdateTime

float

GetMaximumUpdateTime

HSelectionHighlightMode

GetHighlightMode

void

SetHighlightMode

void

SetReferenceSelection

bool

GetKeyState

void

ResetKeyState

void

SetFastFitWorld

void

SetDetailedFitWorld

bool

GetFastFitWorld

bool

GetDetailedFitWorld

void

GetSceneExtents

void

SetLightScaling

void

SetXYSizeOverride

int

GetXSize

int

GetYSize

HViewSelectionLevel

GetViewSelectionLevel

void

SetViewSelectionLevel

void

EnableTargetFrameRate

float

GetFramerate

FramerateMode

GetFramerateMode

int

GetFramerateCullingThreshold

int

GetFramerateSteps

bool

IsFramerateLodEnabled

void

SetFramerateMode

bool

IsFrameRateEnabled

bool

GetViewActive

void

cleanupSimpList

void

SetAnnotationResize

bool

GetAnnotationResize

bool

GetFirstUpdate

void

SetDisplayHandlesOnDblClk

bool

HasInitialView

void

HasInitialView

void

ExhaustiveUpdate

bool

GetUpdateNotFinished

void

SetUpdateNotFinished

void

SetMouseWheelSensitivity

float

GetMouseWheelSensitivity

void

SetSplatRendering

bool

GetSplatRendering

void

SetSplatSize

int

GetSplatSize

void

SetSplatSymbol

SplatSymbol

GetSplatSymbol

void

UpdateFakeHLRColor

void

SetHardwareAntialiasing

int

GetHardwareAntialiasing

void

VisualizeBounding

HPoint

GetFakeHLRColor

void

SetFakeHLRColor

void

FocusOnSelection

bool

GetFocusOnSelection

HTouchManager *

GetTouchManager

void

SetForcedLines

int

GetForcedLines

void

AdjustAxisWindowCallback

void

AdjustWindowCallback

bool

UpdateTick

bool

StreamProgressCallback

void

StaticForceUpdateRequest

Detailed Description

class HBaseView : public HUpdateListener, public HMouseListener, public HObjectManipulationListener

The HBaseView class defines and manages a view of model information.

The HBaseView class stores view-specific information and provides a high level interface for managing viewing attributes. A view typically references an HBaseModel object to define a view of a model.

This class encapsulates a HOOPS segment associated with an instance of a HOOPS driver. This type of segment defines a connection to a device (i.e. OpenGL, X11, GDI, etc.). Its Init method creates a default segment structure under the driver instance segment, which is used to manage the inclusion of the HOOPS Include Library segment associated with HBaseModel, lights for the scene, and segments containing camera and window attributes used for temporary ‘rubberband’ graphics.

The HBaseView object has associations with the following objects:

It also implements the following viewing manipulations by setting the appropriate HOOPS camera attributes:

  • Fit the view’s camera to the model’s extents.

  • Fit the view’s camera to the extents of the current selection set.

  • Fit the view’s camera to the extents of the entire world.

  • Set the view to default angles (XY, YZ, XZ target planes).

It includes interfaces for managing:

  • Rendering methods (antialiasing, shadows, capping lines/faces, etc…)

  • Hidden Surface Removal Algorithms

  • Lighting Interpolation

  • Camera Projection

  • Constant Framerate Logic

Public Types

enum HAnimateMode

Indicates how the scene should be animated; obselete; animation should be performed using MVO’s behavior/animation support.

Values:

enumerator HAnimateScene

Public Functions

HBaseView(HBaseModel *model, char const *alias = 0, char const *driver_type = 0, char const *instance_name = 0, void *window_handle = 0, void *colormap = 0, void *clip_override = 0, void *window_handle_2 = 0, char const *driver_path = 0)

Constructs an HBaseView object.

Parameters
  • model – A pointer to the HBaseModel object, which defines the model to viewed by this HBaseView object. If model is null, then the view will not reference any external part of the HOOPS segment tree, and can only view geometry that is created directly underneath the HBaseView object’s ‘scene’ segment

  • alias – A character pointer denoting the HOOPS alias representing the driver instance segment encapsulated by this HBaseView object

  • driver_type – A character pointer denoting the type of HOOPS driver instance that should be created to correspond with this HBaseView object. See the Device Guide for a list of available drivers.

  • instance_name – A character pointer denoting the name of the HOOPS driver instance associated with this HBaseView object. For example, this might be ‘window’ if driver_type is ‘msw’, or ‘unix:0.0’ if driver_type is ‘x11’ If either driver_type or instance_name are null, HOOPS will use default values obtained from the unique hDB HOOPS MVO object.

  • window_handle – This identifies the handle of the precreated native window system window (X11 or GDI) which the HOOPS driver instance segment should draw into. HOOPS will not handle any events for this window if it is passed in. If window_handle is null, HOOPS will automatically create a native window, and manage its updating as well as all events.

  • colormap – This identifies a native window system colormap which HOOPS will utilize when allocating and managing colors. If null, HOOPS will creates its own system colormap as necessary.

  • clip_override – This identifies a pointer to a clip override array.

  • window_handle_2 – This identifies a window handle to be used for use window id2.

  • driver – path If provided this driver path will be used rather than an internally generated one.

void RebindView(char const *alias = 0, char const *driver_type = 0, char const *instance_name = 0, void *window_handle = 0, void *colormap = 0, void *clip_override = 0, void *window_handle_2 = 0, int debug_flags = 0)

This method rebinds the view to a new window.

Parameters
  • alias – A character pointer denoting the HOOPS alias representing the driver instance segment encapsulated by this HBaseView object

  • driver_type – A character pointer denoting the type of HOOPS driver instance that should be created to correspond with this HBaseView object

  • instance_name – A character pointer denoting the name of the HOOPS driver instance associated with this HBaseView object. For example, this might be ‘window’ if driver_type is ‘msw’, or ‘unix:0.0’ if driver_type is ‘x11’ If either driver_type or instance_name are null, HOOPS will use default values obtained from the unique hDB HOOPS MVO object.

  • window_handle – This identifies the handle of the precreated native window system window (X11 or GDI) which the HOOPS driver instance segment should draw into. HOOPS will not handle any events for this window if it is passed in. If window_handle is null, HOOPS will automatically create a native window, and manage its updating as well as all events.

  • colormap – This identifies a native window system colormap which HOOPS will utilize when allocating and managing colors. If null, HOOPS will creates its own system colormap as necessary.

  • clip_override – This identifies a pointer to a clip override array.

  • window_handle_2 – This identifies a window handle to be used for use window id2.

  • debug_flags – The optional debug flags passed to #HC_Set_Driver_Options().

virtual ~HBaseView()

Deletes the HOOPS segment tree and operator/event/selection/framerate-support objects associated with this view

virtual void Init()

This method initializes the view. The startup default segment hierarchy associated with the HBaseView object is created and initialized.

virtual void FitWorld(HPoint *center_out = 0)

This resets the camera so that it views the extents of the scene. It does not call Update().

Parameters

center_out – A pointer to a 3d point. If a non-null pointer is passed, then the new camera target position is returned.

virtual void FitWorldExact(HPoint *center_out = 0)

This method moves the camera along the exising view vector so that it wholly encloses all geometry, including text, in the scene. The camera is set so that it tightly encloses the geometry and so the geometry in the scene will extend to the bounds of the window in either the x or y direction. It uses #HC_Compute_Screen_Extent to get the tight 2d box around the model. It behaves similarly to FitWorld.

Parameters

center_out – Pass a pointer to an HPoint if you want this method to return the center of the scene viewed by the camera.

virtual void ZoomToExtents()

This method uses FitWorld to reset the camera and then calls Update in various ways depending on how the smooth transition parameters are set.

virtual void ZoomToInitialCamera()

This functions zooms to the original camera settings which have been specified when the model was initially loaded.

void FitSegment(HC_KEY seg_key)

This method fits the camera to the extents of the HOOPS segment tree corresponding with the specified segment.

Parameters

seg_key – The key of the HOOPS segment denoting the top of the desired segment tree.

void FitSelection(HC_KEY key = (-1L), bool adjustToShellNormal = false)

This method fits the camera to view the extents of the geometric objects in the views HSelectionSet list; function is still under development.

void FitItemByPath(HC_KEY key, int incl_count, HC_KEY *incl_path)

This method fits the camera to view the extents of the key passed in.

void RenderAntialiasing()

This method redraws the scene with antialiasing enabled.

void InitAntialiasing()

This method initializes the antialiasing logic.

inline HUtilityAntialiasing *GetAntialiasing()
Returns

A pointer to an HUtilityAntialiasing object.

HMarkupManager *GetMarkupManager()
Returns

A pointer to the HMarkupManager object.

inline bool HaveMarkupManager()
Returns

A true if we a HMarkupManager object.

inline void SetMarkupManager(HMarkupManager *markup)

This method sets the HMarkupManager object for the view.

Parameters

markup – A pointer to an HMarkupManager object.

void RenderWireframe()

This method sets the render mode to wireframe so that only lines and edges appear in the scene.

void RenderSilhouette()

This method sets the render mode to silhouette which renders edges with two attached non-invisible faces, one of which is facing forward and one back on the screen to be.

void RenderHiddenLine()

This method sets the render mode to hidden line.

void RenderHiddenLineFast()

This method sets the render mode to fast hidden line.

void RenderFlat()

This method sets the render mode to flat shading.

void RenderGooch()

This method sets the render mode to Gooch shading.

void RenderGouraud()

This method sets the render mode to gouraud shading.

void RenderPhong()

This method sets the render mode to phong shading.

void RenderWireframeWithSilhouette()

This method sets the render mode to wireframe with silhouette.

void RenderShadedWireframe()

This method sets the render mode to shaded wireframe.

void RenderVertices()

This method sets the render mode to vertices.

void RenderShadedVertices()

This method sets the render mode to shaded vertices.

void RenderFakeHiddenLine()

This method sets the render mode to fake hidden line. Fake hidden line mode sets the top window color and the face color to be the same as the bottom window color. If shaders are available, fake hidden line will use fast silhouette edges to achieve excellent performance.

void RenderBRepHiddenLine()

This method sets the render mode to hidden line for BRep geometry.

void RenderBRepHiddenLineFast()

This method sets the render mode to fast hidden line for BRep geometry.

void RenderBRepWireframe()

This method sets the render mode to brep wireframe.

void RenderShaded()

A higher level function to enable smooth shading. If phong lighting is hardware accelerated, then phong shading will be enabled. Otherwise gouraud shading will be enabled.

void RenderShadedWithLines()

Sets render mode with smooth shading and lines on

void RenderGouraudWithLines()

Sets render mode to Gouraud with lines on

void RenderLOD1()

Clamps rendering to LOD1.

void RenderLOD2()

Clamps rendering to LOD2.

void RemoveTransforms()

This method removes the modelling transformations from the scene segment.

virtual void Update()

This method updates the scene. The HOOPS segment tree is traversed and any changes in geometry or attributes are updated via a redraw. Cutting plane geometry and the orientation of the axis display are recalculated if necessary. If constant frame rate is enabled and activated by an operator, the detail level of the geometry is adjusted if necessary in order to maintain the target frame rate.

virtual void ForceUpdate()

If the view update mode is set to #ViewUpdateMode.Continuous, you can use this method to request an immediate update. If it is set to #ViewUpdateMode.OnDemand, this method will simply call Update. To find the current setting for the view update mode, you can call look at call GetViewUpdateMode.

virtual HFileIOResult FileInput(__wchar_t const *FileName, HInputHandler *handler, HInputHandlerOptions *options = 0)

This method uses a HInputHandler to input image or model data into the HBaseView current HBaseModel. If no HInputHandlerOptions is provided a default, one with the correct HBaseView pointer filled in is created and used for the operation. The key provided by GetModel()->GetModelKey() is used for the input target segment.

Parameters
  • FileName – A null terminated string of the complete file path for the operation.

  • handler – A pointer to an instance of a subclassed HInputHandler implementing the input operation need.

  • options – An optional pointer to an instance of a HInputHandlerOptions contain extra data for input operation.

Returns

An #HFileInputResult value depending on the outcome of the input operation.

inline virtual HFileIOResult FileInput(char const *FileName, HInputHandler *handler, HInputHandlerOptions *options = 0)

This method uses a HInputHandler to input image or model data into the HBaseView current HBaseModel. If no HInputHandlerOptions is provided a default, one with the correct HBaseView pointer filled in is created and used for the operation. The key provided by GetModel()->GetModelKey() is used for the input target segment.

Parameters
  • FileName – A null terminated string of the complete file path for the operation.

  • handler – A pointer to an instance of a subclassed HInputHandler implementing the input operation need.

  • options – An optional pointer to an instance of a HInputHandlerOptions contain extra data for input operation.

Returns

An #HFileInputResult value depending on the outcome of the input operation.

virtual HFileIOResult FileOutput(__wchar_t const *FileName, HOutputHandler *handler, HOutputHandlerOptions *options = 0)

This method uses a HInputHandler to input image or model data into the HBaseView current HBaseModel. If no HInputHandlerOptions is provided a default, one with the correct HBaseView pointer filled in is created and used for the operation. The key provided by GetModel()->GetModelKey() is used for the input target segment.

This method uses a HOutputHandler to create image, model, hardcopy and html output. If no HOutputHandlerOptions is provided a default, one with the correct HBaseView pointer filled in is created and used for the operation. In many cases the default options will not be enough to get the desired output. You should read the documentation for the specific HOutputHandler used and provide the options it needs. HOutputHandler implementers should setup up sane defaults for a minimal options setup. In some cases OutputBadOptions will be returned if a required option was not filled in.

Depending on the style of the HOutputHandler a HOOPS driver may be created or a HOOPS image rendered and its key passed to the handle. In the case of model output the HBaseView, HCamera and model key will be provided by default. If output style is image, then a image will be created by the view and passed to the handle. Height and Width are required for image style output. In the case of html, a page embedding an hsf file will be created. An hsf file will also be created using the current handler for “hsf” registered with the HIOManager.

Note that geometry in the view segment but not in the model segment, though it may be drawn to the screen, will not be written to the file.

Parameters
  • FileName – A null terminated string of the complete UNICODE file path for the operation.

  • handler – A pointer to an instance of a subclassed HInputHandler implementing the input operation need.

  • options – An optional pointer to an instance of a HInputHandlerOptions contain extra data for input operation.

  • FileName – A null terminated string of the complete file path for the operation.

  • handler – A pointer to an instance of a subclassed HOutputHandler implementing the output operation need.

  • options – An optional pointer to an instance of a HOutputHandlerOptions contain extra data for output operation.

Returns

A #HFileInputResult value depending on the outcome of the input operation.

Returns

A HFileOutputResult value depending on the outcome of the output operation

inline virtual HFileIOResult FileOutput(char const *FileName, HOutputHandler *handler, HOutputHandlerOptions *options = 0)

This method uses a HOutputHandler to create image, model, hardcopy and html output. If no HOutputHandlerOptions is provided a default, one with the correct HBaseView pointer filled in is created and used for the operation. In many cases the default options will not be enough to get the desired output. You should read the documentation for the specific HOutputHandler used and provide the options it needs. HOutputHandler implementers should setup up sane defaults for a minimal options setup. In some cases OutputBadOptions will be returned if a required option was not filled in.

Depending on the style of the HOutputHandler a HOOPS driver may be created or a HOOPS image rendered and its key passed to the handle. In the case of model output the HBaseView, HCamera and model key will be provided by default. If output style is image, then a image will be created by the view and passed to the handle. Height and Width are required for image style output. In the case of html, a page embedding an hsf file will be created. An hsf file will also be created using the current handler for “hsf” registered with the HIOManager.

Note that geometry in the view segment but not in the model segment, though it may be drawn to the screen, will not be written to the file.

Parameters
  • FileName – A null terminated string of the complete file path for the operation.

  • handler – A pointer to an instance of a subclassed HOutputHandler implementing the output operation need.

  • options – An optional pointer to an instance of a HOutputHandlerOptions contain extra data for output operation.

Returns

A HFileOutputResult value depending on the outcome of the output operation

inline char const *GetDriverPath()
Returns

A string denoting the fully rooted pathname of the driver instance segment.

inline char const *GetDriverType()
Returns

A string denoting the driver type; e.g. msw, opengl, x11.

virtual void UpdateHighlighting()

This method updates the highlighting of selected objects in all HSelectionSets owned by this view.

inline HSelectionSet *GetSelection()
Returns

A pointer to the HSelectionSet object for this view.

inline void SetSelection(HSelectionSet *selection)

This method sets the selection object for this view.

Parameters

selection – A pointer the HSelectionSet object you want associated with this view.

inline virtual HBaseModel *GetModel()
Returns

A pointer to the HBaseModel object referenced by this view.

HC_KEY GetModelKey()

A helper function that allows developers to access the root of the model segment tree.

Returns

The key to the root of the segment hierarchy in the include library.

inline HRenderMode GetRenderMode()
Returns

An enumerated type denoting the render mode for this view. The default is HRenderGouraud.

inline ViewMode GetViewMode()
Returns

An enumerated type denoting the 2d plane which this view’s camera is looking at. The default is HViewXY.

virtual void SetViewMode(ViewMode mode, bool invert = false, bool fitWorld = true)

This method sets the view mode for this view. The default is HViewXY.

Parameters
  • mode – Pass the new view mode.

  • invert – Pass true if you want to set the inverted view of the passed mode.

  • fitworld – Pass true if you want to reset the camera so that it views the extents of the scene.

inline bool GetCPLineVisibility()
Returns

A boolean denoting the visibility of cutting-plane intersection lines.

inline bool GetCPFaceVisibility()
Returns

A boolean denoting the visibility of cutting-plane intersection faces.

void SetCPGeomVisibility(bool lines, bool faces = false)

This method enables the visibility of cutting-plane intersection geometry. If cutting planes are present, the lines and faces of intersection between the cutting planes and geometry can be computed and drawn. Faces of intersection will only be present when closed objects are cut by the cutting planes. Both intersection lines and faces will be drawn by default.

Parameters
  • lines – Pass true if the intersection lines should be drawn or false if they shouldn’t be drawn.

  • faces – Pass true if the intersection faces should be drawn or false if they shouldn’t be drawn.

bool GetCuttingPlanesExist(char const *plane = 0)

This method determines if the cutting planes exist in the given segment.

Parameters

plane – The name of the segment in which you wish to know if cutting planes exist. If plane is 0, the entire scene will be checked for cutting planes.

Returns

A boolean denoting whether cutting planes exist in the scene.

void SetCuttingPlanesExist(bool state)

Use this method to tell the system whether cutting planes exist.

Parameters

state – Pass true if cutting planes exist or false if they don’t.

inline bool GetCuttingPlanesVisibility()
Returns

A boolean denoting the visibility of the cutting plane.

void SetCuttingPlanesVisibility(bool visible)

This method enables visibility of cutting-plane faces.

Parameters

visible – Pass true to indicate that cutting planes are visible.

inline HConstantFrameRate *GetConstantFrameRateObject()
Returns

A pointer to the HConstantFrameRate object for this view.

inline void SetConstantFrameRateObject(HConstantFrameRate *cf)

This method sets the HConstantFrameRate object for this view.

Parameters

cf – A pointer to the HConstantFrameRate object.

void SetEventCheckerCallback(void (*EventChecker)(HIC_Rendition const *nr))

This method sets the event checker callback.

inline void SetKeyStateCallback(bool (*KeyState)(unsigned int, int&))

Sets the key state callback for low level key access.

void SetOcclusionCullingMode(bool mode, bool UseOctree = true, int threshold = 50)

This method sets the occlusion culling mode. If true, then HOOPS will do a test to determine if an object in the scene will modify any pixels in the scene i.e. is this object fully occluded by other objects in the scene be before deciding to draw it.

Parameters
  • mode – If true, occlusion culling will be used. If false, it will not.

  • UseOctree – If true, HOOPS will use an Octree in calculating occlusion logic. If false, it will not. This parameter is only applied if mode is True.

HandednessMode GetHandedness()
Returns

An enumerated type indicating the current handedness of the world coordinate system.

virtual void SetHandedness(HandednessMode mode, bool emit_message = false)

This method sets the handedness of the world coordinate system. Note that this is very different from polygon handedness. A “left-handed” Cartesian coordinate system is one in which, if you curl the fingers of your left hand from the X axis towards the Y axis, your thumb will point in the direction of the Z axis. This means your viewing camera is set up so that your X axis points to the right on the screen and the Y axis points straight up, then the Z axis will go into the screen. A “right-handed” coordinate system is just the same, except that Z axis will be in the direction of your right hand’s thumb. If the camera is set up with X and Y as above, the Z axis will point out of the screen.

Parameters
  • mode – An enumerated type indicating the world handedness.

  • emit_message – Indicates that a message should be sent to the emit_message_function

virtual void SetHandednessFromMessage(char const *in_data, unsigned int data_length)

This method sets the handedness of the world coordinate system based on the information in the message.

Parameters
  • in_data – A character pointer containing the handedness information.

  • data_length – The size of the message.

virtual bool SetHandednessFromModel(bool remove_handedness_from_model = true, bool emit_message = false)

This method checks if the root segment of the model has a handedness setting, and if so, makes that the handedness setting for this view. It also optionally allows removing the handedness setting from the model after setting handedness on the view. If no handedness setting is found on the model, this method will do nothing. This is a convenience function to help ensure the model and view have the same handedness setting to avoid potentially unexpected behavior when the handedness settings differ.

Parameters
  • remove_handedness_from_model – If a handedness setting is in the model, remove it after setting it on the view.

  • emit_message – Indicates that a message should be sent to the emit_message_function

Returns

True if a handedness setting was found on the model and then set on the view, false otherwise.

virtual void SetFontSize(char const *font_size, bool emit_message = false)

This method sets the font size on the scene key.

Parameters
  • font_size – A character pointer containing the font size information (e.g. “10 oru” or “0.1 sru”).

  • emit_message – Pass true to indicates that a message should be sent to the emit_message_function

virtual void SetFontSizeFromMessage(char const *in_data, unsigned int data_length)

This method sets the font size on the scene key based on the information in the message.

Parameters
  • in_data – A character pointer containing the font size information (e.g. “10 oru” or “0.1 sru”).

  • data_length – The size of the message.

bool GetBackplaneCulling()
Returns

True if back face culling is currently being done or false if it is not.

void SetBackplaneCulling(bool cull)

This method enables or disables back face culling which is a 3-D update optimization that tells the system it’s OK to remove any polygons, circles, or ellipses, or shell or mesh faces that land “facing away” from the camera during drawing. The initial value is true. This option has no effect unless polygon handedness is set using the method SetPolygonHandednessMode().

Parameters

cull – If the value is true, backplane will be enabled. If the value is false, it will be disabled.

ProjMode GetProjMode()

This method gets the projection mode used to convert a 3-D scene into 2-D for viewing.

Returns

The projection mode which determines how a 3-D will be converted in 2-D for viewing.

void SetProjMode(ProjMode mode)

This method sets the projection mode for how the camera converts a 3-D scene into 2-D for viewing.

Parameters

mode – The mode in which you want the camera to project.

DisplayListType GetDisplayListType()
Returns

The current display list type.

void SetDisplayListType(DisplayListType type)

This method sets the display list type. Note that this only applies when the OpenGL_Deprecated, OpenGL2, or DX11 driver is being used.

Parameters

type – Pass the type of display list you would like to use.

Returns

True if the currently active display list type is on and false if it is off. This only applies when HOOPS/3dGS Open GL driver is being used.

bool GetDisplayListMode()
void SetDisplayListMode(bool mode)

This method enables display lists of the currently active display list type (see m_DisplayListType).

Parameters

mode – Pass true to activate the display list type or false to turn it off.

Returns

The polygon handedness which must be set to do backplane culling.

HandednessMode GetPolygonHandednessMode()
void SetPolygonHandednessMode(HandednessMode)

This method sets the polygon handedness. In order to do a backplane cull, there must be some definition of a polygon’s “front” and “back” (or equivalently “inside face” and “outside

face”). This orientation is determined by the order in which the polygon’s vertices were originally defined, and the polygon handedness setting (and not the coordinate system handedness). If you wrap the fingers of the chosen hand along the vertices of the polygon, with your wrist at the first vertex specified and your fingertips at the last, then extend your thumb perpendicular to your fingers, by definition, your thumb is extending out of the front face of the polygon. The hand you use, left or right, determines the front and back of the polygon.

Parameters

HandednessMode – This mode will help HOOPS determine which the inside and outside of a given face.

bool GetLodMode()
Returns

True if the Level-Of-Detail mode is enabled or false if it is disabled.

void SetLodMode(bool onoff)

This method enables or disables the Level-Of-Detail. LOD is an optimization that involves simplifying objects that have facetted representations so that they will be drawn using a smaller number of triangles. As a result, LOD can improve performance by an order of magnitude while maintaining the visual integrity of the model.

Parameters

onoff – If true, LOD is enabled. If false, it is disabled.

inline bool GetSpritingMode()
Returns

True if spriting is enabled and false if otherwise.

inline void SetSpritingMode(bool onoff)

This method allows you to enables or disables spriting. If the spriting mode is turned on, it allows other classes in MVO to set the quick moves heuristic option to spriting for a segment that will be changing rapidly over a certain period time. This lets HOOPS render a scene more quickly because it updates only the changing geometry leaving the rest of the scene unchanged.

Parameters

onoff – Pass true if you wish to turn on spriting. Pass false, if you wish to turn it off.

int GetLodThreshold()
Returns

The LOD threshold which is the distance in world space from the camera position. The LOD threshold tells HOOPS when to dynamically switch between levels of detail.

void SetLodThreshold(int val)

This method sets the LOD threshold for which HOOPS will dynamically switch between different levels of detail.

Parameters

val – The threshold distance in world space from the camera position in which HOOPS will dynamically switch between levels of detail.

Returns

The key of the HOOPS driver instance segment.

inline HC_KEY GetViewKey()

This method sets the key of the HOOPS driver instance segment.

inline void SetViewKey(HC_KEY view_key)
Returns

The key to the link which includes the HBaseModel segment into the scene.

inline HC_KEY GetIncludeLinkKey()

This method sets the key of the link which includes the HBaseModel segment into the scene.

inline void SetIncludeLinkKey(HC_KEY link)
Returns

The key of the segment used to represent the top of the scene’s segment hierarchy.

inline HC_KEY GetSceneKey()
inline void SetSceneKey(HC_KEY scene_key)

This method sets the key of the segment used to represent the top of the scene’s segment hierarchy.

Parameters

scene_key – The key of the segment to use at the top-level scene segment.

inline HC_KEY GetOverwriteKey()
Returns

The key of the segment below the scene key into which temporary attributes can be set (and safely flushed) that are intended to affect the entire model.

HC_KEY GetShadowMapSegmentKey()
Returns

The key of the segment at which shadow maps are set. Currently defined as the owner of the model include link.

Returns

The key of the segment containing the lights for the scene.

inline HC_KEY GetLightsKey()
inline void SetLightsKey(HC_KEY lights_key)

This method sets the key of the segment containing the lights for the scene.

Parameters

lights_key – Pass the key of the segment that you want HOOPS to create light for the scene in.

Returns

The maximum zoom level for a camera. The value is in object space units.

inline float GetZoomLimit()
inline void SetZoomLimit(float zoomLimit)

This method sets the maximum zoom level for a camera. It guarantees that the window always views more than this number of units.

Parameters

zoomlimit – Pass a value in object space units. This method performs an automatic calculation of the zoom limit based off of the bounding box of the scene.

virtual void SetZoomLimit()
Returns

The key of the segment used to hold windowspace attributes.

inline HC_KEY GetWindowspaceKey()
inline void SetWindowspaceKey(HC_KEY winspace_key)

This method sets the key of the segment used to hold window space attributes.

Parameters

winspace_key – The key of the segment you want HOOPS to hold window space attributes.

Returns

The key of the segment used to store temporary construction geometry.

inline HC_KEY GetConstructionKey()
inline void SetConstructionKey(HC_KEY construct_key)

This method sets the key of the segment used to store temporary construction geometry.

Parameters

construct_key – The key to build construction geometry under.

Returns

The key of the segment used to store temporary bounding boxes for the scene.

inline HC_KEY GetBBoxGeometryKey()

This method sets the key of the segment used to store temporary bounding boxes for the scene.

inline void SetBBoxGeometryKey(HC_KEY bbox_key)
Returns

The key of the segment used to store the view’s cutting planes.

inline HC_KEY GetCuttingPlanesKey()
inline void SetCuttingPlanesKey(HC_KEY cuttingplanes_key)

This method sets the the key of the segment used to store the view’s cutting planes.

Parameters

cuttingplanes_key – Pass the key in which you want to the view’s cutting planes.

Returns

The key of the segment used to store geometry representing cutting plane intersections.

inline HC_KEY GetCuttingPlaneGeomKey()
inline void SetCuttingPlaneGeomKey(HC_KEY cuttingplanegeom_key)

This method sets the key of the segment used to store geometry representing cutting plane intersections.

Parameters

cuttingplanegeom_key – Pass the segment that you want HOOPS to store cutting plane geometry under.

Returns

The key of the segment used to store geometry representing polylines of intersection.

inline HC_KEY GetIntersectPolylinesKey()
inline void SetIntersectPolylinesKey(HC_KEY intersectpolylines_key)

This method sets the key of the segment used to store intersection polylines.

Parameters

interesetpolylines_key – Pass the segment key you want HOOPS to store intersection polylines under.

inline HC_KEY GetProgressBarKey()
Returns

The key of the segment that contains the progress bar for loading files.

Returns

The key of the progress bar segment.

inline void SetProgressBarKey(HC_KEY key)

This method sets the key of the segment that HBaseView uses to create the progress bar for loading files under.

Parameters

view_key – The key of the segment to use for creating the progress bar.

Returns

True if the last update was interrupted.

inline int GetUpdateInterrupted()
inline void SetUpdateInterrupted(int val)

Use this method to tell HOOPS if an update was interrupted.

Parameters

val – Pass 1 to indicate that an update was interrupted or 0 to indicate that it wasn’t.

Returns

The time since the last event, as reported by #HC_Show_Time.

float GetIdleTime()
void ResetIdleTime()

This method reports that an event has occurred, so the idle time should be returned to zero.

HQuickMovesMethod GetQuickMovesMethod() const
Returns

The method for quick moves last used by HOOPS. Applications can use this information to make decisions regarding the UI. For example, XOR may look best if drawn wireframe only.

Returns

A pointer to the debug zbuffer object (associated with any active zbuffer visualization winow), or null if there is none.

inline class HDebugZBuffer *GetDebugZBuffer()
inline void SetDebugZBuffer(HDebugZBuffer *dzb)

This method sets the pointer to the debug zbuffer object. The HBaseView will automatically be deleted on destruction, but not on reassignment.

inline AxisMode GetAxisMode()
Returns

The current axis mode.

virtual void SetAxisMode(AxisMode mode)

This method creates an axis triad which is a separate HOOPS window in the current view at bottom left that contains an axis display for directional reference.

Parameters

mode – The mode in which you wish the axis triad to appear.

virtual void OnSetAxisMode(AxisMode mode)

This method does the actual work of settig the axis mode. Users should use SetAxisMode().

Parameters

mode – The mode in which you wish the axis triad to appear.

inline void UpdateAxisTriad()

This method recreates the axis triad to account for any changes in behavior that might have been requested.

virtual void AdjustAxisWindow(int axis_window_pixels_in = -1, HIntRectangle *rect_in = 0)

This method adjusts the size of the axis triad to keep it as a constant size.

Parameters
  • axis_window_pixels_in – The width and height of the axis triad, given as a number of pixels. The value is defaulted to negative -1 which leaves the size unchanged but adjusts it to keep it constant in screen space.

  • rect_in – The screen space rectangle of the drawing context. This parameter is optional.

inline HShadowMode GetShadowMode()
Returns

The current shadow mode.

virtual void SetShadowMode(HShadowMode sm, bool saveMode = true)

This method updates the current shadow of model in the current view.

Parameters
  • sm – The new shadow mode that you want the view to use.

  • saveMode – Pass true to save the mode internally independent of the HOOPS database.

virtual void SetReflectionPlane(bool state, float opacity = 0.5f, bool fading = true, bool attenuate = false, float hither = 0.0f, float yon = 1.0f, bool blur = false, int blur_level = 1)

This method sets up the reflection plane in the current view.

Parameters
  • state – whether the reflection plane should be on or off.

  • opacity – the opacity of the reflection.

  • fading – if true, the reflection will fade as it moves away from the camera.

  • attenuate – determines whether the reflection should fade as the model moves away from it.

  • hither – if attenuate is true, this is the near plane where attenuation begins.

  • yon – if attenuate is true, this is the far plane. attenuation occurs linearly between hither and yon.

  • blur – indicates whether the reflection will be blurred.

  • blur_level – the amount of blurring applied.

inline HC_KEY GetDefaultLightKey(int which = 0)
Returns

The key of the default light for the scene.

inline bool GetTransparentSelectionBoxMode()
Returns

True if the selection area for the HOpSelectArea operator should be drawn transparent.

inline void SetTransparentSelectionBoxMode(bool mode)

Determines whether the HOpSelectArea operator should draw its area with a transparent rectangle as opposed to just an outline.

Parameters

mode – If the value is true, the selection area will be draw with a transparent rectangle. If the value is false, it will just have an outline.

virtual void DeleteSelectionList(bool emit_message = false)

This method deletes the items in the HSelectionSet object associated with this view.

Parameters

emit_message – Pass to indicate that a message should be sent to the emit_message_function

void RotateOnUpdate(char const *sname)

This method adjusts the axis display with regard to the camera setting of the view window. The display indicates the absolute position of the camera related to the three major view axes (x,y,z). The arrows always point in the direction of increasing value.

Parameters

sname – The segment name on the view that contains the camera settings for the axis display.

virtual void SetWindowColor(HPoint rgb, bool emit_message = false)

This method sets the window color.

Parameters
  • rgb – An HPoint containing the rgb color at the top of the window where x is the r value, y is the g value and z is the b value.

  • emit_message – Pass true to indicate that a message should be sent to the emit_message_function

virtual void SetWindowColor(HPoint rgbtop, HPoint rgbbottom, bool emit_message = false)

This method sets the window color, and does an interpolation between color values if top and bottom are different. This is done in the IM Callback HImUtility::draw_gradiated_window_background.

Parameters
  • rgbtop – An HPoint containing the rgb color at the top of the window where x is the r value, y is the g value and z is the b value.

  • rgbbottom – An HPoint containing the rgb color at the bottom of the window,where x is the r value, y is the g value and z is the b value. If the color is different, then rgbtop we will smoothly interpolate between the two color values.

  • emit_message – Pass true to indicate that a message should be sent to the emit_message_function

virtual void SetWindowColorRange(HPoint rgbtop, HPoint rgbbottom, int percentage, bool emit_message = false)

This method sets the window color, and does an interpolation between color values if top and bottom are different. Additionally a percentage value can be specified which determines how far into the vertical direction the gradient will go.

Parameters
  • rgbtop – An HPoint containing the rgb color at the top of the window where x is the r value, y is the g value and z is the b value.

  • rgbbottom – An HPoint containing the rgb color at the bottom of the window,where x is the r value, y is the g value and z is the b value. If the color is different, then rgbtop we will smoothly interpolate between the two color values.

  • percentage – The percentage to extend gradient in the vertical direction.

  • emit_message – Pass true to indicate that a message should be sent to the emit_message_function

virtual void SetWindowMaterial(char const *name, bool emit_message = false)

This method give the window a texture.

Parameters
  • name – The name of a texture material

  • emit_message – Pass true to indicate that a message should be sent to the emit_message_function

virtual void SetWindowColorFromMessage(char const *in_data, unsigned int data_length)

This method sets the window color based on the information in the message.

Parameters
  • in_data – A character pointer containing the window color information.

  • data_length – The size of in_data.

void GetWindowColor(HPoint &color_out)

Use this method to get the RGB value of the current window’s background in HPoint passed.

Parameters

color_out – Returns the window’s background color in the form of an HPoint where x is the red value, y is green value and z is the blue value.

void GetWindowColor(HPoint &color_top, HPoint &color_bottom)

Use this method to get the top and bottom RGB values of the current window’s background.

Parameters
  • color_top – Returns the window’s background top color in the form of an HPoint where x is the red value, y is green value and z is the blue value.

  • color_bottom – Returns the window’s background bottom color in the form of an HPoint where x is the red value, y is green value and z is the blue value.

void GetWindowColor(HPoint &color_top, HPoint &color_bottom, int &percentage)

Use this method to get top and bottom RGB values of the current window’s background as well as the percentage the gradient extends in the vertical direction.

Parameters
  • color_top – Returns the window’s background top color in the form of an HPoint where x is the red value, y is green value and z is the blue value.

  • color_bottom – Returns the window’s background bottom color in the form of an HPoint where x is the red value, y is green value and z is the blue value.

  • percentage – Returns the percentage the gradient extends in the vertical direction.

void GetWindowMaterial(char *out_material, char *out_pattern)

Use this method to get the raw color and pattern string for the current window.

Parameters
  • out_material – Returns the raw color string for the window background

  • out_pattern – Returns the raw pattern string for the window pattern

void SetOperator(HBaseOperator *NewOperator)

This method sets the current operator to NewOperator.

Parameters

NewOperator – A pointer to the new operator.

inline void SetCurrentOperator(HBaseOperator *NewOperator)

Deprecated. Please use SetOperator().

inline HBaseOperator *GetOperator()
Returns

A pointer to the current operator.

inline HBaseOperator *GetCurrentOperator()

Obsolete function.

inline HC_KEY GetAxisTriadKey()
Returns

The key of the segment containing the axis triad.

inline bool GetHideOverlappedText()
Parameters

hide – Pass true to hide overlapped text or false to show it.

Returns

The value of the flag indicating whether overlapped text should be hidden. This method determines the visibility of overlapped text.

void SetHideOverlappedText(bool hide)
inline void SetNavCube(bool onoff)

This method informs the view of the visibility of the navcube.

Parameters

onoff – Pass true to indicate that the navcube is visible or false to indicate that it is not.

inline bool GetSmoothTransition()
Parameters

onoff – Pass true to turn on smooth transition. Pass false to turn it off.

Returns

True if the camera will smoothly from one position to the next. This method determines whether the camera should smoothly transition from the previous position to the new one.

inline void SetSmoothTransition(bool onoff)
inline void SetSmoothTransitionDuration(float duration)

This method determines the length of the smooth transition in seconds.

Parameters

duration – The duration of the transiation in seconds.

inline float GetSmoothTransitionDuration()
Returns

The length of the smooth transition in seconds.

inline bool IsLightFollowCamera()
Returns

True if the light follows the camera or false if it doesn’t.

void SetLightFollowsCamera(bool onoroff)

Use this method to indicate if you want the light to follow the camera.

Parameters

onoroff – Pass true for the light to follow the camera or false if it should not.

void SetLightCount(int count)

Use this method to control the number of lights in the scene.

Parameters

count – the number of lights.

inline int GetLightCount()

This method returns the number of lights currently set in the scene.

Returns

The number of lights.

virtual void CameraPositionChanged(bool emit_message = false, bool smooth_camera_transition = false)

This method tells the view that the camera position has been modified. Camera-dependent information such as lights which will follow the camera by default are updated here.

Parameters
  • emit_message – Indicates that a message should be sent to the emit_message_function

  • smooth_camera_transition – Indicates that the camera should smoothly transition from the last position to the new position.

virtual void PrepareForCameraChange()

This method is called before a camera change.

virtual void SetCamera(HPoint pos, HPoint tar, HPoint up, float fieldx, float fieldy, char const *proj)

This method sets the camera for the scene.

Parameters
  • pos – A HPoint defining the camera position.

  • tar – A HPoint defining the camera target.

  • up – A HPoint defining the camera up vector.

  • fieldx – The minimum amount of the scene that should be viewable in the horizontal direction about the camera target in object space units.

  • fieldy – The minimum amount of the scene that should be viewable in the vertical direction about the camera target in object space units.

  • *proj – projection mode of camera, ‘orthographic, ‘perspective’ and ‘stretched’ are all valid options.

virtual void SetInitialCamera(HPoint pos, HPoint tar, HPoint up, float fieldx, float fieldy, char const *proj)

This method sets the intial camera for the scene usually after loading.

Parameters
  • pos – A HPoint defining the camera position.

  • tar – A HPoint defining the camera target.

  • up – A HPoint defining the camera up vector.

  • fieldx – The minimum amount of the scene that should be viewable in the horizontal direction about the camera target in object space units.

  • fieldy – The minimum amount of the scene that should be viewable in the vertical direction about the camera target in object space units.

  • *proj – projection mode of camera, ‘orthographic, ‘perspective’ and ‘stretched’ are all valid options.

virtual void GetCamera(HPoint *pos, HPoint *tar, HPoint *up, float &fieldx, float &fieldy, char *proj)

This method populates the parameters passed by the the caller with the definition of the camera currently in use.

Parameters
  • pos – Returns the HPoint defining the camera position.

  • tar – Returns the HPoint defining the camera target.

  • up – Returns the HPoint defining the camera up vector.

  • fieldx – Returns the float value indicating in object space units the minimum amount of the scene that should be viewable in the horizontal direction about the camera target.

  • fieldy – Returns the float value indicating in object space units the minimum amount of the scene that should be viewable in the vertical direction about the camera target.

  • *proj – Returns the projection mode of camera, ‘orthographic, ‘perspective’ and ‘stretched’ are all valid options.

virtual void SetCamera(HCamera camera)

This method sets the camera on the scene.

Parameters

cameraHCamera object defining the camera.

virtual void GetCamera(HCamera *camera)

This method populates the HCamera object passed by the the caller with the definition of the camera currently in use.

Parameters

camera – Returns the HCamera object defining the currently used camera,

virtual void SetCameraFromMessage(char const *data, unsigned int data_length)

This method has been deprecated. This is the method that HNet calls to set the camera on the scene.

Parameters
  • *data – A character string containing the camera definition.

  • data_length – The length of data string.

virtual void InsertHSFData(char const *segment, char const *in_data, unsigned int data_length, bool emit_message = false)

This method has been deprecated. InsertHSFData inserts HSF data into a named segment in the model tree.

Parameters
  • segment – The segment in the base of the model tree that the HSF data should be inserted.

  • in_data – The binary HSF data.

  • data_length – The length of the binary HSF data.

  • emit_message – Pass true to indicate that this data should be shared with other members of a HNet session.

virtual void InsertHSFDataFromMessage(char const *in_data, unsigned int data_length)

This method has been deprecated. InsertHSFDataFromMessage is a function to insert HSF data in a scene.

Parameters
  • in_data – The binary HSF Data.

  • data_length – The length of the in_data array.

virtual void EmitHSFData(char const *segment, char const *in_data, unsigned int data_length)

This method has been deprecated. EmitHSFData takes the HSF data and sends it to HNet which will then send it to InsertHSFDataFromMessage of all the clients involved in the HNet session.

Parameters
  • segment – The segment within the model which the user wants the HSF data to be inserted into.

  • in_data – The binary HSF data.

  • data_length – The length of the in_data array.

virtual void SetRenderMode(HRenderMode NewRenderMode, bool emit_message = false)

This method has been deprecated. This method sets the render mode for this view to NewRenderMode. The default is HRenderGouraud.

Parameters
  • NewRenderMode – The new render mode.

  • emit_message – Pass true to indicates that an HNet message should be generated/sent.

virtual void SetRenderModeFromMessage(char const *in_data, unsigned int data_length)

This method has been deprecated. This method is called by HNet to change the rendermode of the client involved in a HNet session.

Parameters
  • in_data – the data containing the requested rendermode.

  • data_length – The length of the in_data array.

virtual void EmitFlushMessage()

This method has been deprecated. EmitFlushMessage sends a message to all clients of HNet session to flush geometry from the Scene, CuttingPlane, CuttingPlaneGeometry and Construction segments as well as reset the HSharedKey object and restart the HStreamToolkit.

virtual void FlushFromMessage(char const *in_data, unsigned int data_length)

This method has been deprecated. This is the message that a client receives after the controlling client emits a flush message. The parameters in_data and data_length are not referenced in this method. They are present so that this method conforms to the signature of the “FromMessage” methods.

Parameters
  • in_data – Not referenced in this method.

  • data_length – Not referenced in this method.

virtual void Flush(bool emit_message = false)

This method has been deprecated. This method flushes geometry from the Scene, CuttingPlane, CuttingPlaneGeometry and Construction segments as well as resets the HSharedKey object and restarts the HStreamToolkit.

Parameters

emit_message – Pass true if you want a message emitted telling other clients to ‘Flush’ as well or false if no message should be emitted.

inline void SetEmitMessageFunction(HBaseViewEmitMessageFunction new_emit_message_function, void *user_data = 0)

This method has been deprecated. SetEmitMessageFunction is what you use to register the function which will send messages to the HNet server during any HNet sessions.

Parameters
  • new_emit_message_function – A pointer to the emit message function.

  • user_data – Users set this when registering the emit_function. When the emit_message_function is subsequently called users can query this value to determine the origins of the callback function.

inline bool EmittingMessages()

This method has been deprecated. This method indicates whether or not the HBaseView is emitting messages.

Returns

True if the HBaseView is emitting messages, false if otherwise.

inline HBaseViewEmitMessageFunction GetEmitMessageFunction()

This method has been deprecated.

Returns

An HBaseViewEmitMessageFunction pointer to the emit_message_function.

inline void *GetEmitMessageFunctionUserData()

This method has been deprecated.

Returns

A pointer to emit_message_function_user_data.

virtual void EmitSelectMessage(HC_KEY key, bool isSelect)

This method has been deprecated. EmitSelectMessage emits a message to the HNet server telling all other clients to select an object.

Parameters
  • key – key to the HOOPS/3dGS object to be selected

  • isSelect – boolean value indicating whether or not the object is already selected

virtual void SelectFromMessage(char const *in_data, unsigned int data_length)

This method has been deprecated. SelectFromMessage is the function the HNet server calls to tell the slave clients to select an object.

Parameters
  • *in_data – data containing the selection information

  • data_length – length of the in_data array

virtual void EmitDeSelectAllMessage()

This method has been deprecated. EmitDeSelectAllMessage emits a message to the HNet server to tell all clients involved in the view’s HNet session to deselect everything.

virtual void EmitDeleteSelectionListMessage()

This method has been deprecated. EmitDeleteSelectionListMessage emits a message to the HNet server telling all HNet clients to delete thei selection list.

virtual void DeleteSelectionListFromMessage()

This method has been deprecated. This is the function the HNet server calls on each HNet client when it receives a DeleteSelectionList message from a controlling client.

virtual void DeSelectAllFromMessage()

This method has been deprecated. This is the function the HNet server calls on each HNet client when it receives a DeSelectAll message from a controlling client.

virtual void EmitSetModellingMatrixMessage(HC_KEY key)

This method has been deprecated. EmitSetModellingMatrixMessage sends a message to the HNet server with a modelling matrix which is to be set on a specific segment.

Parameters

key – key to the segment that the modelling matrix should be applied to.

virtual void EmitSetModellingMatrixMessage()

This method has been deprecated. EmitSetModellingMatrixMessage should be used if you want all the modelling matrices on each element in the selection list to be applied to the same objects in the other HNet clients. This is used in both the HOpObjectTranslate and HOpObjectRotate operators.

virtual void EmitSegment(HC_KEY key, bool emit_contents_only = false)

This method has been deprecated. Emits the hsf data of the segment to the peers in the collabrative session if any.

Parameters
  • key – A HOOPS key denoting the segment to be emitted.

  • emit_contents_only – If true, only contents of the segments will be emitted. If false, the segment itself will be emitted along with the contents. Default is false.

virtual void EmitDeleteByKeyMessage(HC_KEY key)

This method has been deprecated. EmitDeleteByKeyMessage sends a message with the key to an object to be deleted.

Parameters

key – A HOOPS key denoting segment to be deleted.

virtual void DeleteByKeyFromMessage(char const *in_data, unsigned int data_length)

This method has been deprecated. DeleteByKeyFromMessage is the function that will receive any messages which originate in a EmitDeleteByKey message.

Parameters
  • in_data – contains the key to the object to be selected

  • data_length – length of the in_data array

virtual void SetModellingMatrixFromMessage(char const *in_data, unsigned int data_length)

This method receives all SetModellingMatrix messages.

Parameters
  • in_data – this contains the modelling matrix information

  • data_length – length of the in_data array

inline HSharedKey *GetSharedKey()
Returns

A pointer to m_pSharedKey which is used to map the keys of HOOPS/3dGS objects contained in different HBaseView objects.

virtual void StartSharedKey()

This method should be called when you want to associate keys of objects from different HBaseView objects. This is mostly used for HNet sessions.

virtual void Animate(int animation_steps = 30, HAnimateMode animate_flags = HAnimateScene, int MaxRotation = 360)

This method rotates a camera around the scene based on the degrees of rotation and the number of animation steps passed. This method is used in the PartViewer’s “Test Performance” functionality.

Parameters
  • animation_steps – Number of times that the scene should be updated

  • animate_flags – Specifies what to animate.

  • MaxRotation – Degrees Of Rotation

virtual void SetGeometryChanged()

Use this method to indicate when geometry in a view changes. During Update(), this information is used to determine if recalculations are needed like if cutting lines need to be updated.

inline bool GetSceneBoundingSet()

This function tells you whether or not a scene bounding is set.

Returns

true if a scene bounding is set, false otherwise.

void SetSceneBounding(HPoint &min, HPoint &max)

This function sets a scene bounding.

Parameters
  • min – the minimum values of the bounding

  • max – the maximum values of the bounding

inline void InvalidateSceneBounding()

This function invalidates (unsets) any current scene bounding.

void SetFastMarkerDrawing(bool b_fast)

This method indicates whether marker drawing will bias toward performance or quality.

Returns

true if fast marker drawing will be used, false otherwise.

bool GetFastMarkerDrawing()

This method controls whether marker drawing will bias toward performance or quality.

Parameters

b_fast – if true, fast marker drawing will be used, otherwise nice marker drawing will be used.

void SetDoubleBuffering(bool double_buffer)

This method controls whether the HOOPS view will be single- or double-buffered. It must be called before the first update to have any effect.

Parameters

double_buffer – If true, the view will be double-buffered, otherwise it will be single-buffered.

inline virtual void ClearGeometryChanged()

Call this method to clear that flag that changes have occurred in the geometry. Update() calls this method.

inline virtual bool GeometryChanged()
Returns

True if geometry has changed since the last update.

unsigned long SetSignalNotify(int signal, HSignalNotifyFunction callback, void *user_data)

Request notification when a particular event occurs.

Parameters
  • signal – Event for which we are requesting notification (see enum HSignal in HGlobals.h).

  • callback – The function to be called when the event happens.

  • user_data – Data that should be passed along to the callback function.

Returns

A cookie (i.e. a unique id) that we will need to use when we want to clean up this notification request.

void UnSetSignalNotify(unsigned long cookie)

Rescind a signal request notification.

Parameters

cookie – the unique identifier of the request to be cancelled.

void SetColorInterpolation(bool onoff)

This method sets the color interpolation rendering option on the current scene.

Parameters

onoff – Pass true to turn on color interpolation or false to turn it off.

void SetColorIndexInterpolation(bool onoff, bool isolines = false)

This method sets the color index interpolation rendering option on the current scene.

Parameters
  • onoff – Pass true to turn on color index interpolation or false to turn it off.

  • isolines – Pass true to render color interpolation data in the form of polylines instead of color band or false to not render polylines. Note this parameter only applies if you pass true for the onoff parameter.

bool GetColorIndexInterpolation(char *option = 0)

Call this method to find out if color index interpolation is set on the scene.

Parameters

option – Returns either “on” or “isolines” if the color index interpolation is on.

Returns

True if color index interpolation is on or false if it is not on.

bool GetFrameBufferEffectsOptions(char *options = 0, int *border = 0)

Call this method to find out if frame buffer effects are active (e.g. bloom, depth of field, ambient occlusion or fast silhouettes).

Parameters
  • option – Returns all driver options relevant to frame buffer effects.

  • border – Returns the search radius of the current active effects (and, hence, the recommended number of extra pixels to be added around the edge of an image in order to avoid artifacts).

Returns

True if active. Always false on drivers other than dx11, or opengl2.

void Notify(int signal, void *signal_data = 0)

Notifies the appropriate subscribers about the event.

Parameters
  • signal – event which is to be notified

  • signal_data – data associated with this event to be passed to the subscribers.

int UpdateEvent(bool antialias = false, bool forceUpdate = false)

This event method receives update events.

Parameters
  • antialias – If true, then an anti-aliased version of the scene will be drawn.

  • forceUpdate – If true, then an update will be forced.

Returns

A standard event code indicating if the event was consumed or passed.

inline bool GetUpdateRequested()
Returns

True if an update was requested and false if no update was requested.

inline void RequestUpdate()

Call this method to indicate to the view that you would like it to performat an update.

inline void ClearUpdateRequest()

This method sets the update request flag to false indicating that you do not need the view to perform an update.

inline void SetSuppressUpdate(bool suppress)

Use this method to prevent an update from occurring. This can be useful if you are in the middle of an operation and do not want a timer event to cause an update to occur.

Parameters

suppress – If this value is set to true, then no updates will be made.

inline bool GetSuppressUpdate()
Returns

The value of the suppress update flag. If the value is true, then no updates will be made.

inline void SetSuppressUpdateTick(bool suppress)

Use this method to prevent an timer update from occurring. This can be useful if you are in the middle of an operation and do not want a timer event to cause an update to occur.

Parameters

suppress – If this value is set to true, then no updates will be made.

inline bool GetSuppressUpdateTick()
Returns

The value of the suppress update flag. If the value is true, then no updates will be made.

void SetViewUpdateMode(ViewUpdateMode mode, float rate = 0.01f)

Use this method to determine how the view is updated by setting one of the three ViewUpdateModes. ViewUpdateMode::Continuous is the recommended mode for most applications. In this mode, HOOPS will poll at regular intervals for the posted update events. If you choose this mode, please provide a polling interval value is ticks. On the opposite end of the spectrum, ViewUpdateMode::OnDemand tell HOOPS not to perform any update automatically but instead, it expects the application to explicitly call Update when it is required. The final update mode is ViewUpdateMode::Deferred which makes continuous culled, timed updates drawing culled items if time permits. When HBaseView is initialized, the mode is set to ViewUpdateMode::OnDemand.

Parameters
  • mode – The new view update mode ViewUpdateMode::Continuous, ViewUpdateMode::OnDemand or ViewUpdateMode::Deferred.

  • rate – Rate, in ticks, in which updates are generated.

inline ViewUpdateMode GetViewUpdateMode()
Returns

The current view update mode.

void FlushProgressBar()

This method clears outs the progress bar window.

HUndoManager *GetUndoManager()
Returns

The undo manager associated with this view.

HEventManager *GetEventManager()
Returns

The event manager associated with this view.

HObjectManager *GetHObjectManager()
Returns

The object manager associated with this view.

inline bool GetDynamicHighlighting()
Returns

True to indicate that dynamic highlighting is turned on or false if it is turned off.

void SetDynamicHighlighting(bool state)

This enables/disables dynamic highlighting for the geometry in the scene. If dynamic highlighting is set to true, HOOPS will highlight different segments in the scene as the user moves the mouse cursor over the segment.

Parameters

state – Pass true to turn on dynamic highlighting or false to turn it off.

virtual int OnNoButtonDownAndMove(HEventInfo &hevent)

This handles no button down and move event for dynamic highlighting of geometry. If dynamic highlight is on, then as the mouse cursor passes over a given segment, HOOOPS will highlight that segment.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonDownAndMove(HEventInfo &hevent)

This method handles the left button down and move event for dynamic highlighting of geometry.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonDblClk(HEventInfo &hevent)

This method handles the left button double click event for object selection and setting up handles for object manipulation.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnRButtonDownAndMove(HEventInfo &hevent)

Currently not handled.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMButtonDownAndMove(HEventInfo &hevent)

Currently not handled.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLRButtonDownAndMove(HEventInfo &hevent)

Currently not handled.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnLButtonDown(HEventInfo &hevent)

This method handles the left button down event for axis based camera manipulation.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMouseMove(HEventInfo &hevent)

This method handles mouse move events.

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)

This method handles left button up events finalizing any object selection activity and camera manipulation.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMouseWheel(HEventInfo &hevent)

This method handles mouse wheel events for camera manipulation.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual bool ComputeReasonableTarget(HPoint &new_tar, HPoint const &mouse_win, HPoint const &tar_orig)

This function attempts to come up with a reasonable camera target. If something is under the mouse, project the current target into the same plane as the item under the mouse.

void ComputeNewField(float &width, float &height, HPoint const &new_tar, HCamera const &old_camera)
virtual int OnKeyDown(HEventInfo &hevent)

This function is called when a key is pressed.

virtual int OnKeyUp(HEventInfo &hevent)

This function is called when a key is released.

virtual void SetShadowColor(HPoint color)

This method sets the shadow color.

Parameters

color – The new shadow color passed as an HPoint where x is the red value, y is the green value and g is the blue value.

virtual void SetShadowLightDirection(bool explicit_light, HPoint const *direction = 0)

This method allows you to set a custom light direction for simple shadows.

Parameters
  • explicit_light – Whether or not to use an explicit light. If false, a light direction will be automatically generated.

  • direction – A pointer to a HPoint object that determines the direction of the light. Passing null is equivalent to passing false for explicit_light.

virtual bool GetShadowLightDirection(HPoint *direction = 0)

This method allows you to set a custom light direction for simple shadows.

Parameters

direction – A pointer to a HPoint object that determines the direction of the light, will be null if unset. Returned to user.

Returns

true if an explicit light direction is set, false otherwise.

virtual void SetShadowIgnoresTransparency(bool ignore)

Toggles whether or not transparency is considered when casting simple shadow.

virtual bool GetShadowIgnoresTransparency()

Shows whether or not transparency is considered when casting simple shadow.

virtual void DoDynamicHighlighting(HPoint mouse_pos)

Handles the dynamic highlighting logic.

Parameters

mouse_pos – the cursor position in window space.

virtual void SetShadowResolution(int res)

This method sets the shadow resolution.

Parameters

res – The new shadow resolution which is number from 32 to 1024.

virtual void SetShadowBlurring(int blur)

This method sets how blurring will be done on shadows.

Parameters

blur – A number between 1 to 31 indicating the level of blurring (softening) that is applied to the shadow

virtual void InternalUpdate()

This method checks the flags related to updating the scene and then calls #HC_Update_Display.

inline virtual void SetShadowRegenerationMode(bool onoff)

Use this method to enable or disable updates of shadows in the scene. If the mode is on, shadows will be redrawn if there are any changes to the geometry.

Parameters

onoff – Pass true to turn shadow regeneration on or false to turn it off.

inline virtual void SetShadowRegenerationToggle()

This method suppresses shadow regeneration for the next update. After the update is performed, the m_bShadowRegeneration flag will be set to true again and the toggle value will be set to false.

inline bool GetCuttingPlaneRegenerationMode()
Returns

True if cutting planes will be redrawn when there are changes to the geometry or false if they will not be updated.

inline virtual void SetCuttingPlaneRegenerationMode(bool onoff)

Use this method to enable or disable updates to the cutting planes in the scene. If the mode is on, cutting planes will be redrawn if there are any changes to the geometry.

Parameters

onoff – Pass true to turn on cutting plane regeneration or false to turn it off.

inline bool GetShadowRegenerationMode()
Returns

True if the shadows will be generated in the scene or false if they will not be redrawn after an update to the geometry.

inline virtual void SetCameraChanged(bool val = true)

Use this method to indicate if the camera has changed.

Parameters

val – Pass true to indicate the camera has changed or false if the camera has not changed.

inline virtual bool GetCameraChanged()
Returns

True if camera changed between updates.

inline virtual void SetInvertMouseWheelZoom(bool val = true)

Use this method to control the direction of a zoom resulting from a mouse wheel event

Parameters

val – Pass true if you want to invert the zoom direction resulting from a camera wheel event.

inline virtual bool GetInvertMouseWheelZoom()
Returns

True if we are inverting the default direction of the camera zoom which results from a mouse wheel event.

virtual void SetAxisManipulateOperator(HOpCameraManipulate *op)

The method sets operator for axis based camera manipulation.

Parameters

op – A pointer the operator to replace existing operator with.

virtual void SetVisibilitySelectionMode(bool onoff)

This method enables or disables visibility selection mode.

Parameters

onoff – Pass true for object visibility is taken into account or false for object visibility not taken into account.

virtual bool GetVisibilitySelectionMode()
Returns

True if the visibility selection is enabled.

virtual void SetRelatedSelectionLimit(int limit)

This method sets the max number of items that each selection will hit.

Parameters

limit – Pass in NO_RELATED_SELECTION_LIMIT for no related selection limit.

virtual int GetRelatedSelectionLimit()
Returns

The current related selection limit on the view.

virtual void SetDetailSelection(bool onoff)

Use this method to sets the detail selection mode. If it is on, selection events honor the exact shape of the glyphs of a curve, edge or polyline. This means that both the pattern and the weight of a line/edge will affect its selectability.

Parameters

onoff – Pass true if edge and line weight/pattern should be taken into account or false if they shouldn’t be.

virtual bool GetDetailSelectionMode()
Returns

True if the detail selection heuristic is on or false if it is off.

virtual void SetRespectSelectionCulling(bool onoff)

Use this method to set the selection culling mode to “maximum extents”. If it is on, selected geometry will be culled in the same manner as unselected geometry.

Parameters

onoff – Pass true to cull selected geometry in the same manner as unselected geometry, or false for selected geometry not to be culled.

virtual bool GetRespectSelectionCulling()
Returns

True if the selection culling mode is set to “maximum extents” or false otherwise.

virtual void SmartFilterCircumcuboid(char const *segment, char const *defaults, HPoint *bottomfrontleft, HPoint *topbackright)

This is a wrapper around #HC_Filter_Circumcuboid that sends a pre and post filter event to allow the application to manipulate filter results.

Parameters
  • segment – The segment to start the bounding calculation.

  • defaults – The default visibility settings.

  • bottomfrontleft – Returns a point describing one end of the bounding circumcuboid.

  • topbackright – Returns a point describing the other end of the bounding circumcuboid.

int SetupHandlesEvent(HBaseView *view, HC_KEY key, bool complex)

This method creates handles for the specified object.

Parameters
  • view – A pointer to the HBaseView object.

  • key – The key of the object to set up the handles for.

  • complex – Pass true to create complex handles or false to create simple ones.

Returns

An event code that states whether the event was process.

inline virtual bool GetHasObjects()
Returns

True if the scene has segments grouped as object and/or has handles in it.

virtual void SetHasObjects(bool hasobjects)

This method tells the view if there are objects in the scene.

Parameters

hasobjects – Pass true to indicate that the scene has segments that are grouped as objects and/or has handles.

inline virtual void SetHandleOperator(HBaseOperator *op)

This method sets the handle operator for this view.

Parameters

op – A pointer to handle operator you want associated with this view.

inline virtual HBaseOperator *GetHandleOperator()
Returns

A pointer to the handle operator for this view.

inline virtual float GetDefaultSelectionProximity()
Returns

The distance in centimeters in which HOOPS will look to find an object that is eligible for selection. The nearest object within proximity will be selected.

virtual void SetDefaultSelectionProximity(float selectionproximity)

Use this method to control how far away your cursor can be from an object on the screen and still have it select the object. Within that radius, the nearest object is selected.

Parameters

selectionproximity – the range in centimeters for selection proximity

inline bool GetAllowInteractiveShadows()
Returns

True if shadows will be drawn during object manipuation or false if they won’t be.

inline void SetAllowInteractiveShadows(bool onoff)

Use this method to enable or disable shadows during the object manipulation. If you pass true, then shadows will not be drawn while an object is translated, rotated, etc…

Parameters

onOff – Pass true to allow shadows to be drawn while objects are manipulated or false for no shadows to be rendered.

HShadowRenderingMode GetShadowRenderingMode()
Returns

The current shadow rendering mode.

void SetShadowRenderingMode(HShadowRenderingMode mode)

This method sets the shadow rendering mode. The shadow render mode determines if shadows are rendered either by hardware or software.

Parameters

mode – The shadow rendering mode you want HOOPS to use.

inline bool GetAllowInteractiveCutGeometry()
Returns

True if cut geometry will be rendered during object manipulation or false if it will not be.

inline void SetAllowInteractiveCutGeometry(bool onoff)

Use this method to enable or disable the rendering of cut geometry during object manipulation. If you pass false, cut geometry will not be drawn when an object is translated, rotated, etc…

Parameters

onOff – Pass true to allow the rendering of cut geometry during object manipulation or false to not draw it.

HCutGeometryVisibility GetCutGeometryVisibility()
Returns

The value of the Cut Geometry Visibility flag.

void SetCutGeometryVisibility(HCutGeometryVisibility visibility)

Use this method to set the cut geometry visibility.

Parameters

visibility – The cut geometry visibility you want to set for the scene.

inline void *GetWindowHandle()
Returns

A pointer to the window handle for this view.

inline bool GetInitialCameraSet()
Returns

True if the initial camera has been set or false if it hasn’t been set.

int ObjectMovedEvent(HBaseView *view, HC_KEY key, HPoint *pos)

The event handler that gets triggered when an object is moved usually as a result of an animation.

Parameters
  • view – A pointer to HBaseView object.

  • key – The key of the moved object.

  • pos – The position of moved object which is not always available.

Returns

Whether the event passed or consumed.

void SetRecordCamera(bool rc)

This method enables or disables the automatic camera movement recording.

Parameters

rc – Pass true to enable camera recording or false to disable it.

inline bool GetRecordMode()
Returns

True if the camera is currently recording or false if it isn’t recording.

void InjectEvent(HEventInfo const &hevent)

This allows the injection of a synthetic event.

Parameters

hevent – The event to inject

inline void SetForceFastHiddenLine(bool force)

This method enables the forced fast hidden line mode. If this mode is on, all hidden line rendering will be done using the “fast hidden line” mode even if analytic hidden line is requested.

Parameters

force – On/Off Pass true to turn on force all hidden line rendering to fast hidden line.

inline bool GetForceFastHiddenLine()
Returns

True if force fast hidden line mode is turned on or false if it is off.

void SetTransparency(char const *text, bool fast_z_sort = false)

This method sets how transparency should be rendered in the view.

Parameters
  • text – A text string that describes how transparency should be rendered as describe in HC_Set_Rendering_Options.

  • fast_z_sort – If the sorting algorithm is z-sort only, this controls whether to use the fastest or nicest option.

void SetLineAntialiasing(bool onoff)

This method enables or disables anti-aliasing for lines by setting the appropriate rendering option in the view segment.

Parameters

onoff – Line Anti-aliasing on/off

inline bool GetLineAntialiasing()
Returns

True if anti-aliasing for lines is turned on for the rendering options.

void SetTextAntialiasing(bool onoff)

This method enables or disables anti-aliasing for text by setting the appropriate rendering option in the view segment.

Parameters

onoff – text Anti-aliasing on/off

void SetDepthOfField(bool onoff, float strength = 1.0f)

This method enables of disables Depth Of Field

Parameters
  • onoff – whether or not to use depth of field

  • strength – multiplier of the default strength

void SetDepthOfFieldRange(float near = 0.0f, float far = 0.0f)

This method sets the focal range for the Depth Of Field option

Parameters
  • near – the near plane distance from the camera

  • far – the far plane distance from the camera

inline bool GetTextAntialiasing()
Returns

True if anti-aliasing for text is enabled and false if otherwise.

inline void SetIsoDefault(ViewMode vm)

This method sets the default viewpoint or quadrant for ISO View.

Parameters

vm – The default ISO View Setting.

inline ViewMode GetIsoDefault()
Returns

The current ISO View setting.

void SetCullingThreshold(int cullingthreshold)

This method sets the culling threshold. When objects are smaller than the pixel diameter given by the threshold, they will be culled from the scene as described in the maximum extent culling option in #HC_Set_Heuristics.

Parameters

cullingthreshold – The culling threshold value given in pixels.

int GetCullingThreshold()
Returns

The current culling threshold value which is the pixel diameter used to determine if objects will be culled from a scene. If the object is smaller than the pixel diameter, it will be culled.

void SetHardExtent(int cutoff)

This method sets the hard extent cutoff. When objects are smaller than the pixel diameter given by the threshold, they will be culled from the scene as described in the hard extent option in #HC_Set_Heuristics.

Parameters

cutoff – The hard extent value given in pixels.

int GetHardExtent()
Returns

The current hard extent cutoff value which is the pixel diameter used to determine if objects will be culled from a scene. If the object is smaller than the pixel diameter, it will be culled.

void BeginShellSelection()

This method activates the shell selection mode. If this mode is active, data structures related to shell selection are cached which can greatly improve performance for subsequent shell selection calls.

void EndShellSelection()

This method ends the shell selection mode.

inline HSelectionSet *GetHighlightSelection()
Returns

Highlight selection set which is used for mouse-over highlighting.

inline void SetViewAxis(HVector *front_axis, HVector *top_axis)

This method defines the three vectors which represent the front-back, right-left and top-bottom camera axis for the current model. These vectors are used in calls to SetViewMode to determine the correct viewing position for the standard- as well as the isometric views.

Parameters
  • front_axis – A pointer to the front - back axis.

  • top_axis – A pointer to the top

    • bottom axis.

inline void GetViewAxis(HVector *front_axis, HVector *top_axis)

This method returns the view axis vectors.

Parameters
  • front_axis – Returns the front - back axis.

  • top_axis – Returns the top - bottom axis.

void SetDefaultHSRA()

This method sets the hidden surface removal algorithm rendering option to the value that is preferred by the current driver type.

inline void SetMaximumUpdateTime(float mut)

This method lets you set the ceiling on the time it takes for an update to be performed.

Parameters

mut – The upper limit on the duration of a update in seconds.

inline float GetMaximumUpdateTime()

This method shows the ceiling on the time it takes for an update to be performed.

Returns

The upper limit on the duration of a update in seconds.

inline virtual HSelectionHighlightMode GetHighlightMode()
Returns

The selection highlight mode

virtual void SetHighlightMode(HSelectionHighlightMode m)

This method sets the selection highlight mode.

Parameters

m – The new highlight mode as described by HSelectionHighlightMode.

virtual void SetReferenceSelection(bool use_ref)

This method controls whether or not quick moves (reference) highlighting will be used in both of the selection sets maintained by the HBaseView.

Parameters

use_ref – if true, quickmoves highlighting will be used, otherwise conditional highlighting will be.

bool GetKeyState(unsigned int key, int &flags)

This function indicates whether a key is currently pressed.

Parameters
  • key – the character in question.

  • flags – additional flags.

Returns

true if key is depressed, false otherwise.

void ResetKeyState()

This function resets the current key state.

inline void SetFastFitWorld(bool fw)

This method controls whether fast fit world will be used. Note: a fast fit world may be looser.

Parameters

fw – if true fast fit world will be used.

inline void SetDetailedFitWorld(bool fw)

This method controls whether fit world will acknowledge sub-entity visibilities. This will only work if fast fit world is disabled.

Parameters

fw – if true detailed fit world will be used.

inline bool GetFastFitWorld()

This method controls whether fast fit world will be used. Note: a fast fit world may be looser.

Parameters

fw – if true fast fit world will be used.

inline bool GetDetailedFitWorld()

This method controls whether fit world will acknowledge sub-entity visibilities. This will only work if fast fit world is disabled.

Parameters

fw – if true detailed fit world will be used.

void GetSceneExtents(HPoint &min, HPoint &max)

This function retrieves the scene extents.

Parameters
  • min – the minimum values for the scene extents. Passed by reference. Returned to user.

  • max – the maximum values for the scene extents. Passed by reference. Returned to user.

void SetLightScaling(float sv)
inline void SetXYSizeOverride(int x, int y)
inline int GetXSize()
Returns

The window width in pixels. If zero is returned, an update needs to be done.

inline int GetYSize()
Returns

The window height in pixels. If zero is returned, an update needs to be done.

HViewSelectionLevel GetViewSelectionLevel()
Returns

The selection level currently set on the driver.

void SetViewSelectionLevel(HViewSelectionLevel level)

Controls the behavior of Compute_Selection calls performed on this driver. If level is set to HSelectionLevelEntity, the key of each selected piece geometry will be returned. If it is set to HSelectionLevelSegment, only the containing segment keys will be returned once, even if several geometries are selected in a given segment. HSelectionLevelSegmentTree is not currently supported.

Parameters

level – The new selection level to be set on the driver.

void EnableTargetFrameRate(bool enable = true, int target = 100, int threshold = 10, int steps = 5)

Enables or disables the target framerate. This function is deprecated. Use SetFramerateMode() instead.

Parameters
  • enable – Whether to enable or disable the target framerate.

  • target – The desired target framerate.

  • threshold – The minimum size of geometry to be drawn.

  • steps – The number of steps to reduce the threshold.

float GetFramerate()

If a framerate is used, this returns the framerate out parameter. Otherwise this returns -1.

FramerateMode GetFramerateMode()

Returns the framerate mode

int GetFramerateCullingThreshold()

Returns the framerate culling threshold

int GetFramerateSteps()

Returns the number of steps to reduce the culling threshold if applicable. Otherwise this returns -1.

bool IsFramerateLodEnabled()

Returns true if and only if LODs are allowed in the framerate mode

void SetFramerateMode(FramerateMode mode, float framerate = 0.1f, int cullingthreshold = 150, bool enableLods = false, int steps = 20, int cutoff = 1)

This methods lets you set the FramerateMode which can be off, target or fixed. The default is off. The fixed framerate mode guarantees that the specified framerate will be met while the target framerate mode uses constant framerate logic to ensure that the actual framerate is always within range of the specified framerate while still ensuring a smooth non-flickering rendered scene.

Parameters
  • mode – Framerate mode (off, target, fixed)

  • framerate – The desired framerate (in seconds).

  • cullingthreshold – The minimum size of geometry to be drawn.

  • enablelods – Allow lods in framerate (only applies if FramerateMode is FramerateTarget)

  • steps – The number of steps to reduce the threshold (only applies if FramerateMode is FramerateTarget)

  • cutoff – The pixel size to trigger culling

bool IsFrameRateEnabled()

return The current state of the constant framerate setting

bool GetViewActive()
Returns

true if this is the active view, false otherwise.

void cleanupSimpList()

This method frees the SimpList and all members.

void SetAnnotationResize(bool value)

This method enables or disables annotation resizing. It must be on for annotations to work.

Parameters

value – annotation resizing on/off

inline bool GetAnnotationResize()
Returns

True if annotation resizing is enabled and false if otherwise.

inline bool GetFirstUpdate()
Returns

true if the first update has occurred, false otherwise.

inline void SetDisplayHandlesOnDblClk(bool dh)

This function controls whether manipulator handles will be created when geometry is double clicked.

inline bool HasInitialView()
Returns

true if there is an initial view on the scene.

inline void HasInitialView(bool does_it)

Is there an initial view on the scene? Used primarily for hsf streaming.

void ExhaustiveUpdate()

Perform a thorough and full update.

inline bool GetUpdateNotFinished()

Used to indicate whether an update is currently in progress.

inline void SetUpdateNotFinished(bool NotFinished)

Used to indicate whether an update is currently in progress.

inline void SetMouseWheelSensitivity(float sensitivity)
inline float GetMouseWheelSensitivity()
void SetSplatRendering(bool onoff)

Controls the state of splat rendering of markers.

inline bool GetSplatRendering()

Queries the state of splat rendering of markers.

void SetSplatSize(int splat_size)

This method sets the size of marker splats in wsu.

inline int GetSplatSize()
Returns

The size of marker splats in wsu.

void SetSplatSymbol(SplatSymbol symbol)

This method sets the symbol used for marker splats.

inline SplatSymbol GetSplatSymbol()
Returns

The symbol used for marker splats.

void UpdateFakeHLRColor(HPoint paper_color)

This method is used for setting the background color used for fake hidden-line drawing.

Parameters

paper_color – An RGB triplet where each value is in [0.0, 1.0].

inline void SetHardwareAntialiasing(int antialiasinglevel)

Controls whether hardware acceleration will be used for anti-aliasing.

inline int GetHardwareAntialiasing()

Queries whether hardware acceleration will be used for anti-aliasing.

void VisualizeBounding(bool draw_something, HC_KEY key = (-1L), int incl_count = 0, HC_KEY *incl_path = 0)
HPoint GetFakeHLRColor()
void SetFakeHLRColor(HPoint color)
void FocusOnSelection(bool onoff = true)
inline bool GetFocusOnSelection()
inline HTouchManager *GetTouchManager()
Returns

A pointer to the HTouchManager object which handles multi-touch events.

inline void SetForcedLines(bool onoff)

Controls whether the file load requests lines in addition to the default RenderMode.

inline int GetForcedLines()

Queries whether the file load requests lines in addition to the default RenderMode.

Public Members

bool(*)(unsigned int, int &) GetKeyStateCallback ()
Return

A pointer to a keyboard query callback function.

void(*)(HIC_Rendition const *nr) GetEventCheckerCallback ()
Return

A pointer to an event checker callback function.

Public Static Functions

static void AdjustAxisWindowCallback(int signal, void *signal_data, void *user_data)

This function is used as a callback to dynamically adjust the axis window.

static void AdjustWindowCallback(int signal, void *signal_data, void *user_data)

This function is used as a callback to dynamically adjust the HAbsoluteWindow’s.

static bool UpdateTick(float request_time, float actual_time, void *user_data)

The Tick function called from the timer manager.

Parameters
  • request_time – The time in which the function requested a call.

  • actual_time – The actual time the function was called.

  • user_data – The user data.

Returns

True if the event was processed.

static bool StreamProgressCallback(unsigned long so_far, unsigned long expected, void *user_data)

The ProgressBarCallback usually called from streaming toolkit.

Parameters
  • so_far – The amount of data received.

  • expected – The amount Of data expected.

  • user_data – The user data.

Returns

True if the event was processed.

static void StaticForceUpdateRequest(HBaseView &view_pointer)

This function can be used to force an update on a given view.

Parameters

view_pointer – a pointer to an HBaseView object.

Public Static Attributes

static int const MaxLights = 6