HBaseModel
-
class
HBaseModel The
HBaseModelclass is used to store and manage model information.HBaseModelprovides functions which facilitate creation and management of the graphical information associated with the model. It is typically referenced by anHBaseViewobject, 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.
Index
Methods
CleanIncludes()CreateIncludeSegment()DeleteIncludedSegments()Flush()GetBBoxKey()GetBhvBehaviorManager()GetContainsDouble()GetDispatchXML()GetEventManager()GetFileLoadComplete()GetFirstFitComplete()GetHModelInfo()GetLMVModel()GetModelIncludeKey()GetModelKey()GetObjectCheck()GetStaticModel()GetStaticModelOn()GetStreamFileTK()HBaseModel()Init()IsBRepGeometry()IsFEAGeometry()IsVectorGeometry()MakeAnimationSnapshot()Read()Read()SetBhvBehaviorManager()SetBRepGeometry()SetContainsDouble()SetFEAGeometry()SetFileLoadComplete()SetFirstFitComplete()SetLMVModel()SetObjectCheck()SetStaticModel()SetVectorGeometry()Update()Write()Write()WriteWithAnimation()WriteWithAnimation()WriteWithOptions()WriteWithOptions()~HBaseModel()
Variables
Methods
-
HBaseModel::HBaseModel(char const *model = 0) Constructs an
HBaseModelobject.
-
virtual
HBaseModel::~HBaseModel() virtual
Deletes the HOOPS segment tree associated with the model.
-
virtual void
HBaseModel::Init() virtual
Initializes an
HBaseModelobject.
-
virtual void
HBaseModel::Flush() virtual
Flushes the HOOPS segment tree associated with the
HBaseModelobject.
-
bool
HBaseModel::GetFileLoadComplete() const const
Returns
A boolean indicating whether aRead()has completed.
-
void
HBaseModel::SetFileLoadComplete(bool value, HBaseView *pHView = 0) Sets the boolean indicating whether a
Read()has completed.
-
bool
HBaseModel::GetObjectCheck() const const
Returns
A boolean indicating whether to scan model for annotations and other objects.
-
void
HBaseModel::SetObjectCheck(bool value) Sets the boolean indicating whether to scan model for annotations and other objects.
-
void
HBaseModel::SetStaticModel(bool value) Sets the static model status at the root of the model segment.
-
bool
HBaseModel::GetStaticModel() const const
Returns the existence of a static model at the root of the model segment.
-
bool
HBaseModel::GetStaticModelOn() const const
Returns if a static model is requested at the root of the model segment.
-
void
HBaseModel::SetLMVModel(bool value) Sets the LMV model status at the root of the model segment.
-
bool
HBaseModel::GetLMVModel() const const
Returns the existence of a LMV model at the root of the model segment.
-
bool
HBaseModel::GetFirstFitComplete() const const
Returns
A boolean indicating whetherHBaseModelhas called FitWorld on this model after the last call toRead(). It is not useful for model with multiple views.
-
void
HBaseModel::SetFirstFitComplete(bool value) Sets the boolean indicating whether the first call to FitWorld has been performed.
-
bool
HBaseModel::GetContainsDouble() const const
Returns
A boolean indicating whether this model contains double precision attributes. This is set by Visualize on import.
-
void
HBaseModel::SetContainsDouble(bool value) Sets the boolean indicating whether this model contains double precision attributes.
-
virtual HFileInputResult
HBaseModel::Read(__wchar_t const *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
HDBIf 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
FileName: A character pointer denoting the name of the file to be read in
pHView: A pointer to the
HBaseViewobject containing the view-dependent information reading in the modelclean_include: if true, then includes are moved to unique include location after loading
options: An optional pointer to an instance of a HInputHandlerOptions contain extra data for input operation.
Returns
HFileInputResult with result of the attempted file read.
-
virtual HFileInputResult
HBaseModel::Read(char const *FileName, HBaseView *pHView = 0, bool clean_include = true, HInputHandlerOptions *options = 0) virtual
-
virtual HFileOutputResult
HBaseModel::WriteWithOptions(__wchar_t const *FileName, HBaseView *pHView = 0, HOutputHandlerOptions *options = 0) virtual
This function can be overloaded to support reading of additional file types. \param FileName A character pointer denoting the name of the file to write \param pHView A pointer to the HBaseView object containing the view-dependent information \param options An optional pointer to an instance of a HOutputHandlerOptions contain extra data for output operation. \return HFileOutputResult with result of the attempted file write.
-
virtual HFileOutputResult
HBaseModel::WriteWithOptions(char const *FileName, HBaseView *pHView = 0, HOutputHandlerOptions *options = 0) virtual
-
virtual HFileOutputResult
HBaseModel::Write(__wchar_t const *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.
for the ‘.pdf’ file extension, a 2D-PDF will be exported by default.Parameters
FileName: A character pointer denoting the name of the file to write
pHView: A pointer to the
HBaseViewobject containing the view-dependent informationwidth: For 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.
height: For 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.
-
virtual HFileOutputResult
HBaseModel::Write(char const *FileName, HBaseView *pHView = 0, float width = 0, float height = 0) virtual
-
HModelInfo *
HBaseModel::GetHModelInfo() const const
Returns
A pointer to theHModelInfoobject with the current model info.
-
virtual HStreamFileToolkit *
HBaseModel::GetStreamFileTK() const const virtual
Returns
A pointer to the stream toolkit object used with this model for writing and reading HSF files.
-
virtual HC_KEY
HBaseModel::GetModelKey() const const virtual
Returns
The key of the encapsulated HOOPS segment denoting the top of the model hierarchy .
-
virtual HC_KEY
HBaseModel::GetModelIncludeKey() const const virtual
Returns
The key of the encapsulated HOOPS segment denoting the top of the model’s include segment hierarchy.
-
virtual HC_KEY
HBaseModel::GetBBoxKey() const const virtual
Returns
The key of the HOOPS segment containing the model’s bounding box geometry.
-
virtual bool
HBaseModel::IsBRepGeometry() const const virtual
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.
-
virtual void
HBaseModel::SetBRepGeometry(bool brep) virtual
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.
-
virtual bool
HBaseModel::IsFEAGeometry() const const virtual
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.
-
virtual void
HBaseModel::SetFEAGeometry(bool fea) virtual
This method indicates if the model represents finite-element data. Pass true if yes and false if otherwise.
-
virtual bool
HBaseModel::IsVectorGeometry() const const virtual
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.
-
virtual void
HBaseModel::SetVectorGeometry(bool vector) virtual
This method indicates if the model only contains vector data. Pass true if yes and false if otherwise.
-
virtual void
HBaseModel::CleanIncludes() virtual
Utility function which moves global includes to model specific include segments.
-
virtual void
HBaseModel::DeleteIncludedSegments() virtual
Scans for all the segments which are included by the model and deletes them.
-
virtual HBhvBehaviorManager *
HBaseModel::GetBhvBehaviorManager() virtual
Returns
A pointer to theHBhvBehaviorManagerobject.
-
void
HBaseModel::SetBhvBehaviorManager(HBhvBehaviorManager *BehaviorManager) Sets the
HBhvBehaviorManagerobject.
-
HEventManager *
HBaseModel::GetEventManager() Returns
A pointer to theHEventManagerobject.
-
void
HBaseModel::Update(bool antialias = false, bool forceUpdate = false) Performs a rendering update.
Parameters
antialias: If true, then an anti-aliased version of the scene will be drawn.
forceUpdate: If true, then an update will be forced.
-
void
HBaseModel::MakeAnimationSnapshot(int tick)
-
virtual HFileOutputResult
HBaseModel::WriteWithAnimation(__wchar_t const *FileName, HBaseView *pHView = 0, float width = 0, float height = 0) virtual
-
virtual HFileOutputResult
HBaseModel::WriteWithAnimation(char const *FileName, HBaseView *pHView = 0, float width = 0, float height = 0) virtual
-
virtual void
HBaseModel::CreateIncludeSegment() virtual
-
TK_Dispatch_XML *
HBaseModel::GetDispatchXML() Returns
A pointer to the DispatchXML object which allows registering of multiple xml handlers.
Variables
-
HC_KEY
HBaseModel::m_ModelKey protected
HC_KEYKey of the HOOPS segment denoting the top of model hierarchy.
-
HC_KEY
HBaseModel::m_ModelIncludeKey protected
HC_KEYKey of the HOOPS segment denoting the top of model include hierarchy.
-
HC_KEY
HBaseModel::m_BBoxKey protected
HC_KEYKey of the HOOPS segment containing model’s bounding box geometry.
-
HStreamFileToolkit *
HBaseModel::m_pHFile protected
HStreamFileToolkitA pointer to the HStreamFileToolkit object.
-
HModelInfo *
HBaseModel::m_pModelInfo protected
A pointer to the
HModelInfoobject.
-
bool
HBaseModel::m_bBRepGeometry protected
boolSet this value to true if the model represents geometric modeler data but wasn’t necessarily loaded from the modelling kernel.
-
bool
HBaseModel::m_bFEAGeometry protected
boolSet this value to true if the model represents finite-element data.
-
bool
HBaseModel::m_bVectorGeometry protected
boolSet this value to true if the model only contains vector data.
-
bool
HBaseModel::m_bNeedsStencilBuffer protected
boolSet this value to true if the model contains a CuttingAnimation XML behavior (see: StencilProbe).
-
bool
HBaseModel::m_bFileLoadComplete protected
boolUtility member intended to be set to true if the model is being streamed in and the file has finished loading in.
-
bool
HBaseModel::m_bObjectCheck protected
boolUtility member intended to be set to true if the model is to be scanned for annotations and other “objects”
-
bool
HBaseModel::m_bFirstFitComplete protected
boolUtility member intended to be set to true if the model is being streamed in and the first ‘fit scene to camera’ has occurred.
-
bool
HBaseModel::m_containsDouble protected
boolFlag to indicate if this model has double-precision modelling matrices.
-
HBhvBehaviorManager *
HBaseModel::m_pBhvBehaviorManager protected
A pointer to the
HBhvBehaviorManagerobject.
-
HEventManager *
HBaseModel::m_pEventManager protected
A pointer to the
HEventManagerobject.
-
TK_Dispatch_XML *
HBaseModel::m_pDispatchXML protected
Pointer to the Dispatch XML object.
-
HBhvKeyframeGenerator *
HBaseModel::m_pKeyframeGenerator protected
-
HBhvSegmentTracker *
HBaseModel::m_pSegmentTracker protected