CIvfComponent Class Reference
[Ivf Classes]

Interface of the IVF component class. More...

#include <Ivf/IvfComponent.h>

Inheritance diagram for CIvfComponent:
CIvfRenderArea CIvfSceneViewer CIvfStdViewer CIvfExaminerViewer CIvfFlyViewer CIvfPlaneViewer CIvfWalkViewer

List of all members.

Public Types

enum  IvfViewerType {
  IVF_NONE,
  IVF_WALK,
  IVF_EXAMINER
}

Public Member Functions

 CIvfComponent ()
virtual SoSelectionIvfGetSelectionNode ()
virtual void IvfCreateComponent (CWnd *pWnd, void *pCreateArgs=NULL)=0
virtual void IvfDestroyComponent ()=0
virtual SoWinClipboardIvfGetClipboard ()
virtual SoWinComponentIvfGetSoWinComponent ()
void IvfResetComponent (CIvfDocument *pDoc)
virtual BOOL IvfIsSelected ()
void IvfViewmodesSelectionmode ()
void IvfViewmodesViewingmode ()
virtual void IvfSetSceneGraph (SoNode *pRoot)=0
virtual SoNodeIvfGetSceneGraph ()=0
virtual SoNodeIvfGetBaseViewerSceneGraph ()=0
virtual void IvfReleaseSceneGraph ()=0
virtual void IvfSetBackgroundColor (SbColor &)=0
virtual void IvfSetHeadlight (BOOL)=0
virtual BOOL IvfIsHeadlight ()=0
virtual void IvfSetActiveCamera (int nCamera)
virtual void IvfSetActiveCamera (SoCamera *pCam)=0
virtual SoCameraIvfGetActiveCamera ()=0
virtual void IvfSaveHomePosition ()=0
virtual void IvfResetToHomePosition ()=0
virtual void IvfViewAll ()=0
virtual const SbViewportRegionIvfGetViewportRegion ()=0
virtual SoGLRenderActionIvfGetGLRenderAction ()=0
virtual SoSceneManagerIvfGetSceneManager ()=0
virtual BOOL IvfIsViewing ()=0
virtual void IvfSetViewing (BOOL flag)=0

Static Public Member Functions

static void setIgnoreError (WORD err_mask)
static void clearIgnoreError (WORD err_mask)
static BOOL isIgnoreError (WORD err_mask)

Static Public Attributes

static WORD IVF_IGNORE_READERROR
static WORD IVF_IGNORE_MEMERROR
static WORD IVF_IGNORE_DBGINFO
static WORD IVF_IGNORE_DBGWARNING
static WORD IVF_IGNORE_DBGERROR

Protected Member Functions

virtual void IvfSceneGraphChanged ()
void IvfOnBeginPrinting ()
void IvfOnPrint (CDC *)
void IvfOnEndPrinting ()
BOOL IvfSaveAsBitmap (LPCTSTR pFilename)
virtual void IvfOnSelection (SoPath *)
virtual void IvfOnDeSelection (SoPath *)
virtual void IvfRemoveManips (void)
virtual void IvfRestoreManips (void)
void IvfOnEditCopy ()
void IvfOnUpdateEditCopy (CCmdUI *pCmdUI)
void IvfOnEditCut ()
void IvfOnUpdateEditCut (CCmdUI *pCmdUI)
void IvfOnEditPaste ()
void IvfOnUpdateEditPaste (CCmdUI *pCmdUI)
void IvfOnUpdateEditUndo (CCmdUI *pCmdUI)
virtual void IvfOnSelectViewpoint (int nCamera)
virtual void IvfOnUrlDisplayChanged (LPCTSTR urlName)
virtual SoPathIvfOnSelectionPick (const SoPickedPoint *pick)
virtual void IvfOnViewAnchor (SoPath *pPath)
void IvfOnSelectionEnable ()
void IvfOnUpdateSelectionEnable (CCmdUI *pCmdUI)
virtual void IvfPrePasteAction ()
virtual void IvfPostPasteAction ()
virtual void IvfPreCopyAction ()
virtual void IvfPostCopyAction ()
virtual void IvfPreCutAction ()
virtual ~CIvfComponent ()
virtual void IvfSetupUrlDisplayCallback (SoGroup *root)
virtual void IvfRemoveUrlDisplayCallback (SoGroup *root)
virtual void IvfLoc2Callback (void *userData, SoEventCallback *node)
virtual void IvfSetupSelectionPickCallback ()
virtual void IvfRemoveSelectionPickCallback ()
void IvfPasteDone (SoPathList *pathList)
void IvfDestroySelectedObjects ()
virtual void IvfOnDestroy ()
virtual void IvfOnPaint ()
virtual void IvfOnPaint (CWnd *pWnd)
virtual BOOL IvfOnEraseBkgnd (CDC *pDC)
virtual void IvfOnCreate (LPCREATESTRUCT lpCreateStruc)
virtual void IvfOnInitialUpdate (CWnd *pWnd)
virtual void IvfOnActivateComponent (CView *pActivateView=NULL)
virtual void IvfOnDeactivateComponent ()
virtual BOOL IvfOnCommand (WPARAM wParam, LPARAM lParam)
virtual BOOL IvfOnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual void IvfOnSelectViewAnchors ()
virtual BOOL IvfIsViewpointMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual BOOL IvfIsSceneViewer ()

