Interface of the IVF document class. More...
#include <Ivf/IvfDocument.h>
Interface of the IVF document class.
This class provides methods for manipulation of Open Inventor documents.
Note: Although the class name is CIvfDocument, the header file name is IvfDocument.h.
CIvfApp, CIvfArchiveInput, CIvfArchiveOutput, CIvfComponent, CIvfMainFrame
CIvfDocument::CIvfDocument | ( | ) |
CIvfDocument::~CIvfDocument | ( | ) |
void CIvfDocument::AddInlineChild | ( | SoNode * | node, | |
LPTSTR | filename, | |||
void * | cb | |||
) | [protected] |
void CIvfDocument::AddInlineChild | ( | CInlineItem * | ) | [protected] |
following is for inline support rickb
static SoCallbackAction::Response CIvfDocument::CheckForLightsCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoNode * | node | |||
) | [static, protected] |
void CIvfDocument::CleanupScratchFile | ( | LPTSTR | filename | ) | [protected] |
static void CIvfDocument::CountLinesCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoPrimitiveVertex * | , | |||
const SoPrimitiveVertex * | ||||
) | [static, protected] |
static SoCallbackAction::Response CIvfDocument::CountNodesCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoNode * | node | |||
) | [static, protected] |
static void CIvfDocument::CountPointsCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoPrimitiveVertex * | ||||
) | [static, protected] |
void CIvfDocument::CountPrimitives | ( | ) | [protected] |
Counts nodes, triangles, lines, and points in the Doc scene graph (m_pSceneRoot).
static void CIvfDocument::CountTrisCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoPrimitiveVertex * | , | |||
const SoPrimitiveVertex * | , | |||
const SoPrimitiveVertex * | ||||
) | [static, protected] |
void CIvfDocument::DetermineBackgroundColor | ( | const SoInfo * | info | ) | [protected] |
void CIvfDocument::DetermineTitle | ( | const SoInfo * | info | ) | [protected] |
void CIvfDocument::DetermineViewerSpeed | ( | const SoInfo * | info | ) | [protected] |
void CIvfDocument::DetermineViewerType | ( | const SoInfo * | info | ) | [protected] |
LPCTSTR CIvfDocument::GetBaseUrlPath | ( | void | ) | [inline] |
SoType CIvfDocument::getCameraType | ( | ) | [inline] |
Gets the camera type that will be created by the viewer if no cameras are found in the scene graph (see SoPerspectiveCamera and SoOrthographicCamera).
virtual BOOL CIvfDocument::IdleProcessInlines | ( | void | ) | [virtual] |
Called by application OnIdle to process the inline queue.
static SoCallbackAction::Response CIvfDocument::InfoHintCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoNode * | node | |||
) | [static, protected] |
Callbacks used when searching for hints.
BOOL CIvfDocument::IsOKFile | ( | LPTSTR | filename | ) | [protected] |
scratch file management
BOOL CIvfDocument::IsPendingAsyncRequest | ( | CIvfAsyncFile * | pIvfASFile, | |
int & | status | |||
) | [protected] |
This method is called by the file retrieval layer to check if retrieved file is an inline or not.
Processes if in the queue. Returns: TRUE if file was processed as an inline: nothing more should be done with the file. status indicates success/error: 0 = success
void CIvfDocument::IvfAbortAllAsyncFiles | ( | ) |
virtual void CIvfDocument::IvfClearStatCounters | ( | BOOL | bClearAll = FALSE |
) | [virtual] |
Clear the counters.
If ClearAll==FALSE, will not clear node counter (that's usually static per scene).
virtual CIvfAsyncFile* CIvfDocument::IvfCreateAsyncFile | ( | void * | data | ) | [virtual] |
Override this to create an async file object derived from CIvfAsyncFile.
virtual void CIvfDocument::IvfDeleteCameraList | ( | ) | [protected, virtual] |
This method destroys the camera list pointed to by m_pCamList.
All of the cameras contained in the list are unreferenced.
virtual void CIvfDocument::IvfDeleteContents | ( | ) | [virtual] |
This method unrefs the scene graph pointed to by m_pSceneRoot.
virtual void CIvfDocument::IvfDeleteSceneGraph | ( | ) | [virtual] |
This method deletes the scene graph pointed to by m_pSceneRoot.
virtual void CIvfDocument::IvfEnableStatAccumulation | ( | BOOL | bDoAccum | ) | [virtual] |
Enable or disable counter accumulations.
Called by frame on new graph. Override if you want to alter behavior.
virtual void CIvfDocument::IvfFindAnchors | ( | SoGroup * | root | ) | [virtual] |
This method locates all of the SoWWWAnchor nodes in the document object's scene graph and places the path to each node in a list pointed to by m_pAnchorList.
SoCamera* CIvfDocument::IvfGetActiveCamera | ( | int | in_ix = -1 |
) |
This method gets the currently active camera.
int CIvfDocument::IvfGetActiveCameraIX | ( | ) |
SoGroup* CIvfDocument::IvfGetActiveCamParent | ( | ) |
virtual SbColor& CIvfDocument::IvfGetBgColor | ( | void | ) | [virtual] |
SbPList* CIvfDocument::IvfGetCameraList | ( | ) |
virtual LPCTSTR CIvfDocument::IvfGetDocInfoString | ( | void | ) | [virtual] |
SoSeparator* CIvfDocument::IvfGetDocSceneGraph | ( | ) |
IVF_FILETYPE CIvfDocument::IvfGetFileType | ( | void | ) |
int CIvfDocument::IvfGetNumComponents | ( | ) |
return the number of components attached to this document
virtual LPCTSTR CIvfDocument::IvfGetTitleString | ( | void | ) | [virtual] |
virtual LPCTSTR CIvfDocument::IvfGetUrlName | ( | void | ) | [virtual] |
This method retrieves the Url name for this Document.
void CIvfDocument::IvfImportDocument | ( | LPTSTR | PathName | ) |
Opens document and adds it to the current document scene graph.
void CIvfDocument::IvfInitDocument | ( | void * | pCreateArgs | ) |
use this to pass create args to the document
BOOL CIvfDocument::IvfIsAsyncFilesPending | ( | ) |
Call to determine if there are any async files in the queue.
virtual BOOL CIvfDocument::IvfIsEmbedded | ( | ) | [virtual] |
returns whether the document is embedded or not.
if you have access to the IsEmbedded() member from the C(Ole)Document class, use that.
virtual BOOL CIvfDocument::IvfIsInfoSet | ( | void | ) | [virtual] |
This retrieves the DocInfo string if it was set.
int CIvfDocument::IvfIsInlinesPending | ( | ) |
Call to determine if there are any inlines in the queue.
static BOOL CIvfDocument::IvfIsInventorFile | ( | LPCTSTR | lpszFileName | ) | [static] |
This method returns TRUE if the named file is a valid Open Inventor file.
BOOL CIvfDocument::IvfIsOleSrvr | ( | ) |
This method returns TRUE if this application is an OLE server, FALSE otherwise.
virtual BOOL CIvfDocument::IvfIsTitleSet | ( | void | ) | [virtual] |
This method checks the titleHintFound flag and sets the title if it is set.
static SoSeparator* CIvfDocument::IvfLoadSceneGraph | ( | CArchive & | rArchive, | |
CIvfDocument * | ||||
) | [static] |
This method loads from the archive specified by lpFname, and returns a pointer to the scene graph.
The ref count for the returned scene graph is zero. Null is returned if the load fails.
static SoSeparator* CIvfDocument::IvfLoadSceneGraph | ( | UINT | hFile, | |
CIvfDocument * | ||||
) | [static] |
This method loads the file specified by lpFname, and returns a pointer to the scene graph.
The ref count for the returned scene graph is zero. Null is returned if the load fails.
static SoSeparator* CIvfDocument::IvfLoadSceneGraph | ( | LPCTSTR | lpFname, | |
CIvfDocument * | ||||
) | [static] |
This method loads the file specified by lpFname, and returns a pointer to the scene graph.
The ref count for the returned scene graph is zero. Null is returned if the load fails.
virtual void CIvfDocument::IvfOnFetchUrl | ( | LPCTSTR | urlName | ) | [protected, virtual] |
If m_nEnableUrlFetch is TRUE and m_nEnableSelection is FALSE, this method is invoked when a user clicks the mouse button while the cursor is placed over an SoWWWAnchorNode (or one of its children).
When invoked, this method posts the WMIVF_LOADURL registered message to the application frame window. wparam is set to 0, and lparam contains a pointer to a null terminated string containing the URL name.
virtual BOOL CIvfDocument::IvfOnLoadUrlMessage | ( | CIvfAsyncFile * | pIvfASFile | ) | [protected, virtual] |
This method is invoked when it receives the WMIVF_LOADURL registered message.
If urlName points to a local file, The default implementation replaces the document's scene graph with the contents of the file. If urlName does not refer to a local file, the url is referred to a Url retrieval mechanism (currently none).
virtual void CIvfDocument::IvfOnLocationChanged | ( | LPCTSTR | urlName | ) | [virtual] |
This method is invoked by IvfOnLoadUrlMessage to indicate that the location has changed.
An VRML viewer application can use this method to update the location display. The default implementation of this method does nothing.
virtual BOOL CIvfDocument::IvfOnNewDocument | ( | ) | [virtual] |
This method invokes IvfDeleteContents and unrefs the current scene graph.
virtual BOOL CIvfDocument::IvfOnOpenDocument | ( | CArchive & | rArchive | ) | [virtual] |
This method loads a file given an archive object.
The pointer for the scene graph that is produced is stored in m_pSceneRoot.
virtual BOOL CIvfDocument::IvfOnOpenDocument | ( | UINT | hFile | ) | [virtual] |
This method loads a file given file handle.
The pointer for the scene graph that is produced is stored in m_pSceneRoot.
virtual BOOL CIvfDocument::IvfOnOpenDocument | ( | LPCTSTR | lpszPathName | ) | [virtual] |
This method loads a file given a path name.
The pointer for the scene graph that is produced is stored in m_pSceneRoot.
BOOL CIvfDocument::IvfOnOpenDocumentMessage | ( | LPCTSTR | lpszPathName | ) |
Pushthrough message handler from CDocument class Note this is NOT a virtual (You already have control from CDocument derived class).
virtual BOOL CIvfDocument::IvfOnOpenUrl | ( | LPCTSTR | url | ) | [virtual] |
Use this to open a new URL.
virtual BOOL CIvfDocument::IvfOnSaveDocument | ( | CArchive & | rArchive | ) | [virtual] |
This method stores the scene graph pointed to by m_pSceneRoot in the file specified by the argument.
virtual BOOL CIvfDocument::IvfOnSaveDocument | ( | const CFile * | cFile | ) | [virtual] |
This version uses a CFile object.
virtual BOOL CIvfDocument::IvfOnSaveDocument | ( | UINT | hFile | ) | [virtual] |
This method stores the scene graph pointed to by m_pSceneRoot in the file specified by the argument.
virtual BOOL CIvfDocument::IvfOnSaveDocument | ( | LPCTSTR | lpszPathName | ) | [virtual] |
This method stores the scene graph pointed to by m_pSceneRoot in the file specified by the argument.
virtual void CIvfDocument::IvfOnUpdateViewpoints | ( | CCmdUI * | pCmdUI | ) | [virtual] |
This method is invoked by IvfOnCmdMsg to handle update of the viewpoint menu.
virtual void CIvfDocument::IvfPostSave | ( | ) | [virtual] |
This method is invoked by the document object to notify the component that the scene graph save operation has completed.
The component is then free to re-institute any scene graph modifications it has made (i.e. remove all cameras).
virtual void CIvfDocument::IvfPrepareForSave | ( | ) | [virtual] |
This method is invoked by the document object prior to saving the scene graph.
It allows the component to undo any changes it has done to the scene graph.
virtual BOOL CIvfDocument::IvfPreTranslateMessage | ( | MSG * | ) | [virtual] |
This message processes thread specific messages.
InlineQueue messages (WMIVF_PROCPENDINGINLINE) LoadUrl messages (WMIVF_LOADURL)
static SoSeparator* CIvfDocument::IvfReadAll | ( | SoInput * | , | |
CIvfDocument * | ||||
) | [static] |
This method loads the contents of an Open Inventor file.
A pointer to the scene graph is returned. The ref count for the returned scene graph is zero.
void CIvfDocument::IvfRemoveAsyncFile | ( | CIvfAsyncFile * | file | ) |
Use this when done with an async file - removes it from the queue.
virtual void CIvfDocument::IvfRemoveCameras | ( | SoGroup * | root | ) | [protected, virtual] |
This method is invoked from IvfSceneGraphChanged.
It removes all of the cameras contained in the document object's scene graph. The cameras are placed in a list pointed to by m_pCamList. Each of the cameras in the list are referenced.
virtual void CIvfDocument::IvfRemoveUrlFetchCallback | ( | ) | [protected, virtual] |
This method disables IVF's URL fetch callback mechanism.
virtual void CIvfDocument::IvfRemoveViewpointMenu | ( | CCmdUI * | pCmdUI | ) | [virtual] |
Replace the camera specified by the index.
returns the camera that was there, disposition is up to the caller.
virtual void CIvfDocument::IvfRestoreCameras | ( | SoGroup * | root | ) | [protected, virtual] |
This method restores the cameras removed from the document object's scene graph.
static BOOL CIvfDocument::IvfSaveSceneGraph | ( | CArchive & | rArchive, | |
SoSeparator * | pRoot, | |||
CIvfDocument * | ||||
) | [static] |
This method saves the scene graph pointed to by pRoot in the archive specified by rArchive.
If successful, TRUE is returned.
static BOOL CIvfDocument::IvfSaveSceneGraph | ( | SoOutput * | out, | |
SoSeparator * | pRoot, | |||
CIvfDocument * | ||||
) | [static] |
This method saves the scene graph pointed to by pRoot in the file stored in the SoOutput.
If successful, TRUE is returned.
static BOOL CIvfDocument::IvfSaveSceneGraph | ( | UINT | hFile, | |
SoSeparator * | pRoot, | |||
CIvfDocument * | ||||
) | [static] |
This method saves the scene graph pointed to by pRoot in the file specified by hFile.
If successful, TRUE is returned.
static BOOL CIvfDocument::IvfSaveSceneGraph | ( | LPCTSTR | lpFname, | |
SoSeparator * | pRoot, | |||
CIvfDocument * | ||||
) | [static] |
This method saves the scene graph pointed to by pRoot in the file specified by lpFname.
If successful, TRUE is returned.
void CIvfDocument::IvfScanForHints | ( | SoNode * | root | ) | [protected] |
virtual void CIvfDocument::IvfSceneGraphChanged | ( | ) | [virtual] |
This method notifies the view object that the scene graph has changed (but is not necessarily complete - see next).
virtual void CIvfDocument::IvfSceneGraphCompleted | ( | ) | [virtual] |
Called to indicate all the inlines/textures have been retrieved.
virtual void CIvfDocument::IvfScrubInlines | ( | ) | [virtual] |
Forces resolution of inlines and replaces them with separators.
Used in embedded situation.
virtual void CIvfDocument::IvfSetBgColor | ( | const SbColor & | ) | [virtual] |
void CIvfDocument::IvfSetFileHeader | ( | LPCSTR | header | ) | [inline] |
Set the fileHeader.
This is needed for 3SpaceAssistant's reading of a dxf file so that there is a valid fileHeader.
void CIvfDocument::IvfSetFileType | ( | IVF_FILETYPE | ) |
virtual void CIvfDocument::IvfSetSceneGraph | ( | SoSeparator * | pRoot | ) | [virtual] |
This method sets m_pSceneRoot to pRoot.
The scene graph previously pointed to by m_pSceneRoot (if any) is unrefed.
virtual void CIvfDocument::IvfSetupUrlFetchCallback | ( | ) | [protected, virtual] |
This method sets up the mechanism to trigger IvfOnFetchUrl each time the user clicks the left mouse button while the cursor is placed over an SoWWWAnchor node.
This mechanism is put in place only if m_nEnableUrlFetch is TRUE. This method calls SoWWWAnchor::setFetchURLCallBack to set the URL fetch callback to IvfStaticFetchUrlCB. An application should overload this method if a different URL fetch mechanism is desired.
static void CIvfDocument::IvfStaticFetchInlineUrlCB | ( | const SbString & | url, | |
void * | userData, | |||
SoNode * | node | |||
) | [static, protected] |
Same as above, except for SoWWWInline (when inline is traversed).
static BOOL CIvfDocument::IvfStaticFetchTexture2UrlCB | ( | const SbString & | url, | |
void * | userData, | |||
void * | node | |||
) | [static, protected] |
static void CIvfDocument::IvfStaticFetchUrlCB | ( | const SbString & | url, | |
void * | userData, | |||
SoWWWAnchor * | node | |||
) | [static, protected] |
This method is invoked by SoWWWAnchor when the user clicks on a URL.
If m_nEnableUrlFetch is TRUE and m_nEnableSelection is FALSE, this method invokes IvfOnFetchUrl.
void CIvfDocument::IvfUpdateHeadlightHint | ( | BOOL | bOn | ) |
Add a headlight hint and set the contents to the value passed.
virtual void CIvfDocument::IvfUpdateTitle | ( | void | ) | [virtual] |
LPTSTR CIvfDocument::MakeFullUrlPath | ( | LPTSTR | out_url, | |
LPCTSTR | in_url | |||
) | [protected] |
BOOL CIvfDocument::MakeScratchName | ( | LPTSTR | new_path, | |
LPTSTR | filename | |||
) | [protected] |
static SoCallbackAction::Response CIvfDocument::NavInfoCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoNode * | node | |||
) | [static, protected] |
virtual void CIvfDocument::OnFileViewInfo | ( | void | ) | [virtual] |
This processes the OnFileViewInfo (forwarded from the application).
void CIvfDocument::OnProcessPendingInline | ( | WPARAM | , | |
LPARAM | ||||
) | [protected] |
called to process the WMIVF_PROCPENDINGINLINE message
void CIvfDocument::OpenLocalAsyncDoc | ( | CIvfAsyncFile * | ) | [protected] |
called when the async file is local (or resolved)
void CIvfDocument::PostInlineLocation | ( | SoNode * | , | |
LPTSTR | , | |||
void * | ||||
) | [protected] |
void CIvfDocument::ProcessPendingTexture2 | ( | CInlineItem * | , | |
BOOL | ||||
) | [protected] |
void CIvfDocument::SetBaseUrlPath | ( | LPCTSTR | b_path | ) |
virtual void CIvfDocument::setCameraType | ( | SoType | type | ) | [virtual] |
Sets the camera type that will be created if no cameras are found in the scene graph (see SoPerspectiveCamera and SoOrthographicCamera).
By default an SoPerspectiveCamera will be created if no cameras are found.
Note: The set method will only take effect the next time a scene graph is loaded (and if no cameras are found).
static SoCallbackAction::Response CIvfDocument::VRMLInlineCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoNode * | node | |||
) | [static, protected] |
static SoCallbackAction::Response CIvfDocument::WorldInfoCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoNode * | node | |||
) | [static, protected] |
static SoCallbackAction::Response CIvfDocument::WWWInlineCB | ( | void * | userData, | |
SoCallbackAction * | action, | |||
const SoNode * | node | |||
) | [static, protected] |
BOOL CIvfDocument::anyLightsSet [static, protected] |
BOOL CIvfDocument::autoClipOffHintSet [static, protected] |
SbString * CIvfDocument::docInfoString [protected] |
BOOL CIvfDocument::IVOpenError [protected] |
TCHAR* CIvfDocument::lcl_scratch_filename[MAX_SCRATCH_FILES] [protected] |
TCHAR CIvfDocument::m_BasePath[IVF_MAX_URL_NAME_LENGTH] [protected] |
BOOL CIvfDocument::m_bBasePathPreset [protected] |
BOOL CIvfDocument::m_bContainsInlines [protected] |
BOOL CIvfDocument::m_bDefHeadlightVal [protected] |
BOOL CIvfDocument::m_bDocInfoSet [protected] |
Indicates if there is/are SoVRMLTouchSensor(s) in the scene graph.
BOOL CIvfDocument::m_bNewGraphPrepped [protected] |
BOOL CIvfDocument::m_bSaveAsBinary [protected] |
BOOL CIvfDocument::m_bSceneGraphComplete [protected] |
BOOL CIvfDocument::m_bTitleHintSet [protected] |
SoType CIvfDocument::m_cameraType [protected] |
char CIvfDocument::m_fileHeader[256] [protected] |
IVF_FILETYPE CIvfDocument::m_fileType [protected] |
type of file to output.
default is IVF_FILETYPE_IV
int CIvfDocument::m_nActiveCameraIX [protected] |
index to the active camera
BOOL CIvfDocument::m_nEnableUrlDisplay [protected] |
flag that enables URL display mechanism
BOOL CIvfDocument::m_nEnableUrlFetch [protected] |
flag that enables url fetching
BOOL CIvfDocument::m_nEnableViewpoints [protected] |
flag that enables the viewpoint menu
Scene graph stat values.
These are public for anyone to get to.
TCHAR CIvfDocument::m_OriginalPath[IVF_MAX_URL_NAME_LENGTH] [protected] |
SoPathList* CIvfDocument::m_pAnchorList [protected] |
a list of paths to all of the SoWWWAnchor nodes in the scene graph.
CAsyncFileQueue* CIvfDocument::m_pAsyncQueue [protected] |
SoInfo* CIvfDocument::m_pBackColorInfo [protected] |
saved background color & headlight node
SoSwitch* CIvfDocument::m_pCameraSwitch [protected] |
These contain info about any contained camera switches.
SoInfo* CIvfDocument::m_pCameraSwitchInfo [protected] |
SoGroup* CIvfDocument::m_pCameraSwitchParent [protected] |
SbPList* CIvfDocument::m_pCamList [protected] |
pointer to a list of the cameras removed from the scene graph.
SbPList* CIvfDocument::m_pCamParentList [protected] |
pointer to the parent of each camera in m_pCamList.
Used to restore the cameras.
SoGroup* CIvfDocument::m_pDefaultCameraGroup [protected] |
Do NOT expect this to hang around.
This is used as very very temporary storage internally to save the default camera group between IvfRestoreCameras and IvfRemoveCameras. allows us to keep the definition for restoral even though it isn't being stored with the scene graph (!Embedded condition)
SoInfo * CIvfDocument::m_pHLInfo [protected] |
SbPList* CIvfDocument::m_pInfoList [protected] |
pointer to info nodes used as place holders in the scene graph to mark the location we removed the cameras from.
CInlineQueue* CIvfDocument::m_pInlineQueue [protected] |
SoSeparator* CIvfDocument::m_pSceneRoot [protected] |
pointer to the root of the scene graph
SoInfo* CIvfDocument::m_pVPWindowSize [protected] |
SoGroup* CIvfDocument::m_pVPWindowSizePar [protected] |
saved viewport window size and parent
BOOL CIvfDocument::m_queueingOff [static] |
TCHAR CIvfDocument::m_StaticPath[IVF_MAX_URL_NAME_LENGTH] [static] |
TCHAR CIvfDocument::m_urlName[IVF_MAX_URL_NAME_LENGTH] [protected] |
buffer used by IvfLoc2Callback to keep track of the the most recent URL name.
float CIvfDocument::motionSpeedHintVal [protected] |
member version
int CIvfDocument::n_scratch_files [protected] |
SbString* CIvfDocument::sceneTitle [protected] |
BOOL CIvfDocument::titleHintSet [static, protected] |
BOOL CIvfDocument::viewerSpeedHintSet [static, protected] |
probably never need more than one, but this will provide for future capability, if needed
Following is for hints support