The HBaseModel class is used to store and manage model information. More...

#include <HBaseModel.h>

Public Member Functions

virtual void CleanIncludes ()
 
virtual void CreateIncludeSegment ()
 
virtual void DeleteIncludedSegments ()
 
virtual void Flush ()
 
virtual HC_KEY GetBBoxKey () const
 
virtual HBhvBehaviorManagerGetBhvBehaviorManager ()
 
bool GetContainsDouble () const
 
TK_Dispatch_XMLGetDispatchXML ()
 
HEventManagerGetEventManager ()
 
bool GetFileLoadComplete () const
 
bool GetFirstFitComplete () const
 
HModelInfoGetHModelInfo () const
 
bool GetLMVModel () const
 
virtual HC_KEY GetModelIncludeKey () const
 
virtual HC_KEY GetModelKey () const
 
bool GetObjectCheck () const
 
bool GetStaticModel () const
 
bool GetStaticModelOn () const
 
virtual HStreamFileToolkit * GetStreamFileTK () const
 
 HBaseModel (char const *model=0)
 
virtual void Init ()
 
virtual bool IsBRepGeometry () const
 
virtual bool IsFEAGeometry () const
 
virtual bool IsVectorGeometry () const
 
void MakeAnimationSnapshot (int tick)
 
virtual HFileInputResult Read (const __wchar_t *FileName, HBaseView *pHView=0, bool clean_include=true, HInputHandlerOptions *options=0)
 
virtual HFileInputResult Read (const char *FileName, HBaseView *pHView=0, bool clean_include=true, HInputHandlerOptions *options=0)
 
void SetBhvBehaviorManager (HBhvBehaviorManager *BehaviorManager)
 
virtual void SetBRepGeometry (bool brep)
 
void SetContainsDouble (bool value)
 
virtual void SetFEAGeometry (bool fea)
 
void SetFileLoadComplete (bool value, HBaseView *pHView=0)
 
void SetFirstFitComplete (bool value)
 
void SetLMVModel (bool value)
 
void SetObjectCheck (bool value)
 
void SetStaticModel (bool value)
 
virtual void SetVectorGeometry (bool vector)
 
void Update (bool antialias=false, bool forceUpdate=false)
 
virtual HFileOutputResult Write (const __wchar_t *FileName, HBaseView *pHView=0, float width=0, float height=0)
 
virtual HFileOutputResult Write (const char *FileName, HBaseView *pHView=0, float width=0, float height=0)
 
virtual HFileOutputResult WriteWithAnimation (const __wchar_t *FileName, HBaseView *pHView=0, float width=0, float height=0)
 
virtual HFileOutputResult WriteWithAnimation (const char *FileName, HBaseView *pHView=0, float width=0, float height=0)
 
virtual HFileOutputResult WriteWithOptions (const __wchar_t *FileName, HBaseView *pHView=0, HOutputHandlerOptions *options=0)
 
virtual HFileOutputResult WriteWithOptions (const char *FileName, HBaseView *pHView=0, HOutputHandlerOptions *options=0)
 
virtual ~HBaseModel ()
 

Protected Attributes

HC_KEY m_BBoxKey
 
bool m_bBRepGeometry
 
bool m_bFEAGeometry
 
bool m_bFileLoadComplete
 
bool m_bFirstFitComplete
 
bool m_bNeedsStencilBuffer
 
bool m_bObjectCheck
 
bool m_bVectorGeometry
 
bool m_containsDouble
 
HC_KEY m_ModelIncludeKey
 
HC_KEY m_ModelKey
 
HBhvBehaviorManagerm_pBhvBehaviorManager
 
TK_Dispatch_XMLm_pDispatchXML
 
HEventManagerm_pEventManager
 
HStreamFileToolkit * m_pHFile
 
HBhvKeyframeGeneratorm_pKeyframeGenerator
 
HModelInfom_pModelInfo
 
HBhvSegmentTrackerm_pSegmentTracker
 

Detailed Description

The HBaseModel class is used to store and manage model information.

HBaseModel provides functions which facilitate creation and management of the graphical information associated with the model. It is typically referenced by an HBaseView object, which defines a specific view of the model.