Static Protected Member Functions

static void IvfStaticSelectionCB (void *, SoPath *)
static void IvfStaticDeSelectionCB (void *, SoPath *)
static void IvfErrorCallback (const SoError *error, void *data)
static void IvfStaticLoc2Callback (void *userData, SoEventCallback *node)
static SoPathIvfStaticSelectionPickCB (void *userData, const SoPickedPoint *pick)
static void IvfPasteDoneCB (void *userData, SoPathList *pathList)

Protected Attributes

SoWinComponentm_pComponent
void * m_pCreateArgs
SoWinClipboardm_pClipboard
SoSelectionm_pSelection
SoOffscreenRendererm_pOffscreen
CWnd * m_pWnd
SoEventCallbackm_pEventCB
BOOL m_nEnableSelection
BOOL m_bBgColorChangedSet

Static Protected Attributes

static WORD m_fIgnoreError

Friends

class CIvfMainFrame
class CIvfDocument

Detailed Description

Interface of the IVF component class.

This class provides methods to process messages directed to the IVF component object and methods to interact with the SoWin component.

Note: Although the class name is CIvfComponent, the header file name is IvfComponent.h.

m_pCreateArgs is a pointer to an array of type int containing (at least) the following:


Member Enumeration Documentation

Viewer type.

Enumerator:
IVF_NONE 

No viewer.

IVF_WALK 

Walk viewer.

IVF_EXAMINER 

Examiner viewer.


Constructor & Destructor Documentation

CIvfComponent::CIvfComponent (  ) 
virtual CIvfComponent::~CIvfComponent (  )  [protected, virtual]

Member Function Documentation

static void CIvfComponent::clearIgnoreError ( WORD  err_mask  )  [static]
static BOOL CIvfComponent::isIgnoreError ( WORD  err_mask  )  [static]
virtual void CIvfComponent::IvfCreateComponent ( CWnd *  pWnd,
void *  pCreateArgs = NULL 
) [pure virtual]

This method creates an SoWin Component inside of the window pointed to by pWnd.

Use this method to create a component inside of an arbitrary window.

Implemented in CIvfExaminerViewer, CIvfFlyViewer, CIvfPlaneViewer, and CIvfWalkViewer.

virtual void CIvfComponent::IvfDestroyComponent (  )  [pure virtual]

This method destroys the component.

Implemented in CIvfExaminerViewer, CIvfFlyViewer, CIvfPlaneViewer, and CIvfWalkViewer.

void CIvfComponent::IvfDestroySelectedObjects (  )  [protected]

This is the implementation of the cut method.

static void CIvfComponent::IvfErrorCallback ( const SoError error,
void *  data 
) [static, protected]

This method is invoked when an error is encountered.

A dialog containing the error message is displayed.

virtual SoCamera* CIvfComponent::IvfGetActiveCamera (  )  [pure virtual]

Return a pointer to the component's camera.

virtual SoNode* CIvfComponent::IvfGetBaseViewerSceneGraph (  )  [pure virtual]

This returns the scene graph contained by the base viewer (SoSceneViewer, SoExaminerViewer, etc.

)

virtual SoWinClipboard* CIvfComponent::IvfGetClipboard (  )  [virtual]

This method returns the clipboard contained in the components.

virtual SoGLRenderAction* CIvfComponent::IvfGetGLRenderAction (  )  [pure virtual]

Get the component's render action.

virtual SoNode* CIvfComponent::IvfGetSceneGraph (  )  [pure virtual]

This method returns the scene graph contained in the component.

virtual SoSceneManager* CIvfComponent::IvfGetSceneManager (  )  [pure virtual]

Get the component's scene manager.

virtual SoSelection* CIvfComponent::IvfGetSelectionNode (  )  [virtual]

Get the active selection.

virtual SoWinComponent* CIvfComponent::IvfGetSoWinComponent (  )  [virtual]

This method returns a pointer to the component.

virtual const SbViewportRegion& CIvfComponent::IvfGetViewportRegion (  )  [pure virtual]

Get the component's viewport region.

virtual BOOL CIvfComponent::IvfIsHeadlight (  )  [pure virtual]
virtual BOOL CIvfComponent::IvfIsSceneViewer (  )  [protected, virtual]

This method queries if the underlying viewer iss a SceneViewer or not.

Reimplemented in CIvfSceneViewer.

virtual BOOL CIvfComponent::IvfIsSelected (  )  [virtual]

Is a selection active.

virtual BOOL CIvfComponent::IvfIsViewing (  )  [pure virtual]

Query component's viewing status.

virtual BOOL CIvfComponent::IvfIsViewpointMsg ( UINT  nID,
int  nCode,
void *  pExtra,
AFX_CMDHANDLERINFO *  pHandlerInfo 
) [protected, virtual]

This method is used by IvfOnCmdMsg to determine if a message pertains to the viewpoint menu.

virtual void CIvfComponent::IvfLoc2Callback ( void *  userData,
SoEventCallback node 
) [protected, virtual]

If m_nEnableUrlDisplay is TRUE, this method is invoked each time the cursor position changes while inside the component's window.

The default implementation performs an SoRayPickAction action on the scene graph to determine if the cursor is over a URL. In addition, the appropriate analysis is performed to determine if the URL display needs to be updated. If the URL display needs to be changed, IvfOnUrlDisplayChanged is invoked.

virtual void CIvfComponent::IvfOnActivateComponent ( CView *  pActivateView = NULL  )  [protected, virtual]

This method is invoked prior to activation of the component in a MDI application.

Reimplemented in CIvfSceneViewer.

void CIvfComponent::IvfOnBeginPrinting (  )  [protected]

These handle printing.

virtual BOOL CIvfComponent::IvfOnCmdMsg ( UINT  nID,
int  nCode,
void *  pExtra,
AFX_CMDHANDLERINFO *  pHandlerInfo 
) [protected, virtual]

This method is used to route command messages to the component.

TRUE is returned if the command is processed, FALSE otherwise.

virtual BOOL CIvfComponent::IvfOnCommand ( WPARAM  wParam,
LPARAM  lParam 
) [protected, virtual]

This method is used to route commands to the SoWin component.

TRUE is returned if the command is processed, FALSE otherwise.

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfOnCreate ( LPCREATESTRUCT  lpCreateStruc  )  [protected, virtual]

This method is called when the view object is created.

virtual void CIvfComponent::IvfOnDeactivateComponent (  )  [protected, virtual]

This method is invoked prior to component deactivation in a MDI application.

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfOnDeSelection ( SoPath  )  [protected, virtual]
virtual void CIvfComponent::IvfOnDestroy (  )  [protected, virtual]

This method is invoked when the MFC object that is polymorphic with the IVF component object is about to be destroyed.

Reimplemented in CIvfSceneViewer.

void CIvfComponent::IvfOnEditCopy (  )  [protected]

following is direct support for cut/paste operations

void CIvfComponent::IvfOnEditCut (  )  [protected]
void CIvfComponent::IvfOnEditPaste (  )  [protected]
void CIvfComponent::IvfOnEndPrinting (  )  [protected]
virtual BOOL CIvfComponent::IvfOnEraseBkgnd ( CDC *  pDC  )  [protected, virtual]

Erase background message handler (default just returns TRUE).

The IVF AppWizard generates code in the app to override the default CView handler so we can avoid drawing the background of the view's window. It is completely covered by the Inventor viewer window, so drawing would be a waste of cpu cycles.

virtual void CIvfComponent::IvfOnInitialUpdate ( CWnd *  pWnd  )  [protected, virtual]

This method is invoked during the first update of the window containing the component.

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfOnPaint ( CWnd *  pWnd  )  [protected, virtual]

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfOnPaint (  )  [protected, virtual]

Paint message handler (default calls BeginPaint/EndPaint).

No params version is the old one. Starting with release 2.2.1, the IVF AppWizard generates code in the app to override the default CView OnPaint handler and call the second version.

Reimplemented in CIvfSceneViewer.

void CIvfComponent::IvfOnPrint ( CDC *   )  [protected]
virtual void CIvfComponent::IvfOnSelection ( SoPath  )  [protected, virtual]

These are called on selection and deselection.

void CIvfComponent::IvfOnSelectionEnable (  )  [protected]