The class encapsulates a HOOPS Include Library segment. This segment is intended to be used as the root of a HOOPS tree containing segments and geometry which represent graphical information for the application-specific model. A file can be read into it, or geometry can be created within a segment hierarchy beneath it.

Constructor & Destructor Documentation

◆ HBaseModel()

HBaseModel::HBaseModel ( char const *  model = 0)

Constructs an HBaseModel object.

◆ ~HBaseModel()

virtual HBaseModel::~HBaseModel ( )
virtual

Deletes the HOOPS segment tree associated with the model.

Member Function Documentation

◆ CleanIncludes()

virtual void HBaseModel::CleanIncludes ( )
virtual

Utility function which moves global includes to model specific include segments.

◆ DeleteIncludedSegments()

virtual void HBaseModel::DeleteIncludedSegments ( )
virtual

Scans for all the segments which are included by the model and deletes them.

◆ Flush()

virtual void HBaseModel::Flush ( )
virtual

Flushes the HOOPS segment tree associated with the HBaseModel object.

◆ GetBBoxKey()

virtual HC_KEY HBaseModel::GetBBoxKey ( ) const
inlinevirtual
Returns
The key of the HOOPS segment containing the model's bounding box geometry.

◆ GetBhvBehaviorManager()

virtual HBhvBehaviorManager* HBaseModel::GetBhvBehaviorManager ( )
virtual
Returns
A pointer to the HBhvBehaviorManager object.

◆ GetContainsDouble()

bool HBaseModel::GetContainsDouble ( ) const
inline
Returns
A boolean indicating whether this model contains double precision attributes. This is set by Visualize on import.

◆ GetDispatchXML()

TK_Dispatch_XML* HBaseModel::GetDispatchXML ( )
Returns
A pointer to the DispatchXML object which allows registering of multiple xml handlers.

◆ GetEventManager()

HEventManager* HBaseModel::GetEventManager ( )
Returns
A pointer to the HEventManager object.

◆ GetFileLoadComplete()

bool HBaseModel::GetFileLoadComplete ( ) const
inline
Returns
A boolean indicating whether a Read() has completed.

◆ GetFirstFitComplete()

bool HBaseModel::GetFirstFitComplete ( ) const
inline
Returns
A boolean indicating whether HBaseModel has called FitWorld on this model after the last call to Read(). It is not useful for model with multiple views.

◆ GetHModelInfo()

HModelInfo* HBaseModel::GetHModelInfo ( ) const
Returns
A pointer to the HModelInfo object with the current model info.

◆ GetLMVModel()

bool HBaseModel::GetLMVModel ( ) const

Returns the existence of a LMV model at the root of the model segment.

◆ GetModelIncludeKey()

virtual HC_KEY HBaseModel::GetModelIncludeKey ( ) const
inlinevirtual
Returns
The key of the encapsulated HOOPS segment denoting the top of the model's include segment hierarchy.

◆ GetModelKey()

virtual HC_KEY HBaseModel::GetModelKey ( ) const
inlinevirtual
Returns
The key of the encapsulated HOOPS segment denoting the top of the model hierarchy .

◆ GetObjectCheck()

bool HBaseModel::GetObjectCheck ( ) const
inline
Returns
A boolean indicating whether to scan model for annotations and other objects.

◆ GetStaticModel()

bool HBaseModel::GetStaticModel ( ) const

Returns the existence of a static model at the root of the model segment.

◆ GetStaticModelOn()

bool HBaseModel::GetStaticModelOn ( ) const

Returns if a static model is requested at the root of the model segment.

◆ GetStreamFileTK()

virtual HStreamFileToolkit* HBaseModel::GetStreamFileTK ( ) const
inlinevirtual
Returns
A pointer to the stream toolkit object used with this model for writing and reading HSF files.

◆ Init()

virtual void HBaseModel::Init ( )
virtual

Initializes an HBaseModel object.

◆ IsBRepGeometry()