Enable/disable selections.

virtual SoPath* CIvfComponent::IvfOnSelectionPick ( const SoPickedPoint pick  )  [protected, virtual]

If the component contains a scene graph that has a SoSelection node as the root, this method is invoked when the user picks a node in the scene graph by clicking the mouse button.

If m_nEnableSelection is TRUE, the path to the selected node is returned. This causes the selected node to be highlighted. If m_nEnableSelection is FALSE, a path containing only the selection node is returned and no highlighting occurs.

virtual void CIvfComponent::IvfOnSelectViewAnchors (  )  [protected, virtual]

If the camera list is not empty, the item "View Anchors..." is appended to the end of the viewpoint menu.

This method is invoked when "View Anchors..." is selected.

virtual void CIvfComponent::IvfOnSelectViewpoint ( int  nCamera  )  [protected, virtual]

This method is invoked when the user selects a viewpoint from the viewpoint menu.

If m_nEnableViewpoints is TRUE, CIvfComponent will maintain a viewpoint menu for the application. The cameras corresponding to each viewpoint in the viewpoint menu are contained in a list pointed to by the m_pCamList member variable. If the scene graph loaded by the application did not contain any cameras, then the camera list will be empty, and the viewpoint menu will contain the default item "Entry View". If the camera list is not empty, the viewpoint menu will contain items corresponding to the name of each camera. The camera corresponding the the selected menu item is (*m_pCamList)[nCamera]. In the case where the camera list is empty and "Entry View" is selected, this method is invoked with nCamera set to 0.

void CIvfComponent::IvfOnUpdateEditCopy ( CCmdUI *  pCmdUI  )  [protected]
void CIvfComponent::IvfOnUpdateEditCut ( CCmdUI *  pCmdUI  )  [protected]
void CIvfComponent::IvfOnUpdateEditPaste ( CCmdUI *  pCmdUI  )  [protected]
void CIvfComponent::IvfOnUpdateEditUndo ( CCmdUI *  pCmdUI  )  [protected]
void CIvfComponent::IvfOnUpdateSelectionEnable ( CCmdUI *  pCmdUI  )  [protected]
virtual void CIvfComponent::IvfOnUrlDisplayChanged ( LPCTSTR  urlName  )  [protected, virtual]

If m_nEnableUrlDisplay is TRUE, this method is invoked every time the mouse cursor passes over an SoWWWAnchor node, and everytime the cursor moves out of a region of the screen occupied by the SoWWWAnchor node.

This enables applications to display a URL name in the status bar. The default implementation of this method displays urlName in the application frame window's status bar.

virtual void CIvfComponent::IvfOnViewAnchor ( SoPath pPath  )  [protected, virtual]

This method performs a viewAll on the path pointed to by pPath.

If m_nEnableViewpoints is TRUE, CIvfComponent will maintain a list of paths to all of the SoWWWAnchor nodes in the component's scene graph. This method is invoked to cause the component's camera to be relocated so that the anchor pointed to by pPath is visible. Note that performing a viewAll on the path to the anchor does not guarantee that the geometry contained under the anchor node will be visible. Applications should overload this method if a more robust behavior is desired.

void CIvfComponent::IvfPasteDone ( SoPathList pathList  )  [protected]
static void CIvfComponent::IvfPasteDoneCB ( void *  userData,
SoPathList pathList 
) [static, protected]

This method happens on paste.

It is invoked from the specific viewer and passes the paste list. The first is the static callback passed to the clipboard and the second is the actual instance member function (that does all the work).

virtual void CIvfComponent::IvfPostCopyAction (  )  [protected, virtual]

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfPostPasteAction (  )  [protected, virtual]

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfPreCopyAction (  )  [protected, virtual]

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfPreCutAction (  )  [protected, virtual]

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfPrePasteAction (  )  [protected, virtual]

These are called just before and after the respective edit operations to allow the viewer to make adjustments before and after.

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfReleaseSceneGraph (  )  [pure virtual]

This method causes the component to unreference its scene graph.

virtual void CIvfComponent::IvfRemoveManips ( void   )  [protected, virtual]

These functions prune and restore manipulators from and to the scene graph.

Used before saving to storage, clipboard, etc.

Reimplemented in CIvfSceneViewer.

virtual void CIvfComponent::IvfRemoveSelectionPickCallback (  )  [protected, virtual]

This method sets the selection pick filter callback to NULL.

virtual void CIvfComponent::IvfRemoveUrlDisplayCallback ( SoGroup root  )  [protected, virtual]

This method removes the SoEventCallback node from the scene graph.

void CIvfComponent::IvfResetComponent ( CIvfDocument pDoc  ) 

This method responds to IvfSceneGraphChanged to reset the viewer to the new scene graph and camera.

virtual void CIvfComponent::IvfResetToHomePosition (  )  [pure virtual]

Move the component's camera to the home position.

virtual void CIvfComponent::IvfRestoreManips ( void   )  [protected, virtual]

Reimplemented in CIvfSceneViewer.

BOOL CIvfComponent::IvfSaveAsBitmap ( LPCTSTR  pFilename  )  [protected]

Save the scene graph as a bitmap (.bmp file).

virtual void CIvfComponent::IvfSaveHomePosition (  )  [pure virtual]

Save the position of the component's camera as the home position.

virtual void CIvfComponent::IvfSceneGraphChanged (  )  [protected, virtual]

This method notifies the component that the scene graph contained in the document has changed.

virtual void CIvfComponent::IvfSetActiveCamera ( SoCamera pCam  )  [pure virtual]

Set the component's camera to pCam.

virtual void CIvfComponent::IvfSetActiveCamera ( int  nCamera  )  [virtual]

Set the component's camera to camera number nCamera from the list of cameras pointed to by m_pCamList.

virtual void CIvfComponent::IvfSetBackgroundColor ( SbColor  )  [pure virtual]

Set the Background color.

virtual void CIvfComponent::IvfSetHeadlight ( BOOL   )  [pure virtual]

Set the Background color.

virtual void CIvfComponent::IvfSetSceneGraph ( SoNode pRoot  )  [pure virtual]

This method forces the component to use the scene graph pointed to by pRoot instead of the scene graph contained in the document.

virtual void CIvfComponent::IvfSetupSelectionPickCallback (  )  [protected, virtual]

This method sets the selection pick filter callback to IvfStaticSelectionPickCB.

virtual void CIvfComponent::IvfSetupUrlDisplayCallback ( SoGroup root  )  [protected, virtual]

This method inserts an SoEventCallback node into the scene graph contained in the document object.

The callback node triggers a callback for every SoLocation2Event (each time the cursor moves). The default implementation set's up a mechanism so that IvfLoc2Callback is invoked for each mouse move event. This mechanism is needed to enable display of URLs as the mouse cursor moves over SoWWWAnchor nodes. An application should overload this method if another method of URL display is desired. This mechanism is setup only if m_nEnableUrlDisplay is TRUE.

virtual void CIvfComponent::IvfSetViewing ( BOOL  flag  )  [pure virtual]

Set component's viewing status.

static void CIvfComponent::IvfStaticDeSelectionCB ( void *  ,
SoPath  
) [static, protected]
static void CIvfComponent::IvfStaticLoc2Callback ( void *  userData,
SoEventCallback node 
) [static, protected]

This static member function is invoked by the callback node in placed in the scene graph by IvfSetupUrlDisplayCallback for each mouse move event.

This method then invokes IvfLoc2Callback.

static void CIvfComponent::IvfStaticSelectionCB ( void *  ,
SoPath  
) [static, protected]
static SoPath* CIvfComponent::IvfStaticSelectionPickCB ( void *  userData,
const SoPickedPoint pick 
) [static, protected]

These methods are invoked when the user picks a node in the scene graph.

IvfOnSelectionPick is the instance version called by IvfStaticSelectionPickCB.

virtual void CIvfComponent::IvfViewAll (  )  [pure virtual]

Perform a viewAll on the component's scene graph.

void CIvfComponent::IvfViewmodesSelectionmode (  ) 

Set the mode to selection or viewing.

void CIvfComponent::IvfViewmodesViewingmode (  ) 
static void CIvfComponent::setIgnoreError ( WORD  err_mask  )  [static]

Friends And Related Function Documentation

friend class CIvfDocument [friend]
friend class CIvfMainFrame [friend]

Member Data Documentation

flag to indicate the background color changed callback has been set.

WORD CIvfComponent::m_fIgnoreError [static, protected]

flag that enables node selection (highlighting)

clipboard and selection now available to all viewers.

Pointer to the SoWin Component.

void* CIvfComponent::m_pCreateArgs [protected]

pointer to the component creation arguments

a pointer to the event callback node used to route SoLocaton2 events

offscreen renderer is used for printing

CWnd* CIvfComponent::m_pWnd [protected]

pointer to window which contains the SoWin component, note this is not necessarily the CWnd derived object that is polymorphic with CIvfComponent, it may be one of the children of that object (i.e.

a child control of a CDialog)


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/