virtual bool HBaseModel::IsBRepGeometry ( ) const
inlinevirtual
Returns
A boolean indicating whether data originated from a CAD dataset. This is used so that we do not use HOOPS' edges for display but rather the polylines which are provided by the modeller. This is set by setting a User_Option of 1 in the root of your scene-graph. This is automatically set if the data originated from ACIS or Parasolid and you used the framework to generate the file.

◆ IsFEAGeometry()

virtual bool HBaseModel::IsFEAGeometry ( ) const
inlinevirtual
Returns
A boolean indicating whether data originated from a FEA dataset. Developers ensure that this flag is automatically set if a User_Option of 2 is set in the root node of their scene-graph.

◆ IsVectorGeometry()

virtual bool HBaseModel::IsVectorGeometry ( ) const
inlinevirtual
Returns
A boolean indicating whether the data is only vector data. This allows HOOPS to force vector printing always and not turn on shading. This is set by setting a User_Option of 3 in the root of your scene-graph.

◆ Read()

virtual HFileInputResult HBaseModel::Read ( const __wchar_t *  FileName,
HBaseView pHView = 0,
bool  clean_include = true,
HInputHandlerOptions options = 0 
)
virtual

Based on file extention this method loads the content of a file using HInputHandler found in the HIOManager from HDB If no handler is found, it will return InputNotHandled. It does not Flush existing geometry. The default extention is hmf if no other is found.

Parameters
FileNameA character pointer denoting the name of the file to be read in
pHViewA pointer to the HBaseView object containing the view-dependent information reading in the model
clean_includeif true, then includes are moved to unique include location after loading
optionsAn optional pointer to an instance of a HInputHandlerOptions contain extra data for input operation.
Returns
HFileInputResult with result of the attempted file read.

◆ SetBhvBehaviorManager()

void HBaseModel::SetBhvBehaviorManager ( HBhvBehaviorManager BehaviorManager)

Sets the HBhvBehaviorManager object.

◆ SetBRepGeometry()

virtual void HBaseModel::SetBRepGeometry ( bool  brep)
inlinevirtual

This method indicates if this model represents geometric modeler data but wasn't necessarily loaded from the modelling kernel. Pass true if yes and false if otherwise.

◆ SetContainsDouble()

void HBaseModel::SetContainsDouble ( bool  value)
inline

Sets the boolean indicating whether this model contains double precision attributes.

◆ SetFEAGeometry()

virtual void HBaseModel::SetFEAGeometry ( bool  fea)
inlinevirtual

This method indicates if the model represents finite-element data. Pass true if yes and false if otherwise.

◆ SetFileLoadComplete()

void HBaseModel::SetFileLoadComplete ( bool  value,
HBaseView pHView = 0 
)

Sets the boolean indicating whether a Read() has completed.

◆ SetFirstFitComplete()

void HBaseModel::SetFirstFitComplete ( bool  value)
inline

Sets the boolean indicating whether the first call to FitWorld has been performed.

◆ SetLMVModel()

void HBaseModel::SetLMVModel ( bool  value)

Sets the LMV model status at the root of the model segment.

◆ SetObjectCheck()

void HBaseModel::SetObjectCheck ( bool  value)
inline

Sets the boolean indicating whether to scan model for annotations and other objects.

◆ SetStaticModel()

void HBaseModel::SetStaticModel ( bool  value)

Sets the static model status at the root of the model segment.

◆ SetVectorGeometry()

virtual void HBaseModel::SetVectorGeometry ( bool  vector)
inlinevirtual

This method indicates if the model only contains vector data. Pass true if yes and false if otherwise.

◆ Update()

void HBaseModel::Update ( bool  antialias = false,
bool  forceUpdate = false 
)

Performs a rendering update.

Parameters
antialiasIf true, then an anti-aliased version of the scene will be drawn.
forceUpdateIf true, then an update will be forced.

◆ Write()

virtual HFileOutputResult HBaseModel::Write ( const __wchar_t *  FileName,
HBaseView pHView = 0,
float  width = 0,
float  height = 0 
)
virtual

Writes the contents of the HOOPS segment tree to a file. The HOOPS segment tree beginning with the segment denoted by m_ModelKey will be written. The HIO handler registered to handle the specified file extension will be used for export.

This function should be overloaded to support writing of additional file types.

Note
for the '.pdf' file extension, a 2D-PDF will be exported by default.
Parameters
FileNameA character pointer denoting the name of the file to write
pHViewA pointer to the HBaseView object containing the view-dependent information
widthFor 2D or 'paper' export formats, the m_Window_Width and m_Paper_Width are set to 'width'. For image formats, the width of the actual image in pixels will be 'width' * m_Image_Dpi. Default is 0.
heightFor 2D or 'paper' export formats, the m_Window_Height and m_Paper_Height are set to 'height'. For image formats, the height of the actual image in pixels will be 'height' * m_Image_Dpi. Default is 0.
Returns
HFileOutputResult with result of the attempted file write.

◆ WriteWithOptions()

virtual HFileOutputResult HBaseModel::WriteWithOptions ( const __wchar_t *  FileName,
HBaseView pHView = 0,
HOutputHandlerOptions options = 0 
)
virtual
  • Reads the visualization contents of the file into the HOOPS segment tree (visualization contents refers to graphical information/attributes). The segment tree will be created underneath the segment denoted by m_ModelKey. The HIO handler registered to handle the specified file extension will be used for import.

    This function can be overloaded to support reading of additional file types.

    Parameters
    FileNameA character pointer denoting the name of the file to write
    pHViewA pointer to the HBaseView object containing the view-dependent information
    optionsAn optional pointer to an instance of a HOutputHandlerOptions contain extra data for output operation.
    Returns
    HFileOutputResult with result of the attempted file write.

Member Data Documentation

◆ m_BBoxKey

HC_KEY HBaseModel::m_BBoxKey
protected

Key of the HOOPS segment containing model's bounding box geometry.

◆ m_bBRepGeometry

bool HBaseModel::m_bBRepGeometry
protected

Set this value to true if the model represents geometric modeler data but wasn't necessarily loaded from the modelling kernel.

◆ m_bFEAGeometry

bool HBaseModel::m_bFEAGeometry
protected

Set this value to true if the model represents finite-element data.

◆ m_bFileLoadComplete

bool HBaseModel::m_bFileLoadComplete
protected

Utility member intended to be set to true if the model is being streamed in and the file has finished loading in.

◆ m_bFirstFitComplete

bool HBaseModel::m_bFirstFitComplete
protected

Utility member intended to be set to true if the model is being streamed in and the first 'fit scene to camera' has occurred.

◆ m_bNeedsStencilBuffer

bool HBaseModel::m_bNeedsStencilBuffer
protected

Set this value to true if the model contains a CuttingAnimation XML behavior (see: StencilProbe).

◆ m_bObjectCheck

bool HBaseModel::m_bObjectCheck
protected

Utility member intended to be set to true if the model is to be scanned for annotations and other "objects"

◆ m_bVectorGeometry

bool HBaseModel::m_bVectorGeometry
protected

Set this value to true if the model only contains vector data.

◆ m_containsDouble

bool HBaseModel::m_containsDouble
protected

Flag to indicate if this model has double-precision modelling matrices.

◆ m_ModelIncludeKey

HC_KEY HBaseModel::m_ModelIncludeKey
protected

Key of the HOOPS segment denoting the top of model include hierarchy.

◆ m_ModelKey

HC_KEY HBaseModel::m_ModelKey
protected

Key of the HOOPS segment denoting the top of model hierarchy.

◆ m_pBhvBehaviorManager

HBhvBehaviorManager* HBaseModel::m_pBhvBehaviorManager
protected

A pointer to the HBhvBehaviorManager object.

◆ m_pDispatchXML

TK_Dispatch_XML* HBaseModel::m_pDispatchXML
protected

Pointer to the Dispatch XML object.

◆ m_pEventManager

HEventManager* HBaseModel::m_pEventManager
protected

A pointer to the HEventManager object.

◆ m_pHFile

HStreamFileToolkit* HBaseModel::m_pHFile
protected

A pointer to the HStreamFileToolkit object.

◆ m_pModelInfo

HModelInfo* HBaseModel::m_pModelInfo
mutableprotected

A pointer to the HModelInfo object.


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