Copyright: Copyright © Template Graphics Software, Inc.


About TGS

The Standard in Graphics Tools

TGS is a leading supplier of software products that facilitate the use of interactive 3D graphics on PC and UNIX systems. These products include those targeting professional developers, as well as Small Office/Home Office, designers, Webmasters and desktop publishers. TGS products support industry standards, including Java, ActiveX, OpenGL and VRML, which TGS helped to pioneer.

In April 1995, TGS implemented the first-ever Internet 3D VRML browser for the PC, WebSpace Navigator, and gained the endorsement of over 17 major Internet software and hardware companies, including Netscape and Spyglass, to establish Open Inventor as the basis for VRML. TGS quickly delivered professional 3D C++ and ActiveX developer tools for 3D/VRML under the 3D-MasterSuite for Open Inventor family, gaining distribution agreements with Microsoft Corporation, Sun, HP and others.

TGS application products enable the creation and use of 3D graphics, ranging from LiveWork 3D, a 3D art add-on for Microsoft Office; 3Space Publisher, a drag-and-drop graphics creation application for Webmasters and desktop publishers; to Amapi, a NURBS modeling application for designers.

TGS Inc. sells its products worldwide through a direct sales force located in offices across North America and Europe. TGS Europe provides local and distribution support for Europe. Many of TGS's products are also available through popular Internet distributors. Customers can also download many of the TGS products directly from the TGS and TGS Europe web sites, at http://www.tgs.com and http://www.europe.tgs.com.

TGS maintains development and customer support centers at its TGS world headquarters in San Diego, Calif., and TGS Europe headquarters in Bordeaux, France.

Sales Contacts	TGS, Inc Template Graphics Software, Inc. 5330 Carroll Canyon Road, Suite 201 San Diego, CA 92121 Tel: (800) 544-4847 Tel: (858) 457-5359 Fax: (858) 452-2547 E-mail: info@tgs.com For the most current contact information, check the TGS website at: WWW: http://www.tgs.com	TGS Europe  TGS Europe, S.A. 18 Avenue Francois Sommer 92167 Antony Cedex Paris, France Tel: (33)-1-4237-66-66 Fax: (33)-1-4237-27-15 E-mail: europe@tgs.com For the most current contact information, check the TGS Europe website at: WWW: http://www.europe.tgs.com


Actions

SoAction	Abstract base class for all actions
SoBevelAction	Creates a scene graph containing beveled shapes
SoCallbackAction	Performs a generic traversal of the scene graph
SoGetBoundingBoxAction	Computes bounding box of a scene
SoGetMatrixAction	Computes transformation matrix for subgraph
SoGetPrimitiveCountAction	Counts number of primitives in scene
SoGlobalSimplifyAction	Traverses the scene graph and collects all the triangles in a single list, which is simplified
SoGLRenderAction	Renders a scene graph using OpenGL
SoHandleEventAction	Allows nodes in a graph to receive input events
SoIntersectionDetectionAction	Class to detect intersections
SoPickAction	Abstract base class for picking objects in a scene
SoRayPickAction	Intersects objects with a ray cast into scene
SoReorganizeAction	Reorganizes the scene graph by grouping shapes with common properties, then groups these shapes in a single shape and runs the simplifier on it
SoSearchAction	Searches for nodes in a scene graph
SoSearchPathAction	Searches for a node in a scene graph using a sequence of search criteria
SoShapeSimplifyAction	Simplify action that replaces shapes within a scene graph with versions that contain fewer triangles
SoSimplifyAction	Abstract base class for simplifying scene graphs
SoToHTMLAction	Generates an image map and an image from a scene graph
SoToVRML2Action	Converts an Open Inventor scene graph into a VRML 2.0-style scene graph
SoToVRMLAction	Converts an Open Inventor scene graph into a VRML 1.0-style scene graph
SoToZ3DAction	Generates a Z3D file from a scene graph
SoWriteAction	Writes a scene graph to a file


Basics

SbBool	Boolean type
SbBox2f	2D box class
SbBox2s	2D box class
SbBox3f	3D box class
SbColor	Color vector class
SbCylinder	Class for representing a cylinder
SbLine	Directed line in 3D
SbMatrix	4x4 matrix class
SbMatrixd	4x4 matrix class (double precision)
SbName	Character string stored in a hash table
SbPList	List of generic (void *) pointers
SbPlane	Oriented plane in 3D
SbRotation	Class for representing a rotation
SbRotationd	Class for representing a rotation (double precision)
SbSphere	Class for representing a sphere
SbString	Class for smart character strings
SbTime	Class for representation of a time
SbVec2d	2D vector class (double precision)
SbVec2f	2D vector class
SbVec2s	2D vector class
SbVec3d	3D vector class (double precision)
SbVec3f	3D vector class
SbVec3s	3D vector class
SbVec4d	4D vector class (double precision)
SbVec4f	4D vector class
SbViewVolume	Viewing volume class
SbViewportRegion	Class for representing a viewport
SbXfBox3f	3D box with an associated transformation matrix


CIvfApp

NAME

CIvfApp - interface of the IVF application class

INHERITS FROM

None

DESCRIPTION

This class provides methods for initialization of Open Inventor and the IVF Class library.

Note: Although the class name is CIvfApp, the header file name is IvfApp.h.

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

pCreateArgs	[0] =	Enable viewer decorations (default = TRUE)
If enabled, the viewer decorations (thumbwheels, etc.) are turned on.

[1] =	Enable display of URL (default = FALSE)
If enabled, IvfOnUrlDisplayChanged will be called.

[2] =	Enable viewpoints menu (default = FALSE)
If enabled, a Viewpoints menu will be added to the menu bar.

[3] =	Enable URL fetch callback (default = FALSE)
If enabled, IvfOnFetchUrl will be called.

TYPES

typedef CIvfComponent * (*IvfCvtAfxViewProc)(CView *)

This type defines the interface for the application-supplied conversion method that converts an MFC CView object pointer into an IVF CIvfComponent Object pointer.

typedef CView * (*IvfCvtIvfComponentProc)(CIvfComponent *)

This type defines the interface for the application-supplied conversion method that converts an IVF CIvfComponent Object pointer into an MFC CView object pointer.

typedef CIvfComponent * (*IvfCvtAfxWndProc)(CWnd *)

This type defines the interface for the application-supplied conversion method that converts an MFC CWnd object pointer into an IVF CIvfComponent Object pointer.

typedef CWnd * (*IvfCvtIvfComponentProcW)(CIvfComponent *)

This type defines the interface for the application-supplied conversion method that converts an IVF CIvfComponent Object pointer into an MFC CWnd object pointer.

typedef CIvfDocument * (*IvfCvtAfxDocProc)(CDocument *)

This type defines the interface for the application-supplied conversion method that converts an MFC CDocument object pointer into an IVF CIvfDocument Object pointer.

typedef CDocument * (*IvfCvtIvfDocProc)(CIvfDocument *)

This type defines the interface for the application supplied conversion method that converts an IVF CIvfDocument Object pointer into an MFC CDocument object pointer.

typedef CIvfMainFrame * (*IvfCvtAfxFrameProc)(CFrameWnd *pFrame)

This type defines the interface for the application-supplied conversion method that converts an MFC CFrameWnd object pointer into an IVF CIvfMainFrame Object pointer.

METHODS

CIvfApp()

~CIvfApp()

Constructor and destructor.

static void	IvfInitInstance(
CWinApp *	pApp,
CIvfApp *	pIvfApp,
IvfCvtAfxViewProc	pAfxViewProc,
IvfCvtIvfComponentProc	pIvfComponentProc,
IvfCvtAfxWndProc	pAfxWndProc,
IvfCvtIvfComponentProcWpIvfComponentProcW,
IvfCvtAfxDocProc	pAfxDocProc,
IvfCvtIvfDocProc	pIvfDocProc,
IvfCvtAfxFrameProc	pAfxFrameProc,
void *	pCreateArgs,
BOOL	nCreateComponent)

This method initializes the IVF class library. It is called from InitInstance in the MFC application object.

static void	IvfExitInstance()

This method releases any resources allocated by Ivf

static void	IvfOnIdle(LONG lCount)

This method connects MFC's Idle processing to the SoWin component library's delay queue processing mechanism.

static void	IvfInitSoWin(CWnd *pTopLevel)

This method is used to initialize the SoWin component library.

static CIvfApp *	IvfGetApp()

This method returns a pointer to the application object.

static CDocTemplate *	IvfGetDocTemplate()

This method returns a pointer to the application document template object.

static CIvfDocument *	IvfGetDocument(CIvfComponent *pIvfComponent = NULL)

Given a pointer to an IVF component object, this method will return a pointer to the corresponding IVF document object. If the argument is NULL, the document corresponding to the active component is returned. If the application is an MFC dialog based application, this method returns NULL.

static CIvfComponent *	IvfGetComponent(CIvfDocument *pIvfDoc = NULL)

Given a pointer to an IVF document object, this method will return a pointer to the corresponding IVF component object. The corresponding component is derived by locating the active MFC view associated with the document, and converting the MFC view pointer to an IVF component pointer using the application supplied conversion method.

static CFrameWnd *	IvfGetAfxFrame(CIvfComponent *pIvfComponent = NULL)

static CIvfMainFrame *	IvfGetIvfFrame()

This method returns a pointer to the application frame window.

static CView *	IvfGetAfxView(CIvfComponent *pIvfComponent = NULL)

Given a pointer to an IVF component object, this method calls the application-supplied conversion method to perform a type safe cast down to the application view class and then a cast up to the MFC view class. A pointer to the MFC view object corresponding to the IVF component object is returned. If the argument is NULL, a pointer to the active view is returned. If the application is dialog based, this method returns NULL.

static CWnd *	IvfGetAfxWnd(CIvfComponent *pIvfComponent = NULL)

Given a pointer to an IVF component object, this method calls the application-supplied conversion method to perform a type safe cast down to the application window class and then a cast up to the MFC window class. A pointer to the MFC window object corresponding to the IVF component object is returned. If the argument is NULL, a pointer to the active component is returned. If the application is not dialog based, this method returns NULL.

static CDocument *	IvfGetAfxDocument(CIvfComponent *pIvfComponent = NULL)

Given a pointer to an IVF component object, this method first locates the corresponding IVF document object. It then calls the application supplied conversion method to perform a type safe cast of the IVF document object pointer down to the application document class and then a cast up to the MFC document class. A pointer to the MFC document object corresponding to the IVF component object is returned. If the argument is NULL, a pointer to the document object corresponding to the active MFC view is returned. If the application is dialog based, this method returns NULL.

static CDocument *	IvfGetAfxDocument(CIvfDocument *pIvfDoc)

Given a pointer to an IVF document object, calls the application-supplied conversion method to perform a type safe cast of the IVF document object pointer down to the application document class, and then a cast up to the MFC document class. A pointer to the MFC document object corresponding to the IVF document object is returned.

static CIvfComponent *	ToIvfComponent(CView *pAfxView)

This method invokes the application-supplied conversion method to convert an MFC view object pointer into an IVF component object pointer. If the application is dialog based, NULL is returned.

static CView *	ToAfxView(CIvfComponent *pIvfComponent)

This method invokes the application-supplied conversion method to convert an IVF component object pointer into an MFC view object pointer. If the application is dialog based, NULL is returned.

static CIvfComponent *	ToIvfComponentW(CWnd *pAfxWnd)

This method invokes the application-supplied conversion method to convert an MFC window object pointer into an IVF component object pointer. If the application is not dialog based, NULL is returned.

static CWnd *	ToAfxWnd(CIvfComponent *pIvfComponent)

This method invokes the application-supplied conversion method to convert an IVF component object pointer into an MFC window object pointer. If the application is not dialog based, NULL is returned.

static CIvfDocument *	ToIvfDocument(CDocument *pAfxDoc)

This method invokes the application-supplied conversion method to convert an MFC document object pointer into an IVF document object pointer. If the application is a dialog based, NULL is returned.

static CDocument *	ToAfxDocument(CIvfDocument *pIvfDoc)

static CIvfMainFrame *	ToIvfFrame(CFrameWnd *pFrame)

This method invokes the application-supplied conversion method to convert an IVF document object pointer into an MFC document object pointer. If the application is a dialog based, NULL is returned.

static void *	IvfCreateArgs()

This method returns a pointer to the arguments passed to the of the IVF view class for component creation.

static BOOL 	IvfIsMdi()

This method returns a Boolean that indicates if this an MDI application.

static BOOL	IvfIsIvfComponent(CView *pAfxView)

Check if a CView object is derived from CIvfComponent

static void	IvfAddToIvfComponentList(CView *pAfxView)

Utility routine to add view to the list of IVF views. Not all views in an IVF application have to be derived from CIvfComponent. To distinguish between IVF and Non-IVF views, we keep a list of all IVF views.

static void	IvfRemoveFromIvfComponentList(CView *pAfxView)

Remove a view from the IVF view list.

MEMBER VARIABLES

static __IvfStaticImport CIvfApp *	m_pApp

Pointer to the IVF application object

static __IvfStaticImport CDocTemplate *	m_pDocTemplate

Pointer to the application document template object

static __IvfStaticImport void *	m_pCreateArgs

Pointer to the arguments for SoWin component creation

static __IvfStaticImport BOOL	m_nMDI

MDI flag

MACROS

#define IVF_INIT_INSTANCE
(pApp, IvfCvtAfxView, IvfCvtIvfComponent, IvfCvtAfxWnd, IvfCvtIvfComponentW, IvfCvtAfxDoc, IvfCvtIvfDoc, IvfCvtAfxFrame, pCreateArgs, nCreateVwr) \
{ \
CIvfApp::IvfInitInstance( \
pApp,\
pApp,\
IvfCvtAfxView, \
IvfCvtIvfComponent, \
IvfCvtAfxWnd, \
IvfCvtIvfComponentW, \
IvfCvtAfxDoc, \
IvfCvtIvfDoc, \
IvfCvtAfxFrame,\
pCreateArgs, \
nCreateVwr); \
}

This macro is invoked from the MFC application objects InitInstance method. It invokes the CIvfApp method IvfInitInstance to initialize IVF.

#define IVF_AFX_CONVERSION_METHOD (AppViewClassName, AppDocClassName)

This macro is used to define the type safe conversion methods for view-based applications. See the header file for details.

#define IVF_AFX_WND_CONVERSION_METHOD(AppWndClassName)

This macro is used to define the type safe conversion methods for dialog-based applications. See the header file for details.

SEE ALSO

CIvfArchiveInput, CIvfArchiveOutput, CIvfComponent, CIvfDocument, CIvfMainFrame


CIvfArchiveInput

NAME

CIvfArchiveInput - interface of the IVF archive input class

INHERITS FROM

None

DESCRIPTION

SoInput derived class to handle performing input on MFC CArchive objects.

Note: Although the class name is CIvfArchiveInput, the header file name is IvfArchiveInput.h.

METHODS

CIvfArchiveInput()

CIvfArchiveInput(CArchive *ar)

virtual	~CIvfArchiveInput()

Constructors and destructors.

virtual SbBool	get(char &c)

Reads next character from current file/buffer. Returns FALSE on EOF or error.

virtual SbBool	read(char &c)

virtual SbBool	read(SbString &s)

virtual SbBool	read(SbName &n, SbBool validIdent = FALSE)

virtual SbBool	read(int &i)

virtual SbBool	read(unsigned int &i)

virtual SbBool	read(short &s)

virtual SbBool	read(unsigned short &s)

virtual SbBool	read(float &f)

virtual SbBool	read(double &d)

virtual SbBool	readBinaryArray(int32_t *l, int length)

virtual SbBool	readBinaryArray(float *f, int length)

virtual SbBool	readBinaryArray(double *d, int length)

Reads item of particular type from current file pointer/buffer. All skip white space before reading and return FALSE on EOF or if item could not be read.

virtual SbBool	eof() const

Returns TRUE if current file/buffer is at EOF

virtual void	putBack(char c)

virtual void	putBack(const char *string)

Puts a just-read character or string back in input stream/buffer

virtual SbBool	getASCIIFile(char &c)

Reads next ASCII character from current file. Returns FALSE on EOF or error.

SEE ALSO

CIvfApp, CIvfArchiveOutput, CIvfComponent, CIvfDocument, CIvfMainFrame


CIvfArchiveOutput

NAME

CIvfArchiveOutput - interface of the IVF archive output class

INHERITS FROM

None

DESCRIPTION

SoOutput derived class to handle performing output on MFC CArchive objects.

Note: Although the class name is CIvfArchiveOutput, the header file name is IvfArchiveOutput.h.

METHODS

CIvfArchiveOutput()

CIvfArchiveOutput(CArchive *ar)

virtual	~CIvfArchiveOutput()

Constructors and destructor.

CArchive *	getArchive()

virtual void	closeFile()

virtual void	flushFile()

virtual void	write(char c)

virtual void	write(const char *s)

virtual void	write(const SbString &s)

virtual void	write(const SbName &n)

virtual void	write(int i)

virtual void	write(unsigned int i)

virtual void	write(short s)

virtual void	write(unsigned short s)

virtual void	write(float f)

virtual void	write(double d)

virtual void	writeBinaryArray(int32_t *l, int length)

virtual void	writeBinaryArray(float *f, int length)

virtual void	writeBinaryArray(double *d, int length)

SEE ALSO

CIvfApp, CIvfArchiveInput, CIvfComponent, CIvfDocument, CIvfMainFrame


CIvfComponent

NAME

CIvfComponent - interface of the IVF component class

INHERITS FROM

None

DESCRIPTION

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.

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

pCreateArgs	[0] =	Enable viewer decorations (default = TRUE)
If enabled, the viewer decorations (thumbwheels, etc.) are turned on.

[1] =	Enable display of URL (default = FALSE)
If enabled, IvfOnUrlDisplayChanged will be called.

[2] =	Enable viewpoints menu (default = FALSE)
If enabled, a Viewpoints menu will be added to the menu bar.

[3] =	Enable URL fetch callback (default = FALSE)
If enabled, IvfOnFetchUrl will be called.

METHODS

CIvfComponent()

Constructor.

virtual SoSelection *	IvfGetSelectionNode()

Get the active selection.

virtual void 	IvfCreateComponent(CWnd *pWnd,
void *pCreateArgs=NULL) = 0

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.

virtual SoWinClipboard *	IvfGetClipboard()

This method returns the clipboard contained in the components

virtual void 	IvfDestroyComponent()

This method destroys the component.

virtual SoWinComponent	*IvfGetComponent()

This method returns a pointer to the component.

void	IvfResetComponent(CIvfDocument *pDoc)

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

virtual BOOL	IvfIsSelected()

Is a selection active

void	IvfViewmodesSelectionmode()

void	IvfViewmodesViewingmode()

Set the mode to selection or viewing

virtual void	IvfSetSceneGraph(SoNode *pRoot) = 0

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

virtual SoNode *	IvfGetSceneGraph()=0

This method returns the scene graph contained in the component.

virtual void	IvfReleaseSceneGraph() = 0

This method causes the component to unreference its scene graph.

virtual void	IvfSetBackgroundColor(SbColor &) = 0

Set the background color

virtual void	IvfSetHeadlight(BOOL) = 0

Set the headlight color

virtual void	IvfSetActiveCamera(int nCamera)

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

virtual void	IvfSetActiveCamera(SoCamera *pCam)=0

Set the component's camera to pCam.

virtual SoCamera*	IvfGetActiveCamera()=0

Return a pointer to the component's camera.

virtual void	IvfSaveHomePosition()=0

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

virtual void	IvfResetToHomePosition()=0

Move the component's camera to the home position.

virtual void	IvfViewAll()=0

Perform a viewAll on the component's scene graph.

virtual const SbViewportRegion &IvfGetViewportRegion()=0

Get the component's viewport region.

virtual SoSceneManager *	IvfGetSceneManager()=0

Get the component's scene manager

virtual BOOL	IvfIsViewing()=0

Query component's viewing status

virtual void	IvfSetViewing(BOOL flag)=0

Set component's viewing status

METHODS (Protected)

virtual void	IvfSceneGraphChanged()

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

void	IvfOnBeginPrinting()

void	IvfOnPrint(CDC *)

void	IvfOnEndPrinting()

These handle printing.

BOOL	IvfSaveAsBitmap(LPCTSTR pFilename)

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

virtual void	IvfOnSelection(SoPath *)

virtual void	IvfOnDeSelection(SoPath *)

static void	IvfStaticSelectionCB(void *, SoPath *)

static void	IvfStaticDeSelectionCB(void *, SoPath *)

These are called on selection and deselection.

virtual void	IvfRemoveManips(void)

virtual void	IvfRestoreManips(void)

These functions prune and restore manipulators from and to the scene graph. Used before saving to storage, clipboard, etc.

void	IvfOnEditCopy()

void	IvfOnUpdateEditCopy(CCmdUI* pCmdUI)

void	IvfOnEditCut()

void	IvfOnUpdateEditCut(CCmdUI* pCmdUI)

void	IvfOnEditPaste()

void	IvfOnUpdateEditPaste(CCmdUI* pCmdUI)

void	IvfOnUpdateEditUndo(CCmdUI* pCmdUI)

Direct support for cut/paste operations

virtual void	IvfOnSelectViewpoint(int nCamera)

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.

virtual void 	IvfOnUrlDisplayChanged(const char *urlName)

If m_nEnableUrlDisplay is TRUE, this method is invoked every time the mouse cursor passes over an SoWWWAnchor node, and every time 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 SoPath *	IvfOnSelectionPick(const SoPickedPoint *pick )

If the component contains a scene graph that has an 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	IvfOnViewAnchor(SoPath *pPath)

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	IvfOnSelectionEnable()

void	IvfOnUpdateSelectionEnable(CCmdUI* pCmdUI)

Enable/disable selections.

static void	IvfErrorCallback( const SoError *error, void *data)

This method is invoked when an error is encountered. A dialog containing the error message is displayed.

virtual void	IvfPrePasteAction()

virtual void	IvfPostPasteAction()

virtual void	IvfPreCopyAction()

virtual void	IvfPostCopyAction()

virtual void	IvfPreCutAction()

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

virtual	~CIvfComponent()

Destructor.

virtual void	IvfSetupUrlDisplayCallback(SoGroup *root)

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	IvfRemoveUrlDisplayCallback(SoGroup *root)

This method removes the SoEventCallback node from the scene graph.

virtual void	IvfLoc2Callback( void *userData, SoEventCallback *node)

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.

static void	IvfStaticLoc2Callback( void *userData, SoEventCallback *node)

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.

virtual void	IvfSetupSelectionPickCallback()

This method sets the selection pick filter callback to IvfStaticSelectionPickCB.

virtual void	IvfRemoveSelectionPickCallback()

This method sets the selection pick filter callback to NULL.

static SoPath *	IvfStaticSelectionPickCB( void *userData, const SoPickedPoint *pick)

These methods are invoked when the user picks a node in the scene graph.  IvfOnSelectionPick is the instance version called by IvfStaticSelectionPickCB.

static void	IvfPasteDoneCB(void *userData, SoPathList *pathList)

void	IvfPasteDone(SoPathList *pathList)

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).

void	IvfDestroySelectedObjects()

This is the implementation of the cut method.

virtual void	IvfOnDestroy()

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

virtual void	IvfOnPaint()

Paint message handler.

virtual void	IvfOnCreate(LPCREATESTRUCT lpCreateStruc)

This method is called when the view object is created.

virtual void	IvfOnInitialUpdate(CWnd *pWnd)

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

virtual void	IvfOnActivateComponent(CView *pActivateView = NULL)

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

virtual void	IvfOnDeactivateComponent()

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

virtual BOOL	IvfOnCommand(WPARAM wParam, LPARAM lParam)

This method is used to route commands to the SoWin component. TRUE is returned if the command is processed, FALSE otherwise.

virtual BOOL	IvfOnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)

This method is used to route command messages to the component. TRUE is returned if the command is processed, FALSE otherwise.

virtual void	IvfOnSelectViewAnchors()

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 BOOL	IvfIsViewpointMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)

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

virtual BOOL	IvfIsSceneViewer()

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

MEMBER VARIABLES

SoWinComponent *	m_pComponent

Pointer to the SoWin Component

void *	m_pCreateArgs

Pointer to the component creation arguments

SoWinClipboard *	m_pClipboard

SoSelection *	m_pSelection

Clipboard and selection now available to all viewers.

SoOffscreenRenderer *	m_pOffscreen

Offscreen renderer is used for printing

CWnd *	m_pWnd

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)

SoEventCallback *	m_pEventCB

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

BOOL	m_nEnableSelection

Flag that enables node selection (highlighting)

BOOL	m_bBgColorChangedSet

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

ENUMS

enum IvfViewerType	{
IVF_NONE,
IVF_WALK,
IVF_EXAMINER
}

MACROS

#define IVF_COMPONENT_BASE()

This macro is used by classes derived from CIvfComponent for convenient declaration of the minimum set of methods that must be defined by the derived class.  These are all of the methods that are declared as pure virtual functions in CIvfComponent.See the header file for details.

SEE ALSO

CIvfApp, CIvfArchiveInput, CIvfArchiveOutput, CIvfDocument, CIvfMainFrame


CIvfDocument

NAME

CIvfDocument - interface of the IVF document class

INHERITS FROM

None

DESCRIPTION

This class provides methods for manipulation of Open Inventor documents.

Note: Although the class name is CIvfDocument, the header file name is IvfDocument.h.

METHODS

CIvfDocument()

~CIvfDocument()

Constructor and destructor.

void	IvfSetFileHeader(LPCTSTR header)

The method allows the programmer to specify a custom header string. This feature could be used to add additional text to one of the standard header strings

virtual BOOL 	IvfOnNewDocument()

This method invokes IvfDeleteContents and unrefs the current scene graph.

virtual BOOL 	IvfOnOpenDocument(LPCTSTR lpszPathName)

This method loads a file given a path name. The pointer for the scene graph that is produced is stored in m_pSceneRoot.

virtual BOOL 	IvfOnSaveDocument(LPCTSTR lpszPathName)

This method stores the scene graph pointed to by m_pSceneRoot in the file specified by the argument.

virtual BOOL 	IvfOnOpenDocument(UINT hFile)

This method loads a file given file handle. The pointer for the scene graph that is produced is stored in m_pSceneRoot.

virtual BOOL 	IvfOnSaveDocument(UINT hFile)

This method stores the scene graph pointed to by m_pSceneRoot in the file specified by the argument.

virtual BOOL	IvfOnOpenDocument(CArchive &rArchive)

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	IvfOnSaveDocument(CArchive &rArchive)

This method stores the scene graph pointed to by m_pSceneRoot in the file specified by the argument.

BOOL	IvfOnOpenDocumentMessage(LPCTSTR lpszPathName)

Pushthrough message handler from CDocument class. Note this is NOT a virtual (You already have control from CDocument derived class)

void	IvfImportDocument(char *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.

virtual void	IvfDeleteContents()

This method unrefs the scene graph pointed to by m_pSceneRoot

virtual const char *	IvfGetUrlName(void)

This method retrieves the Url name for this Document

virtual BOOL	IvfIsTitleSet(void)

virtual void	IvfUpdateTitle(void)

virtual const char *	IvfGetTitleString(void)

This method checks the titleHintFound flag and sets the title if it is set.

virtual BOOL	IvfIsInfoSet(void)

virtual const char *	IvfGetDocInfoString(void)

This retrieves the DocInfo string if it was set.

virtual void	OnFileViewInfo(void)

This processes the OnFileViewInfo (forwarded from the application)

virtual void	IvfSetSceneGraph(SoSeparator *pRoot)

SoSeparator *	IvfGetDocSceneGraph()

This method sets m_pSceneRoot to pRoot. The scene graph previously pointed to by m_pSceneRoot (if any) is unrefed.

SoCamera *	IvfGetActiveCamera(int in_ix = -1)

SoGroup *	IvfGetActiveCamParent(void)

This method gets the currently active camera

SoCamera *	IvfReplaceCamera(SoCamera *cam, int ix)

Replace the camera specified by the index. Returns the camera that was there, disposition is up to the caller.

virtual void	IvfPrepareForSave()

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 void	IvfPostSave()

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	IvfFindAnchors(SoGroup *root)

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.

BOOL 	IvfIsOleSrvr()

This method returns TRUE if this application is an OLE server, FALSE otherwise.

static SoSeparator*	IvfReadAll(SoInput *, CIvfDocument *)

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.

static BOOL	IvfSaveSceneGraph(LPCTSTR lpFname, SoSeparator *pRoot, CIvfDocument *)

This method saves the scene graph pointed to by pRoot in the file specified by lpFname. If successful, TRUE is returned.

static SoSeparator *	IvfLoadSceneGraph(LPCTSTR lpFname, CIvfDocument *)

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 BOOL	IvfSaveSceneGraph(UINT hFile, SoSeparator *pRoot, CIvfDocument *)

This method saves the scene graph pointed to by pRoot in the file specified by hFile. If successful, TRUE is returned.

static SoSeparator *	IvfLoadSceneGraph(UINT hFile, CIvfDocument *)

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 BOOL	IvfSaveSceneGraph(CArchive &rArchive, SoSeparator *pRoot, CIvfDocument *)

This method saves the scene graph pointed to by pRoot in the archive specified by rArchive. If successful, TRUE is returned.

static SoSeparator *	IvfLoadSceneGraph(CArchive &rArchive, CIvfDocument *)

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.

virtual void	IvfDeleteSceneGraph()

This method deletes the scene graph pointed to by m_pSceneRoot.

virtual void	IvfSceneGraphChanged()

This method notifies the view object that the scene graph has changed.

virtual void	IvfOnLocationChanged(const char *urlName)

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 void	IvfOnUpdateViewpoints(CCmdUI* pCmdUI)

virtual void	IvfRemoveViewpointMenu(CCmdUI* pCmdUI)

This method is invoked by IvfOnCmdMsg to handle update of the viewpoint menu.

BOOL	IdleProcessInlines(void)

Called by application OnIdle to process the inline queue.

static BOOL	IvfIsInventorFile(LPCSTR lpszFileName)

This method returns TRUE if the named file is a valid Open Inventor file

void	IvfSetFileType(IVF_FILETYPE)

IVF_FILETYPE	IvfGetFileType(void)

Used to determine which format to use in next write.

virtual void	IvfSetBgColor(const SbColor &)

virtual SbColor	&IvfGetBgColor(void)

Set and get background color.

BOOL	IvfPreTranslateMessage(MSG *)

This message processes thread specific messages
InlineQueue messages (WMIVF_PROCPENDINGINLINE)
LoadUrl messages (WMIVF_LOADURL)

METHODS (Protected)

virtual void	IvfRemoveCameras(SoGroup *root)

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	IvfRestoreCameras(SoGroup *root)

This method restores the cameras removed from the document object's scene graph.

virtual void	IvfDeleteCameraList()

This method destroys the camera list pointed to by m_pCamList. All of the cameras contained in the list are unreferenced.

virtual BOOL	IvfOnLoadUrlMessage(const char *urlName)

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 BOOL	IvfSetupUrlFetchCallback()

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.

virtual void	IvfRemoveUrlFetchCallback()

This method disables IVF's URL fetch callback mechanism.

virtual void	IvfOnFetchUrl(const char *urlName)

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.

static void	IvfStaticFetchUrlCB( const SbString &url, void *userData, SoWWWAnchor *node)

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.

static void	IvfStaticFetchInlineUrlCB(const SbString &url, void *userData, SoWWWInline *node)

static BOOL	IvfStaticFetchTexture2UrlCB(const SbString &url, void *userData, void *node)

Same as above, except for SoWWWInline (when inline is traversed).

BOOL	IsPendingInline(char *in_url, char *in_filename)

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.

void	OnProcessPendingInline(WPARAM, LPARAM)

void	ProcessPendingTexture2(CInlineItem *, BOOL)

void	PostInlineLocation(SoNode *, char *, void *)

void	SetBaseUrlPath(const char *b_path)

const char *	GetBaseUrlPath(void)

char *	MakeFullUrlPath(char *out_url, const char *in_url)

Called to process the WMIVF_PROCPENDINGINLINE message

BOOL	IsOKFile(char *filename)

BOOL	MakeScratchName(char *new_path, char *filename)

void	CleanupScratchFile(char *filename)

Scratch file management

SoGroup	*m_pDefaultCameraGroup

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 restoration even though it isn't being stored with the scene graph (!Embedded condition)

char *	FileToURL(char *, const char *)

char *	URLToFile(char *, const char *)

BOOL	IsFileURL(const char *)

BOOL	IsURL(const char *)

Global utilities to handle URL/ conversions/queries

MEMBER VARIABLES (Protected)

SoSeparator *	m_pSceneRoot

Pointer to the root of the scene graph

IVFDOC_OPEN_ENUM	m_eOpenType

No comment.

SoSwitch	*m_pCameraSwitch

SoGroup	*m_pCameraSwitchParent

SoInfo	*m_pCameraSwitchInfo

These contain info about any contained camera switches.

SbPList *	m_pCamList

Pointer to a list of the cameras removed from the scene graph.

SbPList *	m_pCamParentList

Pointer to the parent of each camera in m_pCamList. Used to restore the cameras.

int	m_nActiveCameraIX

Index to the active camera

SbPList *	m_pInfoList

Pointer to info nodes used as place holders in the scene graph to mark the location we removed the cameras from.

SoPathList *	m_pAnchorList

A list of paths to all of the SoWWWAnchor nodes in the scene graph.

SoInfo *	m_pBackColorInfo

Saved background color node

BOOL	m_nEnableUrlFetch

Flag that enables url fetching

BOOL	m_nEnableUrlDisplay

Flag that enables URL display mechanism

BOOL	m_nEnableViewpoints

Flag that enables the viewpoint menu

char	m_urlName[IVF_MAX_URL_NAME_LENGTH]

Buffer used by IvfLoc2Callback to keep track of the the most recent URL name.

IVF_FILETYPE	m_fileType

Type of file to output. Default is IVF_FILETYPE_IV.

ENUMS

static enum IVF_FILETYPE	{
IVF_FILETYPE_IV,
IVF_FILETYPE_VMRL,
IVF_FILETYPE_VRML2
}

static enum IVFDOC_OPEN_ENUM	{
IVFDOC_OPEN_NORMAL,
IVFDOC_OPEN_LOAD,
IVFDOC_OPEN_IMPORT
}

This enum guides the behavior of IvfOnOpenDocumentMessage. It is set by the loading calls OnFileImport and OnFileLoad.

SEE ALSO

CIvfApp, CIvfArchiveInput, CIvfArchiveOutput, CIvfComponent, CIvfMainFrame


CIvfExaminerViewer

NAME

CIvfExaminerViewer - Ivf wrapper for an SoWinExaminerViewer

INHERITS FROM

None

DESCRIPTION

The Examiner viewer component allows you to rotate the view around a point of interest using a virtual trackball. The viewer uses the camera focalDistance field to figure out the point of rotation, which is usually set to be at the center of the scene. In addition to allowing you to rotate the camera around the point of interest, this viewer also allows you to translate the camera in the viewer plane, as well as dolly (move forward and backward) to get closer to or further away from the point of interest. The viewer also supports seek to quickly move the camera to a desired object or point.

See the SoWinExaminerViewer description for additional information.

Note: Although the class name is CIvfExaminerViewer, the header file name is IvfExaminerViewer.h.

METHODS

CIvfExaminerViewer()

Constructor

virtual void	IvfCreateComponent(CWnd *pWnd, void *pCreateArgs)

virtual void	IvfDestroyComponent()

Overload component creation

METHODS (Protected)

virtual	~CIvfExaminerViewer()

Destructor

SEE ALSO

SoWinExaminerViewer


CIvfFlyViewer

NAME

CIvfFlyViewer - Ivf wrapper for an SoWinFlyViewer

INHERITS FROM

None

DESCRIPTION

Fly Viewer - this viewer is intended to simulate flight through space, with a constant world up direction. The viewer only constrains the camera to keep the user from flying upside down. No mouse buttons need to be pressed in order to fly. The mouse position is used only for steering, while mouse clicks are used to increase or decrease the viewer speed.

The viewer allows you to tilt your head up/down/right/left and move in the direction you are looking (forward or backward). The viewer also supports seek to quickly move the camera to a desired object or point.

See the SoWinFlyViewer description for additional information.

Note: Although the class name is CIvfFlyViewer, the header file name is IvfFlyViewer.h.

METHODS

CIvfFlyViewer()

Constructor

virtual void	IvfCreateComponent(CWnd *pWnd, void *pCreateArgs)

virtual void 	IvfDestroyComponent()

Overload component creation

METHODS (Protected)

virtual	~CIvfFlyViewer()

Destructor.

SEE ALSO

SoWinFlyViewer


CIvfMainFrame

NAME

CIvfMainFrame - interface of the IVF frame window class

INHERITS FROM

None

DESCRIPTION

This class provides methods to process messages directed to the frame window.

Note: Although the class name is CIvfMainFrame, the header file name is IvfMainFrame.h.

METHODS (Protected)

CIvfMainFrame()

virtual	~CIvfMainFrame()

Constructor and destructor.

METHODS (Public)

virtual void	IvfOnCreate(CWnd *pWnd)

This method is called when the frame window is created. This is where initialization of the SoWin component library occurs.

virtual BOOL	IvfOnCommand(WPARAM wParam,
LPARAM lParam)

This method routes command messages to the IVF viewer class. If the command is processed, TRUE is returned FALSE otherwise.

virtual BOOL	IvfOnQueryNewPalette()

This method passes query palette messages to the SoWin component library.

virtual void	IvfOnPaletteChanged(CWnd* pFocusWnd)

This method passes palette changed messages to the SoWin component library.

virtual BOOL	IvfPreCreateWindow(CREATESTRUCT& cs,
UINT cx,
UINT cy)

This method sets the initial size of the application frame window.

virtual BOOL	IvfOnUpdateFrameTitle(BOOL bAddToTitle,
CString &strTitle)

This method sets the window text for the application frame window. If the window text is set, this method returns TRUE, otherwise FALSE is returned.

virtual void	IvfSetStatusText(const char *)=0

virtual void	IvfSetViewerText(Cstring &)

Set the status line text

MACROS

#define IVF_MAINFRAME_BASE()

SEE ALSO

CIvfApp, CIvfArchiveInput, CIvfArchiveOutput, CIvfComponent, CIvfDocument


CIvfPlaneViewer

NAME

CIvfPlaneViewer - Ivf wrapper for an SoWinPlaneViewer

INHERITS FROM

None

DESCRIPTION

The Plane viewer component allows the user to translate the camera in the viewing plane, as well as dolly (move foward/backward) and zoom in and out. The viewer also allows the user to roll the camera (rotate around the forward direction) and seek to objects which will specify a new viewing plane. This viewer could be used for modeling, in drafting, and architectural work. The camera can be aligned to the X, Y or Z axes.

See the SoWinPlaneViewer description for additional information.

Note: Although the class name is CIvfPlaneViewer, the header file name is IvfPlaneViewer.h.

METHODS

CIvfPlaneViewer()

Constructor

virtual void	IvfCreateComponent(CWnd *pWnd, void *pCreateArgs)

virtual void	IvfDestroyComponent()

Overload component creation

METHODS (Protected)

virtual	~CIvfPlaneViewer()

Destructor

SEE ALSO

SoWinPlaneViewer


CIvfRenderArea

NAME

CIvfRenderArea - Ivf wrapper for an SoWinRenderArea

INHERITS FROM

None

DESCRIPTION

This class provides Open Inventor rendering and message handling inside a Windows window. There is a routine to specify the scene to render. The scene is automatically rendered whenever anything under it changes (a data sensor is attached to the root of the scene), unless explicitly told not to do so (manual redraws). Users can also set Open Inventor rendering attributes such as the transparency type, antialiasing on or off, etc. This class employs an SoSceneManager to manage rendering and message handling.

Windows messages that occur in the render area can be handled by the application, by the viewer (if this is really a viewer), or by the nodes in the scene graph. When a message occurs, it is first passed to the application message callback function registered with the setEventCallback() method on SoWinRenderArea. If this function does not exist or returns FALSE, the message is either used directly by the viewer or translated to an SoEvent for further scene graph processing. If the viewer does not handle the message, and an overlay scene graph exists, the SoEvent is sent to that scene graph by way of an SoHandleEventAction. If no node in the overlay scene graph handles the message (i.e., calls setHandled() on the SoHandleEventAction), the SoEvent is passed to the normal scene graph in the same manner.

See the SoWinRenderArea description for additional information.

Note: Although the class name is CIvfRenderArea, the header file name is IvfRenderArea.h.

METHODS

CIvfRenderArea()

Constructor

virtual void 	IvfDestroyComponent()

Overload component destruction

void	IvfSpinText(const char *pText)

Create a spinning text logo

METHODS (Protected)

virtual	~CIvfRenderArea()

Destructor.

MEMBER VARIABLES (Protected)

SoWinRenderArea *	m_pViewer

Pointer to the render area

SoCamera *	m_pCamera

Pointer to the camera

SoDirectionalLight *	m_pLight

Pointer to the light

MACROS

IVF_COMPONENT_BASE()

This macro declares the minimum number of methods necessary to create a class derived from CIvfComponent.

SEE ALSO

SoWinRenderArea


CIvfSceneViewer

NAME

CIvfSceneViewer - Ivf wrapper for an SoSceneViewer

INHERITS FROM

None

DESCRIPTION

Note: Although the class name is CIvfSceneViewer, the header file name is IvfSceneViewer.h.

ENUMS

enum IvfSvEViewerType	{
SV_VWR_NONE = -1,
SV_VWR_EXAMINER ,
SV_VWR_FLY,
SV_VWR_WALK,
SV_VWR_PLANE,
}

enum IvfSvEManipMode	{
SV_NONE
None
SV_TRANSFORMER
Transformer manip
SV_TRACKBALL,
Trackball manip
SV_HANDLEBOX,
Handlebox manip
SV_JACK,
Jack manip
SV_CENTERBALL,
Centerball manip
SV_XFBOX,
TransformBox manip
SV_TABBOX
TabBox manip
}

METHODS

CIvfSceneViewer()

Constructor

virtual void	IvfDestroyComponent()

virtual void	IvfRemoveManips()

virtual void	IvfRestoreManips()

IvfSvEManipMode	IvfGetCurrManipMode()

IvfSvEViewerType	 	IvfGetCurrViewerType()

Overload component destruction

void	IvfOnFileInfo()

void	IvfOnUpdateFileInfo(CCmdUI* pCmdUI)

void	IvfOnFileImport()

void	IvfOnUpdateFileImport(CCmdUI* pCmdUI)

void	IvfOnViewScreendoortransparency()

void	IvfOnUpdateViewScreendoortransparency(CCmdUI* pCmdUI)

void	IvfOnViewBlendedtransparency()

void	IvfOnUpdateViewBlendedtransparency(CCmdUI* pCmdUI)

void	IvfOnViewDelayedblendedtransparency()

void	IvfOnUpdateViewDelayedblendedtransparency(CCmdUI* pCmdUI)

void	IvfOnViewSortedblendedtransparency()

void	IvfOnUpdateViewSortedblendedtransparency(CCmdUI* pCmdUI)

void	IvfOnViewViewselection()

void	IvfOnUpdateViewViewselection(CCmdUI* pCmdUI)

void	IvfOnViewFog()

void	IvfOnUpdateViewFog(CCmdUI* pCmdUI)

void	IvfOnViewAntialiasing()

void	IvfOnUpdateViewAntialiasing(CCmdUI* pCmdUI)

void	IvfOnViewEditbackgroundcolor()

void	IvfOnUpdateViewEditbackgroundcolor(CCmdUI* pCmdUI)

void	IvfOnUpdateViewExaminer(CCmdUI* pCmdUI)

void	IvfOnViewExaminer()

void	IvfOnViewFly()

void	IvfOnUpdateViewFly(CCmdUI* pCmdUI)

void	IvfOnViewPlane()

void	IvfOnUpdateViewPlane(CCmdUI* pCmdUI)

void	IvfOnViewWalk()

void	IvfOnUpdateViewWalk(CCmdUI* pCmdUI)

void	IvfOnViewPicedit()

void	IvfOnUpdateViewPicedit(CCmdUI* pCmdUI)

void	IvfOnSelectionShiftselection()

void	IvfOnUpdateSelectionShiftselection(CCmdUI* pCmdUI)

void	IvfOnSelectionSingleselection()

void	IvfOnUpdateSelectionSingleselection(CCmdUI* pCmdUI)

void	IvfOnSelectionToggleselection()

void	IvfOnUpdateSelectionToggleselection(CCmdUI* pCmdUI)

void	IvfOnEditorsColoreditor()

void	IvfOnUpdateEditorsColoreditor(CCmdUI* pCmdUI)

void	IvfOnEditorsMaterialeditor()

void	IvfOnUpdateEditorsMaterialeditor(CCmdUI* pCmdUI)

void	IvfOnEditorsTransformsliders()

void	IvfOnUpdateEditorsTransformsliders(CCmdUI* pCmdUI)

void	IvfOnManipsCenterball()

void	IvfOnUpdateManipsCenterball(CCmdUI* pCmdUI)

void	IvfOnManipsHandlebox()

void	IvfOnUpdateManipsHandlebox(CCmdUI* pCmdUI)

void	IvfOnManipsJack()

void	IvfOnUpdateManipsJack(CCmdUI* pCmdUI)

void	IvfOnManipsNone()

void	IvfOnUpdateManipsNone(CCmdUI* pCmdUI)

void	IvfOnManipsReplace()

void	IvfOnUpdateManipsReplace(CCmdUI* pCmdUI)

void	IvfOnManipsTabbox()

void	IvfOnUpdateManipsTabbox(CCmdUI* pCmdUI)

void	IvfOnManipsTransformer()

void	IvfOnUpdateManipsTransformer(CCmdUI* pCmdUI)

void	IvfOnManipsTrackball()

void	IvfOnUpdateManipsTrackball(CCmdUI* pCmdUI)

void	IvfOnManipsTransformbox()

void	IvfOnUpdateManipsTransformbox(CCmdUI* pCmdUI)

void	IvfOnLightsCreatedirlight()

void	IvfOnUpdateLightsCreatedirlight(CCmdUI* pCmdUI)

void	IvfOnLightsCreatepointlight()

void	IvfOnUpdateLightsCreatepointlight(CCmdUI* pCmdUI)

void	IvfOnLightsCreatespotlight()

void	IvfOnUpdateLightsCreatespotlight(CCmdUI* pCmdUI)

void	IvfOnUpdateLightsHideallicons(CCmdUI* pCmdUI)

void	IvfOnLightsHideallicons()

void	IvfOnLightsAmbientlighting()

void	IvfOnUpdateLightsAmbientlighting(CCmdUI* pCmdUI)

void	IvfOnLightsShowallicons()

void	IvfOnUpdateLightsShowallicons(CCmdUI* pCmdUI)

void	IvfOnLightsTurnalloff()

void	IvfOnUpdateLightsTurnalloff(CCmdUI* pCmdUI)

void	IvfOnLightsTurnallon()

void	IvfOnUpdateLightsTurnallon(CCmdUI* pCmdUI)

void	IvfOnUpdateFilePrint(CCmdUI* pCmdUI)

void	IvfOnUpdateFilePrintPreview(CCmdUI* pCmdUI)

void	IvfOnUpdateFilePrintSetup(CCmdUI* pCmdUI)

CIvfSceneViewer specific menu command handlers

METHODS (Protected)

virtual	~CIvfSceneViewer()

Destructor

virtual BOOL	IvfGetLightName(char *buf, int buflen, SoType lightType, BOOL &modified)

virtual void	IvfPrePasteAction()

virtual void	IvfPostPasteAction()

virtual void	IvfPreCopyAction()

virtual void	IvfPostCopyAction()

virtual void	IvfPreCutAction()

virtual void	IvfOnPaint()

virtual BOOL	IvfOnUpdateFrameTitle(CString &strTitle)

virtual void	IvfOnInitialUpdate(CWnd *pWnd)

virtual void	IvfOnDeactivateComponent()

virtual void	IvfOnActivateComponent(CView *pView = NULL)

virtual BOOL	IvfPreTranslateMessage(MSG *pMsg)

virtual BOOL	IvfOnCommand(WPARAM wParam, LPARAM lParam)

virtual void	IvfOnDestroy()

Overloads from CIvfComponent

BOOL	IvfUpdateWindowText()

void	IvfFindTopWindow()

void	IvfDrawTopMenuBar()

CIvfSceneViewer specific utility methods

virtual BOOL	IvfIsSceneViewer()

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

static void IvfBgColorChangedCB(void *userData, const SbColor *c)

This is added to the background color editor to tell us when the background color has changed.

MEMBER VARIABLES (Protected)

Pointer to the SoSceneViewer object we create

SoSceneViewer * 	m_pSV

CIvfSceneViewer specific member variables

Cstring	m_strTitle

CWnd *	m_pTopWnd

int	m_nFirstLightMenuId

MACROS

IVF_COMPONENT_BASE()

This macro declares the minimum number of methods necessary to create a class derived from CIvfComponent

SEE ALSO

SceneViewer


CIvfServerItem

NAME

CIvfServerItem

INHERITS FROM

None

DESCRIPTION

Parallels the application CServerItem class. Used for OLE server handling.

Note: Although the class name is CIvfServerItem, the header file name is IvfSrvrItem.h.

METHODS

CIvfServerItem()

~CIvfServerItem()

Constructor and destructor.

BOOL	IvfOnDraw(CDC *pDC, int sizePX, int sizePY)

Called by the client when it wants to draw the metafile. Creates an offscreen renderer and writes to the metafile.


CIvfStdViewer

NAME

CIvfStdViewer - Ivf wrapper for standard viewers (Examiner, Fly, Plane, and Walk)

INHERITS FROM

None

DESCRIPTION

Intermediate class to collect functionality for standard viewers: Examiner, Walk, Plane, and Fly. This should never be instantiated without one of these.

METHODS

CIvfStdViewer()

Constructor

virtual void	IvfDestroyComponent()

Overload component destruction

METHODS (Protected)

virtual	~CIvfStdViewer()

Destructor

MEMBER VARIABLES (Protected)

SoWinFullViewer*	m_pViewer

Pointer to the viewer we create.

MACROS

IVF_COMPONENT_BASE()

This macro declares the minimum number of methods necessary to create a class derived from CIvfComponent.


CIvfWalkViewer

NAME

CIvfWalkViewer - Ivf wrapper for an SoWinWalkViewer

INHERITS FROM

None

DESCRIPTION

The paradigm for this viewer is a walk-through of an architectural model. Its primary behavior is forward, backward, and left/right turning motion while maintaining a constant "eye level". It is also possible to stop and look around at the scene. The eye level plane can be disabled, allowing the viewer to proceed in the "look at" direction, as if on an escalator. The eye level plane can also be translated up and down - similar to an elevator.

See the SoWinWalkViewer description for additional information.

Note: Although the class name is CIvfWalkViewer, the header file name is IvfWalkViewer.h.

METHODS

CIvfWalkViewer()

Constructor

virtual void	IvfCreateComponent(CWnd *pWnd, void *pCreateArgs)

virtual void	IvfDestroyComponent()

Overload component creation

METHODS (Protected)

virtual	~CIvfWalkViewer()

Destructor

SEE ALSO

SoWinWalkViewer


Classes (by Function)
Classes (SDK Only)

Actions	Apply actions to the scene graph (e.g., render, pick, search)
Basics	Basic types (e.g., bool, box, vec)
Details	Details specific to a shape node
Draggers	Low level manipulation objects (e.g., trackball, jack)
Engines	Interconnect fields and modify them
Errors	Error handling
Events	Respond to external events (e.g., mouse motion, key press)
Fields	Part of a node
General	General scene graph classes
Interaction	Base class for interaction with the scene graph
Manips	High level manipulation objects attaching draggers to part of the scene graph
Nodekits	Group nodes into a useful collection
Nodes	Part of a scene graph (e.g., shape, light, camera, transformation)
Projectors	Convert from window coordinates to 3D coordinates
Sensors	Respond to data changes in the scene graph or the passing of time
Simplifiers	Geometry simplifiers
VRML 2.0	VRML 2.0 nodes
----------------------
SoWin Classes	Includes components, devices, stereo, and viewers for use in a Win32 environment
SoXt Classes	Includes components, devices, and viewers for use in a Unix/Motif environment


Collision Detection

Open Inventor 2.4 (and above) supports collision detection. It is now possible to manage objects and camera transformations to prevent objects from passing through (intersecting) one another. Walls are really walls: you can avoid walking through them. Solid objects are really solid: you can avoid having two of them occupy the same space at the same time.

Three new classes are provided to support detection of collisions in Open Inventor.

Viewer Collision Detection

This method prevents the camera from going through walls or floors, making viewer manipulation much more comfortable and realistic. To use this class, first create a standard viewer and then an SoWinCollisionViewer for this viewer. Collision detection will be activated immediately. The minimum distance between the camera and the object can be tuned. A user callback function can be set to receive notification when a collision is detected. See SoWinCollisionViewer for more information. A program demonstrates how to use this class: %OIVHOME%/src/TGSdemos/Collision/Viewer

Collision Manager

This class is useful for monitoring the transformations of an object relative to a scene graph. It can prevent this object from colliding with other shapes in the scene, or it can glue the object to the surface of the shapes it is colliding with, or it can just call a user callback function. The gluing process tries to find the closest position where the objects do not collide. The number of positions to try can be tuned. Collision detection can be computed only on bounding boxes for the object or for all of the shapes in the scene. When a bounding box collision occurs between two shapes, a user filter function is called. This function can stop the detection process for these two shapes.

The second step of the collision detection mechanism consists of comparing each triangle of both shapes. If a triangle collision is found, the collision manager calls the user callbacks. Each callback can inform the manager if it is interested in the next collision report for the current transformation. It can be informed of the collision for the next graphic primitive (e.g. triangle or line segment) or only for the next shape or it can just say that it is not interested in the next collision reports for the current transformation. Collisions are detected even if objects are not visible or pickable. See SoCollisionManager for more information. Two programs demonstrate how to use this class: %OIVHOME%/src/TGSdemos/Collision/Dart and %OIVHOME%/src/TGSdemos/Collision/ObjectMoving

Intersection Detection Action

This class is an Open Inventor action. It allows programmers to analyze a complete scene graph to detect intersection between shapes. The action first detects intersection between bounding boxes. If an intersection exists between two shapes, the action calls a user filter function. This function can stop the collision detection process for these two shapes.

The second step of the intersection detection mechanism consists of comparing each triangle of both shapes. If a triangle collision is found, the action calls the user callbacks. Each callback is able to inform the action if it is interested in the next collision report. It can be informed of the intersection for the next graphic primitive or only for the next shape or it can just say that it is not interested in the next intersection. Intersections are detected even if objects are not visible or pickable. See SoIntersectionDetectionAction for more information. A program demonstrates how to use this class: %OIVHOME%/src/TGSdemos/Collision/Intersection


Contents

Inventor Overview	A brief introduction to Open Inventor
TGS Innovations	Custom features added to Open Inventor by TGS
Win32 Features	Win32-specific features
Documentation	Open Inventor documentation
VRML	VRML support
LMV Overview	Introduction to LMV (Large Model Visualization)
Collision Detection	Collision detection support
Using a Spaceball or Space Mouse with Open Inventor
Demos	Demo programs
Tools	Utility programs
Scene Viewer Intro	A brief introduction to the SceneViewer
Environment Variables
Localization
Open Inventor Classes	Open Inventor classes
IVF AppWizard	Your Open Inventor MFC application builder
IVF Classes	A set of classes which integrate Open Inventor with the Microsoft Foundation Classes (MFC) application development framework
Technical Support	How to contact technical support
About TGS	Brief company overview
Copyright	Copyright


Copyright

This manual has been prepared for Template Graphics Software, Inc.(TGS™) licensees solely for use in connection with software supplied by TGS and is furnished under a written license agreement. This material may not be used, reproduced or disclosed, in whole or in part, except as permitted in the license agreement or by prior written authorization of TGS.

Users are cautioned that TGS reserves the right to make changes without notice to the specifications and materials contained herein and shall not be responsible for any damages (including consequential) caused by reliance on the materials presented, including but not limited to typographical, arithmetic or listing errors.

LiveWork, 3Space, Amapi, Active3D, 3D-MasterSuite and the TGS logo are trademarks of Template Graphics Software, Inc. TEMPLATE is a registered trademark of Template Graphics Software, Inc.

OpenGL is a registered trademark of Silicon Graphics, Inc. Open Inventor is a trademark of Silicon Graphics, Inc.

Restricted Rights Legend Use, duplication, or disclosure by the Government of Software or related Documentation is subject to restrictions as set forth in subparagraph (c)(1) of the Commercial Computer Software - Restricted Rights clause at FAR 52.227-19 or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013. Contractor/Manufacturer is Template Graphics Software, Inc., San Diego, CA 92121.

Copyright © 1985-2000

Template Graphics Software, Inc.

5330 Carroll Canyon Road, Suite 201

San Diego, CA 92121

Printed in U.S.A. All Rights Reserved

Confidential, Unpublished Property of Template Graphics Software, Inc.


Demos
Demos (SDK Only)

LargeModelViewer	Demonstrates adaptive viewing and simplification
maze	A nostalgic 3D game
SceneViewer	3D editor and viewer for Open Inventor scenes
slotcar	A networked slot car racing game for any number of players


Details

SoConeDetail	Stores detail information about the SoCone node
SoCubeDetail	Stores detail information about the SoCube node
SoCylinderDetail	Stores detail information about the SoCylinder node
SoDetail	Base class for describing detail information about a shape node
SoDetailList	Maintains a list of instances of details
SoFaceDetail	Stores detail information about vertex-based shapes made of faces
SoLineDetail	Stores detail information about vertex-based shapes made of line segments
SoNodeKitDetail	Stores detail information about a nodekit
SoPointDetail	Stores detail information about vertex-based shapes made of points
SoTextDetail	Stores detail information about a text node


Draggers

SoCenterballDragger	Striped ball you rotate and re-center by dragging with the mouse
SoDirectionalLightDragger	Directional icon you rotate and translate by dragging with the mouse
SoDragPointDragger	Object you can translate in 3D by dragging with the mouse
SoDragger	Base class for nodekits that move in response to click-drag-release mouse events
SoHandleBoxDragger	Box you can scale, stretch and translate by dragging with the mouse
SoJackDragger	Jack-shaped object you rotate, translate, or scale by dragging with the mouse
SoPointLightDragger	Sun-shaped icon you can translate in 3D by dragging with the mouse
SoRotateCylindricalDragger	Object you rotate along a cylindrical surface by dragging with the mouse
SoRotateDiscDragger	Object you can rotate like a knob by dragging with the mouse
SoRotateSphericalDragger	Object you can rotate about a spherical surface by dragging with the mouse
SoScale1Dragger	Object you can scale in one dimension by dragging with the mouse
SoScale2Dragger	Object you can scale in two dimensions by dragging with the mouse
SoScale2UniformDragger	Object you can scale uniformly in two dimensions by dragging with the mouse
SoScaleUniformDragger	Object you can scale uniformly in 3D by dragging with the mouse
SoSpotLightDragger	Spotlight shaped dragger that allows you to change position, direction, and width of the beam
SoTabBoxDragger	Cubic object you can translate and scale by dragging with the mouse
SoTabPlaneDragger	Object you can translate or scale within a plane by dragging with the mouse
SoTrackballDragger	Striped ball you can rotate or scale uniformly by dragging with the mouse
SoTransformBoxDragger	Box-like object you scale, rotate, and translate by dragging with the mouse
SoTransformerDragger	Box-like object you scale, rotate, and translate by dragging with the mouse
SoTranslate1Dragger	Object you can translate along a line by dragging with the mouse
SoTranslate2Dragger	Object you can translate within a plane by dragging with the mouse


Engines

SoBoolOperation	Performs Boolean operations
SoCalculator	A general-purpose calculator
SoComposeMatrix	Composes a transformation matrix
SoComposeRotation	Composes a rotation from axis and angle values
SoComposeRotationFromTo	Composes a rotation that rotates from one vector into another
SoComposeVec2f	Composes 2D vectors from floating-point values
SoComposeVec3f	Composes 3D vectors from floating-point values
SoComposeVec4f	Composes 4D vectors from floating-point values
SoComputeBoundingBox	Computes the bounding box and center of a scene graph
SoConcatenate	Joins separate fields into a single multiple-value field
SoCounter	Triggered integer counter
SoDecomposeMatrix	Decomposes transformation matrices into values for translation, rotation, and scale
SoDecomposeRotation	Decomposes rotation values
SoDecomposeVec2f	Decomposes 2D vectors into floating-point values
SoDecomposeVec3f	Decomposes 3D vectors into floating-point values
SoDecomposeVec4f	Decomposes 4D vectors into floating-point values
SoElapsedTime	Basic controllable time source
SoEngine	Base class for all engines
SoEngineList	Maintains a list of pointers to engines
SoEngineOutput	Class for all engine outputs
SoEngineOutputList	Maintains a list of pointers to engine output
SoGate	Selectively copies its input to its output
SoInterpolate	Base class for all interpolator engines
SoInterpolateFloat	Interpolates floating-point values
SoInterpolateRotation	Interpolates rotation values
SoInterpolateVec2f	Interpolates 2D floating-point vectors
SoInterpolateVec3f	Interpolates 3D floating-point vectors
SoInterpolateVec4f	Interpolates 4D floating-point vectors
SoOnOff	Engine that functions as an on/off switch
SoOneShot	Timer that runs for a pre-set amount of time
SoSelectOne	Selects one value from a multiple-value field
SoTimeCounter	Timed integer counter
SoTransformVec3f	Transforms a 3D vector by a 4x4 matrix
SoTriggerAny	Provides fan-in for triggers


Environment Variables

These environment variables are used for a variety of functions, including debugging.

IV_ALLOW_LOCATE_HIGHLIGHT

Affects SoLocateHighlight.
If set, the default SoLocateHighlight mode is set to AUTO. If not set, the default mode is OFF.

IV_AUTO_CACHE_MIN

IV_AUTO_CACHE_MAX

These influence when automatic caching happens.

IV_NO_TEXTURE_OBJECT

Tells Open Inventor not to use OpenGL 1.1 texture objects. If some textures are missing or otherwise displayed incorrectly, try setting this variable.

IV_NO_VERTEX_ARRAY

Tells Open Inventor not to use OpenGL 1.1 vertex arrays. If some geometry is missing or misshapen, try setting this variable.

IV_OCTREE_MAX_DEPTH

Affects SoOctreeOrdering.
Specifies the maximum depth used during octree ordering. Default: 8

IV_SEPARATOR_MAX_CACHES

Applies to SoSeparator, SoVRMLGroup, SoVRMLShape, and SoVRMLCollision.
Specifies the maximum number of render caches. To disable caching entirely, set it to 0. (This can reduce memory requirements at the cost of degraded performance.)

IV_STROKE_FONT_PATH

Specifies the path of the directory containing the TGS stroke font data files. See SoFont for information on the stroke font files.

IV_TIMER_RESOLUTION [Win32 only]

Specifies how often Open Inventor's internal clock ticks. Effectively it sets the minimum time between render traversals when animating (including spin animation and animation performed by engines). Make sure the value is less than the time it takes to render one frame of your scene. Default: 10 ms.

OIV_COMPAT_24 [Win32 only]

If this variable is set to any value, then the Open Inventor 2.4 pixel format selection code is used. Stereo is not possible.

OIV_CURSOR_STYLE [Win32 only]

Specifies the cursor style.

0	Classic

1	XOR

2	Shadow

The cursor can also be controlled programmatically. See SoWinViewer.

OIV_DEBUG_PIXEL_FORMAT [Win32 only]

If this variable is set to 1, Open Inventor programs built with the debug target will write a file (named pixel.txt) that indicates which pixel format was chosen.

OIV_FORCE_PIXEL_FORMAT [Win32 only]

If this environment variable is set to a non-zero integer, Open Inventor will try to use it as the pixel format. You can list the available pixel formats with the "oglinfo" utility that is provided with the Open Inventor for Win32 SDK. To request a pixel format programmatically, use the setPixelFormat method of SoWinGLWidget.

OIV_LINE_WIDTH

If defined, forces Open Inventor to use line width 1. no matter what line width the program requests. (This was used to improve performance on a system that had notoriously slow wide lines.)

OIV_NO_OVERLAYS [Win32 only]

Specifies that the pixel format chooser should not take into consideration if a pixel format supports overlays or not.

OIV_PSFONT_PATH [Unix only]

Specifies the path to the PostScript fonts that Open Inventor will use for 2D and 3D text. See SoFont.

OIV_REQUIRE_STENCIL [Win32 only]

Provides a strong hint to the pixel format chooser. A pixel format that has a stencil buffer will be chosen even if it is not accelerated.

SO_DRAGGER_DIR

Specifies the path to the directory containing dragger geometry files. By default, Open Inventor uses the dragger geometry files from %OIVHOME%/data/draggerDefaults. See SoDragger.

Debug Environment Variables

We recommend these flags only be used by expert Open Inventor users or at the request of TGS Customer Support.

IV_DEBUG_BUFLEN <num>	# Constructs an internal <num> length buffer to print into (See SoDebug.C)
IV_DEBUG_CACHES	# Prints interesting (!) stuff
IV_DEBUG_CACHELIST	# Ditto
IV_DEBUG_SENSORS	# Ditto (lots of!)
IV_DEBUG_TRANSFORM_MANIP_FIELDS	# Ditto
IV_DEBUG_KIT_PARTS	# Ditto
IV_DEBUG_WRITE_KIT_CHILDREN	# Forces a nodekit to be written out like an SoGroup node
IV_DEBUG_FROMNAME	# Issues a message if the dynamic load of a node class fails.
IV_DEBUG_PICK_CULL	# For relevant grouping nodes, prints whether they were culled during picking.
IV_DEBUG_RENDER_CULL	# For relevant grouping nodes, prints whether they were culled during rendering.


Errors

SoDebugError	Debug error handling
SoError	Error handling base class
SoMemoryError	Memory error handling
SoReadError	Read error handling


Events

SoButtonEvent	Base class for all button events
SoEvent	Base class for all events
SoKeyboardEvent	Keyboard key press and release events
SoLocation2Event	2D location events
SoMotion3Event	3D motion events
SoMouseButtonEvent	Mouse button press and release events
SoSpaceballButtonEvent	Spaceball button press and release events


Fields

SoField	Base class for all fields
SoFieldContainer	Abstract base class for objects that contain fields
SoFieldList	Maintains a list of pointers to fields
SoMFBitMask	Multiple-value field containing any number of masks of bit flags
SoMFBool	Multiple-value field containing any number of Boolean values
SoMFColor	Multiple-value field containing any number of RGB colors stored as three floats
SoMFEngine	Multiple-value field containing any number of pointers to engines
SoMFEnum	Multiple-value field containing any number of enumerated type values
SoMFFloat	Multiple-value field containing any number of floating point values
SoMFInt32	Multiple-value field containing any number of int32_t integers
SoMFLong	(OBSOLETE) Synonym for SoMFInt32
SoMFMatrix	Multiple-value field containing any number of 4x4 matrices
SoMFName	Multiple-value field containing any number of names
SoMFNode	Multiple-value field containing any number of pointers to nodes
SoMFPath	Multiple-value field containing any number of pointers to paths
SoMFPlane	Field containing several plane equations
SoMFRotation	Multiple-value field containing any number of SbRotations
SoMFShort	Multiple-value field containing any number of short integers
SoMFString	Multiple-value field containing any number of strings
SoMFTime	Multiple-value field containing any number of SbTime values
SoMFUInt32	Multiple-value field containing any number of uint32_t integers
SoMFULong	(OBSOLETE) Synonym for SoMFUInt32
SoMFUShort	Multiple-value field containing any number of unsigned short integers
SoMFVec2f	Multiple-value field containing any number of two-dimensional vectors
SoMFVec3f	Multiple-value field containing any number of three-dimensional vectors
SoMFVec4f	Multiple-value field containing any number of four-dimensional vectors
SoMField	Base class for all multiple-valued field
SoSFBitMask	Single-value field containing a set of bit flags
SoSFBool	Field containing a single Boolean value
SoSFBox3s	Field containing a three-dimensional box
SoSFColor	Field containing an RGB color
SoSFEngine	Field containing a pointer to a engine
SoSFEnum	Field containing an enumerated value
SoSFFloat	Field containing a floating-point value
SoSFImage	Field containing a 2D image
SoSFImage3	Field containing a 3D image
SoSFInt32	Field containing an int32_t integer
SoSFLong	(OBSOLETE) Synonym for SoSFInt32
SoSFMatrix	Field containing a 4x4 matrix
SoSFName	Field containing a name
SoSFNode	Field containing a pointer to a node
SoSFPath	Field containing a pointer to an SoPath
SoSFPlane	Field containing a plane equation
SoSFRotation	Field containing a rotation
SoSFShort	Field containing a short integer
SoSFString	Field containing a string
SoSFTime	Field containing an SbTime
SoSFTrigger	Field used to trigger engines or connection networks
SoSFUInt32	Field containing an unsigned int32_t integer
SoSFULong	(OBSOLETE) Synonym for SoSFUInt32
SoSFUShort	Field containing an unsigned short integer
SoSFVec2f	Field containing a two-dimensional vector
SoSFVec3f	Field containing a three-dimensional vector
SoSFVec4f	Field containing a homogeneous three-dimensional vector
SoSField	Abstract base class for all single-value fields


General

SoBase	Base class for all nodes, paths, and engines
SoBaseList	Maintains a list of pointers to instances of the SoBase classes
SoByteStream	Converts scene graph objects to character byte streams
SoCallbackList	Manages a list of callback functions and associated data
SoCollisionManager	Class to manage collisions
SoDB	Scene graph database class
SoInput	Used to read Open Inventor data files
SoNodeKitPath	Path that points to a list of hierarchical nodekits
SoNodeList	Maintains a list of pointers to nodes
SoOffscreenRenderer	Renders to an off-screen buffer for printing or generating textures
SoOutput	Used to write Open Inventor data files
SoPath	Path that points to a list of hierarchical nodes
SoPathList	Maintains a list of pointers to paths
SoPickedPoint	Represents point on surface of picked object
SoPickedPointList	Maintains a list of pointers to SoPickedPoint instances
SoPrimitiveVertex	Represents a vertex of a generated primitive
SoTranReceiver	Interprets database changes for transcription
SoTranSender	Sends database changes for transcription
SoType	Stores runtime type information
SoTypeList	Maintains a list of SoTypes


IVF Architecture Overview

IVF Architecture Overview

The purpose of the IVF class library is to simplify integration of functionality provided by the Open Inventor Win32 Classes with MFC-based applications. IVF builds upon the application framework provided by MFC to deliver the additional functionality of Open Inventor in a manner that is familiar to MFC developers. The following discussion assumes familiarity with MFC terminology and the structure of SDI, MDI, and dialog-based MFC applications. In addition, a basic understanding of Open Inventor and the Open Inventor User Interface Component Library (SoWin or SoXt) is assumed.

Anatomy of an IVF Application

Figure 1.1 illustrates the objects in an IVF SDI application. Note there is no fundamental difference between the object relationships in an IVF application and an MFC application. An IVF application is an MFC application.

Figure 1.1 Objects in an IVF SDI Application. Arrows show direction of communication flow.

In an IVF application, the application, document, main frame window, and view objects have been endowed with additional functionality. The additional functionality enables the standard MFC objects to interact appropriately with the core Open Inventor Library and the Open Inventor User Interface Component Library. The addition of functionality to the standard MFC objects is achieved through the use of multiple inheritance. Figure 1.2 illustrates the class hierarchy of IVF SDI and MDI applications.

Figure 1.2 Class hierarchy of IVF SDI and MDI Applications.

This example diagrams an examiner viewer application. The class hierarchy for all IVF viewer applications is similar, the difference being which IVF viewer class the user view is derived from.

Note that the IVF classes are not derived from Object. This is because the current implementation of MFC does not support the use of Object as a virtual base class. It is important to note in Figure 1.2 that all of the user classes have the MFC class as the first (left most) base class. This is necessary due to the implementation of the MFC run-time typing mechanism. Refer to MFC Technical Note 16 for information about using multiple inheritance with MFC. In IVF SDI and MDI applications, the Open Inventor viewer occupies the entire view window. The details of how the view's window is transformed into an Open Inventor viewer are discussed in later chapters.

IVF also supports MFC dialog-based applications. Figure 1.3 illustrates the class hierarchy of an IVF dialog-based application. In an IVF dialog-based application, any of the dialog's child controls can be turned into an Open Inventor viewer or render area.

Figure 1.3 Class hierarchy of an IVF dialog-based Application.

This example diagrams an examiner viewer application. The class hierarchy for all IVF dialog-based viewer applications is similar, the difference being which IVF viewer class the user dialog is derived from.

IVF Class Library Structure

The IVF class library is composed of two separate Win32 libraries. The IVF core classes are contained in a Dynamic Link Library (DLL). The IVF viewer classes are provided in a static library. Figure 1.4 illustrates the composition of the IVF core classes and the IVF viewer classes.

Figure 1.4 Composition of the IVF core classes and the IVF viewer classes.


Interaction

SoBoxHighlightRenderAction	A selection highlight style
SoEventCallback	Node which invokes callbacks for events
SoExtSelection	Selection node that supports lasso and rectangle selection of shapes
SoInteraction	Initializes Open Inventor interaction classes
SoLineHighlightRenderAction	Selection highlight style
SoSceneManager	Manages scene graph rendering and event handling
SoSelection	Manages a list of selected objects


Inventor AppWizard - Introduction
Introduction to IVF AppWizard (Win32 only)

The IVF AppWizard is a Microsoft Visual C++ "Custom AppWizard", which is used within the Visual C++ 5.x and 6.x environments to build an initial framework for an Open Inventor MFC application. The IVF AppWizard will create an MFC application containing the necessary IVF classes. Applications can be created with a simple RenderArea or any of the standard Open Inventor viewers - walk, examiner, and fly-through.

The following pages show how to build an Open Inventor application using the IVF AppWizard. Unless otherwise indicated in the text of the following pages, you may choose from any of the options shown on the IVF AppWizard screens.


Inventor
Open Inventor

NAME

Open Inventor - a toolkit for writing 3D programs

DESCRIPTION

The Open Inventor 3D Toolkit is an object-oriented toolkit that simplifies and abstracts the task of writing graphics programming into a set of easy to use objects. These objects range from low level data-centered objects such as Sphere, Camera, Material, Light, and Group, to high level application-level objects such as Walkthrough Viewer and Material Editor. The foundation concept in Open Inventor is the "scene database" which defines the objects to be used in an application. When using Open Inventor, a programmer creates, edits, and composes these objects into hierarchical 3D scene graphs (i.e., database). A variety of fundamental application tasks such as rendering, picking, event handling, and file reading/writing are built-in operations of all objects in the database and thus are simple to invoke.

Since Open Inventor is object-oriented (written in C++), it encourages programmers to extend the system by writing new objects. Open Inventor users have created a variety of new objects that are not included in the product, such as: Bezier surfaces, CSG objects, animation objects, special viewers, and many more.

Note that the rendering mechanism inside Open Inventor objects employs OpenGL. Thus, during rendering each object automatically makes the proper, efficient calls to OpenGL. Furthermore, Open Inventor rendering supports a caching scheme which automatically generates very fast renderings of the database without traversal overheads.

Inventor picking is extremely efficient and does not utilize rendering. Furthermore, picking returns a variety of 3D information and detail about what objects were picked. A sorted list of picked objects and corresponding information is returned to the programmer. Picking is so fast, that programs can perform 3D locate highlighting as the mouse moves across a 3D window.

INTERACTION, EVENTS, AND DEVICES

Inventor defines a event model for writing 3D interaction. This model is window system independent. It is quite easy to use and makes 3D direct manipulation programming possible. Open Inventor includes a variety of interactive 3D objects and tools for writing interactive objects, such as: Manipulators, Draggers, and Projectors. The flexible event model encourages programmers to extend the system to support new devices and event types.

FILE FORMAT

The Open Inventor 3D File Format is SGI's standard for 3D data. The format supports both an ASCII and private binary format. The binary format is network-neutral and thus can be exported across machine boundaries.

BENEFITS

Programming 3D graphics applications with Open Inventor results in large scale productivity increases. This also increases with time as more tools utilize the Open Inventor paradigm, user interfaces, and standard file format.

DOCUMENTATION

"The Inventor Mentor", "The Inventor Toolmaker", and "The Open Inventor C++ Reference Manual", published by Addison-Wesley Publishing Company, are available in technical bookstores.

SOURCE CODE

The Inventor Toolkit includes source code to numerous programs and examples.

FILES

%OIVHOME%\data\models\* - Sample 3D data files
%OIVHOME%\src\* - Source to Open Inventor samples and examples

SEE ALSO

SceneViewer, ivcat, maze


Inventor AppWizard - New Project Information
IVF AppWizard - New Project Information

This dialog box is a standard VC++ dialog box. Click the What's This help button [image] for standard help information.

•	Click OK to proceed.

The IVF AppWizard will create a new skeleton project, ready for you to customize and build.


Inventor AppWizard - New Project
New Project

The first step in building an Open Inventor application is to open a new project using the VC++ IDE (interactive development environment).

•	On the File menu, click New.

•	In the dialog box that appears, click the Projects tab.

•	Select IVF AppWizard (exe) as the project type.

•	In the Project name box, type the name of your new project.

•	In the Location box, specify a directory for the new project files.

•	Click OK to start the IVF AppWizard.

NOTE: This dialog box is a standard VC++ dialog box. Click the What's This help button [image] in each dialog box for standard MFC help information.


Inventor AppWizard - Step 1 of 6
IVF AppWizard - Step 1 of 6

This dialog box is a standard VC++ dialog box. Click the What's This help button [image] for standard help information.

•	Choose the type of application you would like to create.

•	Then click Next to proceed.


Inventor AppWizard - Step 2 of 6
IVF AppWizard - Step 2 of 6

This dialog box is a standard VC++ dialog box. Click the What's This help button [image] for standard help information.

•	Click Next to proceed.


Inventor AppWizard - Step 3 of 6
IVF AppWizard - Step 3 of 6

This dialog box is a standard VC++ dialog box. Click the What's This help button [image] for standard help information.

•	Click Next to proceed.


Inventor AppWizard - Step 4 of 6
IVF AppWizard - Step 4 of 6

This dialog box is a standard VC++ dialog box. Click the What's This help button [image] for standard help information.

•	Click Next to proceed.


Inventor AppWizard - Step 5 of 6
IVF AppWizard - Step 5 of 6

Use this dialog box to select the IVF options you want in your application.

Viewer Type

Select the type of viewer:

Render Area:	The most basic drawing area (no viewer)

Examiner Viewer:	Viewer for manipulating objects

Fly Viewer:	Viewer that "flys" the camera through a scene

Plane Viewer:	Viewer that constrains the camera to a plane

Walk Viewer:	Viewer that "walks" the camera through a scene

Scene Viewer:	Combines all the viewers, plus editting capability

Viewer Attributes

Select the desired default width and height for the main frame window.

Decorations:	If selected, viewer "decorations" (thumbwheels, etc.) are displayed by default.

Cut & Paste:	If selected, enables cutting and pasting of 3D geometry.

About Box Logo:	If selected, the "About Box" includes a spinning logo box by default.

VRML Options

Select the desired VRML options.

URL Display:	Select this option to have the URL displayed automatically in the status bar when the cursor moves onto geometry associated with a WWWAnchor node.

URL Fetch:	Select this option to enable the fetch callback when the user clicks on geometry associated with a WWWAnchor node.

Viewpoint Menu:	Select this option to include a "Viewpoints" menu in the application menu bar.

Startup File

Enter the name of an Open Inventor or VRML file to be automatically loaded when the application is executed.

Select Enable to enable this feature.


Inventor AppWizard - Step 6 of 6
IVF AppWizard - Step 6 of 6

This dialog box is a standard VC++ dialog box. Click the What's This help button [image] for standard help information.

•	Click Finish to proceed.


IVF Classes
IVF Classes (Win32 only)

The IVF Classes are a set of classes that integrate Open Inventor with the Microsoft Foundation Classes (MFC) application development framework. IVF classes are based upon the SoWin component classes but shield the application from this level of detail. IVF classes also handle much of the complexity of when and where to do various operations within the MFC framework. For more details, see the IVF architecture overview.

CIvfApp	Provides methods for initialization of Open Inventor and the IVF library
CIvfArchiveInput	SoInput derived class to handle performing input on MFC CArchive objects
CIvfArchiveOutput	SoOutput derived class to handle performing output on MFC CArchive objects
CIvfComponent	Provides methods to process messages directed to the IVF component object and methods to interact with the SoWin component
CIvfDocument	Provides methods for manipulation of Open Inventor documents
CIvfMainFrame	Provides methods to process messages directed to the frame window
CIvfServerItem	Provides support for OLE server applications
IvfResource	Utility class for accessing strings in the Open Inventor resource DLL
CIvfExaminerViewer	IVF wrapper for an SoWinExaminerViewer
CIvfFlyViewer	IVF wrapper for an SoWinFlyViewer
CIvfPlaneViewer	IVF wrapper for an SoWinPlaneViewer
CIvfRenderArea	IVF wrapper for an SoWinRenderArea
CIvfSceneViewer	IVF wrapper for the Scene Viewer
CIvfStdViewer	IVF wrapper for standard viewers (Examiner, Fly, Plane, and Walk)
CIvfWalkViewer	IVF wrapper for an SoWinWalkViewer


IvfResource

NAME

IvfResource

INHERITS FROM

None

DESCRIPTION

Used for internationalization to access strings in resource file.

METHODS

static void	initialize()

static LPCTSTR	getString(int nId)

static void	freeStrings()

static HGLOBAL	getStringCopy(int nId)

static HMENU	getMenu(int nId)

MEMBER VARIABLES

static HMODULE	m_hResDll


LMV Overview
Large Model Visualization Overview

Open Inventor and Large Model Visualization (LMV) -- The Solution for Large Model Visualization

In order to visualize graphics quickly, we have to be clever in choosing which primitives we feed to the graphics pipeline. The demand for increasingly complex 3D graphics models is growing faster than graphics workstation hardware can keep up. The only solution left is to find ways to represent models and scenes with fewer graphics primitives, and to send only the needed primitives to the graphics pipeline.

Since Open Inventor 2.4, there have been techniques to enhance large model visualization with view frustum culling and caching mechanisms and levels of detail. Starting with Open Inventor 2.5, we have gone further and added new techniques for visualization of large models and assemblies, as described below.

Geometry Simplification

The first algorithm Open Inventor includes is geometry simplification. The purpose of this algorithm is to simplify the rendered geometry of the model. After simplification, we have more options for the complexity of the model's representation and, therefore, we have more control over the rendering cost.

Open Inventor integrates mesh decimation through two components: a simplifier and a simplify action. The simplify action can be applied to a scene graph, or some part of it, to produce a simpler representation that will be used for subsequent redraws. A new node, SoLevelOfSimplification, has been added to group these representations and to keep track of their complexity levels, represented by a percentage of the original number of primitives.

Simplifiers

Objects derived from the virtual class SoSimplifier receive a set of triangles and return an Open Inventor node representing a simplified version of the original geometry. Thus one can ask for a simplified version of a triangle list containing 50% of the original number of triangles.

Open Inventor contains an SoDecimator object derived from SoSimplifier, which implements a geometry simplification algorithm. This algorithm uses iterative contractions of vertex pairs to simplify models. Simplifiers are used internally by simplify actions but can also be used by any application to generate a simplified node from a given list of triangles not stored in an Open Inventor node. The programmer can implement new simplification methods by deriving from SoSimplifier.

Simplify Actions

Open Inventor contains several simplify actions. Each action can be applied to a specific scene graph to create a simplified version of its geometry.

Each action's constructor receives an SoSimplifier which is used for simplifying the geometry. This simplifier can be an SoDecimator or any class derived from SoSimplifier by the application.

Several traversal methods are available:

- SoGlobalSimplifyAction: traverses the scene graph and collects all the triangles in a single list. This list is then simplified and the result is stored in a new scene graph.

- SoShapeSimplifyAction: traverses the scene graph and replaces every complex shape with its simplified version.

- SoReorganizeAction: reorganizes the scene graph by grouping shapes with common properties, then groups these shapes in a single shape and runs the simplifier on it. If a simplifier is not provided it creates an IndexedTriangleStripSet from this shape. This action is similar to the ivfix utility program.

Each simplified sub-level can be stored in regular Separators or in WWWInline nodes. In this case, the urlName defines the full url to use for each WWWInline. For instance if urlName = "dir/file", the action will generate "dir/file_1.wrl","dir/file_2.wrl", and so on.

When a simplify action generates LevelOfSimplification nodes, the range field of each LevelOfSimplification node can be given globally in the range field of the simplify action. If the simplify action range field is not set, the simplify action computes it automatically for each LevelOfSimplification node. In this case, the sizeFactor field can be used to customize the range computation.

A minimum number of triangles can be set to stop the simplification when the object becomes too small.

Specifying 0% for the last level inserts an empty node in the scene graph. This allows you to completely remove objects that are too small or too far from the viewer.

The SoGlobalSimplifyAction provides two simplification strategies:

- SIMPLIFY_GLOBALLY: all the triangles found in the scene graph are collected in a single object. Then this object is simplified.

- SIMPLIFY_BY_SUBGROUP: triangles are collected until a material change or a separator is found.

The generateNormals flag can be used to force per-vertex normal computation during an SoGlobalSimplifyAction. When not set, objects may appear faceted instead of appearing smooth. Setting the addShapeHints flag to TRUE tells Open Inventor to build normals at run-time.

By default the SoGlobalSimplifyAction collects all the triangles even if they are part of a simple shape (cube, cone, sphere, text3...). Setting the addShapeHints flag to FALSE tells the action to collect triangles only if they belong to a complex shape.

The getSimplifiedSceneGraph() method returns the root of the new scene graph after applying the SoGlobalSimplifyAction.

Adaptive Viewing

Functionality was added to every viewer class in Open Inventor to be able to control the update rate, either through fixing the frames per second or the number of primitives rendered. For the viewer to be successful, there need to be nodes in the scene graph that can produce multiple levels of detail. What the adaptive viewers offer is a way for the user to set complexity goals that the dynamic nodes in the scene graph try to achieve.

Open Inventor implements adaptive viewing through a new action, GetPrimitiveCountAction, and a new element, DecimationPercentage. The GetPrimitiveCount action is used by the viewer to calculate the complexity of the scene graph by counting the number of triangles, points, lines, text, and images. It then can decide to render some lesser percentage of these primitives by setting the DecimationPercentage element. The viewer can fix the frame rate by timing each render and then adjusting the Decimation value to keep the frame rate within some desired range.

A new example demo program, the Large Model Viewer, has been developed to demonstrate this new functionality. With this program you can control the complexity of scenes output from the mesh decimation algorithm. In addition, you can control scenes that contain LOD nodes, such as many VRML files on the World Wide Web, and nodes that respond to the complexity element, such as Spheres, Cones, Cylinders, NURBS Curves and Surfaces, and 3D Text.

RenderList Node, ValueOrdering, OctreeOrdering

Large Model Viewing techniques require a spatial organization of shapes. Unfortunately, application scene graphs are often not organized spatially. The abstract node class, RenderList, has been developed to deal with this dilemma. This new node creates a flat, linear representation of the shapes within a hierarchical scene graph, which can then be traversed in any order or can be reorganized into a spatial scheme. This reorganization is transparent to the application, which receives the benefits of spatial organization without needing to change its logical organization of the scene graph.

In Open Inventor two organizational strategies have been implemented in the nodes ValueOrdering and OctreeOrdering. Advanced programmers are given the ability to derive new nodes from the RenderList class to implement their own large model viewing techniques.

The ValueOrdering node traverses the linear list of shapes generated by the RenderList node and determines the rendering value and cost of each shape. The rendering value is based on the object's approximate screen size and its cost is based on a count of the number of primitives the shape contains.

During each render traversal, the ValueOrdering node determines how many primitives a shape deserves based on its rendering value. If the shape contains multiple levels of detail, then the ValueOrdering node will choose the correct level of detail. However, this node also has two techniques that allow it to handle scenes that do not contain levels of detail: bounding box substitutes and drop culling.

If bounding box substitutes are enabled and the ValueOrdering node calculates that the number of triangles that the object deserves is closer to 12 (the number of triangles in a bounding box) than to the minimum number of triangles the shape can draw, then the ValueOrdering node will draw a bounding box instead of the shape. With drop culling enabled, a user can specify a size in pixels such that when the shape is less than this size, the shape is not rendered.

The typical scenario where this is useful is in CAD model assembly viewing, where all or most of the scene is visible, but lots of details may be so small that there is no point in drawing them until the user zooms in on them. Replacing such detail with its bounding box is adequate in many cases and does not have the disk and memory costs, along with the preprocessing time, associated with maintaining multiple levels of detail.

The OctreeOrdering node is more appropriate for use in walk-throughs or in other situations where the viewer is inside a large scene and much of the geometry is not visible from any given camera position. The linear list of shapes created by the RenderList node is processed and organized into an Octree which allows objects to be quickly dismissed if they fall out of the viewing frustum, for instance when they are behind or to the side of the viewer. The OctreeOrdering node also can replace with a bounding box groups of shapes that are too small, based on an approximate screen size.

The new Large Model Viewer demo program incorporates these two traversal ordering techniques as well. This allows an application developer to experiment with the different large model viewing techniques that Open Inventor offers and determine the best solution for his or her data.


LargeModelViewer

NAME

LargeModelViewer - demonstrates adaptive viewing and simplification

SYNOPSIS

LargeModelViewer

DESCRIPTION

The LargeModelViewer program is a demonstration of the adaptive viewing, simplification, and ordering traversal techniques in Open Inventor.

AdaptiveViewing

In the status bar are displayed rendering and scene complexity statistics. The right corner section of the statistics bar displays the current frames per second and the decimation percentage. It will take a few frames to get an average fps, so the frames per second display may be off immediately after loading a new file.

The Edit Adaptive Viewing menu button will display options for controlling the scene complexity through the new decimation elements. There are four radio buttons for choosing the strategy the viewer should use:

•	Normal - do not control decimation element; works the same as previous versions of Open Inventor.

•	Fixed Number of Triangles - the viewer will use a GetPrimitiveCountAction to find how many triangles are in the scene, and then adjust the decimation element so that the number of triangles rendered remains constant.

•	Frames Per Second - the viewer will time each render traversal and then adjust the decimation element to keep the render time close to the desired frame rate.

•	Fixed Percentage - the same decimation percentage will be used always. In addition, the DecimationType element will be set to PERCENTAGE, so that SoLOD and SoLevelOfSimplification nodes will choose a child based on the DecimationPercentage element alone, without looking at the camera position. Because the LOD node is no longer dependent on the camera position, its GL calls can be cached and may result in quicker rendering.

The Do Full Rendering When Still check box tells the viewer to render at 1.0 decimation (full detail) when the scene is still. This allows you to interact with the scene at a lower decimation, and then see all of the details when done.

Reorganizing

The Reorganize (Triangle Strips) item is under the Processing menu. This applies an SoReorganizeAction that reorganizes the scene graph similar to the ivfix utility program. In files with no Inlines or LOD nodes, this will group shapes by material and texture and then convert the shapes into SoIndexedTriangleStripSet nodes. The reorganized scene graph should render quicker, although the effects will be more noticeable on hardware-accelerated graphics cards.

Notice that the Triangle-Stripping algorithm has been improved in version 2.5 (and higher), so if you have used ivfix before and were unsatisfied, be sure to try it again now.

Simplifying

Two of the SimplifyActions are accessible from the Processing menu: ShapeSimplify and GlobalSimplify. Both of these actions will produce multiple levels of detail for the scene. You can then use the Adaptive Viewing dialog to choose which level of detail to view.

The ShapeSimplifyAction will simplify each shape individually, leaving the rest of the scene graph intact. The GlobalSimplifyAction will group the shapes together and simplify the scene as a whole, replacing the old scene graph.

The last two buttons on the menu combine the Simplify and Reorganize actions. First the Simplify action is run on the scene, and then each of the simplified shapes are organized into triangle strips. Notice that you can only simplify the scene once. If you want to try a different simplify technique on the same scene, you will have to reload the original file again.

Traversal

The traversal menu allows you to experiment with the new Ordering nodes, derived from SoRenderList. This menu alters the type of grouping node kept above the loaded scene. This node is kept below the lights and camera, but above the actual geometry. The default option is SoSeparator, which will result in the usual traversal behavior; the other two options use either an SoValueOrdering node or an SoOctreeOrdering node.

The ValueOrdering node will work well with assemblies where there are many parts of various sizes. This node also allows you to use the AdaptiveViewing techniques on scenes that normally would not respond to the Decimation element, if for instance there are no LODs in the scene.

The OctreeOrdering node, in contrast, is better in spatially large scenes, where the viewer moves through the scene instead of around it. The OctreeOrdering node organizes the shapes into an octree spatial organization, which allows it to cull large areas of space quickly that will not be within the view frustum.

If you load a file with VRML 2.0 animations, the flag under the Processing menu Find VRML 2.0 Animations will search for VRML 2.0 Time Sensors to determine which subgraphs will be changing in the animation, and mark these as render objects for the Ordering nodes. If you are not using VRML 2.0 files, you can turn the flag off for quicker file loading.

Notice that after reorganizing, some small shapes that are far away from each other will be grouped into one large shape. This will prevent the Ordering nodes from drop culling effectively. If you are wondering how the shapes are grouped, try changing the draw style to bounding box with the right mouse button menu. The same is true for GlobalSimplify, because it groups together all of the shapes; however, the Ordering nodes should work well with the ShapeSimplifyAction.

Fetching Inlines

This demo program assumes that any Inlines can be resolved on the local file system. It will not fetch http requests over the network. From the "Processing" menu, you can set whether to load all of the Inlines immediately, or only as needed.

Viewing menu

This menu contains a number of flags that can boost performance in special cases. You can experiment with these flags to see which ones work with your data.

•	Show Primitive Count - Although the primitive count is cached under separators that do not change, it does take some time to apply the GetPrimitiveCountAction, get the results and update the display. You may find that turning off the display when not needed gives the viewer a performance boost. This is especially the case with the OctreeOrdering and ValueOrdering nodes and with some scenes with LODs.

•	Backface Culling - Open Inventor by default draws both sides of triangles, but if you have an assembly of solid parts, the interior sides of the triangles are not needed. This flag, when on, sets fields of a ShapeHints node such that vertexOrdering is COUNTERCLOCKWISE and shapeType is SOLID. When the flag is off, these fields are ignored, letting the scene (and any ShapeHints in it) decide whether to do backface culling.

•	Disable GL Normalize - If turned on, the OpenGL flag, GL_NORMALIZE will be disabled. This may increase rendering speed for scenes that do not contain any scaling. If the model contains scales (SoTransform's scaleFactor field), then these parts will either glow too bright, or be too dark. Often, using the ReorganizeAction (under menu Processing) will remove the scales, allowing you to disable GL_NORMALIZE for increased performance. (Try the data/models/vehicles/kittyHawk.iv file for an example; the engine will glow too brightly if GL_NORMALIZE is disabled).

•	Generate Smooth Normals - If the model has no Normal nodes, Open Inventor will generate smooth normals for the shape if this is on. This flag sets the creaseAngle field of a ShapeHints node to 0.5.

•	Delayed Blended Transparency - Switches between SCREEN_DOOR and DELAYED_BLEND transparency. With this switch on, transparent objects will appear correct, but the viewer will run slower.

SOURCE CODE

Source code to LargeModelViewer is included in the source example directory: %OIVHOME%\src\examples\LargeModel\LargeModelViewer

OPTIONS

There are no command line options.

FILES

%OIVHOME%\data\LargeModel\*

The "formula1" example contains many SoLOD nodes, so the best method would be to use the DecimationStrategy dialog to set the desired level of detail, and leave the Traversal as "Separator". This would also be the case for files output from the Simplification demo programs.

The Harley.iv file contains many parts, but does not contain LOD nodes, so the ValueOrdering node can used to allow the scene to be decimated through bounding boxes and drop culling of individual shapes, or a simplify action can be applied.

A new directory "allModels" has been added under "data/models", which uses WWWInlines to link the other example files into one scene. Each file represents a directory under data/models. The file "allModels.iv" joins these files into one large scene. This can be used as an example for the OctreeOrdering node.

SEE ALSO

inventor, ivfix, Large Model Viewing Overview, SceneViewer, SoGetPrimitiveCountAction, SoGlobalSimplifyAction, SoLevelOfSimplification, SoLOD, SoOctreeOrdering, SoRenderList, SoReorganizeAction, SoShapeHints, SoShapeSimplifyAction, SoSimplifyAction, SoValueOrdering, SoWinViewer


Light Directional Light
Directional Light

The 3D icon allows interactive manipulation of the light's direction.


Light Point Light
Point Light

The 3D icon allows interactive manipulation of the light's position.


Light Spot Light
Spot Light

The 3D icon allows interactive manipulation of the light's position, direction, and cutoff angle.


Manip Center Ball
Center Ball Manipulator

Crosshairs (at the ends of the x, y and z axes)

•	Click and drag to translate within the plane of the crosshairs

•	<Shift> click and drag to translate along one axis (determined by next user gesture)

Circles

•	Click and drag to rotate about a constrained axis

•	Click and drag the areas between the circles to rotate freely about the center

Sphere Surface

•	Click and drag to rotate freely

SEE ALSO

SoCenterBallDragger, SoCenterBallManip


Manip Handle Box
Handle Box Manipulator

Corner Cubes

•	Click and drag to scale uniformly about center

•	<Alt> click and drag to scale uniformly about opposite corner

Center Cubes (on sides of box)

•	Click and drag to scale about center

•	<Alt> click and drag to scale about opposite face

Faces

•	Click and drag to translate freely in plane of face

•	<Shift> click and drag to translate along one axis (determined by next user gesture)

•	<Alt> click and drag to translate perpendicular to that face

SEE ALSO

SoHandleBoxDragger, SoHandleBoxManip


Manip Jack
Jack Manipulator

End Cubes

•	Click and drag any cube to scale uniformly

Lines

•	Click and drag along line to rotate freely

Cylinder

•	Click and drag to translate along that axis

SEE ALSO

SoJackDragger, SoJackManip


Manip Selection
Selection


Manip Tab Box
Tab Box Manipulator

Corner Tabs

•	Click and drag to scale about opposite corner

Edge Tabs

•	Click and drag to scale about opposite edge

Faces

•	Click and drag to translate freely in the plane of the face

•	<Shift> click and drag to translate along one axis (determined by initial gesture)

SEE ALSO

SoTabBoxDragger, SoTabBoxManip


Manip Trackball
Trackball Manipulator

Stripes

•	Click and drag to rotate around that axis

Sphere Surface

•	Click and drag to rotate freely

<Alt> Surface

•	Click and drag to scale uniformly

<Shift> Surface

•	Click and drag to position user axis (user axis stripe appears)

•	<Shift> click and drag pole to intersection of two normal stripes to remove user axis

User Axis Stripe

•	Click and drag to rotate around user axis

SEE ALSO

SoTrackballDragger, SoTrackballManip


Manip Transform Box
Transform Box Manipulator

Cubes

•	Click and drag to scale uniformly

Edges

•	Click and drag to rotate around axis parallel to that edge

Faces

•	Click and drag to translate freely in plane of face

•	<Shift> click and drag to translate along one axis (determined by initial gesture)

SEE ALSO

SoTransformBoxDragger, SoTransformBoxManip


Manip Transformer
Transformer Manipulator

Click-drag any face to translate the dragger within the plane of that face. The face you selected will highlight in yellow. While you drag, yellow feedback arrows display the two directions of motion. Press the <Shift> key and the arrows turn orange; you may now pick between these two directions to constrain the motion. The direction you move the cursor in will determine which direction is chosen. Press the <Control> key and the dragger will translate perpendicular to that plane. The translation field is modified as the face is dragged.

Click a corner to scale the dragger. The corner you selected will turn yellow and radial lines will indicate that you may move toward and away from the center of the box. Drag radially and you will perform uniform scale. Press the <Control> key to scale about the opposite corner instead of the center of the box.

To stretch the dragger non-uniformly, press <Shift> when you drag the corner cube. Now you will see three orange arrows indicating that your gesture will determine which direction to choose. Move the cursor and the selected arrow will turn yellow while the others disappear. Now the dragger will stretch only in the direction you selected. Pressing <Control> at the same time as <Shift> allows you to stretch the dragger while keeping the opposite side pinned in place. When you drag a corner, this modifies the scaleFactor and possibly the translation field of the dragger.

Click one of the spherical knobs to rotate the dragger. When you first click, you'll see two orange lines and two purple circles. The purple circles indicate the two ways you can rotate. The orange lines are, once again, the two choices for your mouse gesture. Each line begins you moving around one of the two circles. Once you move the cursor far enough, the selected line turns yellow and you begin rotating the dragger about the selected circle. The other circle and line will disappear.

To perform unconstrained ("free") rotation, just press <Shift> while you drag the spherical knob. There will be no choices; instead all three purple circles will be displayed, forming a ball that you can roll around. Regardless of how you rotate, dragging the spherical knobs will modify the rotatation field of the dragger. Depending on how it is centered and what transforms precede it in the scene graph, rotation is likely to affect the translation and scaleFactor fields as well.

Pressing the <Control> key will change the center of rotation in both the constrained and unconstrained (<Shift>) case. By default, rotation occurs about the center of the bounding box. With <Control> depressed, rotation occurs about the middle of the opposite side of the bounding box. The purple feedback will change to illustrate this; the feedback circles increase in size and purple crosshairs sprout at the new rotational center.

SEE ALSO

SoTransformerDragger, SoTransformerManip


Manips

SoCenterballManip	Transform node with 3D interface for editing rotation and center
SoClipPlaneManip	Manipulator to transform a clipping plane
SoDirectionalLightManip	Directional light node with 3D interface for editing direction
SoHandleBoxManip	Transform node with 3D Interface for editing ScaleFactor and Translation
SoJackManip	Transform node with 3D interface for rotating, scaling, and translating
SoPointLightManip	Point light node with 3D interface for editing location
SoSpotLightManip	Spotlight node with 3D interface for editing location, direction, and beam width
SoTabBoxManip	Transform node with 3D Interface for editing scale and translation
SoTrackballManip	Transform node with 3D interface for changing rotation and scaling
SoTransformBoxManip	Transform node with 3D interface for changing scaling, rotation, and translation
SoTransformerManip	Transform node with 3D interface for changing scaling, rotation, and translation
SoTransformManip	Base class for all transform nodes with built-in 3D user interfaces


Nodekits

SoAppearanceKit	Appearance nodekit class
SoBaseKit	Base class for all node kits
SoCameraKit	Camera nodekit class
SoInteractionKit	Base class for all interaction nodekit classes
SoLightKit	Light nodekit class
SoNodeKit	Initializes nodekit classes
SoNodeKitListPart	Group node with restricted children
SoNodekitCatalog	Nodekit catalog class
SoSceneKit	Scene nodekit class
SoSeparatorKit	Separator nodekit class
SoShapeKit	Shape nodekit class
SoWrapperKit	Wrapper nodekit class


Nodes

SoAnnotation	Annotation group node
SoAnnoText3	Annotation text node
SoAnnoText3Property	Annotation text property node
SoAntiSquish	Transformation node that undoes non-uniform 3D scales
SoArray	Group node that creates a regular IxJxK array of copies of its children
SoAsciiText	Simple 3D text shape node
SoBaseColor	Node that defines an object's base color
SoBevelProperty	Node to define beveling properties
SoBlinker	Animated cycling switch node
SoCallback	Provides custom behavior during actions
SoCamera	Abstract base class for camera nodes
SoClipPlane	Clipping plane node
SoColorIndex	Surface color index node
SoComplexity	Shape complexity node
SoCone	Cone shape node
SoCoordinate3	Coordinate point node
SoCoordinate4	Rational coordinate point node
SoCube	Cube shape node
SoCylinder	Cylinder shape node
SoDirectionalLight	Node representing a directional light source
SoDrawStyle	Node that defines the style to use when rendering
SoEdgeFlag	Class to mark/unmark edges for beveling
SoEnvironment	Global environment node
SoFaceSet	Polygonal face shape node
SoFile	Node that reads children from a named file
SoFont	Node that defines font type and size for text
SoFontStyle	Simple 3D text style node
SoGroup	Base class for all group nodes
SoImage	Displays an image that always faces the camera
SoIndexedFaceSet	Indexed polygonal face shape node
SoIndexedLineSet	Indexed polyline shape node
SoIndexedNurbsCurve	Indexed NURBS curve shape node
SoIndexedNurbsSurface	Indexed NURBS surface shape node
SoIndexedShape	Abstract base class for all indexed vertex-based shapes
SoIndexedTriangleStripSet	Indexed triangle strip set shape node
SoInfo	Node containing information text string
SoLabel	Node containing label text string
SoLevelOfDetail	Level-of-detail switching group node
SoLevelOfSimplification	Level-of-detail switching node designed for grouping simplified versions of the same shape
SoLight	Abstract base class for all light source nodes
SoLightModel	Node that defines the lighting model to use when rendering
SoLineSet	Polyline shape node
SoLinearProfile	Piecewise-linear profile curve
SoLocateHighlight	Special separator that performs locate highlighting
SoLOD	Distance-based level-of-detail switching group node
SoMarkerSet	Extension of Point Set that draws a small bitmap (symbol) at each 3D location
SoMaterial	Surface material definition node
SoMaterialBinding	Node that specifies how multiple materials are bound to shapes
SoMaterialIndex	(OBSOLETE) Surface material node for color index mode
SoMatrixTransform	Node that specifies a 3D geometric transformation as a matrix
SoMultipleCopy	Group node that traverses multiple times, applying matrices
SoNode	Abstract base class for all database nodes
SoNonIndexedShape	Abstract base class for all non-indexed vertex-based shapes
SoNormal	Node that defines surface normals for shapes
SoNormalBinding	Node that specifies how multiple surface normals are bound to shapes
SoNurbsCurve	NURBS curve shape node
SoNurbsProfile	NURBS profile curve
SoNurbsProperty	Node that defines additional properties for rendering a NURBS surface
SoNurbsSurface	NURBS surface shape node
SoOctreeOrdering	Group node that maintains a transparent octree organization of the shapes below it
SoOrthographicCamera	Orthographic camera node
SoPackedColor	Node that defines base colors using packed representation
SoPathSwitch	Group node that traverses only when traversed along a given path
SoPattern	Node that defines the pattern to use when rendering shapes
SoPendulum	Animated oscillating rotation node
SoPerspectiveCamera	Perspective camera node
SoPickStyle	Picking style node
SoPointLight	Node representing a point light source
SoPointSet	Point set shape node
SoPolygonOffset	Provides access to OpenGL's polygon offset feature
SoProfile	Abstract base class for all profile nodes
SoProfileCoordinate2	Profile coordinate node
SoProfileCoordinate3	Rational profile coordinate node
SoQuadMesh	Quadrilateral mesh shape node
SoRenderList	Abstract group node that changes traversal from the scene graph to a list of render objects
SoResetTransform	Node that resets the current transformation to identity
SoRotation	Node representing a 3D rotation about an arbitrary axis
SoRotationXYZ	Representing a 3D rotation about the x-, y-, or z-axis
SoRotor	Animated rotation node
SoScale	Node representing a 3D geometric scaling
SoSeparator	Group node that saves and restores traversal state
SoShape	Abstract base class for all shape nodes
SoShapeHints	Node that provides hints about shapes
SoShuttle	Animated oscillating translation node
SoSphere	Sphere shape node
SoSpotLight	Node representing a spotlight source
SoSurroundScale	Transformation node that adjusts the current matrix so a default cube will surround other objects
SoSwitch	Group node that traverse one chosen child
SoText2	Screen-aligned 2D text shape node
SoText3	3D text shape node
SoTexture2	2D texture mapping node
SoTexture2Transform	2D texture transformation node
SoTexture3	3D texture mapping node
SoTexture3Transform	3D texture transformation node
SoTextureCoordinate2	2D texture coordinate node
SoTextureCoordinate3	3D texture coordinate node
SoTextureCoordinateBinding	Node that specifies how texture coordinates are bound to shapes
SoTextureCoordinateDefault	Node that removes texture coordinates from state
SoTextureCoordinateEnvironment	Node that specifies texture coordinates by projection from a environment
SoTextureCoordinateFunction	Abstract base class for texture coordinate function nodes
SoTextureCoordinatePlane	Node that specifies texture coordinates by projection from a plane
SoTransform	General 3D geometric transformation node
SoTransformSeparator	Group node that saves and restores transformation state
SoTransformation	Abstract base class for all geometric transformation nodes
SoTranslation	Node representing a 3D translation
SoTriangleStripSet	Triangle strip set shape node
SoUnits	Node that scales to convert units of length
SoValueOrdering	Group node that alters the decimation of shapes below it depending on their rendering value as approximated by their size on the screen
SoVertexFlag	Class to mark/unmark vertices for beveling
SoVertexProperty	Vertex property node
SoVertexShape	Abstract base class for all vertex-based shape nodes
SoWWWAnchor	Separator group node with a URL hyperlink
SoWWWInLine	Node that refers to children through a URL


Projectors

SbCylinderPlaneProjector	Cylinder-plane projector
SbCylinderProjector	Cylinder projector
SbCylinderSectionProjector	Cylinder-section projector
SbCylinderSheetProjector	Cylinder-sheet projector
SbLineProjector	Line projector
SbPlaneProjector	Plane projector
SbProjector	Base class for representing projectors
SbSpherePlaneProjector	Sphere-plane projector
SbSphereProjector	Sphere projector
SbSphereSectionProjector	Sphere-section projector
SbSphereSheetProjector	Sphere-sheet projector


SVI Buttons
Viewer Buttons

If the SceneViewer window is too small, not all of these buttons will be visible.

 Select/Pick Button

Selects object manipulation or pick mode (and deselects camera or viewer mode). The cursor shape will change to an arrow. In this mode, the user is manipulating objects in the scene graph.

 View Button

Selects camera or viewer mode (and deselects object manipulation or pick mode). The cursor shape will change to a hand icon. In this mode, the user is moving the camera in 3D space.

 Help

This menu provides help about the application.

 Home Button

Returns the camera to its home position (initial position if not reset).

 Set Home Button

Resets the home position to the current camera position.

 View All Button

Brings the entire scene graph into view.

 Seek Button

Allows the user to select a new center of rotation for the camera. When clicked on (and in viewer mode) the cursor changes to a crosshair. The next left mouse buttonpress causes whatever is underneath the cursor to be selected as the new center of rotation. Once the button is released, the camera either jumps or animates to its new position depending on the current setting of the seek time in the preferences dialog box.

   Camera Alignment Buttons

Select the axis of alignment (X, Y, or Z) of the camera. Only displayed for Plane Viewers.

  Projection Button

Selects the type of camera used by the viewer. It toggles between the two available camera types --perspective and orthographic. Only displayed for Examiner and Plane viewers.

The Dolly thumbwheel is only available to the perspective camera.


SVI Color Editor
Color Editors

The color editors are used for editing a number of different properties, including the background color, light colors, and various material colors. They all have this same general appearance. This one, for example, is used for setting a material's diffuse color.

You can drag the marker in the color wheel to select a color. You move the V (value) slider to control the intensity of the color. The color boxes display the currently selected color and the previous color. You can use the arrow buttons to switch back and forth between them. By default, the scene is automatically updated as you modify the color.

Edit Menu

The color editor's Copy menu item allows you to copy the current color to the Windows clipboard. The Paste menu item applies that color to the currently selected object. The Paste menu item will also apply the color component from a material that was copied to the clipboard by the material editor.

Sliders Menu

The color editor can display sliders that allow you to directly manipulate the components of an RGB or HSV color.


SVI Edit
Edit

Undo	Not implemented
--------------------
Cut	Cut the selection and put it on the Clipboard
Copy	Copy the selection and put it on the Clipboard
Paste	Insert Clipboard contents


SVI Editors
Editors

SceneViewer provides a variety of editors that make it easy for you to change colors, material properties, and headlight properties.

This menu launches the Material Editor and the Color Editor. An object must be selected for the menu to be active.


SVI File
File

New...	Open a new (empty, untitled) scene
Open...	Open an existing scene (replaces the current scene)
Import...	Open an existing scene and add it to the scene
Save	Save the active scene
Save As...	Save the active scene with a new name
--------------------
Print...	Print the current scene
Print Preview	Display full page preview
Print Setup...	Change the printer and printing options
--------------------
Info...	Display scene description info, if any
--------------------
1	Open this scene (most recently used)
2	"
3	"
4	"
--------------------	"
Exit	Quit the application; prompts to save documents


SVI Graphics Area
Graphics Area

Shown is the default Examiner Viewer. In the Examiner Viewer you can use the cursor to move and spin objects.

Mouse Usage

Left Mouse:	Rotate the virtual trackball.
Ctrl + Left Mouse:	Used for roll action (rotates around the viewer forward direction).
Middle Mouse:	Translate up, down, left and right.
	Alternative to the Middle Mouse button: Shift + Left Mouse
Left + Middle Mouse:	Dolly in and out (gets closer to and further away from the object).
	Alternative to the Middle Mouse button: Ctrl + Shift + Left Mouse
Right Mouse:	Open the popup menu.

Predefined Keys

Escape	Toggles between viewing and selection mode
Home	Sets camera to Home position
's'	Activate Seek mode. Press (but do not hold down) the 's' key, then click on a target object.


SVI Headlight Editor
Headlight Editor

The headlight editor allows you to control the direction and the intensity of the viewer's headlight.

You can drag the arrow icon to directly manipulate the direction in which the headlight is shining.

The edit menu allows you to bring up a color editor to change the headlight color. It also allows you to copy the current headlight properties to the Windows clipboard, and apply them to the scene later.


SVI Help
Help

This menu item displays the help file.


SVI Lights
Lights

Create Dir Light	Create a directional light
Create Point Light	Create a point light
Create Spot Light	Create a spot light
--------------------
Ambient Lighting...	Edit the ambient light color (launches color editor)
--------------------
Turn all ON	Turn on all the lights
Turn all OFF	Turn off all the lights
Show all Icons	Display the light icons
Hide all Icons	Hide all light icons
--------------------
Headlight >	Turn headlight on or off and edit it (launches headlight editor)
<additional lights>	If there are additional lights in the scene, you can edit some of their properties.


SVI Manips
Manips

Universal Transformer	Selects universal transformer manipulator
Trackball	Selects trackball manipulator
HandleBox	Selects handle box manipulator
Jack	Selects jack manipulator
Centerball	Selects centerball manipulator
TabBox	Selects tab box manipulator
TransformBox	Selects transform box manipulator
None	Turns off manipulator. Selected objects will be surrounded with a red wireframe box highlight.
--------------------
Replace


SVI Material Editor
Material Editor

The material editor allows you to modify the appearance properties of the currently selected object.


SVI Selection
Selection

This menu allows the different selection policies to be demonstrated. A selection policy determines how objects get added and removed from the collection of selected objects.

Enable	Toggles ability to select objects on and off.
--------------------
Single Selection	Left mouse pick on object clears selection, then selects object. Left mouse pick on nothing clears selection. Only one object may be selected at a time.
Toggle Selection	Left mouse pick on object toggles its selection status. Left mouse pick on nothing does nothing. Multiple objects may be selected.
Shift Selection	When shift key is down, selection policy is TOGGLE. When shift key is up, selection policy is SINGLE. Multiple objects may be selected. (DEFAULT)
--------------------
Select Parent	Selects parent of currently selected object.


SVI View
View

Toolbar	Toggle toolbar on and off.
Status Bar	Toggle status bar on and off.
Viewing	Toggle between viewing mode (hand cursor) and selection mode (arrow cursor).
--------------------
Examiner	Select Examiner Viewer, which provides a virtual trackball interface.
Fly	Select Fly-through Viewer, which is used for traveling through expansive data sets.
Walk	Select Walk Viewer, which is used for architectural walk-throughs.
Plane	Select Plane Viewer, which is used for orthographic projections.
--------------------
View Selection	Move camera to view selected object
Fog	Toggles fog on and off.
Antialiasing	Toggles antialiasing on and off.
--------------------
Screen Door Transparency	Selects screen door transparency.
Blended Transparency	Selects blended transparency.
Delayed Blended Transparency	Selects delayed blended transparency.
Sorted Blended Transparency	Selects sorted blended transparency.
--------------------
Edit Background Color...	Edit the background color (launches color editor).


SVI View Points
ViewPoints

This menu provides a list of camera positions obtained when the scene was read in. (Some scenes don't have any.) If there are no viewpoints in the scene, this menu contains one item, Default View, which returns you to the home view.

When an entry is selected, the camera moves to the position and orientation specified.

Technical Note: Camera positions are contained under a Switch node whose name is "Cameras" within the scene graph file.


SbBool

NAME

SbBool - Boolean type

INHERITS FROM

SbBool

SYNOPSIS

#include <Inventor/SbBasic.h>

DESCRIPTION

This typedef is used to represent the Boolean values TRUE and FALSE. SbBool is not a class and does not have any methods or variables.


SbBox2f

NAME

SbBox2f - 2D box class

INHERITS FROM

SbBox2f

SYNOPSIS

#include <Inventor/SbBox.h>

Methods from class SbBox2f:

SbBox2f()

SbBox2f(float xmin,
float ymin,
float xmax,
 float ymax)

SbBox2f(const SbVec2f &min,
const SbVec2f &max)

void	~SbBox2f()

const SbVec2f &	getMin()

const SbVec2f &	getMax()

SbVec2f	getCenter()

void	extendBy(const SbVec2f &point)

void	extendBy(const SbBox2f &box)

SbBool	intersect(const SbVec2f &point)

SbBool	intersect(const SbBox2f &box)

void	setBounds(float xmin,
float ymin,
float xmax,
float ymax)

void	setBounds(const SbVec2f &min,
const SbVec2f &max)

void	getBounds(float &xmin,
float &ymin,
float &xmax,
float &ymax)

void	getBounds(SbVec2f &min,
SbVec2f &max)

void	getOrigin(float &x0,
float &y0)

void	getSize(float &x,
float &y)

float	getAspectRatio()

void	makeEmpty()

SbBool	isEmpty()

SbBool	hasArea()

DESCRIPTION

2D box which has planes parallel to the major axes and is specified by two points (specified as floating point) on a diagonal. This class is part of the standard Open Inventor datatype classes and is used as input and output to geometry operations.

METHODS

SbBox2f()

SbBox2f(float xmin,
float ymin,
float xmax,
 float ymax)

SbBox2f(const SbVec2f &min,
const SbVec2f &max)

void	~SbBox2f()

Constructors and destructor for a 2D float box. xmin, ymin, xmax, and ymax are the bounds of the box. min and max are the corners of the diagonal that define the box.

const SbVec2f &	getMin()

const SbVec2f &	getMax()

Returns the minimum and maximum points of the box.

SbVec2f	getCenter()

Returns the center of the box.

void	extendBy(const SbVec2f &point)

void	extendBy(const SbBox2f &box)

Extends this box (if necessary) to contain the specified point or other box.

SbBool	intersect(const SbVec2f &point)

SbBool	intersect(const SbBox2f &box)

Returns TRUE if the specified point or box intersects this box.

void	setBounds(float xmin,
float ymin,
float xmax,
float ymax)

void	setBounds(const SbVec2f &min,
const SbVec2f &max)

Sets the corners of the box.

void	getBounds(float &xmin,
float &ymin,
float &xmax,
float &ymax)

void	getBounds(SbVec2f &min,
SbVec2f &max)

Gets the corners of the box.

void	getOrigin(float &x0,
float &y0)

Gets box origin.

void	getSize(float &x,
float &y)

Gets box size.

float	getAspectRatio()

Gets box aspect ratio.

void	makeEmpty()

Makes an empty box.

SbBool	isEmpty()

Returns TRUE if the box is empty, and FALSE otherwise.

SbBool	hasArea()

Returns TRUE if both dimensions of the box have positive size, and FALSE otherwise.

SEE ALSO

SbBox3f, SbXfBox3f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix


SbBox2s

NAME

SbBox2s - 2D box class

INHERITS FROM

SbBox2s

SYNOPSIS

#include <Inventor/SbBox.h>

Methods from class SbBox2s:

SbBox2s()

SbBox2s(short xmin,
short ymin,
short xmax,
short ymax)

SbBox2s(const SbVec2s &_min,
const SbVec2s &_max)

void	~SbBox2s()

const SbVec2s &	getMin() const

const SbVec2s &	getMax() const

void	extendBy(const SbVec2s &point)

void	extendBy(const SbBox2s &box)

SbBool	intersect(const SbVec2s &point) const

SbBool	intersect(const SbBox2s &box) const

void	setBounds(short xmin,
short ymin,
short xmax,
short ymax)

void	setBounds(const SbVec2s &_min,
const SbVec2s &_max)

void	getBounds(short &xmin,
short &ymin,
short &xmax,
short &ymax) const

void	getBounds(SbVec2s &_min,
SbVec2s &_max) const

void	getOrigin(short &originX,
short &originY) const

void	getSize(short &sizeX,
short &sizeY) const

float	getAspectRatio() const

void	makeEmpty()

int	operator ==(const SbBox2s &b1,
const SbBox2s &b2)

int	operator !=(const SbBox2s &b1,
const SbBox2s &b2)

DESCRIPTION

2D box which has planes parallel to the major axes and is specified by two points (specified with short integers) on a diagonal. This class is part of the standard Open Inventor datatype classes and is used as input and output to geometry operations.

METHODS

SbBox2s()

SbBox2s(short xmin,
short ymin,
short xmax,
short ymax)

SbBox2s(const SbVec2s &_min,
const SbVec2s &_max)

void	~SbBox2s()

Constructors and destructor for a 2D integer box. xmin, ymin, xmax, and ymax are the bounds of the box. min and max are the corners of the diagonal that define the box.

const SbVec2s &	getMin() const

const SbVec2s &	getMax() const

Returns the minimum and maximum points of the box.

void	extendBy(const SbVec2s &point)

void	extendBy(const SbBox2s &box)

Extends this box (if necessary) to contain the specified point or other box.

SbBool	intersect(const SbVec2s &point) const

SbBool	intersect(const SbBox2s &box) const

Returns TRUE if the specified point or box intersects this box.

void	setBounds(short xmin,
short ymin,
short xmax,
short ymax)

void	setBounds(const SbVec2s &_min,
const SbVec2s &_max)

Sets the corners of the box.

void	getBounds(short &xmin,
short &ymin,
short &xmax,
short &ymax) const

void	getBounds(SbVec2s &_min,
SbVec2s &_max) const

Gets the corners of the box.

void	getOrigin(short &originX,
short &originY) const

Returns origin (minimum point) of box.

void	getSize(short &sizeX,
short &sizeY) const

Returns box size.

float	getAspectRatio() const

Returns aspect ratio (ratio of width to height) of box.

void	makeEmpty()

Makes an empty box.

int	operator ==(const SbBox2s &b1,
const SbBox2s &b2)

int	operator !=(const SbBox2s &b1,
const SbBox2s &b2)

Equality comparisons.

SEE ALSO

SbBox3f, SbXfBox3f, SbBox2f, SbVec3f, SbVec2f, SbVec2s, SbMatrix


SbBox3f

NAME

SbBox3f - 3D box class

INHERITS FROM

SbBox3f

SYNOPSIS

#include <Inventor/SbBox.h>

Methods from class SbBox3f:

SbBox3f()

SbBox3f(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)

SbBox3f(const SbVec3f &min,
const SbVec3f &max)

void	~SbBox3f()

const SbVec3f &	getMin()

const SbVec3f &	getMax()

SbVec3f	getCenter()

void	extendBy(const SbVec3f &point)

void	extendBy(const SbBox3f &box)

SbBool	intersect(const SbVec3f &point)

SbBool	intersect(const SbBox3f &box)

void	setBounds(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)

void	setBounds(const SbVec3f &min,
const SbVec3f &max)

void	getBounds(float &xmin,
float &ymin,
float &zmin,
float &xmax,
float &ymax,
float &zmax)

void	getBounds(SbVec3f &min,
SbVec3f &max)

void	getOrigin(float &x0,
float &y0,
float &z0)

void	getSize(float &x,
float &y,
float &z)

void	makeEmpty()

SbBool	isEmpty()

SbBool	hasVolume()

void	getSpan(SbVec3f &dir,
float &dMin,
float &dMax)

void	transform(const SbMatrix &mx)

float	getVolume()

DESCRIPTION

3D box which has planes parallel to the major axes and is specified by two points on a diagonal. This class is part of the standard Open Inventor datatype classes and is used as input and output to geometry operations (see SoGetBoundingBoxAction).

METHODS

SbBox3f()

SbBox3f(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)

SbBox3f(const SbVec3f &min,
const SbVec3f &max)

void	~SbBox3f()

Constructors and destructor for a 3D float box. xmin, ymin, zmin, xmax, ymax and zmax are the bounds of the box. min and max are the corners of the diagonal that define the box.

const SbVec3f &	getMin()

const SbVec3f &	getMax()

Returns the minimum and maximum points of the box. The minimum point is the corner of the box with the lowest X, Y, and Z values. The maximum point is the corner of the box with the highest X, Y, and Z values.

SbVec3f	getCenter()

Returns the center of the box.

void	extendBy(const SbVec3f &point)

void	extendBy(const SbBox3f &box)

Extends this box (if necessary) to contain the specified point or other box.

SbBool	intersect(const SbVec3f &point)

SbBool	intersect(const SbBox3f &box)

Returns TRUE if the specified point or box intersects this box.

void	setBounds(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)

void	setBounds(const SbVec3f &min,
const SbVec3f &max)

Sets the corners of the box.

void	getBounds(float &xmin,
float &ymin,
float &zmin,
float &xmax,
float &ymax,
float &zmax)

void	getBounds(SbVec3f &min,
SbVec3f &max)

Gets the corners of the box.

void	getOrigin(float &x0,
float &y0,
float &z0)

Gets box origin which is the same as the minimum corner of the box.

void	getSize(float &x,
float &y,
float &z)

Gets box size.

void	makeEmpty()

Makes an empty box.

SbBool	isEmpty()

Returns TRUE if the box is empty, and FALSE otherwise.

SbBool	hasVolume()

Returns TRUE if all three dimensions of the box have positive size, and FALSE otherwise.

void	getSpan(SbVec3f &dir,
float &dMin,
float &dMax)

Finds the span of a box along a specified direction. The span is the total distance the box occupies along a given direction. The total distance is returned in the form of a minimum and maximum distance from the origin of each of the corners of the box along the given direction. The difference between these two values is the span.

void	transform(const SbMatrix &mx)

Transforms box by matrix, enlarging box to contain result.

float	getVolume()

Returns the volume of the box.

SEE ALSO

SbXfBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix, SoGetBoundingBoxAction


SbColor

NAME

SbColor - color vector class

INHERITS FROM

SbVec3f>SbColor

SYNOPSIS

#include <Inventor/SbColor.h>

Methods from class SbColor:

SbColor(const SbVec3f vec3f)

SbColor(const float rgb[3])

SbColor(float r,
float g,
float b)

SbColor &	setHSVValue(float h,
float s,
float v)

SbColor &	setHSVValue(const float hsv[3])

void	getHSVValue(float &h,
float &s,
float &v) const

void	getHSVValue(float hsv[3]) const

SbColor &	setPackedValue(uint32_t rgba,
float& transparency)

uint32_t	getPackedValue(float transparency = 0.0) const

Methods from class SbVec3f:

SbVec3f	cross(const SbVec3f &v) const

float	dot(const SbVec3f &v) const

SbBool	equals(const SbVec3f v,
float tolerance) const

SbVec3f	getClosestAxis() const

const float *	getValue() const

void	getValue(float &x,
float &y,
float &z) const

float	length() const

void	negate()

float	normalize()

SbVec3f &	setValue(const float v[3])

SbVec3f &	setValue(float x,
float y,
float z)

SbVec3f &	setValue(const SbVec3f &barycentric,
const SbVec3f &v0,
const SbVec3f &v1,
const SbVec3f &v2)

float &	operator [](int i)

const float &	operator [](int i)

SbVec3f &	operator *=(float d)

SbVec3f &	operator /=(float d)

SbVec3f &	operator +=(const SbVec3f &u)

SbVec3f &	operator -=(const SbVec3f &u)

SbVec3f	operator -() const

SbVec3f	operator *(const SbVec3f &v,
float d)

SbVec3f	operator *(float d,
const SbVec3f &v)

SbVec3f	operator /(const SbVec3f &v,
float d)

SbVec3f	operator +(const SbVec3f &v1,
const SbVec3f &v2)

SbVec3f	operator -(const SbVec3f &v1,
const SbVec3f &v2)

int	operator ==(const SbVec3f &v1,
const SbVec3f &v2)

int	operator !=(const SbVec3f &v1,
const SbVec3f &v2)

DESCRIPTION

This class is used to represent an RGB color. Each component of the vector is a floating-point number between 0.0 and 1.0. There are routines to convert back and forth between RGB and HSV.

METHODS

SbColor(const SbVec3f vec3f)

SbColor(const float rgb[3])

SbColor(float r,
float g,
float b)

Constructors for color vector.

SbColor &	setHSVValue(float h,
float s,
float v)

Sets value of color vector from 3 HSV (Hue, Saturation, and Value) components. Value is the same as brightness of the color.

SbColor &	setHSVValue(const float hsv[3])

Sets value of color vector from array of 3 HSV components

void	getHSVValue(float &h,
float &s,
float &v) const

Returns 3 individual HSV components

void	getHSVValue(float hsv[3]) const

Returns an array of 3 HSV components

SbColor &	setPackedValue(uint32_t rgba,
float& transparency)

Sets value of color vector from an RGBA packed color value. The packed color format expressed in hexadecimal is 0xrrggbbaa, where

•	rr is the red value

•	gg is the green value

•	bb is the blue value

•	aa is the alpha value

RGBA component values range from 0 to 0xFF (255). The returned transparency value is a floating point value between 0.0 (opaque) and 1.0 (completely transparent). It is derived from the alpha component of the RGBA color.

uint32_t	getPackedValue(float transparency = 0.0) const

Returns an RGBA packed color value, derived from the color vector and the passed transparency value. The alpha component is set to (1.0 - transparency) * 255, resulting in a hex value between 0 and 0xFF. If transparency not specified, alpha is set to 0xFF (opaque).

SEE ALSO

SbVec3f


SbCylinder

NAME

SbCylinder - class for representing a cylinder

INHERITS FROM

SbCylinder

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbCylinder:

SbCylinder()

SbCylinder(const SbLine &a,
float r)

void	setValue(const SbLine &a,
float r)

void	setAxis(const SbLine &a)

void	setRadius(float r)

const SbLine &	getAxis() const

float	getRadius() const

SbBool	intersect(const SbLine &l,
SbVec3f &intersection) const

SbBool	intersect(const SbLine &l,
SbVec3f &enter,
SbVec3f &exit) const

DESCRIPTION

This class defines a simple cylinder datatype. It is used by the Open Inventor toolkit for arguments or return values.

METHODS

SbCylinder()

SbCylinder(const SbLine &a,
float r)

Constructors. One takes an axis and radius.

void	setValue(const SbLine &a,
float r)

Change the axis and radius.

void	setAxis(const SbLine &a)

void	setRadius(float r)

Set just the axis or radius.

const SbLine &	getAxis() const

float	getRadius() const

Return the axis and radius.

SbBool	intersect(const SbLine &l,
SbVec3f &intersection) const

SbBool	intersect(const SbLine &l,
SbVec3f &enter,
SbVec3f &exit) const

Intersect line and cylinder, returning TRUE if there is an intersection.

SEE ALSO

SbVec3f, SbLine, SbPlane, SbSphere, SoCylinder


SbCylinderPlaneProjector

NAME

SbCylinderPlaneProjector - cylinder-plane projector

INHERITS FROM

SbProjector > SbCylinderProjector > SbCylinderSectionProjector > SbCylinderPlaneProjector

SYNOPSIS

#include <Inventor/projectors/SbCylinderPlaneProjector.h>

Methods from class SbCylinderPlaneProjector:

SbCylinderPlaneProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbCylinderPlaneProjector(const SbCylinder &cyl,
float edgeTol = .9,
SbBool orientToEye = TRUE)

~SbCylinderPlaneProjector()

Methods from class SbCylinderSectionProjector:

void	setTolerance(float edgeTol)

float	getTolerance() const

SbBool	isWithinTolerance(const SbVec3f &point)

Methods from class SbCylinderProjector:

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setCylinder(const SbCylinder &cyl)

const SbCylinder &	getCylinder() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbCylinderPlaneProjector projects a window space point (usually based on the mouse location) onto a surface defined by a cylinder and plane cutting through the cylinder. Two projected points can produce a rotation along the cylinder's axis. When the mouse position projects onto the plane, the rotations will be as if the plane is being dragged, causing the cylinder to roll beneath it.

Incremental changes (delta rotation) can be computed during interactive sessions. Cylinder projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

SbCylinderPlaneProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbCylinderPlaneProjector(const SbCylinder &cyl,
float edgeTol = .9,
SbBool orientToEye = TRUE)

Constructors. The first uses a default cylinder aligned with the Y axis with radius 1.0; the cylinder is supplied in the second. The position of the plane is specified as a fraction of the cylinder radius with the parameter edgeTol. A tolerance value of 1.0 positions the plane down the center of the cylinder. A tolerance value of 0.5 defines the longitudinal plane halfway between the center and the outside edge of the cylinder. The default value is .9, so that almost half the cylinder is in front of the plane. The orientToEye parameter determines whether the plane is perpendicular to the eye, or perpendicular to the cylinder's Z axis. Setting that parameter to TRUE (the default) specifies that the plane be perpendicular to the eye, which is most often the desired behavior.

The default view volume is undefined, and the working space is identity.

~SbCylinderPlaneProjector()

Destructor.

SEE ALSO

SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbCylinderProjector

NAME

SbCylinderProjector - cylinder projector

INHERITS FROM

SbProjector > SbCylinderProjector

SYNOPSIS

#include <Inventor/projectors/SbCylinderProjector.h>

Methods from class SbCylinderProjector:

~SbCylinderProjector()

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setCylinder(const SbCylinder &cyl)

const SbCylinder &	getCylinder() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbCylinderProjector is an abstract base class for projectors that use a cylinder in their projection. The getRotation() method for an SbCylinderProjector will always return a rotation that is about the axis of the cylinder. Cylinder projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

~SbCylinderProjector()

Destructor.

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

Apply the projector using the given point, returning the point in three dimensions that it projects to. This also returns in rot a rotation about the axis of the cylinder from the last projected point to this one. The passed point should be normalized (i.e. lie in the range [0.0,1.0]), with (0,0) at the lower-left.

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

Get a rotation given two points on this cylinder projector. The rotation will be about the axis of the cylinder.

void	setCylinder(const SbCylinder &cyl)

const SbCylinder &	getCylinder() const

Set and get the cylinder on which to project points. The default cylinder is aligned with the Y axis and has radius 1.0.

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

Set and get whether the projector should always be oriented towards the eye. Set to FALSE if the tolerance should be evaluated in working space.

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Set and get whether the projector should intersect the half of the cylinder that faces the eye. Set to FALSE if the projector should intersect with the rear half.

SEE ALSO

SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbCylinderSectionProjector

NAME

SbCylinderSectionProjector - cylinder-section projector

INHERITS FROM

SbProjector > SbCylinderProjector > SbCylinderSectionProjector

SYNOPSIS

#include <Inventor/projectors/SbCylinderSectionProjector.h>

Methods from class SbCylinderSectionProjector:

SbCylinderSectionProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbCylinderSectionProjector(const SbCylinder &cyl,
float edgeTol = .9,
SbBool orientToEye = TRUE)

~SbCylinderSectionProjector()

void	setTolerance(float edgeTol)

float	getTolerance() const

SbBool	isWithinTolerance(const SbVec3f &point)

Methods from class SbCylinderProjector:

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setCylinder(const SbCylinder &cyl)

const SbCylinder &	getCylinder() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbCylinderSectionProjector projects a window space point (usually based on the mouse location) onto the section of a cylinder that has been sliced by a plane. Two projected points can produce a rotation along the cylinder's axis. The tolerance slice can be specified as a fraction of the radius of the cylinder. The projection point will not extend beyond the sliced portion of the cylinder.

Incremental changes (delta rotation) can be computed during interactive sessions. Cylinder projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

SbCylinderSectionProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbCylinderSectionProjector(const SbCylinder &cyl,
float edgeTol = .9,
SbBool orientToEye = TRUE)

Constructors. The first uses a default cylinder aligned with the Y axis with radius 1.0; the cylinder is supplied in the second. The position of the plane which slices the cylinder into a section is specified as a fraction of the cylinder radius with the parameter edgeTol. A tolerance value of 1.0 positions the plane down the center of the cylinder. A tolerance value of 0.5 defines the longitudinal plane halfway between the center and the outside edge of the cylinder. The default value is .9, so that almost half the cylinder is in front of the plane. The orientToEye parameter determines whether the plane is perpendicular to the eye, or perpendicular to the cylinder's Z axis. Setting that parameter to TRUE (the default) specifies that the plane be perpendicular to the eye, which is most often the desired behavior.

The default view volume is undefined, and the working space is identity.

~SbCylinderSectionProjector()

Destructor.

void	setTolerance(float edgeTol)

float	getTolerance() const

Set and get the edge tolerance as a fraction of the radius of the cylinder. If this is 1.0, the projector is a half cylinder. If this is .1, the projector is a slice of the cylinder with radius .1*radius. Default is .9.

SbBool	isWithinTolerance(const SbVec3f &point)

Find whether this point on the cylinder or tolerance plane is within tolerance.

SEE ALSO

SbCylinderPlaneProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbCylinderSheetProjector

NAME

SbCylinderSheetProjector - cylinder-sheet projector

INHERITS FROM

SbProjector > SbCylinderProjector > SbCylinderSheetProjector

SYNOPSIS

#include <Inventor/projectors/SbCylinderSheetProjector.h>

Methods from class SbCylinderSheetProjector:

SbCylinderSheetProjector(SbBool orientToEye = TRUE)

SbCylinderSheetProjector(const SbCylinder &cyl,
SbBool orientToEye = TRUE)

~SbCylinderSheetProjector()

Methods from class SbCylinderProjector:

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setCylinder(const SbCylinder &cyl)

const SbCylinder &	getCylinder() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbCylinderSheetProjector projects a window space point (usually based on the mouse location) onto the surface of a cylinder with a hyperbolic sheet draped over it. This allows smooth transitions onto and off of the cylinder. Two projected points can produce a rotation along the cylinder's axis. When the mouse position projects on to the sheet, the rotations will be as if the sheet is being dragged, causing the cylinder to roll beneath it.

Incremental changes (delta rotation) can be computed during interactive sessions. Cylinder projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

SbCylinderSheetProjector(SbBool orientToEye = TRUE)

SbCylinderSheetProjector(const SbCylinder &cyl,
SbBool orientToEye = TRUE)

Constructors. The first uses a default cylinder aligned with the Y axis with radius 1.0; the cylinder is supplied in the second. The orientToEye parameter determines whether the sheet is perpendicular to the eye, or perpendicular to the cylinder's Z axis. Setting that parameter to TRUE (the default) specifies that the plane be perpendicular to the eye, which is most often the desired behavior.

The default view volume is undefined, and the working space is identity.

~SbCylinderSheetProjector()

Destructor.

SEE ALSO

SbCylinderSectionProjector, SbCylinderPlaneProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbLine

NAME

SbLine - directed line in 3D

INHERITS FROM

SbLine

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbLine:

SbLine()

SbLine(const SbVec3f &p0,
const SbVec3f &p1)

void	setValue(const SbVec3f &p0,
const SbVec3f &p1)

SbBool	getClosestPoints(const SbLine &line2,
SbVec3f &ptOnThis,
SbVec3f &ptOnLine2 ) const

SbVec3f	getClosestPoint(const SbVec3f &point) const

const SbVec3f &	getPosition() const

const SbVec3f &	getDirection() const

DESCRIPTION

Represents a directed line in 3D. This is a basic Open Inventor datatype that is used for representing a 3D line. It is used as input and output by a variety of Open Inventor classes.

METHODS

SbLine()

SbLine(const SbVec3f &p0,
const SbVec3f &p1)

Constructors. To construct a line from a position and direction, use: SbLine(p0, p0 + dir). The line is directed from p0 to p1.

void	setValue(const SbVec3f &p0,
const SbVec3f &p1)

Sets line to pass through points p0 and p1.

SbBool	getClosestPoints(const SbLine &line2,
SbVec3f &ptOnThis,
SbVec3f &ptOnLine2 ) const

Finds the two closest points between this line and line2, and loads them into ptOnThis and ptOnLine2. Returns FALSE if the lines are parallel (results undefined), and returns TRUE otherwise.

SbVec3f	getClosestPoint(const SbVec3f &point) const

Returns the closest point on the line to the given point.

const SbVec3f &	getPosition() const

const SbVec3f &	getDirection() const

Returns position of line origin point and direction vector of line.

SEE ALSO

SbVec3f, SbPlane


SbLineProjector

NAME

SbLineProjector - line projector

INHERITS FROM

SbProjector > SbLineProjector

SYNOPSIS

#include <Inventor/projectors/SbLineProjector.h>

Methods from class SbLineProjector:

SbLineProjector()

~SbLineProjector()

void	setLine(const SbLine &line)

const SbLine &	getLine() const

virtual SbVec3f	getVector(const SbVec2f &mousePosition1,
const SbVec2f &mousePosition2)

virtual SbVec3f	getVector(const SbVec2f &mousePosition)

void	setStartPosition(const SbVec2f &mousePosition)

void	setStartPosition(const SbVec3f &point)

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbLineProjector projects a 2D point, typically the location of the cursor, onto a 3D line.

METHODS

SbLineProjector()

~SbLineProjector()

Constructor and destructor. The default line passes through the origin and is aligned with the Y axis.

void	setLine(const SbLine &line)

const SbLine &	getLine() const

Set and get the line on which to project 2D points.

virtual SbVec3f	getVector(const SbVec2f &mousePosition1,
const SbVec2f &mousePosition2)

Get a vector on this line given two normalized mouse points.

virtual SbVec3f	getVector(const SbVec2f &mousePosition)

Get a vector given the current mouse point. Uses the last point on this projector from the previous call to getVector() or setStartPostion(). Do not use this if the working space transform is changing since the new point will be in a different space than the old one.

void	setStartPosition(const SbVec2f &mousePosition)

Set the initial position from a mouse position.

void	setStartPosition(const SbVec3f &point)

Set the initial position from a point on the projector.

SEE ALSO

SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbMatrix

NAME

SbMatrix - 4x4 matrix class

INHERITS FROM

SbMatrix

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbMatrix:

SbMatrix()

SbMatrix(float a11,
float a12,
float a13,
float a14,
float a21,
float a22,
float a23,
float a24,
float a31,
float a32,
float a33,
float a34,
float a41,
float a42,
float a43,
float a44)

SbMatrix(const SbMat &m)

void	setValue(const SbMat &m)

void	setValue(const SbMatrixd &md)

void	getValue(SbMat &m) const

const SbMat &	getValue() const

void	makeIdentity()

static SbMatrix	identity()

void	setRotate(const SbRotation &q)

void	setScale(float s)

void	setScale(const SbVec3f &s)

void	setTranslate(const SbVec3f &t)

void	setTransform(const SbVec3f &t,
const SbRotation &r,
const SbVec3f &s)

void	setTransform(const SbVec3f &t,
const SbRotation &r,
const SbVec3f &s,
const SbRotation &so)

void	setTransform(const SbVec3f &translation,
const SbRotation &rotation,
const SbVec3f &scaleFactor,
const SbRotation &scaleOrientation,
const SbVec3f &center)

void	getTransform(SbVec3f &t,
SbRotation &r,
SbVec3f &s,
SbRotation &so) const

void	getTransform(SbVec3f &translation,
SbRotation &rotation,
SbVec3f &scaleFactor,
SbRotation &scaleOrientation,
const SbVec3f &center) const

float	det3(int r1,
int r2,
int r3,
int c1,
int c2,
int c3) const

float	det3() const

float	det4() const

SbBool	factor(SbMatrix &r,
SbVec3f &s,
SbMatrix &u,
SbVec3f &t,
SbMatrix &proj) const

SbMatrix	inverse() const

SbBool	LUDecomposition(int index[4],
float &d)

void	LUBackSubstitution(int index[4],
float b[4]) const

SbMatrix	transpose() const

SbMatrix &	multRight(const SbMatrix &m)

SbMatrix &	multLeft(const SbMatrix &m)

void	multMatrixVec(const SbVec3f &src,
SbVec3f &dst) const

void	multVecMatrix(const SbVec3f &src,
SbVec3f &dst) const

void	multDirMatrix(const SbVec3f &src,
SbVec3f &dst) const

void	multLineMatrix(const SbLine &src,
SbLine &dst) const

void	print(FILE *fp) const

float *	operator float*()

SbMat	operator SbMat&()

float *	operator [](int i)

const float *	operator [](int i) const

SbMatrix &	operator =(const SbMat &m)

SbMatrix &	operator =(const SbMatrix &m)

SbMatrix &	operator =(const SbRotation &q)

SbMatrix &	operator *=(const SbMatrix &m)

SbMatrix	operator *(const SbMatrix &m1,
const SbMatrix &m2)

int	operator ==(const SbMatrix &m1,
const SbMatrix &m2)

int	operator !=(const SbMatrix &m1,
const SbMatrix &m2)

SbBool	equals(const SbMatrix &m,
float tolerance) const

DESCRIPTION

4x4 matrix class/datatype used by many Open Inventor node and action classes. The matrices are stored in row-major order.

METHODS

SbMatrix()

SbMatrix(float a11,
float a12,
float a13,
float a14,
float a21,
float a22,
float a23,
float a24,
float a31,
float a32,
float a33,
float a34,
float a41,
float a42,
float a43,
float a44)

SbMatrix(const SbMat &m)

Constructors.

void	setValue(const SbMat &m)

Sets value from 4x4 array of elements.

void	setValue(const SbMatrixd &md)

Sets value from a double precision matrix.

void	getValue(SbMat &m) const

const SbMat &	getValue() const

Returns 4x4 array of elements.

void	makeIdentity()

Sets matrix to be identity.

static SbMatrix	identity()

Returns an identity matrix.

void	setRotate(const SbRotation &q)

Sets matrix to rotate by given rotation.

void	setScale(float s)

Sets matrix to scale by given uniform factor.

void	setScale(const SbVec3f &s)

Sets matrix to scale by given vector.

void	setTranslate(const SbVec3f &t)

Sets matrix to translate by given vector.

void	setTransform(const SbVec3f &t,
const SbRotation &r,
const SbVec3f &s)

void	setTransform(const SbVec3f &t,
const SbRotation &r,
const SbVec3f &s,
const SbRotation &so)

void	setTransform(const SbVec3f &translation,
const SbRotation &rotation,
const SbVec3f &scaleFactor,
const SbRotation &scaleOrientation,
const SbVec3f &center)

Composes the matrix based on a translation, rotation, scale, orientation for scale, and center. The center is the center point for scaling and rotation. The scaleOrientation chooses the primary axes for the scale.

void	getTransform(SbVec3f &t,
SbRotation &r,
SbVec3f &s,
SbRotation &so) const

Return translation, rotation, scale, and scale orientation components of the matrix.

void	getTransform(SbVec3f &translation,
SbRotation &rotation,
SbVec3f &scaleFactor,
SbRotation &scaleOrientation,
const SbVec3f &center) const

Decomposes the matrix into a translation, rotation, scale, and scale orientation. Any projection information is discarded. The decomposition depends upon choice of center point for rotation and scaling, which is optional as the last parameter. Note that if the center is 0, decompose() is the same as factor() where t is translation, u is rotation, s is scaleFactor, and r is ScaleOrientation.

float	det3(int r1,
int r2,
int r3,
int c1,
int c2,
int c3) const

Returns determinant of 3x3 submatrix composed of given row and column indices (0-3 for each).

float	det3() const

Returns determinant of upper-left 3x3 submatrix.

float	det4() const

Returns determinant of entire matrix.

SbBool	factor(SbMatrix &r,
SbVec3f &s,
SbMatrix &u,
SbVec3f &t,
SbMatrix &proj) const

Factors a matrix m into 5 pieces: m = r s r^ u t, where r^ means transpose of r, and r and u are rotations, s is a scale, and t is a translation. Any projection information is returned in proj.

SbMatrix	inverse() const

Returns inverse of matrix. Results are undefined for singular matrices. Uses LU decomposition.

SbBool	LUDecomposition(int index[4],
float &d)

Perform in-place LU decomposition of matrix. index is index of rows in matrix. d is the parity of row swaps. Returns FALSE if singular.

void	LUBackSubstitution(int index[4],
float b[4]) const

Perform back-substitution on LU-decomposed matrix. Index is permutation of rows from original matrix.

SbMatrix	transpose() const

Returns transpose of matrix.

SbMatrix &	multRight(const SbMatrix &m)

SbMatrix &	multLeft(const SbMatrix &m)

Multiplies matrix by given matrix on right or left.

void	multMatrixVec(const SbVec3f &src,
SbVec3f &dst) const

Multiplies matrix by given column vector, giving vector result.

void	multVecMatrix(const SbVec3f &src,
SbVec3f &dst) const

Multiplies given row vector by matrix, giving vector result.

void	multDirMatrix(const SbVec3f &src,
SbVec3f &dst) const

Multiplies given row vector by matrix, giving vector result. src is assumed to be a direction vector, so translation part of matrix is ignored. Note: if you wish to transform surface points and normals by a matrix, call multVecMatrix() for the points and call multDirMatrix() on the inverse transpose of the matrix for the normals.

void	multLineMatrix(const SbLine &src,
SbLine &dst) const

Multiplies the given line's origin by the matrix, and the line's direction by the rotation portion of the matrix.

void	print(FILE *fp) const

Prints a formatted version of the matrix to the given file pointer.

float *	operator float*()

Cast: returns pointer to storage of first element.

SbMat	operator SbMat&()

Cast: returns reference to 4x4 array.

float *	operator [](int i)

const float *	operator [](int i) const

Make it look like a usual matrix (so you can do m[3][2]).

SbMatrix &	operator =(const SbMat &m)

Sets value from 4x4 array of elements.

SbMatrix &	operator =(const SbMatrix &m)

Set the matrix from another SbMatrix.

SbMatrix &	operator =(const SbRotation &q)

Set the matrix from an SbRotation.

SbMatrix &	operator *=(const SbMatrix &m)

Performs right multiplication with another matrix.

SbMatrix	operator *(const SbMatrix &m1,
const SbMatrix &m2)

Binary multiplication of matrices.

int	operator ==(const SbMatrix &m1,
const SbMatrix &m2)

int	operator !=(const SbMatrix &m1,
const SbMatrix &m2)

Equality comparison operators.

SbBool	equals(const SbMatrix &m,
float tolerance) const

Equality comparison within given tolerance, for each component.

SEE ALSO

SbVec3d, SbVec3f, SbRotation, SbRotationd


SbName

NAME

SbName - character string stored in a hash table

INHERITS FROM

SbName

SYNOPSIS

#include <Inventor/SbString.h>

Methods from class SbName:

SbName()

SbName(const char *s)

SbName(const SbString &s)

SbName(const SbName &n)

~SbName()

const char *	getString() const

int	getLength() const

static SbBool	isIdentStartChar(char c)

static SbBool	isIdentChar(char c)

int	operator !() const

int	operator ==(const char *s,
const SbName &n)

int	operator ==(const SbName &n1,
const SbName &n2)

int	operator ==(const SbName &n,
const char *s)

int	operator !=(const char *s,
const SbName &n)

int	operator !=(const SbName &n1,
const SbName &n2)

int	operator !=(const SbName &n,
const char *s)

DESCRIPTION

This class of strings stores the string in a hash table. It is used by the Open Inventor toolkit for keywords and other unique names. It is not recommended for general use (only in the context of Open Inventor objects). When a string is stored in this table, a pointer to the storage is returned. Two identical strings will return the same pointer. This means that comparison of two SbNames for equality can be accomplished by comparing their identifiers. SbNames are used for strings which are expected to show up frequently, such as node names.

METHODS

SbName()

SbName(const char *s)

SbName(const SbString &s)

SbName(const SbName &n)

~SbName()

Constructors and destructor.

const char *	getString() const

Returns pointer to the character string.

int	getLength() const

Returns length of string.

static SbBool	isIdentStartChar(char c)

Returns TRUE if given character is a legal starting character for an identifier.

static SbBool	isIdentChar(char c)

Returns TRUE if given character is a legal nonstarting character for an identifier.

int	operator !() const

Unary "not" operator; returns TRUE if string is empty ("").

int	operator ==(const char *s,
const SbName &n)

int	operator ==(const SbName &n1,
const SbName &n2)

int	operator ==(const SbName &n,
const char *s)

Equality operator for SbName/char* and SbName/SbName comparison.

int	operator !=(const char *s,
const SbName &n)

int	operator !=(const SbName &n1,
const SbName &n2)

int	operator !=(const SbName &n,
const char *s)

Inequality operator for SbName/char* and SbName/SbName comparison.

SEE ALSO

SbString


SbPList

NAME

SbPList - list of generic (void *) pointers

INHERITS FROM

SbPList

SYNOPSIS

#include <Inventor/SbPList.h>

Methods from class SbPList:

SbPList()

SbPList(const SbPList &pl)

SbPList(int initSize)

~SbPList()

void	append(void * ptr)

int	find(const void *ptr) const

void	insert(void *ptr,
int addBefore)

void	remove(int which)

int	getLength() const

void	truncate(int start)

void	copy(const SbPList &pl)

SbPList &	operator =(const SbPList &pl)

void *&	operator [](int i) const

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This class manages a dynamic list of generic void * pointers. This class allows random access, insertion, and removal.

METHODS

SbPList()

SbPList(const SbPList &pl)

SbPList(int initSize)

~SbPList()

Constructors and destructor. initSize specifies an initial size for the list, which is useful as an optimization if you can estimate the length of the list before you construct it. If another SbPList is given, it returns a copy of that list.

void	append(void * ptr)

Adds given pointer to end of list.

int	find(const void *ptr) const

Returns index of given pointer in list, or -1 if not found.

void	insert(void *ptr,
int addBefore)

Inserts given pointer in list before pointer with given index.

void	remove(int which)

Removes pointer with given index.

int	getLength() const

Returns number of pointers in list.

void	truncate(int start)

Removes all pointers after one with given index, inclusive.

void	copy(const SbPList &pl)

Copy a list.

SbPList &	operator =(const SbPList &pl)

Assignment operator; copies list into this list.

void *&	operator [](int i) const

Returns pointer with given index.

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

Equality and inequality operators.


SbPlane

NAME

SbPlane - oriented plane in 3D

INHERITS FROM

SbPlane

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbPlane:

SbPlane()

SbPlane(const SbVec3f &p0,
const SbVec3f &p1,
const SbVec3f &p2)

SbPlane(const SbVec3f &normal,
float distance)

SbPlane(const SbVec3f &normal,
const SbVec3f &point)

void	offset(float d)

SbBool	intersect(const SbLine &l,
SbVec3f &intersection) const

void	transform(const SbMatrix &matrix)

SbBool	isInHalfSpace(const SbVec3f &point) const

const SbVec3f &	getNormal() const

float	getDistanceFromOrigin() const

int	operator ==(const SbPlane &p1,
const SbPlane &p2)

int	operator !=(const SbPlane &p1,
const SbPlane &p2)

DESCRIPTION

Represents an oriented plane in 3D. This is a lightweight class/datatype that is used for arguments to some Open Inventor objects.

METHODS

SbPlane()

SbPlane(const SbVec3f &p0,
const SbVec3f &p1,
const SbVec3f &p2)

SbPlane(const SbVec3f &normal,
float distance)

SbPlane(const SbVec3f &normal,
const SbVec3f &point)

Constructors. p0, p1, and p2 represent three points in the plane. normal is a normal vector, distance is distance from origin to plane along normal vector, and point is a point in 3-space for the plane to pass through.

void	offset(float d)

Offset a plane by a given distance.

SbBool	intersect(const SbLine &l,
SbVec3f &intersection) const

Intersect line and plane, returning TRUE if there is an intersection, FALSE if line is parallel to plane.

void	transform(const SbMatrix &matrix)

Transforms the plane by the given matrix.

SbBool	isInHalfSpace(const SbVec3f &point) const

Returns TRUE if the given point is within the half-space defined by the plane.

const SbVec3f &	getNormal() const

Returns normal vector to plane.

float	getDistanceFromOrigin() const

Returns distance from origin to plane.

int	operator ==(const SbPlane &p1,
const SbPlane &p2)

int	operator !=(const SbPlane &p1,
const SbPlane &p2)

Equality/inequality comparison operators.

SEE ALSO

SbVec3f, SbLine


SbPlaneProjector

NAME

SbPlaneProjector - plane projector

INHERITS FROM

SbProjector > SbPlaneProjector

SYNOPSIS

#include <Inventor/projectors/SbPlaneProjector.h>

Methods from class SbPlaneProjector:

SbPlaneProjector(SbBool orient = FALSE)

SbPlaneProjector(const SbPlane &plane,
SbBool orient = FALSE)

~SbPlaneProjector()

void	setPlane(const SbPlane &plane)

const SbPlane &	getPlane() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

virtual SbVec3f	getVector(const SbVec2f &mousePosition1,
const SbVec2f &mousePosition2)

virtual SbVec3f	getVector(const SbVec2f &mousePosition)

void	setStartPosition(const SbVec2f &mousePosition)

void	setStartPosition(const SbVec3f &point)

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbPlaneProjector projects the mouse onto a plane. This is typically used to write interactive 3D manipulators and viewers.

METHODS

SbPlaneProjector(SbBool orient = FALSE)

Constructor. The default plane passes through the origin and is oriented perpendicular to the Z axis.

SbPlaneProjector(const SbPlane &plane,
SbBool orient = FALSE)

Constructor which is passed a plane. If orient to eye is TRUE, the plane will be reoriented to the eye.

~SbPlaneProjector()

Destructor.

void	setPlane(const SbPlane &plane)

const SbPlane &	getPlane() const

Set and get the plane to use.

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

Set and get whether the projector should be oriented towards the eye. If orientToEye is set to TRUE, the given plane's direction is ignored, and the plane will be oriented to the eye. It will pass through the same point from the origin defined by the original dir * dist. Set to FALSE if the plane's direction should remain in working space.

virtual SbVec3f	getVector(const SbVec2f &mousePosition1,
const SbVec2f &mousePosition2)

Get a vector on this plane given two normalized mouse positions.

virtual SbVec3f	getVector(const SbVec2f &mousePosition)

Get a vector given the current mouse point. Uses the last point on this projector from the previous call to getVector() or setStartPostion(). Do not use this if the working space transform is changing since the new point will be in a different space than the old one.

void	setStartPosition(const SbVec2f &mousePosition)

Set the initial mouse position.

void	setStartPosition(const SbVec3f &point)

Set the initial position from a point on the projector.

SEE ALSO

SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbProjector

NAME

SbProjector - base class for representing projectors

INHERITS FROM

SbProjector

SYNOPSIS

#include <Inventor/projectors/SbProjector.h>

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbProjector is the base class for all projector classes. Projector classes are used to convert from window space (usually based on the mouse location) into a 3D point. This is done by projecting the window coordinate as a 3D vector onto a geometric function in 3-space, and computing the intersection point. Most projectors actually compute incremental changes and produce incremental rotations and translation as needed. Projectors are used to write 3D interactive manipulators and viewers.

METHODS

virtual SbVec3f	project(const SbVec2f &point)

Apply the projector using the given point, returning the point in three dimensions that it projects to. The point should be normalized (lie in the range [0.0,1.0]), with (0,0) at the lower-left.

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

Set and get the view volume to use for the projection. This is typically supplied from SoCamera::getViewVolume().

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

Set and get the transform space to work in. This matrix should transform working space coordinates into world space. The default matrix is identity, meaning that the default working space is world space.

virtual SbProjector *	copy() const

Creates and returns an exact copy of the projector.

SEE ALSO

SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbRotation

NAME

SbRotation - class for representing a rotation

INHERITS FROM

SbRotation

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbRotation:

SbRotation()

SbRotation(const SbVec3f &axis,
float radians)

SbRotation(const float v[4])

SbRotation(float q0,
float q1,
float q2,
float q3)

SbRotation(const SbMatrix &m)

SbRotation(const SbVec3f &rotateFrom,
const SbVec3f &rotateTo)

const float *	getValue() const

void	getValue(float &q0,
float &q1,
float &q2,
float &q3) const

SbRotation &	setValue(float q0,
float q1,
float q2,
float q3)

void	getValue(SbVec3f &axis,
float &radians) const

void	getValue(SbMatrix &matrix) const

void	getValue(SbMatrixd &matrix) const

SbRotation &	invert()

SbRotation	inverse() const

SbRotation &	setValue(const float q[4])

SbRotation &	setValue(const SbMatrix &m)

SbRotation &	setValue(const SbVec3f &axis,
float radians)

SbRotation &	setValue(const SbVec3f &rotateFrom,
const SbVec3f &rotateTo)

SbRotation &	setValue(const SbRotationd &rotate)

SbRotation &	setValue(const SbMatrixd &matrix)

SbRotation &	operator *=(const SbRotation &q)

int	operator ==(const SbRotation &q1,
const SbRotation &q2)

int	operator !=(const SbRotation &q1,
const SbRotation &q2)

SbBool	equals(const SbRotation &r,
float tolerance) const

SbRotation	operator *(const SbRotation &q1,
const SbRotation &q2)

void	multVec(const SbVec3f &src,
SbVec3f &dst) const

void	scaleAngle(float scaleFactor )

static SbRotation	slerp(const SbRotation &rot0,
const SbRotation &rot1,
float t)

static SbRotation	identity()

DESCRIPTION

Object that stores a rotation. There are several ways to specify a rotation: quaternion (4 floats, in the order x, y, z, w), 4x4 rotation matrix, or axis and angle. All angles are in radians and all rotations are right-handed.

METHODS

SbRotation()

SbRotation(const SbVec3f &axis,
float radians)

SbRotation(const float v[4])

SbRotation(float q0,
float q1,
float q2,
float q3)

SbRotation(const SbMatrix &m)

SbRotation(const SbVec3f &rotateFrom,
const SbVec3f &rotateTo)

Constructors for rotation. The axis/radians constructor creates a rotation of angle radians about the given axis. The constructors that take four floats create a quaternion from those floats (careful, this differs from the four numbers in an axis/radian definition). Matrix constructor requires a valid rotation matrix. The rotateFrom/To constructor defines rotation that rotates from one vector into another. The rotateFrom and rotateTo vectors are normalized by the constructor before calculating the rotation.

const float *	getValue() const

Returns pointer to array of 4 components defining quaternion.

void	getValue(float &q0,
float &q1,
float &q2,
float &q3) const

Returns 4 individual components of rotation quaternion.

SbRotation &	setValue(float q0,
float q1,
float q2,
float q3)

Sets value of rotation from 4 individual components of a quaternion.

void	getValue(SbVec3f &axis,
float &radians) const

Returns corresponding 3D rotation axis vector and angle in radians.

void	getValue(SbMatrix &matrix) const

Returns corresponding 4x4 rotation matrix.

void	getValue(SbMatrixd &matrix) const

Returns corresponding 4x4 rotation matrix.

SbRotation &	invert()

Changes a rotation to be its inverse.

SbRotation	inverse() const

Returns the inverse of a rotation.

SbRotation &	setValue(const float q[4])

Sets value of rotation from array of 4 components of a quaternion.

SbRotation &	setValue(const SbMatrix &m)

Sets value of rotation from a rotation matrix.

SbRotation &	setValue(const SbVec3f &axis,
float radians)

Sets value of vector from 3D rotation axis vector and angle in radians.

SbRotation &	setValue(const SbVec3f &rotateFrom,
const SbVec3f &rotateTo)

Sets rotation to rotate one direction vector to another. The rotateFrom and rotateTo arguments are normalized before the rotation is calculated.

SbRotation &	setValue(const SbRotationd &rotate)

Sets rotation from a double precision rotation.

SbRotation &	setValue(const SbMatrixd &matrix)

Sets rotation from a double precision rotation matrix.

SbRotation &	operator *=(const SbRotation &q)

Multiplies by another rotation; results in product of rotations.

int	operator ==(const SbRotation &q1,
const SbRotation &q2)

int	operator !=(const SbRotation &q1,
const SbRotation &q2)

Equality comparison operators.

SbBool	equals(const SbRotation &r,
float tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two quaternion vectors.

SbRotation	operator *(const SbRotation &q1,
const SbRotation &q2)

Multiplication of two rotations; results in product of rotations.

void	multVec(const SbVec3f &src,
SbVec3f &dst) const

Multiplies the given vector by the matrix of this rotation.

void	scaleAngle(float scaleFactor )

Keep the axis the same. Multiply the angle of rotation by the amount scaleFactor.

static SbRotation	slerp(const SbRotation &rot0,
const SbRotation &rot1,
float t)

Spherical linear interpolation: as t goes from 0 to 1, returned value goes from rot0 to rot1.

static SbRotation	identity()

Returns a null rotation.

NOTES

Rotations are stored internally as quaternions.

SEE ALSO

SbVec3d, SbVec3f, SbMatrix, SbMatrixd, SbRotationd


SbSphere

NAME

SbSphere - class for representing a sphere

INHERITS FROM

SbSphere

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbSphere:

SbSphere()

SbSphere(const SbVec3f &center,
float radius)

void	setValue(const SbVec3f &center,
float radius)

void	setCenter(const SbVec3f &center)

void	setRadius(float radius)

const SbVec3f &	getCenter() const

float	getRadius() const

void	circumscribe(const SbBox3f &box)

SbBool	intersect(const SbLine &l,
SbVec3f &intersection) const

SbBool	intersect(const SbLine &l,
SbVec3f &enter,
SbVec3f &exit) const

DESCRIPTION

Represents a sphere in 3D. This is a lightweight datatype that is used for arguments or return values in the Open Inventor toolkit. See SoSphere for a database sphere (used for rendering, picking, etc.).

METHODS

SbSphere()

SbSphere(const SbVec3f &center,
float radius)

Constructors.

void	setValue(const SbVec3f &center,
float radius)

Change the center and radius.

void	setCenter(const SbVec3f &center)

void	setRadius(float radius)

Set just the center or radius.

const SbVec3f &	getCenter() const

float	getRadius() const

Return the center and radius.

void	circumscribe(const SbBox3f &box)

Return a sphere containing a given box.

SbBool	intersect(const SbLine &l,
SbVec3f &intersection) const

SbBool	intersect(const SbLine &l,
SbVec3f &enter,
SbVec3f &exit) const

Intersect line and sphere, returning TRUE if there is an intersection. The line is treated as a ray.

SEE ALSO

SbVec3f, SbLine, SoSphere


SbSpherePlaneProjector

NAME

SbSpherePlaneProjector - sphere-plane projector

INHERITS FROM

SbProjector > SbSphereProjector > SbSphereSectionProjector > SbSpherePlaneProjector

SYNOPSIS

#include <Inventor/projectors/SbSpherePlaneProjector.h>

Methods from class SbSpherePlaneProjector:

SbSpherePlaneProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbSpherePlaneProjector(const SbSphere &sph,
float edgeTol = .9,
SbBool orientToEye = TRUE)

~SbSpherePlaneProjector()

Methods from class SbSphereSectionProjector:

void	setTolerance(float edgeTol)

float	getTolerance() const

void	setRadialFactor(float radialFactor = 0.0)

float	getRadialFactor() const

SbBool	isWithinTolerance(const SbVec3f &point)

Methods from class SbSphereProjector:

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setSphere(const SbSphere &sph)

const SbSphere &	getSphere() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbSpherePlaneProjector projects a window space point (usually based on the mouse location) onto a surface defined by a sphere and plane cutting through the sphere. Two projected points can produce a rotation about the sphere's center. When the mouse position projects onto the plane, the rotations will be as if the plane is being dragged, causing the sphere to roll beneath it.

Incremental changes (delta rotation) can be computed during interactive sessions. Sphere projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

SbSpherePlaneProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbSpherePlaneProjector(const SbSphere &sph,
float edgeTol = .9,
SbBool orientToEye = TRUE)

Constructors. The first uses a default sphere centered at the origin with radius 1.0; the sphere is supplied in the second. The position of the plane is specified as a fraction of the sphere radius with the parameter edgeTol. A tolerance value of 1.0 positions the plane down the center of the sphere. A tolerance value of 0.5 defines the longitudinal plane halfway between the center and the outside edge of the sphere. The default value is .9, so that almost half the sphere is in front of the plane. The orientToEye parameter determines whether the plane is perpendicular to the eye, or perpendicular to the sphere's Z axis. Setting that parameter to TRUE (the default) specifies that the plane be perpendicular to the eye, which is most often the desired behavior.

The default view volume is undefined, and the working space is identity.

~SbSpherePlaneProjector()

Destructor.

SEE ALSO

SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSphereSheetProjector


SbSphereProjector

NAME

SbSphereProjector - sphere projector

INHERITS FROM

SbProjector > SbSphereProjector

SYNOPSIS

#include <Inventor/projectors/SbSphereProjector.h>

Methods from class SbSphereProjector:

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setSphere(const SbSphere &sph)

const SbSphere &	getSphere() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbSphereProjector is an abstract base class for projectors that use a sphere in their projection. Sphere projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

Apply the projector using the given point, returning the point in three dimensions that it projects to. This also returns in rot a rotation on the surface of the sphere from the last projected point to this one. The passed point should be normalized (i.e. lie in the range [0.0,1.0]), with (0,0) at the lower-left.

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

Get a rotation given two points on this sphere projector. The rotation will be on the surface of the sphere.

void	setSphere(const SbSphere &sph)

const SbSphere &	getSphere() const

Set and get the sphere on which to project points. The default sphere has radius 1.0.

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

Set and get whether the projector should always be oriented towards the eye. Set to FALSE if the tolerance should be evaluated in working space.

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Set and get whether the projector should intersect the half of the sphere that faces the eye. Set to FALSE if the projector should intersect with the rear half.

SEE ALSO

SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereSectionProjector, SbSphereSheetProjector


SbSphereSectionProjector

NAME

SbSphereSectionProjector - sphere-section projector

INHERITS FROM

SbProjector > SbSphereProjector > SbSphereSectionProjector

SYNOPSIS

#include <Inventor/projectors/SbSphereSectionProjector.h>

Methods from class SbSphereSectionProjector:

SbSphereSectionProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbSphereSectionProjector(const SbSphere &sph,
float edgeTol = .9,
SbBool orientToEye = TRUE)

~SbSphereSectionProjector()

void	setTolerance(float edgeTol)

float	getTolerance() const

void	setRadialFactor(float radialFactor = 0.0)

float	getRadialFactor() const

SbBool	isWithinTolerance(const SbVec3f &point)

Methods from class SbSphereProjector:

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setSphere(const SbSphere &sph)

const SbSphere &	getSphere() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbSphereSectionProjector projects a window space point (usually based on the mouse location) onto the section of a sphere that has been sliced by a plane. Two projected points can produce a rotation about the sphere's center. The tolerance slice can be specified as a fraction of the radius of the sphere. The projection point will not extend beyond the sliced portion of the sphere.

Incremental changes (delta rotation) can be computed during interactive sessions. Sphere projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

SbSphereSectionProjector(float edgeTol = .9,
SbBool orientToEye = TRUE)

SbSphereSectionProjector(const SbSphere &sph,
float edgeTol = .9,
SbBool orientToEye = TRUE)

Constructors. The first uses a default sphere centered at the origin with radius 1.0; the sphere is supplied in the second. The position of the plane which slices the sphere into a section is specified as a fraction of the sphere radius with the parameter edgeTol. A tolerance value of 1.0 positions the plane down the center of the sphere. A tolerance value of 0.5 defines the longitudinal plane halfway between the center and the outside edge of the sphere. The default value is .9, so that almost half the sphere is in front of the plane. The orientToEye parameter determines whether the plane is perpendicular to the eye, or perpendicular to the sphere's Z axis. Setting that parameter to TRUE (the default) specifies that the plane be perpendicular to the eye, which is most often the desired behavior.

The default view volume is undefined, and the working space is identity.

~SbSphereSectionProjector()

Destructor.

void	setTolerance(float edgeTol)

float	getTolerance() const

Set and get the edge tolerance as a fraction of the radius of the sphere. If this is 1.0, the projector is a hemisphere. If this is .1, the projector is a slice of the sphere with radius .1*radius. Default is .9.

void	setRadialFactor(float radialFactor = 0.0)

float	getRadialFactor() const

Set and get the radial rotation factor. When the mouse is dragged off the edge of the sphere, the mouse motion can be classified as either tangential (moving in a circle around the sphere) or radial (moving toward or away from the center). The tangential motion will always map to a rotation around the center, (like the hands of a clock). The radial motion, by default, has no effect. But if you set the radialFactor to be > 0.0, this motion will make the sphere rotate as if the mouse is pulling the top of the sphere out toward the mouse. If radialFactor = 1.0, then pulling has a `normal' feel (that is, the mouse motion causes the same amount of rotation as if you had rotated by hitting the actual surface of the sphere). Default is 0.0

SbBool	isWithinTolerance(const SbVec3f &point)

Find whether this point on the sphere or tolerance plane is within tolerance.

SEE ALSO

SbCylinderProjector, SbCylinderSectionProjector, SbCylinderPlaneProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereSheetProjector


SbSphereSheetProjector

NAME

SbSphereSheetProjector - sphere-sheet projector

INHERITS FROM

SbProjector > SbSphereProjector > SbSphereSheetProjector

SYNOPSIS

#include <Inventor/projectors/SbSphereSheetProjector.h>

Methods from class SbSphereSheetProjector:

SbSphereSheetProjector(SbBool orientToEye = TRUE)

SbSphereSheetProjector(const SbSphere &sph,
SbBool orientToEye = TRUE)

~SbSphereSheetProjector()

Methods from class SbSphereProjector:

SbVec3f	projectAndGetRotation(const SbVec2f &point,
SbRotation &rot)

virtual SbRotation	getRotation(const SbVec3f &point1,
const SbVec3f &point2)

void	setSphere(const SbSphere &sph)

const SbSphere &	getSphere() const

void	setOrientToEye(SbBool orientToEye)

SbBool	isOrientToEye() const

void	setFront(SbBool isFront)

SbBool	isFront() const

SbBool	isPointInFront(const SbVec3f &point) const

Methods from class SbProjector:

virtual SbVec3f	project(const SbVec2f &point)

virtual void	setViewVolume(const SbViewVolume &vol)

const SbViewVolume &	getViewVolume() const

virtual void	setWorkingSpace(const SbMatrix &space)

const SbMatrix &	getWorkingSpace() const

virtual SbProjector *	copy() const

DESCRIPTION

SbSphereSheetProjector projects a window space point (usually based on the mouse location) onto the surface of a sphere with a hyperbolic sheet draped over it. This allows smooth transitions onto and off of the sphere. Two projected points can produce a rotation about the sphere's center. When the mouse position projects on to the sheet, the rotations will be as if the sheet is being dragged, causing the sphere to roll beneath it.

Incremental changes (delta rotation) can be computed during interactive sessions. Sphere projectors are typically used to write interactive 3D manipulators and viewers.

METHODS

SbSphereSheetProjector(SbBool orientToEye = TRUE)

SbSphereSheetProjector(const SbSphere &sph,
SbBool orientToEye = TRUE)

Constructors. The first uses a default sphere centered at the origin with radius 1.0; the sphere is supplied in the second. The orientToEye parameter determines whether the sheet is perpendicular to the eye, or perpendicular to the sphere's Z axis. Setting that parameter to TRUE (the default) specifies that the sheet be perpendicular to the eye, which is most often the desired behavior.

The default view volume is undefined, and the working space is identity.

~SbSphereSheetProjector()

Destructor.

SEE ALSO

SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector


SbString

NAME

SbString - class for smart character strings

INHERITS FROM

SbString

SYNOPSIS

#include <Inventor/SbString.h>

Methods from class SbString:

SbString()

SbString(const char *str)

SbString(const char *str,
int start,
int end)

SbString(const SbString &str)

SbString(int digitString)

~SbString()

uint32_t	hash()

int	getLength() const

void	makeEmpty(SbBool freeOld = TRUE)

const char *	getString() const

SbString	getSubString(int startChar,
int endChar = -1) const

void	deleteSubString(int startChar,
int endChar = -1)

SbString &	operator =(const char *str)

SbString &	operator =(const SbString &str)

SbString &	operator +=(const char *str)

SbString &	operator +=(const SbString &str)

int	operator !() const

int	operator ==(const char *s,
const SbString &str)

int	operator ==(const SbString &str,
const char *s)

int	operator ==(const SbString &str1,
const SbString &str2)

int	operator !=(const char *s,
const SbString &str)

int	operator !=(const SbString &str,
const char *s)

int	operator !=(const SbString &str1,
const SbString &str2)

DESCRIPTION

Strings which have many convenience methods to make string manipulation easier.

METHODS

SbString()

SbString(const char *str)

SbString(const char *str,
int start,
int end)

SbString(const SbString &str)

SbString(int digitString)

~SbString()

Constructors and destructor. Constructors take a character string, the subset of a character string from start to end (inclusive), or an integer to be turned into a string. For example, SbString(1234) creates the string "1234". SbString("Testing",1,3) creates the string "est".

uint32_t	hash()

Returns a reasonable hash key for string.

int	getLength() const

Returns length of string.

void	makeEmpty(SbBool freeOld = TRUE)

Sets string to be the empty string (""). If freeOld is TRUE (default), any old storage is freed up.

const char *	getString() const

Returns pointer to the character string.

SbString	getSubString(int startChar,
int endChar = -1) const

Returns new string representing sub-string from startChar to endChar, inclusive. If endChar is -1 (the default), the sub-string from startChar until the end is returned.

void	deleteSubString(int startChar,
int endChar = -1)

Deletes the characters from startChar to endChar, inclusive, from the string. If endChar is -1 (the default), all characters from startChar until the end are deleted.

SbString &	operator =(const char *str)

SbString &	operator =(const SbString &str)

Assignment operators for character string, SbString.

SbString &	operator +=(const char *str)

SbString &	operator +=(const SbString &str)

Concatenation operators "+=" for string, SbString.

int	operator !() const

Unary "not" operator; returns TRUE if string is empty ("").

int	operator ==(const char *s,
const SbString &str)

int	operator ==(const SbString &str,
const char *s)

int	operator ==(const SbString &str1,
const SbString &str2)

Equality operator for SbString/char* and SbString/SbString comparison.

int	operator !=(const char *s,
const SbString &str)

int	operator !=(const SbString &str,
const char *s)

int	operator !=(const SbString &str1,
const SbString &str2)

Inequality operator for SbString/char* and SbString/SbString comparison.

SEE ALSO

SbName


SbTime

NAME

SbTime - class for representation of a time

INHERITS FROM

SbTime

SYNOPSIS

#include <Inventor/SbTime.h>

Methods from class SbTime:

SbTime()

SbTime(double sec)

SbTime(int32_t sec,
long usec)

SbTime(const struct timeval *tv)

static SbTime	getTimeOfDay()

void	setToTimeOfDay()

static SbTime	zero()

static SbTime	max()

void	setValue(double sec)

void	setValue(int32_t sec,
long usec)

void	setValue(const struct timeval *tv)

void	setMsecValue(unsigned long msec)

double	getValue() const

void	getValue(int32_t &sec,
long &usec) const

void	getValue(struct timeval *tv) const

unsigned long	getMsecValue() const

SbString	format(const char *fmt = "%S.%i") const

SbString	formatDate(const char *fmt = "%A,
%D %r") const

SbTime	operator +(const SbTime &t0,
const SbTime &t1)

SbTime	operator -(const SbTime &t0,
const SbTime &t1)

SbTime &	operator +=(const SbTime &tm)

SbTime &	operator -=(const SbTime &tm)

SbTime	operator -() const

SbTime	operator *(double s,
const SbTime &tm)

SbTime	operator *(const SbTime &tm,
double s)

SbTime	operator /(const SbTime &tm,
double s)

SbTime &	operator *=(double s)

SbTime &	operator /=(double s)

double	operator /(const SbTime &tm) const

SbTime	operator %(const SbTime &tm) const

int	operator ==(const SbTime &tm) const

int	operator !=(const SbTime &tm) const

SbBool	operator <(const SbTime &tm) const

SbBool	operator >(const SbTime &tm) const

SbBool	operator <=(const SbTime &tm) const

SbBool	operator >=(const SbTime &tm) const

DESCRIPTION

This class represents and performs operations on time. Operations may be done in seconds, seconds and microseconds, or using a struct timeval (defined in time.h).

METHODS

SbTime()

SbTime(double sec)

SbTime(int32_t sec,
long usec)

SbTime(const struct timeval *tv)

Constructors taking seconds, seconds and microseconds, or a struct timeval. NOTE that an integer parameter will not automatically cast to a double to invoke the constructor taking seconds; that is, SbTime(1) will result in a compilation error. SbTime(1.0) must be used instead. This is to avoid errors in upgrading from an earlier release, in which SbTime(1) had different semantics. In future releases, this distinction will be eliminated, and the effect of SbTime(1.0) and that of SbTime(1) will be identical.

static SbTime	getTimeOfDay()

Get the current time (seconds since Jan 1, 1970).

void	setToTimeOfDay()

Set to the current time (seconds since Jan 1, 1970).

static SbTime	zero()

Get a zero time.

static SbTime	max()

Get a time far, far into the future.

void	setValue(double sec)

Set time from a double (in seconds).

void	setValue(int32_t sec,
long usec)

Set time from seconds + microseconds.

void	setValue(const struct timeval *tv)

Set time from a struct timeval.

void	setMsecValue(unsigned long msec)

Set time from milliseconds.

double	getValue() const

Get time in seconds as a double.

void	getValue(int32_t &sec,
long &usec) const

Get time in seconds and microseconds.

void	getValue(struct timeval *tv) const

Get time in a struct timeval.

unsigned long	getMsecValue() const

Get time in milliseconds (for Xt).

SbString	format(const char *fmt = "%S.%i") const

Convert to a string. The default format is seconds with 3 digits of fraction precision. fmt is a character string that consists of field descriptors and text characters, in a manner analogous to printf(). Each field descriptor consists of a % character followed by another character which specifies the replacement for the field descriptor. All other characters are copied from fmt into the result. The following field descriptors are supported:

%	the `%' character

D	total number of days

H	total number of hours

M	total number of minutes

S	total number of seconds

I	total number of milliseconds

U	total number of microseconds

h	hours remaining after the days (00-23)

m	minutes remaining after the hours (00-59)

s	seconds remaining after the minutes (00-59)

i	milliseconds remaining after the seconds (000-999)

u	microseconds remaining after the seconds (000000-999999)

The uppercase descriptors are formatted with a leading `-' for negative times; the lowercase descriptors are formatted fixed width, with leading zeros. For example, a reasonable format string might be "elapsed time: %M minutes, %s seconds". The default value of fmt, "%S.%i", formats the time as seconds with 3 digits of fractional precision.

SbString	formatDate(const char *fmt = "%A,
%D %r") const

Convert to a date string, interpreting the time as seconds since Jan 1, 1970. The default format gives "Tuesday, 01/26/93 11:23:41 AM". See the strftime() reference page for explanation of the format string.

SbTime	operator +(const SbTime &t0,
const SbTime &t1)

SbTime	operator -(const SbTime &t0,
const SbTime &t1)

Addition and subtraction of two times.

SbTime &	operator +=(const SbTime &tm)

SbTime &	operator -=(const SbTime &tm)

Addition and subtraction of two times which modifies the time structure.

SbTime	operator -() const

Unary negation.

SbTime	operator *(double s,
const SbTime &tm)

SbTime	operator *(const SbTime &tm,
double s)

SbTime	operator /(const SbTime &tm,
double s)

Multiplication and division by scalar.

SbTime &	operator *=(double s)

SbTime &	operator /=(double s)

Destructive multiplication and division by scalar.

double	operator /(const SbTime &tm) const

Division by another time.

SbTime	operator %(const SbTime &tm) const

Modulus for two times (remainder when time1 is divided by time2).

int	operator ==(const SbTime &tm) const

int	operator !=(const SbTime &tm) const

Equality operators.

SbBool	operator <(const SbTime &tm) const

SbBool	operator >(const SbTime &tm) const

SbBool	operator <=(const SbTime &tm) const

SbBool	operator >=(const SbTime &tm) const

Relational operators.


SbVec2f

NAME

SbVec2f - 2D vector class

INHERITS FROM

SbVec2f

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec2f:

SbVec2f()

SbVec2f(const float v[2])

SbVec2f(float x,
float y)

float	dot(const SbVec2f &v) const

SbBool	equals(const SbVec2f v,
float tolerance) const

const float *	getValue() const

void	getValue(float &x,
float &y) const

float	length() const

void	negate()

float	normalize()

SbVec2f &	setValue(const float v[2])

SbVec2f &	setValue(float x,
float y)

SbVec2f &	setValue(const SbVec2d &vec2d)

float &	operator [](int i)

const float &	operator [](int i)

SbVec2f &	operator *=(float d)

SbVec2f &	operator /=(float d)

SbVec2f &	operator +=(const SbVec2f &u)

SbVec2f &	operator -=(const SbVec2f &u)

SbVec2f	operator -() const

SbVec2f	operator *(const SbVec2f &v,
float d)

SbVec2f	operator *(float d,
const SbVec2f &v)

SbVec2f	operator /(const SbVec2f &v,
float d)

SbVec2f	operator +(const SbVec2f &v1,
const SbVec2f &v2)

SbVec2f	operator -(const SbVec2f &v1,
const SbVec2f &v2)

int	operator ==(const SbVec2f &v1,
const SbVec2f &v2)

int	operator !=(const SbVec2f &v1,
const SbVec2f &v2)

DESCRIPTION

2D vector class used to store 2D vectors and points. This class is used throughout Open Inventor for arguments and return values.

METHODS

SbVec2f()

Default constructor.

SbVec2f(const float v[2])

SbVec2f(float x,
float y)

Constructor given vector components.

float	dot(const SbVec2f &v) const

Returns dot (inner) product of vector and another vector.

SbBool	equals(const SbVec2f v,
float tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.

const float *	getValue() const

void	getValue(float &x,
float &y) const

Returns vector components.

float	length() const

Returns geometric length of vector.

void	negate()

Negates each component of vector in place.

float	normalize()

Changes vector to be unit length.

SbVec2f &	setValue(const float v[2])

SbVec2f &	setValue(float x,
float y)

Sets the vector components.

SbVec2f &	setValue(const SbVec2d &vec2d)

Sets value of vector from a double precision vector.

If the values stored in the double precision argument(s) are too large to be stored in single precision variables, some loss of data will occur during the data transfer. The loss of data is defined by the standard C type conversion from double to float. It is the application's responsibility to handle this potential loss of data appropriately.

NOTE: Open Inventor fields still store only single precision values, not double precision values.

float &	operator [](int i)

const float &	operator [](int i)

Accesses indexed component of vector.

SbVec2f &	operator *=(float d)

SbVec2f &	operator /=(float d)

Component-wise scalar multiplication and division operators.

SbVec2f &	operator +=(const SbVec2f &u)

SbVec2f &	operator -=(const SbVec2f &u)

Component-wise vector addition and subtraction operators.

SbVec2f	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec2f	operator *(const SbVec2f &v,
float d)

SbVec2f	operator *(float d,
const SbVec2f &v)

SbVec2f	operator /(const SbVec2f &v,
float d)

Component-wise binary scalar multiplication and division operators.

SbVec2f	operator +(const SbVec2f &v1,
const SbVec2f &v2)

SbVec2f	operator -(const SbVec2f &v1,
const SbVec2f &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec2f &v1,
const SbVec2f &v2)

int	operator !=(const SbVec2f &v1,
const SbVec2f &v2)

Equality comparison operators.

SEE ALSO

SbVec2d, SbVec3d, SbVec3f, SbVec4d, SbVec4f, SbVec2s, SbVec3s, SbRotation, SbRotationd


SbVec2s

NAME

SbVec2s - 2D vector class

INHERITS FROM

SbVec2s

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec2s:

SbVec2s()

SbVec2s(const short v[2])

SbVec2s(short x,
short y)

int32_t	dot(const SbVec2f &v) const

const short *	getValue() const

void	getValue(short &x,
short &y) const

void	negate()

SbVec2s &	setValue(const short v[2])

SbVec2s &	setValue(short x,
short y)

short &	operator [](int i)

const short &	operator [](int i)

SbVec2s &	operator *=(int d)

SbVec2s &	operator *=(double d)

SbVec2s &	operator /=(int d)

SbVec2s &	operator /=(double d)

SbVec2s &	operator +=(const SbVec2s &u)

SbVec2s &	operator -=(const SbVec2s &u)

SbVec2s	operator -() const

SbVec2s	operator *(const SbVec2s &v,
int d)

SbVec2s	operator *(const SbVec2s &v,
double d)

SbVec2s	operator *(int d,
const SbVec2s &v)

SbVec2s	operator *(double d,
const SbVec2s &v)

SbVec2s	operator /(const SbVec2s &v,
int d)

SbVec2s	operator /(const SbVec2s &v,
double d)

SbVec2s	operator +(const SbVec2s &v1,
const SbVec2s &v2)

SbVec2s	operator -(const SbVec2s &v1,
const SbVec2s &v2)

int	operator ==(const SbVec2s &v1,
const SbVec2s &v2)

int	operator !=(const SbVec2s &v1,
const SbVec2s &v2)

DESCRIPTION

2D vector class used to store 2D integer vectors and points. This class is used throughout Open Inventor for arguments and return values.

METHODS

SbVec2s()

Default constructor.

SbVec2s(const short v[2])

SbVec2s(short x,
short y)

Constructor given 2 components.

int32_t	dot(const SbVec2f &v) const

Returns dot (inner) product of vector and another vector.

const short *	getValue() const

void	getValue(short &x,
short &y) const

Returns vector components.

void	negate()

Negates each component of vector in place.

SbVec2s &	setValue(const short v[2])

SbVec2s &	setValue(short x,
short y)

Sets vector components.

short &	operator [](int i)

const short &	operator [](int i)

Accesses indexed component of vector.

SbVec2s &	operator *=(int d)

SbVec2s &	operator *=(double d)

SbVec2s &	operator /=(int d)

SbVec2s &	operator /=(double d)

Component-wise scalar multiplication and division operators.

SbVec2s &	operator +=(const SbVec2s &u)

SbVec2s &	operator -=(const SbVec2s &u)

Component-wise vector addition and subtraction operators.

SbVec2s	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec2s	operator *(const SbVec2s &v,
int d)

SbVec2s	operator *(const SbVec2s &v,
double d)

SbVec2s	operator *(int d,
const SbVec2s &v)

SbVec2s	operator *(double d,
const SbVec2s &v)

SbVec2s	operator /(const SbVec2s &v,
int d)

SbVec2s	operator /(const SbVec2s &v,
double d)

Component-wise binary scalar multiplication and division operators.

SbVec2s	operator +(const SbVec2s &v1,
const SbVec2s &v2)

SbVec2s	operator -(const SbVec2s &v1,
const SbVec2s &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec2s &v1,
const SbVec2s &v2)

int	operator !=(const SbVec2s &v1,
const SbVec2s &v2)

Equality comparison operators.

SEE ALSO

SbVec3f, SbVec4f, SbVec2f, SbVec3s


SbVec3f

NAME

SbVec3f - 3D vector class

INHERITS FROM

SbVec3f

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec3f:

SbVec3f()

SbVec3f(const float v[3])

SbVec3f(float x,
float y,
float z)

SbVec3f(SbPlane &p0,
SbPlane &p1,
SbPlane &p2)

SbVec3f	cross(const SbVec3f &v) const

float	dot(const SbVec3f &v) const

SbBool	equals(const SbVec3f v,
float tolerance) const

SbVec3f	getClosestAxis() const

const float *	getValue() const

void	getValue(float &x,
float &y,
float &z) const

float	length() const

void	negate()

float	normalize()

SbVec3f &	setValue(const float v[3])

SbVec3f &	setValue(float x,
float y,
float z)

SbVec3f &	setValue(const SbVec3f &barycentric,
const SbVec3f &v0,
const SbVec3f &v1,
const SbVec3f &v2)

SbVec3f &	setValue(const SbVec3d &vec3)

float &	operator [](int i)

const float &	operator [](int i)

SbVec3f &	operator *=(float d)

SbVec3f &	operator /=(float d)

SbVec3f &	operator +=(const SbVec3f &u)

SbVec3f &	operator -=(const SbVec3f &u)

SbVec3f	operator -() const

SbVec3f	operator *(const SbVec3f &v,
float d)

SbVec3f	operator *(float d,
const SbVec3f &v)

SbVec3f	operator /(const SbVec3f &v,
float d)

SbVec3f	operator +(const SbVec3f &v1,
const SbVec3f &v2)

SbVec3f	operator -(const SbVec3f &v1,
const SbVec3f &v2)

int	operator ==(const SbVec3f &v1,
const SbVec3f &v2)

int	operator !=(const SbVec3f &v1,
const SbVec3f &v2)

DESCRIPTION

3D vector class used to store 3D vectors and points. This class is used throughout Open Inventor for arguments and return values.

METHODS

SbVec3f()

Default constructor.

SbVec3f(const float v[3])

SbVec3f(float x,
float y,
float z)

Constructor given vector components.

SbVec3f(SbPlane &p0,
SbPlane &p1,
SbPlane &p2)

Constructor given 3 planes.

SbVec3f	cross(const SbVec3f &v) const

Returns right-handed cross product of vector and another vector.

float	dot(const SbVec3f &v) const

Returns dot (inner) product of vector and another vector.

SbBool	equals(const SbVec3f v,
float tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.

SbVec3f	getClosestAxis() const

Returns principal axis that is closest (based on maximum dot product) to this vector.

const float *	getValue() const

void	getValue(float &x,
float &y,
float &z) const

Returns vector components.

float	length() const

Returns geometric length of vector.

void	negate()

Negates each component of vector in place.

float	normalize()

Changes vector to be unit length, returning the length before normalization.

SbVec3f &	setValue(const float v[3])

SbVec3f &	setValue(float x,
float y,
float z)

Sets the vector components.

SbVec3f &	setValue(const SbVec3f &barycentric,
const SbVec3f &v0,
const SbVec3f &v1,
const SbVec3f &v2)

Sets value of vector as the weighted average of 3 other vectors.

SbVec3f &	setValue(const SbVec3d &vec3)

Sets value of vector from a double precision vector.

float &	operator [](int i)

const float &	operator [](int i)

Accesses indexed component of vector.

SbVec3f &	operator *=(float d)

SbVec3f &	operator /=(float d)

Component-wise scalar multiplication and division operators.

SbVec3f &	operator +=(const SbVec3f &u)

SbVec3f &	operator -=(const SbVec3f &u)

Component-wise vector addition and subtraction operators.

SbVec3f	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec3f	operator *(const SbVec3f &v,
float d)

SbVec3f	operator *(float d,
const SbVec3f &v)

SbVec3f	operator /(const SbVec3f &v,
float d)

Component-wise binary scalar multiplication and division operators.

SbVec3f	operator +(const SbVec3f &v1,
const SbVec3f &v2)

SbVec3f	operator -(const SbVec3f &v1,
const SbVec3f &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec3f &v1,
const SbVec3f &v2)

int	operator !=(const SbVec3f &v1,
const SbVec3f &v2)

Equality comparison operators.

SEE ALSO

SbVec2d, SbVec2f, SbVec3d, SbVec4d, SbVec4f, SbVec2s, SbVec3s, SbRotation, SbRotationd


SbVec3s

NAME

SbVec3s - 3D vector class

INHERITS FROM

SbVec3s

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec3s:

SbVec3s()

SbVec3s(const short v[3])

SbVec3s(short x,
short y,
short z)

int32_t	dot(const SbVec3f &v) const

const short *	getValue() const

void	getValue(short &x,
short &y,
short &z) const

void	negate()

SbVec3s &	setValue(const short v[3])

SbVec3s &	setValue(short x,
short y,
short z)

short &	operator [](int i)

const short &	operator [](int i)

SbVec3s &	operator *=(int d)

SbVec3s &	operator *=(double d)

SbVec3s &	operator /=(int d)

SbVec3s &	operator /=(double d)

SbVec3s &	operator +=(const SbVec3s &u)

SbVec3s &	operator -=(const SbVec3s &u)

SbVec3s	operator -() const

SbVec3s	operator *(const SbVec3s &v,
int d)

SbVec3s	operator *(const SbVec3s &v,
double d)

SbVec3s	operator *(int d,
const SbVec3s &v)

SbVec3s	operator *(double d,
const SbVec3s &v)

SbVec3s	operator /(const SbVec3s &v,
int d)

SbVec3s	operator /(const SbVec3s &v,
double d)

SbVec3s	operator +(const SbVec3s &v1,
const SbVec3s &v2)

SbVec3s	operator -(const SbVec3s &v1,
const SbVec3s &v2)

int	operator ==(const SbVec3s &v1,
const SbVec3s &v2)

int	operator !=(const SbVec3s &v1,
const SbVec3s &v2)

DESCRIPTION

3D vector class used to store 3D integer vectors and points. This class is used throughout Open Inventor for arguments and return values.

METHODS

SbVec3s()

Default constructor.

SbVec3s(const short v[3])

SbVec3s(short x,
short y,
short z)

Constructor given 3 components.

int32_t	dot(const SbVec3f &v) const

Returns dot (inner) product of vector and another vector.

const short *	getValue() const

void	getValue(short &x,
short &y,
short &z) const

Returns vector components.

void	negate()

Negates each component of vector in place.

SbVec3s &	setValue(const short v[3])

SbVec3s &	setValue(short x,
short y,
short z)

Sets vector components.

short &	operator [](int i)

const short &	operator [](int i)

Accesses indexed component of vector.

SbVec3s &	operator *=(int d)

SbVec3s &	operator *=(double d)

SbVec3s &	operator /=(int d)

SbVec3s &	operator /=(double d)

Component-wise scalar multiplication and division operators.

SbVec3s &	operator +=(const SbVec3s &u)

SbVec3s &	operator -=(const SbVec3s &u)

Component-wise vector addition and subtraction operators.

SbVec3s	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec3s	operator *(const SbVec3s &v,
int d)

SbVec3s	operator *(const SbVec3s &v,
double d)

SbVec3s	operator *(int d,
const SbVec3s &v)

SbVec3s	operator *(double d,
const SbVec3s &v)

SbVec3s	operator /(const SbVec3s &v,
int d)

SbVec3s	operator /(const SbVec3s &v,
double d)

Component-wise binary scalar multiplication and division operators.

SbVec3s	operator +(const SbVec3s &v1,
const SbVec3s &v2)

SbVec3s	operator -(const SbVec3s &v1,
const SbVec3s &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec3s &v1,
const SbVec3s &v2)

int	operator !=(const SbVec3s &v1,
const SbVec3s &v2)

Equality comparison operators.

SEE ALSO

SbVec3f, SbVec4f, SbVec2f, SbVec2s, SbRotation


SbVec4f

NAME

SbVec4f - 4D vector class

INHERITS FROM

SbVec4f

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec4f:

SbVec4f()

SbVec4f(const float v[4])

SbVec4f(float x,
float y,
float z,
float w)

float	dot(const SbVec4f &v) const

SbBool	equals(const SbVec4f v,
float tolerance) const

void	getReal(SbVec3f &v) const

const float *	getValue() const

void	getValue(float &x,
float &y,
float &z,
float &w) const

float	length() const

void	negate()

normalize()

SbVec4f &	setValue(const float v[4])

SbVec4f &	setValue(float x,
float y,
float z,
float w)

SbVec4f &	setValue(const SbVec4d &vec4)

float &	operator [](int i)

const float &	operator [](int i)

SbVec4f &	operator *=(float d)

SbVec4f &	operator /=(float d)

SbVec4f &	operator +=(const SbVec4f &u)

SbVec4f &	operator -=(const SbVec4f &u)

SbVec4f	operator -() const

SbVec4f	operator *(const SbVec4f &v,
float d)

SbVec4f	operator *(float d,
const SbVec4f &v)

SbVec4f	operator /(const SbVec4f &v,
float d)

SbVec4f	operator +(const SbVec4f &v1,
const SbVec4f &v2)

SbVec4f	operator -(const SbVec4f &v1,
const SbVec4f &v2)

int	operator ==(const SbVec4f &v1,
const SbVec4f &v2)

int	operator !=(const SbVec4f &v1,
const SbVec4f &v2)

DESCRIPTION

4D vector class used to store homogeneous coordinates. This class is used in Open Inventor for arguments and return values.

METHODS

SbVec4f()

Default constructor.

SbVec4f(const float v[4])

SbVec4f(float x,
float y,
float z,
float w)

Constructor given vector components.

float	dot(const SbVec4f &v) const

Returns dot (inner) product of vector and another vector.

SbBool	equals(const SbVec4f v,
float tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.

void	getReal(SbVec3f &v) const

Returns the real portion of the vector by dividing by the fourth value.

const float *	getValue() const

void	getValue(float &x,
float &y,
float &z,
float &w) const

Returns vector components.

float	length() const

Returns geometric length of vector.

void	negate()

Negates each component of vector in place.

normalize()

Changes vector to be unit length.

SbVec4f &	setValue(const float v[4])

SbVec4f &	setValue(float x,
float y,
float z,
float w)

Sets the vector components.

SbVec4f &	setValue(const SbVec4d &vec4)

Sets value of vector from a double precision vector.

float &	operator [](int i)

const float &	operator [](int i)

Accesses indexed component of vector.

SbVec4f &	operator *=(float d)

SbVec4f &	operator /=(float d)

Component-wise scalar multiplication and division operators.

SbVec4f &	operator +=(const SbVec4f &u)

SbVec4f &	operator -=(const SbVec4f &u)

Component-wise vector addition and subtraction operators.

SbVec4f	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec4f	operator *(const SbVec4f &v,
float d)

SbVec4f	operator *(float d,
const SbVec4f &v)

SbVec4f	operator /(const SbVec4f &v,
float d)

Component-wise binary scalar multiplication and division operators.

SbVec4f	operator +(const SbVec4f &v1,
const SbVec4f &v2)

SbVec4f	operator -(const SbVec4f &v1,
const SbVec4f &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec4f &v1,
const SbVec4f &v2)

int	operator !=(const SbVec4f &v1,
const SbVec4f &v2)

Equality comparison operators.

SEE ALSO

SbVec2d, SbVec2f, SbVec3d, SbVec3f, SbVec4d, SbVec2s, SbVec3s, SbRotation, SbRotationd


SbViewportRegion

NAME

SbViewportRegion - class for representing a viewport

INHERITS FROM

SbViewportRegion

SYNOPSIS

#include <Inventor/SbViewportRegion.h>

Methods from class SbViewportRegion:

SbViewportRegion()

SbViewportRegion(short width,
short height)

SbViewportRegion(SbVec2s winSize)

SbViewportRegion(const SbViewportRegion &vpReg)

void	setWindowSize(short width,
short height)

void	setWindowSize(SbVec2s winSize)

void	setViewport(float left,
float bottom,
float width,
float height)

void	setViewport(SbVec2f origin,
SbVec2f size)

void	setViewportPixels(short left,
short bottom,
short width,
short height)

void	setViewportPixels(SbVec2s origin,
SbVec2s size)

const SbVec2s &	getWindowSize() const

const SbVec2f &	getViewportOrigin() const

const SbVec2s &	getViewportOriginPixels() const

const SbVec2f &	getViewportSize() const

const SbVec2s &	getViewportSizePixels() const

float	getViewportAspectRatio() const

void	scaleWidth(float ratio)

void	scaleHeight(float ratio)

void	setPixelsPerInch(float ppi)

float	getPixelsPerInch() const

float	getPixelsPerPoint() const

friend int	operator ==(const SbViewportRegion &reg1,
const SbViewportRegion &reg2)

DESCRIPTION

This class represents the active viewport region in a display window. It contains the screen-space size of the window as well as the origin and size of the viewport within the window. By default, the viewport is the same as the full window. Methods allow the viewport to be set either in terms of screen-space pixels or as normalized coordinates, where (0,0) is the lower-left corner of the window and (1,1) is the upper-right corner.

METHODS

SbViewportRegion()

SbViewportRegion(short width,
short height)

SbViewportRegion(SbVec2s winSize)

SbViewportRegion(const SbViewportRegion &vpReg)

Constructors of various kinds.

void	setWindowSize(short width,
short height)

Changes window size to given width and height in pixels.

void	setWindowSize(SbVec2s winSize)

Changes window size to given width and height in pixels, given as SbVec2s.

void	setViewport(float left,
float bottom,
float width,
float height)

Sets viewport to given region, specified as normalized window coordinates: (0,0) is the lower-left corner, (1,1) is the upper-right.

void	setViewport(SbVec2f origin,
SbVec2f size)

Sets viewport to region with given origin (lower-left corner) and size, given as normalized coordinate vectors.

void	setViewportPixels(short left,
short bottom,
short width,
short height)

Sets viewport to given region, specified as pixel coordinates in window: (0,0) is the lower-left corner.

void	setViewportPixels(SbVec2s origin,
SbVec2s size)

Sets viewport to region with given origin (lower-left corner) and size, given as pixel coordinates.

const SbVec2s &	getWindowSize() const

Returns window size in pixels.

const SbVec2f &	getViewportOrigin() const

Returns viewport origin in normalized coordinates.

const SbVec2s &	getViewportOriginPixels() const

Returns viewport origin in pixels.

const SbVec2f &	getViewportSize() const

Returns viewport size in normalized coordinates.

const SbVec2s &	getViewportSizePixels() const

Returns viewport size in pixels.

float	getViewportAspectRatio() const

Returns aspect ratio (width/height) of viewport.

void	scaleWidth(float ratio)

void	scaleHeight(float ratio)

Scales viewport within window to be the given ratio of its current width or height, leaving the resulting viewport centered about the same point as the current one.

void	setPixelsPerInch(float ppi)

float	getPixelsPerInch() const

Sets/returns the pixel-per-inch ratio for the display device the viewport is part of. The default value is 72 (1 pixel per printer's point).

float	getPixelsPerPoint() const

Convenience function that returns number of pixels per printer's point.

friend int	operator ==(const SbViewportRegion &reg1,
const SbViewportRegion &reg2)

Equality comparison operator.

SEE ALSO

SbVec2f, SbVec2s


SbXfBox3f

NAME

SbXfBox3f - 3D box with an associated transformation matrix

INHERITS FROM

SbBox3f > SbXfBox3f

SYNOPSIS

#include <Inventor/SbBox.h>

Methods from class SbXfBox3f:

SbXfBox3f()

SbXfBox3f(const SbVec3f &_min,
const SbVec3f &_max)

SbXfBox3f(const SbBox3f &box)

~SbXfBox3f()

void	setTransform(const SbMatrix &m)

const SbMatrix &	getTransform() const

const SbMatrix &	getInverse() const

SbVec3f	getCenter() const

void	extendBy(const SbVec3f &pt)

void	extendBy(const SbBox3f &bb)

void	extendBy(const SbXfBox3f &bb)

SbBool	intersect(const SbVec3f &pt) const

SbBool	intersect(const SbBox3f &bb) const

void	setBounds(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)

void	setBounds(const SbVec3f &_min,
const SbVec3f &_max)

void	getBounds(float &xmin,
float &ymin,
float &zmin,
float &xmax,
float &ymax,
float &zmax) const

void	getBounds(SbVec3f &_min,
SbVec3f &_max) const

void	getOrigin(float &originX,
float &originY,
float &originZ)

void	getSize(float &sizeX,
float &sizeY,
float &sizeZ)

float	getVolume() const

void	makeEmpty()

SbBool	isEmpty() const

SbBool	hasVolume() const

void	getSpan(const SbVec3f &direction,
float &dMin,
float &dMax) const

void	transform(const SbMatrix &m)

SbBox3f	project() const

int	operator ==(const SbXfBox3f &b1,
const SbXfBox3f &b2)

int	operator !=(const SbXfBox3f &b1,
const SbXfBox3f &b2)

Methods from class SbBox3f:

const SbVec3f &	getMin()

const SbVec3f &	getMax()

DESCRIPTION

A 3D box with an arbitrary transformation applied. This class is useful when a box will be transformed frequently; if an SbBox3f is used for this purpose it will expand each time it is transformed in order to keep itself axis-aligned. Transformations can be accumulated on an SbXfBox3f without expanding the box, and after all transformations have been done, the box can be expanded to an axis-aligned box if necessary.

METHODS

SbXfBox3f()

SbXfBox3f(const SbVec3f &_min,
const SbVec3f &_max)

SbXfBox3f(const SbBox3f &box)

~SbXfBox3f()

Constructors and destructor.

void	setTransform(const SbMatrix &m)

Sets the transformation on the box.

const SbMatrix &	getTransform() const

const SbMatrix &	getInverse() const

Gets the transformation on the box, and its inverse.

SbVec3f	getCenter() const

Returns the center of the box.

void	extendBy(const SbVec3f &pt)

Extends the box (if necessary) to contain the given 3D point. If the box has had a non-identity transformation applied using the setTransform() method, the point is assumed to be in the transformed space. For example, the following code sequence:

SbXfBox3f bbox;

bbox.extendBy(SbVec3f(0,0,0));

SbMatrix trans;

trans.setTranslate(SbVec3f(1,1,1));

bbox.setTransform(trans);

bbox.extendBy(SbVec3f(0,0,0));

will result in a bounding box extending from (-1,-1,-1) to (0,0,0) in bbox'es local (untransformed) space.

void	extendBy(const SbBox3f &bb)

Extends the box (if necessary) to contain the given SbBox3f. If the box has had a non-identity transformation applied using the setTransform() method, the given SbBox3f is assumed to be in the transformed space.

void	extendBy(const SbXfBox3f &bb)

Extends the box (if necessary) to contain the given SbXfBox3f.

SbBool	intersect(const SbVec3f &pt) const

Returns TRUE if intersection of given point and this box is not empty.

SbBool	intersect(const SbBox3f &bb) const

Returns TRUE if intersection of given box and this box is not empty.

void	setBounds(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)

void	setBounds(const SbVec3f &_min,
const SbVec3f &_max)

void	getBounds(float &xmin,
float &ymin,
float &zmin,
float &xmax,
float &ymax,
float &zmax) const

void	getBounds(SbVec3f &_min,
SbVec3f &_max) const

Set and get the bounds of the box.

void	getOrigin(float &originX,
float &originY,
float &originZ)

Returns origin (minimum point) of the box.

void	getSize(float &sizeX,
float &sizeY,
float &sizeZ)

Returns size of the box.

float	getVolume() const

Gives the volume of the box (0 for an empty box).

void	makeEmpty()

Sets the box to contain nothing.

SbBool	isEmpty() const

Checks if the box is empty (degenerate).

SbBool	hasVolume() const

Checks if the box has volume; i.e., all three dimensions have positive size.

void	getSpan(const SbVec3f &direction,
float &dMin,
float &dMax) const

Finds the extent of the box along a particular direction.

void	transform(const SbMatrix &m)

Transforms the box by the given matrix.

SbBox3f	project() const

Projects an SbXfBox3f to an SbBox3f

int	operator ==(const SbXfBox3f &b1,
const SbXfBox3f &b2)

int	operator !=(const SbXfBox3f &b1,
const SbXfBox3f &b2)

Equality comparisons.

SEE ALSO

SbBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix, SoGetBoundingBoxAction


SceneViewer

NAME

SceneViewer - 3D editor and viewer for Open Inventor scenes

SYNOPSIS

SceneViewer [-e env_file] [file]

DESCRIPTION

SceneViewer is a program for viewing and interacting with Open Inventor scene graph files (the SGI 3D file format standard). SceneViewer was written to demonstrate Open Inventor features, and serves as the basis for the IRIS Explorer Render Module.

When SceneViewer is run, a window appears containing the Open Inventor examiner viewer and a menu bar. The viewer allows the user to interactively change the view of the scene through direct manipulation, or indirect slider and push button controls. The menu bar contains the following menus:

File

This menu supports file reading and writing, and launches a dialog for printing to a printer or to PostScript file.

Edit

This menu enables copy and paste of 3D data, selecting all objects, and deleting the currently selected objects.

Viewing

This menu controls viewing options. It allows different viewing paradigms to be employed: the examiner viewer which provides a virtual trackball interface, the fly-through viewer for traveling through expansive data sets, the walk viewer for architectural walk-throughs, and the plane viewer for orthographic projections. The menu also enables different types of transparency, fog effects, antialiasing, and background color controls.

Selection

This menu allows the different selection policies to be demonstrated. A selection policy determines how objects get added and removed from the collection of selected objects.

Editors

This menu launches the material editor and transform sliders. An object must be selected for the menu to be active.

Manips

This menu allows different manipulators to act on the current selection, including the trackball, handle box, jack, center ball, and transform box. Manipulators can also be turned off, in which case selected objects are surrounded with a red wireframe box highlight.

Lights

This menu allows directional, point, and spot lights to be created and edited. It also allows lights to be turned on and off.

For more information on how to use the viewers and editors employed by the scene viewer, please see SceneViewer's runtime help cards.

SOURCE CODE

Source code to SceneViewer is available from TGS.

OPTIONS

The following command line options are allowed:

-e  env_file Read the passed environment file, and use the lights, camera, and environment settings found there.

FILES

%OIVHOME%\data\models\* - Sample 3D data files

SEE ALSO

inventor, ivcat, maze, SceneViewer figure


SceneViewer Intro

Welcome to the SceneViewer! When SceneViewer is run, a window appears containing the Open Inventor Examiner Viewer and a menu bar. The viewer allows the user to interactively change the view of the scene through direct manipulation, or indirect slider and push button controls. (The figure below shows the SceneViewer on a Windows system. On a Unix system, its appearance will be slightly different.)

The SceneViewer

1.	Menu bar. The menu bar contains the File, Edit, View, Selection, Editors, Manips, Lights, ViewPoints, and Help menus.

2.	Toolbar. This is a standard Windows application toolbar.

3.	Graphics Area. You can use the cursor to interact with the objects in the scene. Pressing the right mouse button will bring up a context-sensitive menu.

4.	Rotx. In Examiner Viewer mode, this thumbwheel rotates the model about the screen X axis.

5.	Status Area. This area displays status messages.

6.	Roty. In Examiner Viewer mode, this thumbwheel rotates the model about the screen Y axis.

7.	Zoom. The zoom slider adjusts the camera's field of view. Field of view is specified in degrees.

8.	Dolly. This thumbwheel moves the camera in and out.

9.	Viewer Buttons. If the SceneViewer window is too small, not all of these buttons will be visible.


Sensors

SoAlarmSensor	Triggers a callback once sometime in the future
SoDataSensor	Abstract base class for sensors attached to parts of a scene
SoDelayQueueSensor	Abstract base class for sensors not dependent on time
SoFieldSensor	Sensor class that can be attached to Open Inventor fields
SoIdleSensor	Sensor for one-time only callbacks when the application is idle
SoNodeSensor	Sensor class that can be attached to Open Inventor nodes
SoOneShotSensor	Sensor for one-time only callbacks
SoPathSensor	Sensor class that can be attached to Open Inventor paths
SoSensor	Abstract base class for Open Inventor sensors
SoTimerQueueSensor	Abstract base class for sensors dependent on time
SoTimerSensor	Sensor that triggers callback repeatedly at regular intervals


Simplifiers

SoDecimator	Encapsulates an algorithm for simplifying shapes through mesh decimation
SoSimplifier	Abstract base class for objects that encapsulate simplification algorithms


SoAction

NAME

SoAction - abstract base class for all actions

INHERITS FROM

SoAction

SYNOPSIS

#include <Inventor/actions/SoAction.h>

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

SoAction is the abstract base class for all actions. Classes derived from SoAction define operations to be applied at each node encountered during traversal of a scene graph. The function that gets called to implement the action for a particular node type is determined by a lookup table in the global database.

METHODS

virtual	~SoAction()

Destructor.

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

Initiates an action on the graph defined either by a node, path, or list of paths. TRUE can be passed for the obeysRules flag if the given path list has the following 4 properties:

1	All paths have the same head node

2	Paths are sorted in traversal order

3	If one path ends at node A, no other path continues through A

4	No two paths are the same

These rules will be obeyed by path lists returned by picking and by searches for non-group nodes.

static SoType	getClassTypeId()

Returns the type identifier for this class.

virtual SoType	getTypeId()

Returns the type identifier for a specific instance.

virtual SbBool	isOfType(SoType type)

Returns TRUE if this instance is of the type specified in type or is derived from that type. Otherwise, it returns FALSE. For example,

actionPtr->isOfType(SoGetMatrixAction::getClassTypeId())

returns TRUE if actionPtr is an instance of SoGetMatrixAction or one of its subclasses.

virtual void	invalidateState()

Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied. This is typically unnecessary in most applications.

SEE ALSO

SoNode, SoPath, SoPathList, SoCallbackAction, SoGLRenderAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoPickAction, SoRayPickAction, SoSearchAction, SoWriteAction


SoAlarmSensor

NAME

SoAlarmSensor - triggers a callback once sometime in the future

INHERITS FROM

SoSensor > SoTimerQueueSensor > SoAlarmSensor

SYNOPSIS

#include <Inventor/sensors/SoAlarmSensor.h>

Methods from class SoAlarmSensor:

SoAlarmSensor()

SoAlarmSensor(SoSensorCB *func,
void *data)

~SoAlarmSensor()

void	setTime(const SbTime &absTime)

void	setTimeFromNow(const SbTime &relTime)

const SbTime &	getTime() const

Methods from class SoTimerQueueSensor:

const SbTime &	getTriggerTime()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

This type of sensor can be used to schedule a one-time callback for some time in the future. The sensor is not guaranteed to be called at exactly that time, but will be called sometime after the specified time.

METHODS

SoAlarmSensor()

SoAlarmSensor(SoSensorCB *func,
void *data)

Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

~SoAlarmSensor()

Destroys the sensor, freeing up any memory associated with it after unscheduling it.

void	setTime(const SbTime &absTime)

Sets the sensor to go off at the specified time. You must also call schedule() for the sensor to be triggered. If the sensor is already scheduled, it must be unscheduled and then rescheduled for the change in the trigger time to take effect.

void	setTimeFromNow(const SbTime &relTime)

Sets the sensor to go off the given amount of time from now. You must also call schedule() for the sensor to be triggered. If the sensor is already scheduled, it must be unscheduled and then rescheduled for the change in the trigger time to take effect.

const SbTime &	getTime() const

Returns the time at which the sensor is set to be triggered. This is similar to the getTriggerTime method, but returns the time even if the sensor has not yet been scheduled.

SEE ALSO

SoOneShotSensor, SoTimerSensor, SoTimerQueueSensor, SbTime


SoAnnoText3

NAME

SoAnnoText3 - Annotation text node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoAnnoText3

SYNOPSIS

#include <Inventor/nodes/SoAnnoText3.h>

enum Justification	{
SoAnnoText3::LEFT
Left justification
SoAnnoText3::RIGHT
Right justification
SoAnnoText3::CENTER
Center justification
}

Fields from class SoAnnoText3:

SoMFString	string

SoSFFloat	spacing

SoSFEnum	justification

Methods from class SoAnnoText3:

SoAnnoText3()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoAnnoText3 has some features of SoText3 and also some of SoText2. However for the Text2 functionality, the size of the font (see SoFont) is interpreted in the current units, so the text can be zoomed, but not rotated. The current annotation property (SoAnnoText3Property) determines this choice.

Stroke Fonts: If a stroke font is used (see SoFont), the text is rendered with lines rather than faces. Line attributes apply instead of polygon attributes. Text is not extruded.

FIELDS

SoMFString	string

The text string(s) to display. Each string will appear on its own line.

SoSFFloat	spacing

Defines the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height. A value of 1 indicates single spacing, a value of 2 indicates double spacing, and so on.

SoSFEnum	justification

Indicates placement and alignment of strings. With LEFT justification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned. RIGHT justification is similar. CENTER justification places the center of the first string at the (transformed) origin, with the centers of all remaining strings aligned under it.

METHODS

SoAnnoText3()

Constructor.

ACTION BEHAVIOR

SoGLRenderAction

Draws text based on the current font, profiles, transformation, drawing style, material, texture, complexity, and so on.

SoRayPickAction

Performs a pick on the text. The string index and character position are available from the SoTextDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses the text.

SoCallbackAction

For non-stroke fonts, if any triangle callbacks are registered with the action, they will be invoked for each successive triangle used to approximate the text geometry.

For stroke fonts, if any line segment callbacks are registered with the action, they will be invoked for each successive line segment used to approximate the text geometry.

FILE FORMAT/DEFAULT

AnnoText3 {

string	""

spacing	1.0

justification	LEFT

}

SEE ALSO

SoAnnoText3Property, SoText2, SoText3


SoAnnoText3Property

NAME

SoAnnoText3Property - Annotation text property node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoAnnoText3Property

SYNOPSIS

#include <Inventor/nodes/SoAnnoText3Property.h>

enum RenderPrintType	{
SoAnnoText3Property::RENDER3D_PRINT_VECTOR
Text is rendered in 3D (like SoText3). It is printed (in the case of the use of PlotMaster) as vectors.
SoAnnoText3Property::RENDER3D_PRINT_RASTER
Text is rendered in 3D (like SoText3). It is printed (in the case of the use of PlotMaster) as raster text using PostScript fonts.
SoAnnoText3Property::RENDER2D_PRINT_RASTER
Text is rendered in 2D (like SoText2) but can be zoomed because the font size is interpreted in the current units. It is printed (in the case of the use of PlotMaster) as raster (PostScript font).
}

enum FontSizeHint	{
SoAnnoText3Property::ANNOTATION
2D text maintains its nominal font size from any view angle.
SoAnnoText3Property::FIT_VECTOR_TEXT
The font size of 2D text changes according to the view angle (it follows the projection on the screen of 3D text).
}

SoSFBool	isCharOrientedRasterPrint

SoSFEnum	fontSizeHint

DESCRIPTION

This node sets the current annotation text properties in the state used by all subsequent SoAnnoText3 nodes.

FIELDS

SoSFEnum	renderPrintType

This flag specifies how annotation text should be rendered (as 3D text or 2D text) and how it should printed when using PlotMaster (as 3D vectors or 2D PostScript raster fonts).

SoSFBool	isCharOrientedRasterPrint

This flag is used when the field renderPrintType is equal to RENDER3D_PRINT_RASTER or RENDER2D_PRINT_RASTER. It specifies whether the text should be oriented (or not) for printing in the case of the use of PlotMaster.

SoSFEnum	fontSizeHint

This flag is used when the field renderPrintType is equal to RENDER3D_PRINT_RASTER or RENDER2D_PRINT_RASTER. It specifies how the font size for 2D text (whether rendered or raster) changes according to the view.

METHODS

SoAnnoText3Property()

Constructor.

FILE FORMAT/DEFAULT

AnnoText3Property {

RenderPrintType	RENDER3D_PRINT_VECTOR

isCharOrientedRasterPrint	TRUE

fontSizeHint	FIT_VECTOR_TEXT

}

SEE ALSO

SoAnnoText3


SoAnnotation

NAME

SoAnnotation - annotation group node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoAnnotation

SYNOPSIS

#include <Inventor/nodes/SoAnnotation.h>

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoAnnotation:

SoAnnotation()

static SoType	getClassTypeId()

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node delays rendering its children until all other nodes have been traversed, turning off depth buffer comparisons first. The result is that the shapes under the annotation node are rendered on top of the rest of the scene. This node is derived from SoSeparator, so it saves and restores traversal state for all actions.

Note that if more than one annotation node is present in a graph, the order in which they are traversed determines the stacking order - later nodes are rendered on top of earlier ones. Also note that since depth buffer comparisons are disabled, complex 3D objects may not be rendered correctly when used under annotation nodes.

Also note that the annotation node does nothing special when picking along a ray. That is, it does not modify the sorting order of intersected objects based on which ones are under annotation nodes. If your application uses annotation nodes and you want to ensure that objects under them are picked "in front of" other objects, you can tell the pick action that you want to pick all objects along the ray and then scan through the paths in the resulting picked point instances to see if any of them passes through an annotation node. Your program can then decide what to do in such a case.

METHODS

SoAnnotation()

Creates an annotation node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Delays rendering its children until all other nodes have been traversed, turning off depth buffer comparisons first.

SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoRayPickAction, SoSearchAction

Same as SoSeparator

FILE FORMAT/DEFAULT

Annotation {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

}


SoAntiSquish

NAME

SoAntiSquish - transformation node that undoes non-uniform 3D scales

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoAntiSquish

SYNOPSIS

#include <Inventor/nodes/SoAntiSquish.h>

enum Sizing	{
SoAntiSquish::X
Fits the other two axes to match the X axis, whose size is unchanged
SoAntiSquish::Y
Fits the other two axes to match the Y axis, whose size is unchanged
SoAntiSquish::Z
Fits the other two axes to match the Z axis, whose size is unchanged
SoAntiSquish::AVERAGE_DIMENSION
Uses average of 3 scales in the matrix
SoAntiSquish::BIGGEST_DIMENSION
Uses biggest of 3 scales in the matrix
SoAntiSquish::SMALLEST_DIMENSION
Uses smallest of 3 scales in the matrix
SoAntiSquish::LONGEST_DIAGONAL
Accounts for shearing; transforms a cube by the matrix and then uses length of longest diagonal
}

Fields from class SoAntiSquish:

SoSFEnum	sizing

SoSFBool	recalcAlways

Methods from class SoAntiSquish:

SoAntiSquish()

static SoType	getClassTypeId()

void	recalc()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node removes nonuniform 3D scaling from the current transformation matrix when traversed by an action. It is used by draggers such as the SoTrackballDragger that need to stay uniformly scaled no matter where they are located in the scene graph.

The magnitude of the new scale is determined by the current transformation matrix and the sizing field. This node does not change the translation or rotation in the matrix.

FIELDS

SoSFEnum	sizing

Determines which of the algorithms enumerated by the type Sizing will be used to select the new scale when the x,y, and z scales are not equal.

SoSFBool	recalcAlways

If recalcAlways is TRUE, this node calculates its unsquishing matrix every time it is traversed. If FALSE, then this only occurs during the first traversal folllowing a call to recalc().

METHODS

SoAntiSquish()

Creates an anti-squish node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

void	recalc()

Sets a flag so that the next time the node is traversed, it will recalculate its unsquishing matrix.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoRayPickAction

Appends the current transformation with a new matrix to create an unsquished result.

FILE FORMAT/DEFAULT

AntiSquish {

sizing	AVERAGE_DIMENSION

recalcAlways	TRUE

}

SEE ALSO

SoCenterballDragger, SoJackDragger, SoTrackballDragger, SoTransformerDragger, SoTransformation, SoTransformBoxDragger


SoAppearanceKit

NAME

SoAppearanceKit - appearance nodekit class

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoAppearanceKit

SYNOPSIS

#include <Inventor/nodekits/SoAppearanceKit.h>

Parts from class SoAppearanceKit:

(SoLightModel)	lightModel

(SoEnvironment)	environment

(SoDrawStyle)	drawStyle

(SoMaterial)	material

(SoComplexity)	complexity

(SoTexture2)	texture2

(SoFont)	font

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoAppearanceKit:

SoAppearanceKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

The SoAppearanceKit is used to create a group of property nodes that will be used to affect subsequent shape nodes or nodekits in the scene graph.

This nodekit defines seven new parts: lightModel, environment, drawStyle, material, complexity, texture2, and font. Note that it does not include binding nodes such as SoMaterialBinding.

SoAppearanceKit is derived from SoBaseKit and thus also includes a callbackList part for adding callback nodes.

PARTS

(SoLightModel)	lightModel

An SoLightModel node that affects any shapes that follow this nodekit in the scene graph. This part is NULL by default.

(SoEnvironment)	environment

An SoEnvironment node that affects any nodes that follow this nodekit in the scene graph. This part is NULL by default.

(SoDrawStyle)	drawStyle

An SoDrawStyle node that affects any shapes that follow this nodekit in the scene graph. This part is NULL by default.

(SoMaterial)	material

An SoMaterial node that affects any shapes that follow this nodekit in the scene graph. This part is NULL by default.

(SoComplexity)	complexity

An SoComplexity node that affects any shapes that follow this nodekit in the scene graph. This part is NULL by default.

(SoTexture2)	texture2

An SoTexture2 node that affects any shapes that follow this nodekit in the scene graph. This part is NULL by default.

(SoFont)	font

An SoFont node that affects any text nodes that follow this nodekit in the scene graph. This part is NULL by default.

METHODS

SoAppearanceKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns the SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
lightModel	LightModel	--	yes
environment	Environment	--	yes
drawStyle	DrawStyle	--	yes
material	Material	--	yes
complexity	Complexity	--	yes
texture2	Texture2	--	yes
font	Font	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

AppearanceKit {

callbackList	NULL

lightModel	NULL

environment	NULL

drawStyle	NULL

material	NULL

complexity	NULL

texture2	NULL

font	NULL

}

NOTE

Note that SoSeparatorKit includes an SoAppearanceKit as a part.

SEE ALSO

SoBaseKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit


SoArray

NAME

SoArray - group node that creates a regular IxJxK array of copies of its children

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoArray

SYNOPSIS

#include <Inventor/nodes/SoArray.h>

enum Origin	{
SoArray::FIRST
First copy is rendered at the current local origin; all other copies are distributed relative to it
SoArray::CENTER
Copies are distributed relative to the center of the array
SoArray::LAST
Last copy is rendered at the current local origin; all other copies are distributed relative to it
}

Fields from class SoArray:

SoSFShort	numElements1

SoSFShort	numElements2

SoSFShort	numElements3

SoSFVec3f	separation1

SoSFVec3f	separation2

SoSFVec3f	separation3

SoSFEnum	origin

Methods from class SoArray:

SoArray()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node traverses its children, in order, several times, creating a regular 3D array of copies of them. The number of copies in each of the three directions is specified by fields, as are the vectors used to separate the copies in each of the three dimensions.

For example, an SoArray node can be used to create a 2x3x4 array of copies of its children, where the separation vectors between adjacent copies in the three array dimensions are (1,2,3), (-4,-5,-6), and (7,8,9), respectively. The base point of the array can be set to one of several values, as described in the origin field.

Copies are traversed so that the first dimension cycles most quickly, followed by the second, and then the third. This order is important because SoArray sets the current switch value to N before traversing the children for the Nth time (for use with inherited switch values - see SoSwitch).

FIELDS

SoSFShort	numElements1

SoSFShort	numElements2

SoSFShort	numElements3

Number of elements in each of the three array dimensions.

SoSFVec3f	separation1

SoSFVec3f	separation2

SoSFVec3f	separation3

Separation vector in each of the three array dimensions.

SoSFEnum	origin

Defines the base point from which copies are distributed.

METHODS

SoArray()

Creates an array node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Traverses all children for each array element, saving and restoring state before and after each traversal.

SoSearchAction

Traverses all children once, setting the inherited switch value to SO_SWITCH_ALL first.

FILE FORMAT/DEFAULT

Array {

numElements1	1

numElements2	1

numElements3	1

separation1	1 0 0

separation2	0 1 0

separation3	0 0 1

origin	FIRST

}

SEE ALSO

SoMultipleCopy, SoSwitch


SoAsciiText

NAME

SoAsciiText - simple 3D text shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoAsciiText

SYNOPSIS

#include <Inventor/nodes/SoAsciiText.h>

enum Justification	{
SoAsciiText::LEFT
Left edges of all strings are aligned
SoAsciiText::RIGHT
Right edges of all strings are aligned
SoAsciiText::CENTER
Centers of all strings are aligned
}

Fields from class SoAsciiText:

SoMFString	string

SoSFFloat	spacing

SoSFEnum	justification

SoMFFloat	width

Methods from class SoAsciiText:

SoAsciiText()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines one or more strings of 3D text. In contrast with SoText2, 3D text can be rotated, scaled, lighted, and textured, just like all other 3D shapes. In contrast with SoText3, this 3D ascii text cannot be extruded.

The text origin is at (0,0,0) after applying the current transformation. The scale of the text is affected by the size field of the current SoFont as well as the current transformation.

SoAsciiText uses the current material when rendering. Textures are applied to ascii text as follows. On the front face of the text, the texture origin is at the base point of the first string; the base point is at the lower left for justification LEFT, at the lower right for RIGHT, and at the lower center for CENTER. The texture is scaled equally in both S and T dimensions, with the font height representing 1 unit. S increases to the right on the front face.

FIELDS

SoMFString	string

The text string(s) to display. Each string will appear on its own line.

SoSFFloat	spacing

Defines the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height. A value of 1 indicates single spacing, a value of 2 indicates double spacing, and so on.

SoSFEnum	justification

Indicates placement and alignment of strings. With LEFT justification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned. RIGHT justification is similar. CENTER justification places the center of the first string at the (transformed) origin, with the centers of all remaining strings aligned under it.

SoMFFloat	width

Defines the width of each text string. Each string will be scaled so that it spans this many units.

METHODS

SoAsciiText()

Creates an ascii text node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws text based on the current font, transformation, drawing style, material, texture, complexity, and so on.

SoRayPickAction

Performs a pick on the text. The string index and character position are available from the SoTextDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses the text.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle used to approximate the text geometry.

FILE FORMAT/DEFAULT

AsciiText {

string	""

spacing	1

justification	LEFT

width	0

}

SEE ALSO

SoFont, SoFontStyle, SoText2, SoText3, SoTextDetail


SoBase

NAME

SoBase - base class for all nodes, paths, and engines

INHERITS FROM

SoBase

SYNOPSIS

#include <Inventor/misc/SoBase.h>

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

static SoVRMLPROTODef* getPROTO(SbName &protoName)

static SoVRMLEXTERNPROTODef* getEXTERNPROTO(SbName &externprotoName)

DESCRIPTION

Abstract base class for Open Inventor node, path, and engine classes. This class handles reference counting, notification, and naming.

METHODS

void	ref()

void	unref() const

void	unrefNoDelete() const

Adds and removes a reference to an instance. Instances should be referenced when they will be used outside of the routine in which they were initialized. (A typical example of this is maintaining a pointer to the root of a graph.) Whenever the reference count for an instance is decremented to 0, the instance is automatically destroyed by the database (unless unrefNoDelete() is used to unref it). The reference count of a node is automatically incremented when the node is added as a child of another node or when a path points to the node. Likewise, the reference count is automatically decremented when the node is removed as a child or when a path that points to the node is changed or destroyed.

unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero. This is most useful in returning an object to a zero-reference-count state, like it was when it was created by new.

void	touch()

Marks an instance as modified, simulating a change to it. This will notify auditors (parent nodes, connected engines, and so on) of a change to this object and cause attached sensors to be triggered.

static SoType	getClassTypeId()

Returns type identifier for this class.

virtual SoType	getTypeId() const

Returns the type identifier for a specific instance.

SbBool	isOfType(SoType type) const

Returns TRUE if this object is of the type specified in type or is derived from that type. Otherwise, it returns FALSE. For example,

nodePtr->isOfType(SoGroup::getClassTypeId())

returns TRUE if nodePtr is an instance of SoGroup or one of its subclasses.

virtual void	setName(const SbName &name)

Sets the name of an instance. Object names are preserved when objects are written to or read from files. Object names must not begin with a digit, and must not contain spaces or control characters, periods, single or double quote characters, backslashes, curly braces or the plus character. The isBaseNameChar() and isBaseNameStartChar() methods of SbName can be used to validate names input by users. This method will replace any bad characters in the name with underscore characters, and will print out an error message if the application is using the Open Inventor debugging library.

virtual SbName	getName() const

Returns the name of an instance. If the instance has not been named, an empty SbName is returned. Objects that are named can be looked up using the getByName() methods of SoNode, SoEngine, or SoPath.

static SoVRMLPROTODef* getPROTO(SbName &protoName)

Returns a pointer to the definition for the prototype node protoName.

static SoVRMLEXTERNPROTODef* getEXTERNPROTO(SbName &externprotoName)

Returns a pointer to the definition for the externproto node externprotoName.

SEE ALSO

SoFieldContainer, SoNode, SoPath, SoEngine, SoDB


SoBaseColor

NAME

SoBaseColor - node that defines an object's base color

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseColor

SYNOPSIS

#include <Inventor/nodes/SoBaseColor.h>

Fields from class SoBaseColor:

SoMFColor	rgb

Methods from class SoBaseColor:

SoBaseColor()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the base color (or colors) of subsequent shape nodes in the scene graph. SoBaseColor sets only the diffuse color(s) of the current material and has no effect on the material's other attributes.

FIELDS

SoMFColor	rgb

RGB color(s).

METHODS

SoBaseColor()

Creates a base color node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current base color in the state.

FILE FORMAT/DEFAULT

BaseColor {

rgb	0.8 0.8 0.8

}

SEE ALSO

SoMaterial, SoPackedColor


SoBaseKit

NAME

SoBaseKit - base class for all node kits

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit

SYNOPSIS

#include <Inventor/nodekits/SoBaseKit.h>

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoBaseKit:

SoBaseKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

This is the base class from which all nodekit nodes are derived. Nodekits provide a convenient mechanism for creating groups of scene graph nodes with some larger meaning. When you create a shape node such as an indexed face set, for example, you almost always precede it with a coordinate node. You may also want to add a transform node or specify properties with material, drawing style, material binding, etc. Instead of creating each of these nodes individually and then arranging them into a subgraph, you can use a nodekit of the appropriate type (in this case, SoShapeKit).

Each class of nodekit has a nodekit catalog (SoNodekitCatalog) that describes the nodes in the subgraph, referred to as parts. The catalog has an entry for each part, with information such as the partName, partType, and nullByDefault (if FALSE the constructor creates it). The catalog also describes the arrangement of parts in the subgraph. (Other information is described below; a complete description is in the SoNodekitCatalog reference page.)

If we regard the scene graph arrangement as a branching tree, then the top node (root) of the arrangement is always the nodekit itself. The leaf nodes are those at the bottom (containing no children). Some leaves of the tree are defined in the catalog to be public parts, while other leaves are private. All non-leaf parts are considered internal to the nodekit structure and are marked private. Public parts are accessible; they may be requested, changed, or set by the programmer with member functions such as getPart(). Private parts are not accessible, so methods such as getPart() will have no effect on them. For example, if you call getPart() to retrieve a private part, NULL will be returned even when the part exists.

Every nodekit reference page has a Parts section describing the function of each public part it adds to those inherited from its parent class. Also, a Catalog Parts section has tables of often-needed information from the catalog (part type, etc.). These tables include all public parts, both new and inherited. Only the public parts of a nodekit are described in the reference pages. Nodekits take care of the rest for you; they automatically arrange the subgraph, creating and deleting the private parts when necessary. (The SoNodekitCatalog reference page has methods for finding out the part names and arrangement of all parts, both public and private.)

The nodekit catalog is a template shared by all instances of a class. They use the shared catalog as a guide when creating parts (i.e., constructing actual nodes), but each instance stores its own parts separately. Moreover, nodekits are not SoGroup nodes, and parts are added as hidden children; you can only access parts with the methods of SoBaseKit and its derived classes.

Any public part may be retrieved with getPart(), installed with setPart(), or removed by giving a NULL argument to setPart(). Paths from the nodekit down to a part can be created by createPathToPart().

By default, parts are not created until the user requests or sets them. This keeps the subgraph uncluttered and efficient for traversal. Additionally, removing a part (setting it to NULL) has the extra effect of removing any internal parts that are no longer needed.

Since nodekits hide their children, any SoPath containing nodekits will end at the topmost nodekit. However, since nodekits may be nested within other nodekits, you may wish to cast an (SoPath *) into an (SoNodeKitPath *). The methods of SoNodeKitPath allow you to view all nodekits that lie on the path (see the reference page for SoNodeKitPath).

Public parts in the nodekit catalog fall into three categories:

[1] regular nodes

[2] nodekits, or nested nodekits (which may nest recursively). Any node which is public in a nested nodekit is accessible to the higher level nodekit(s) that contains it. The description of getPart() below shows how to refer to nested parts by name (e.g., "appearance.material"). This works for any nodekit method that takes a part name for an argument.

[3] lists, or list parts. These parts group together children (list elements) of a particular type or types. As with nested nodekits, you can refer to individual elements using notation described in getPart() (e.g., "childList[0]", or if the list elements are in turn nodekits, "childList[2].transform").

When the catalog denotes that a part is a list, the part itself is always a node of type SoNodeKitListPart. The catalog specifies a set of permissible listItemTypes and a listContainerType for that part. It gives this information to the SoNodeKitListPart when it creates it. From then on, the list part will enforce type checking. So even if you retrieve the SoNodeKitListPart with getPart(), you will not be able to add illegal children. (See the SoNodeKitListPart reference page for more information). As an example, the callbackList part of SoBaseKit has an SoSeparator container and allows only SoCallback and SoEventCallback nodes in the list. Children may be added, retrieved, and removed from an SoNodeKitListPart node using methods that parallel those of SoGroup. However, type-checking is strictly enforced.

Note that, although all public parts are leaves in the nodekit catalog, you are free to add children to them (assuming that they are groups, nodekits, or list parts). A part's status as a leaf in the catalog just means that the nodekit will not manage the part's children. For example, SoWrapperKit has a part called contents with a part type of SoSeparator. You can put whatever you want underneath the separator, as long as contents itself is an SoSeparator.

Thus, a nodekit only controls a section of the scene graph. Above and below that section, anything goes.

However, when nodekits are nested, they effectively create a larger `known' section of the scene graph. For example, the appearance part of the SoSeparatorKit is a leaf node in the SoSeparatorKit catalog. But appearance is in turn an SoAppearanceKit, containing parts such as material and drawStyle. The two nodekits combine to make an even larger template, which the SoSeparatorKit can examine by looking at the catalogs for both classes. So an SoSeparatorKit can successfully return a part named "material"; first it finds (or creates) the appearance part, then it gets the material by calling getPart() on the appearance.

When the catalog defines the listItemTypes of a list part to be nodekits, the name-able space expands further. For example, SoSeparatorKit has a part childList which permits only SoSeparatorKits, so each list element can be further searched. Hence the name "childList[0].childList[1].childList[2].material" is perfectly legal.

PARTS

(SoNodeKitListPart)	callbackList

This is the only part that the base class SoBaseKit creates. It is a public part that is inherited by all nodekits. It provides an easy way to add callbacks for a nodekit to use during action traversal (e.g. SoHandleEventAction). It is a list part and may contain numerous SoCallback and/or SoEventCallback nodes.

METHODS

SoBaseKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns the SoNodekitCatalog for the class SoBaseKit.

virtual const SoNodekitCatalog *	getNodekitCatalog() const

Returns the SoNodekitCatalog for this instance of SoBaseKit. While each instance of a given class creates its own distinct set of parts (which are actual nodes), all instances share the same catalog (which describes the parts but contains no actual node pointers).

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

Searches the nodekit catalog (and those of all nested nodekits) for the part named partName. Returns a pointer to the part if a match is found, the part is public, and the part has already been built. If no match is found, or if the part is private, NULL is returned. If partName is in the catalog (or that of one of its nested nodekit parts), but the part has not been built yet, the argument makeIfNeeded determines the course of action. When makeIfNeeded is FALSE, NULL is returned; when makeIfNeeded is TRUE, getPart() will create the part (as well as any necessary intermediary parts), put it in the correct place, and return a pointer to the newly created part.

Elements of list parts and parts within nested nodekits can all be retrieved with getPart() The full syntax for legal partName arguments is given below.

Part name BNF notation:

partName = singleName | compoundName

compoundName = singleName | compoundName.singleName

singleName = singlePartName | singleListElementName

singlePartName = the name of any single part in the catalog (including those that are lists or nodekits), or in the recursively nested catalogs of any of its parts.

singleListElementName = singleListName[index]

singleListName = the name of any single list-type part in the catalog, or in the recursively nested catalogs of any of its parts.

index = integer

Examples of valid part names are:

"transform", "appearance.material", "childList[2].drawStyle", "foot", "bird.leftLeg.foot", "octopus.leg[4].suctionCup[2].material"

SbString	getPartString(const SoBase *part)

Given a node or a path to a node, checks if the part exists in the nodekit, in a nested nodekit, or an element of a list part. If so, returns a string describing the part name; otherwise, returns an empty string ("").

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

Returns a path that begins at this nodekit and ends at partName. Searching for the part is the same as in getPart(). NULL is returned if partName cannot be found, or if makeIfNeeded is FALSE and the part is not yet built. If the the part is retrieved and the argument pathToExtend is NULL, the path returned begins at this and ends at partName. If pathToExtend is not NULL, the path created is a copy of pathToExtend with entries appended all the way down to partName. It is okay for pathToExtend to go beyond the nodekit; extra nodes will be popped off the tail before continuing from this down to partName.

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

Inserts the given node (not a copy) as the new part specified by partName. See getPart() for the syntax of partName. This method adds any extra nodes needed to fit the part into the nodekit's catalog. For example, if you call:

mySepKit->setPart("childList[0]", myNewChild);

the kit may need to create the part childList before it can install myNewChild. Run-time type checking verifies that the node type of newPart matches the type called for by partName. For example, if partName was a material for an SoSeparatorKit, but newPart was an SoTransform node, then the node would not be installed, and FALSE would be returned.

If newPart is NULL, then the node specified by partName is removed. If this renders any private parts useless (as occurs when you remove the last child of an SoGroup node), they will also be removed. Hence nodekits do not retain unnecessary nodes.

TRUE is returned on success, and FALSE upon error.

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

These functions allow field values of parts (nodes) to be set. If partName and parameters are used, then a single part is specified by partName; the field values are specified in parameters. The format of parameters is the Open Inventor File Format syntax. For example,

mySepKit->set("material", "diffuseColor 1 0 0 shininess 0.6");

sets the part material to the values "diffuseColor 1 0 0 shininess 0.6". The values used in parameters must of course be appropriate for the node-type to which partName belongs. In this case, the nodekit SoSeparatorKit has a part named material which is of type SoMaterial.

The nameValuePairs syntax can be used to set the field values in several different parts simultaneously. In this case, the argument string, nameValuePairs contains name-value pairs: "partName1  parameters1  ... partNameN  parametersN ".

For example,

mySepKit->set("material  diffuseColor 1 1 1

            transform  translation 4 3 .6 ");

mySepKit->set("childList[0].material  ambientColor .5 .5 .5 ");

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Sets and queries if nodekit children are searched during SoSearchAction traversal. By default, they are not.

static SoType	getClassTypeId()

Returns type identifier for this class.

MACROS

SO_GET_PART(kit, partName, partClass)

Calls getPart() with makeIfNeeded set to TRUE, then casts the result to the type partClass. Note that in the debug library, this macro checks to see if the part is of type partClass, while the regular library does no type checking.

SO_CHECK_PART(kit, partName, partClass)

Calls getPart(), but with makeIfNeeded set to FALSE, then casts the result to the type partClass. Note that in the debug library, this macro checks to see if the part is of type partClass, while the regular library does no type checking.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction

Behaves like an SoGroup. Traverses each child in order.

SoRayPickAction

Traverses each child in order. Then, for any pick containing the kit on its path, makes an SoNodeKitDetail as follows: Sets the "detailNodeKit" (retrievable with SoNodeKitDetail::getNodeKit()) to be a pointer to itself. Sets the "detailPart" (retrievable with SoNodeKitDetail::getPart()) to be a pointer to the kit's leaf-most part that lies on the pickPath. Sets the "detailPartName" (retrievable with SoNodeKitDetail::getPartName()) to be the partName of that part, as found in the catalog.

Does not descend into nested nodekits. Each nodekit along the path is the "detailPart" in its parent's detail. However, if the pick path goes through a list part, a pointer to the child is used for the "detailPart", and "detailPartName" is of the form "listName[i]".

SoGetMatrixAction

Behaves like an SoGroup. Does nothing unless the kit is in the middle of the path chain the action is being applied to. If so, the children up to and including the next node in the chain are traversed.

SoSearchAction

First, searches itself like an SoNode. Then, checks the value of isSearchingChildren(). If TRUE, traverses the children in order. If FALSE, returns.

SoWriteAction

Begins by writing out regular fields, then writes out the parts. A nodekit does not write out its parts the way an SoGroup writes out its children. Instead, it writes each part as an SoSFNode field. First the partName is written, then the node being used for that part.

To keep the files terse, nodekits write out as few parts as possible. However, nodekits always write a part if another instance or a path is writing it. If this is not the case, parts are left out according to the following rules:

[1] NULL parts only write if the catalog states they are created by default.

[2] Empty SoGroup and SoSeparator nodes do not write.

[3] Non-leaf parts only write if they have non-default field values.

[4] List parts only write if they have children or if the container node has non-default field values.

[5] Nested nodekit parts only write if they need to write one or more parts, or if they have non-default field values.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

BaseKit {

callbackList	NULL

}

SEE ALSO

SoAppearanceKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit


SoBaseList

NAME

SoBaseList - maintains a list of pointers to instances of the SoBase classes

INHERITS FROM

SbPList > SoBaseList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoBaseList:

SoBaseList()

SoBaseList(int size)

SoBaseList(const SoBaseList &l)

~SoBaseList()

void	append(SoBase *ptr)

void	insert(SoBase *ptr,
int addBefore)

void	remove(int which)

void	truncate(int start)

void	copy(const SoBaseList &l)

SoBaseList &	operator =(const SoBaseList &l)

SoBase *	operator [](int i) const

void	set(int i,
SoBase *ptr)

void	addReferences(SbBool flag)

Methods from class SbPList:

int	find(const void *ptr) const

int	getLength() const

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SbPList holds lists of pointers to instances of classes derived from SoBase (an abstract class). A flag indicates whether adding an instance pointer to the list should add a reference to the instance. If this flag is TRUE, then adding and removing pointers from the list updates reference counts in the corresponding instances.

METHODS

SoBaseList()

Constructor.

SoBaseList(int size)

Constructor that pre-allocates storage for size pointers.

SoBaseList(const SoBaseList &l)

Constructor that copies the contents of another list.

~SoBaseList()

Destructor.

void	append(SoBase *ptr)

Adds a pointer to the end of the list.

void	insert(SoBase *ptr,
int addBefore)

Inserts given pointer in list before pointer with given index.

void	remove(int which)

Removes pointer with given index.

void	truncate(int start)

Removes all pointers after one with given index, inclusive.

void	copy(const SoBaseList &l)

Copies a list, keeping all reference counts correct.

SoBaseList &	operator =(const SoBaseList &l)

Copies a list, keeping all reference counts correct.

SoBase *	operator [](int i) const

Accesses an element of a list.

void	set(int i,
SoBase *ptr)

Sets an element of a list.

void	addReferences(SbBool flag)

Indicates whether to call ref() and unref() for bases in the list when adding/removing them. The default value is TRUE.

SEE ALSO

SoBase, SoNodeList, SoPathList


SoBevelAction

NAME

SoBevelAction - creates a scene graph containing beveled shapes

INHERITS FROM

SoAction > SoBevelAction

SYNOPSIS

#include <Inventor/actions/SoBevelAction.h>

Methods from class SoBevelAction:

SoBevelAction()

virtual	~SoBevelAction()

void	setAngle(float angle)

float	getAngle() const

void	setRadius(float radius)

float	getRadius() const

void	enableAbsoluteRadius(SbBool flag = TRUE)

SbBool	isAbsoluteRadiusEnabled() const

void	setOutputVRML(SbBool flag = FALSE)

SbBool	isOutputVRML() const

void	enableCoplanarTest(SbBool flag = TRUE)

SbBool	isCoplanarTestEnabled() const

void	enableDuplicateTest(SbBool flag = TRUE)

SbBool	isDuplicateTestEnabled() const

void	enableOrderingTest(SbBool flag = TRUE)

SbBool	isOrderingTestEnabled() const

SoGroup*	getSceneGraph()

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action traverses a scene graph or paths, looking for shapes to bevel, then creating another scene graph containing the beveled shapes (in the form of SoCoordinate3 and SoIndexedFaceSet nodes). Typically it is applied to a subgraph that contains only a single shape.

SoBevelAction does not take into consideration PER_FACE or PER_VERTEX materials. Therefore, the shapes to be beveled should have a uniform material (SoMaterialBinding::OVERALL).

It works like other actions, but does not modify the source scene graph. The scene graph containing beveled shapes can be accessed by calling getSceneGraph() after applying the action.

The methods setAngle, setRadius, and enableAbsoluteRadius set the default behavior of the beveling of the shapes this action will be applied to. If bevel property values have been set by the SoBevelProperty node, they are used. Otherwise, the values set by these methods are used.

METHODS

SoBevelAction()

virtual	~SoBevelAction()

Constructor and destructor.

void	setAngle(float angle)

float	getAngle() const

Sets/returns the minimum angle (in radians) between two adjacent face normals required to bevel the edge common to these two faces. The default value is 0.5.

void	setRadius(float radius)

float	getRadius() const

Sets/returns the bevel radius. The default value is 0.05.

void	enableAbsoluteRadius(SbBool flag)

Sets the absolute radius flag. If TRUE, the radius value is absolute. Otherwise the radius is a value between 0.0 and 1.0; the real radius corresponding is max * radius, where max is the length of the longest edge of the current shape to be beveled. The default is FALSE.

SbBool	isAbsoluteRadiusEnabled()

Returns TRUE if the radius is absolute, FALSE if it is relative to the shape.

void	setOutputVRML(SbBool flag)

If TRUE, each beveled shape is generated as a VRML indexed face set. Otherwise the beveled shapes are generated as "classic" indexed face sets. Default value is FALSE.

SbBool	isOutputVRML() const

Returns TRUE if the shapes created by the bevel action are VRML shapes.

void	enableCoplanarTest(SbBool flag = TRUE)

If TRUE, a coplanar test is performed on each shape before beveling it. This test combines contiguous coplanar faces into one larger face because the bevel method will not work properly on contiguous coplanar faces.

If FALSE, each shape is assumed not to have contiguous coplanar faces. This provides better performance because the coplanar test is not performed.

It is recommended that you turn off this test only if the shapes to be beveled do not contain contiguous coplanar faces. Default value is TRUE.

SbBool	isCoplanarTestEnabled() const

Returns TRUE if a coplanar test is performed before the beveling.

void	enableDuplicateTest(SbBool flag = TRUE)

If TRUE, examine each shape to bevel, removing duplicate faces if found. As this test is time consuming, it can be turned on/off depending on whether the shapes to be beveled contain duplicate faces or not. If a shape contains duplicate faces the test is off, no beveling will be performed on the shape. Default value is FALSE.

SbBool	isDuplicateTestEnabled() const

If TRUE, a test is performed to remove duplicate faces in the shapes being beveled.

void	enableOrderingTest(SbBool flag = TRUE)

If TRUE, each shape to bevel is re-ordered so that each face is oriented like the first face of the shape. This test is not time consuming. However, it may be desirable to disable this test when it is not needed. Default value is TRUE.

SbBool	isOrderingTestEnabled() const

Returns TRUE if the shapes are re-ordered before being beveled.

virtual SoGroup*	getSceneGraph()

This method returns the scene graph containing the beveled shapes created by the action.

SEE ALSO

SoBevelProperty, SoEdgeFlag, SoVertexFlag


SoBevelProperty

NAME

SoBevelProperty - node to define beveling properties

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBevelProperty

SYNOPSIS

#include <Inventor/nodes/SoBevelProperty.h>

enum Tests	{
SoBevelProperty::COPLANAR_TEST
Concatenate coplanar faces
SoBevelProperty::DUPLICATE_TEST
Remove duplicate faces
SoBevelProperty::ORDERING_TEST
Reorder facet normals
SoBevelProperty::ALL_TESTS
All tests
}

Fields from class SoBevelProperty:

SoSFFloat	angle

SoSFFloat	radius

SoSFBool	absoluteRadius

SoSFBool	vrmlOutput

SoSFBitMask	testsBeforeBevel

Methods from class SoBevelProperty:

SoBevelProperty()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the current beveling properties (used by SoBevelAction) for all subsequent shapes.

You can use it to specify a beveling radius (absolute or relative) and an angle between adjacent faces (like a crease angle) that determines if the edge between those faces will be beveled.

FIELDS

SoSFFloat	angle

Indicates the angle (in radians, between 0 and pi) between two adjacent face normals above which the edge will be beveled. (If the edge has been unmarked by the current SoEdgeFlag it will not be beveled, regardless of the value of angle).

SoSFFloat	radius

This defines the bevel radius (the size of the rounded edge or corner). This value will be interpreted as absolute or relative depending on the absoluteRadius flag (below).

SoSFBool	absoluteRadius

If TRUE, the value of radius will be taken as the bevel radius. Otherwise, the radius is relative to the shape: the radius value is a fraction between 0.0 and 1.0. The bevel radius will be max * radius, where max is the length of the longest edge of the current shape to be beveled.

SoSFBool	vrmlOutput

Flag for the type of the output shapes. If TRUE, the beveled shapes are created using VRML indexed face sets (SoVRMLIndexedFaceSet). Otherwise, the beveled shapes are created using standard Open Inventor indexed face sets (SoIndexedFaceSet).

SoSFBitMask	testsBeforeBevel

Which tests should be performed in order to "clean up" the shape before it is beveled.

METHODS

SoBevelProperty()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

BevelProperty {

angle	0.5

radius	0.05

absoluteRadius	FALSE

vrmlOutput	FALSE

testsBeforeBevel	DUPLICATE_TEST | ORDERING_TEST

}

SEE ALSO

SoBevelAction, SoEdgeFlag, SoVertexFlag


SoBlinker

NAME

SoBlinker - animated cycling switch node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSwitch > SoBlinker

SYNOPSIS

#include <Inventor/nodes/SoBlinker.h>

Fields from class SoBlinker:

SoSFFloat	speed

SoSFBool	on

Fields from class SoSwitch:

SoSFInt32	whichChild

Methods from class SoBlinker:

SoBlinker()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoBlinker class is derived from SoSwitch, so it selects one of its children to traverse. Using engines connected to the realTime global field, the whichChild field is animated over time. If the node has only one child, whichChild toggles between SO_SWITCH_NONE and 0, causing the child to be switched on and off repeatedly. If the node has more than one child, they are cycled through continuously.

FIELDS

SoSFFloat	speed

Defines the speed of the blinker, in cycles per second.

SoSFBool	on

Allows applications to enable or disable the blinking easily.

METHODS

SoBlinker()

Creates a blinker node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction, SoSearchAction

Same as for SoSwitch.

FILE FORMAT/DEFAULT

Blinker {

whichChild	-1

speed	1

on	TRUE

}


SoBoolOperation

NAME

SoBoolOperation - performs Boolean operations

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoBoolOperation

SYNOPSIS

#include <Inventor/engines/SoBoolOperation.h>

enum Operation	{
SoBoolOperation::CLEAR
SoBoolOperation::SET
SoBoolOperation::A
SoBoolOperation::NOT_A
SoBoolOperation::B
SoBoolOperation::NOT_B
SoBoolOperation::A_OR_B
SoBoolOperation::NOT_A_OR_B
SoBoolOperation::A_OR_NOT_B
SoBoolOperation::NOT_A_OR_NOT_B
SoBoolOperation::A_AND_B
SoBoolOperation::NOT_A_AND_B
SoBoolOperation::A_AND_NOT_B
SoBoolOperation::NOT_A_AND_NOT_B
SoBoolOperation::A_EQUALS_B
SoBoolOperation::A_NOT_EQUALS_B
}

Inputs from class SoBoolOperation:

SoMFBool	a

SoMFBool	b

SoMFEnum	operation

Outputs from class SoBoolOperation:

(SoMFBool)	output

(SoMFBool)	inverse

Methods from class SoBoolOperation:

SoBoolOperation()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine performs a Boolean operation on two inputs, and returns both the result of the operation and its inverse.

The input fields can have multiple values, allowing the engine to perform several Boolean operations in parallel. One input may have more values than the other. In that case, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFBool	a

First argument to the Boolean operation.

SoMFBool	b

Second argument to the Boolean operation.

SoMFEnum	operation

The Boolean operation.

OUTPUTS

(SoMFBool)	output

Result of the Boolean operation applied to the inputs.

(SoMFBool)	inverse

Inverse of output.

METHODS

SoBoolOperation()

Constructor.

FILE FORMAT/DEFAULT

BoolOperation {

a	FALSE

b	FALSE

operation	A

}

SEE ALSO

SoEngineOutput, SoCalculator


SoBoxHighlightRenderAction

NAME

SoBoxHighlightRenderAction - a selection highlight style

INHERITS FROM

SoAction > SoGLRenderAction > SoBoxHighlightRenderAction

SYNOPSIS

#include <Inventor/actions/SoBoxHighlightRenderAction.h>

Methods from class SoBoxHighlightRenderAction:

SoBoxHighlightRenderAction()

virtual void	apply(SoNode *node)

void	setVisible(SbBool b)

SbBool	isVisible() const

void	setColor(const SbColor &c)

SbColor &	getColor()

void	setLinePattern(unsigned short pattern)

unsigned short	getLinePattern()

void	setLineWidth(float width)

float	getLineWidth()

Methods from class SoGLRenderAction:

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setUpdateArea(const SbVec2f &origin,
const SbVec2f &size)

void	getUpdateArea(SbVec2f &origin,
SbVec2f &size) const

void	setAbortCallback(SoGLRenderAbortCB *func,
void *userData)

void	setTransparencyType(TransparencyType type)

TransparencyType	getTransparencyType() const

void	setSmoothing(SbBool smooth)

SbBool	isSmoothing() const

void	setNumPasses(int num)

int	getNumPasses() const

void	setPassUpdate(SbBool flag)

SbBool	isPassUpdate() const

void	setPassCallback(SoGLRenderPassCB *func,
void *userData)

void	setCacheContext(uint32_t context)

uint32_t	getCacheContext() const

Methods from class SoAction:

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

SoBoxHighlightRenderAction is a render action which renders the specified scene graph, then renders wireframe boxes surrounding each selected object. Selected objects are specified by the first SoSelection node in the scene to which this action is applied. If an SoGetBoundingBoxAction applied to a selected object produces an empty bounding box, no highlight is rendered for that object. A highlight render action can be passed to the setGLRenderAction() method of SoWinRenderArea  to have an effect on scene graphs.

METHODS

SoBoxHighlightRenderAction()

Constructor.

virtual void	apply(SoNode *node)

This renders the passed scene graph, and also renders wireframe boxes around selected objects as specified by the first SoSelection node found in the scene graph.

void	setVisible(SbBool b)

This provides a convenient mechanism for turning highlights off or on. When FALSE is passed, subsequent calls to apply() render the scene graph without rendering highlights. The application is responsible for forcing a redraw of the scene after changing this state. The default visibility is on.

SbBool	isVisible() const

Returns whether highlights will be rendered or not.

void	setColor(const SbColor &c)

SbColor &	getColor()

Set and get the color of the highlight. Default is red (1,0,0). Application is responsible for forcing a redraw of the scene to see the effects of this change.

void	setLinePattern(unsigned short pattern)

unsigned short	getLinePattern()

Set and get the line pattern of the highlight. Default is solid, 0xffff. The pattern of bits in the passed variable specifies the pattern of the line. See SoDrawStyle for a description. Application is responsible for forcing a redraw of the scene to see the effects of this change.

void	setLineWidth(float width)

float	getLineWidth()

Set and get the line width of the highlight. Default is 3. Application is responsible for forcing a redraw of the scene to see the effects of this change.

EXAMPLE

Here is an example of how a box highlight can be specified for a particular selection node and render area.

    SoWinRenderArea *myRenderArea;

    SoSelection *mySelection;

    // Set the highlight render action

    myRenderArea->setGLRenderAction(

        new SoBoxHighlightRenderAction());

    // Automatic redraw on selection changes

    myRenderArea->redrawOnSelectionChange(mySelection);

SEE ALSO

SoLineHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea, SoDrawStyle, SoInteraction


SoButtonEvent

NAME

SoButtonEvent - base class for all button events

INHERITS FROM

SoEvent > SoButtonEvent

SYNOPSIS

#include <Inventor/events/SoButtonEvent.h>

enum State	{
SoButtonEvent::UP
Button up event
SoButtonEvent::DOWN
Button down event
SoButtonEvent::UNKNOWN
Button in unknown state
}

Methods from class SoButtonEvent:

SoButtonEvent()

static SoType	getClassTypeId()

void	setState(SoButtonEvent::State s)

SoButtonEvent::State	getState() const

Methods from class SoEvent:

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

void	setTime(SbTime t)

SbTime	getTime() const

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

DESCRIPTION

SoButtonEvent represents generic button press and release events in the Open Inventor event model. It is the base class for device-specific button events, namely SoKeyboardEvent, SoMouseButtonEvent, and SoSpaceballButtonEvent. This class stores the down/up state of the button when the event occurred.

METHODS

SoButtonEvent()

Constructor.

static SoType	getClassTypeId()

Return the type id for the SoButtonEvent class.

void	setState(SoButtonEvent::State s)

SoButtonEvent::State	getState() const

Set and get the state of the button.

SEE ALSO

SoEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice


SoByteStream

NAME

SoByteStream - converts scene graph objects to character byte streams

INHERITS FROM

SoByteStream

SYNOPSIS

#include <Inventor/misc/SoByteStream.h>

Methods from class SoByteStream:

SoByteStream()

~SoByteStream()

void	convert(SoNode *node,
SbBool binaryFormat = TRUE)

void	convert(SoPath *path,
SbBool binaryFormat = TRUE)

void	convert(SoPathList *pathList,
SbBool binaryFormat = TRUE)

void *	getData()

uint32_t	getNumBytes()

static SoPathList *	unconvert(SoByteStream *byteStream)

static SoPathList *	unconvert(void *data,
uint32_t numBytes)

DESCRIPTION

This class creates a byte stream representation of a scene graph, using an SoWriteAction to write path lists to an in-memory buffer. Byte streams are commonly used to transfer data in copy and paste operations. (The SoWinClipboard class passes SoByteStream data during copy and paste.)

METHODS

SoByteStream()

~SoByteStream()

Constructor and destructor.

void	convert(SoNode *node,
SbBool binaryFormat = TRUE)

void	convert(SoPath *path,
SbBool binaryFormat = TRUE)

void	convert(SoPathList *pathList,
SbBool binaryFormat = TRUE)

These convert the passed scene graph object(s) into a byte stream. The caller may specify whether the byte stream is written in binary (TRUE) or ASCII (FALSE) format, and can pass the object(s) by node, path, or pathList.

void *	getData()

uint32_t	getNumBytes()

These return the data and number of bytes from the last convert() operation. This byte stream format is well suited to data transfers, like copy and paste.

static SoPathList *	unconvert(SoByteStream *byteStream)

static SoPathList *	unconvert(void *data,
uint32_t numBytes)

These take byte stream data and unconvert it back to scene graph objects. The objects are returned in a path list.

SEE ALSO

SoWinClipboard


SoCalculator

NAME

SoCalculator - a general-purpose calculator

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoCalculator

SYNOPSIS

#include <Inventor/engines/SoCalculator.h>

Inputs from class SoCalculator:

SoMFFloat	a

SoMFFloat	b

SoMFFloat	c

SoMFFloat	d

SoMFFloat	e

SoMFFloat	f

SoMFFloat	g

SoMFFloat	h

SoMFVec3f	A

SoMFVec3f	B

SoMFVec3f	C

SoMFVec3f	D

SoMFVec3f	E

SoMFVec3f	F

SoMFVec3f	G

SoMFVec3f	H

SoMFString	expression

Outputs from class SoCalculator:

(SoMFFloat)	oa

(SoMFFloat)	ob

(SoMFFloat)	oc

(SoMFFloat)	od

(SoMFVec3f)	oA

(SoMFVec3f)	oB

(SoMFVec3f)	oC

(SoMFVec3f)	oD

Methods from class SoCalculator:

SoCalculator()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine is a general-purpose calculator. The calculator operates on floating-point values and 3D floating-point vectors. The engine takes up to eight inputs of each type (SoMFFloat and SoMFVec3f), and produces up to four outputs of each type.

Each input field (a-h, A-H) can have multiple values, allowing the engine to evaluate the expression with different values in parallel. Some inputs may have more values than others. In such cases, the last value of the shorter inputs will be repeated as necessary.

The expression input string specifies the expression to be evaluated. An expression can consist of multiple subexpressions. Several subexpressions can be specified in one string, separated by semicolons (;). Alternatively, the subexpressions can be stored in separate strings in the multiple-valued input field.

Each subexpression is of the form:

<lhs> = <rhs>

The <lhs> can be any one of the outputs or a temporary variable. The engine provides 8 temporary floating-point variables (ta, tb, tc, td, te, tf, tg, and th), and 8 temporary vector variables (tA, tB, tC, tD, tE, tF, tG, and tH). You can assign a value to one component of a vector output (A-H) or a vector variable (tA-tH) by using the [ ] operator. For example, oA[0] = <rhs>, will evaluate the right hand side and assign the value to the first component of the output vector oA.

The <rhs> supports arithmetic, logical and conditional operators. They are:

(unary)   !, -

(binary)  +, -, *, /, %, <, > <=, >=, ==, !=, &&, ||

(ternary) ? :

The ternary operator is a conditional operator. For example, a ? b : c evaluates to b if a != 0, and to c if a==0.

Valid operands for the <rhs> include the inputs, outputs, temporary variables, and their components (e.g. oA[0]). Operands can also be numeric constants (e.g. 1.0), pre-defined named constants, or pre-defined functions.

The named constants are:

MAXFLOAT

MINFLOAT

M_E

M_LOG2E

M_LOG10E

M_LN2

M_LN10

M_PI

M_SQRT2  = sqrt(2)

M_SQRT1_2 = sqrt(1/2)

Most of the pre-defined functions come from the math library:

cos, sin, tan,

acos, asin, atan, atan2,

cosh, sinh, tanh,

sqrt, pow, exp, log, log10,

ceil, floor, fabs, fmod.

Other functions are defined by SoCalculator. They are:

rand(f) - Random number generator

cross(v1, v2) - Vector cross product

dot(v1, v2) - Vector dot product

length(v) - Vector length

normalize(v) - Normalize vector

vec3f(f1, f2, f3) - Generate a vector from 3 floats

The subexpressions are evaluated in order, so a variable set in the <lhs> of an earlier expression may be used in the <rhs> of a later expression.

Note, when the input has multiple values, all the subexpressions specified in the expression are applied to all the multiple input values. This is unlike the SoBoolOperation engine, where each operation is applied only to the corresponding entries of the input data. Note also, that even though the inputs and outputs can have multiple values the [ ] operator is only for indexing into the values of a single vector. It does not index into the multiple values of a field. For example, if the floating-point input field a has two values: 1.0, and 2.0, then the expression

"oA[0]=a; oA[1]=a; oA[2]=0.0"

will produce two output vectors in oA: (1.0, 1.0, 0.0) and (2.0, 2.0, 0.0).

Examples of expressions:

"ta = oA[0]*floor(a)"

"tb = (a+b)*sin(M_PI)"

"oA = vec3f(ta, tb, ta+tb)"

"oB = normalize(oA)"

"ta = a; tb = sin(ta); oA = vec3f(ta, tb, 0)"

INPUTS

SoMFFloat	a

SoMFFloat	b

SoMFFloat	c

SoMFFloat	d

SoMFFloat	e

SoMFFloat	f

SoMFFloat	g

SoMFFloat	h

Inputs a-h are the floating-point values.

SoMFVec3f	A

SoMFVec3f	B

SoMFVec3f	C

SoMFVec3f	D

SoMFVec3f	E

SoMFVec3f	F

SoMFVec3f	G

SoMFVec3f	H

Inputs A-H are the vectors.

SoMFString	expression

The expression to be evaluated.

OUTPUTS

(SoMFFloat)	oa

(SoMFFloat)	ob

(SoMFFloat)	oc

(SoMFFloat)	od

Outputs oa-od are the floating-point values.

(SoMFVec3f)	oA

(SoMFVec3f)	oB

(SoMFVec3f)	oC

(SoMFVec3f)	oD

Outputs oA-oD are the vectors.

METHODS

SoCalculator()

Constructor

FILE FORMAT/DEFAULT

Calculator {

a	0

b	0

c	0

d	0

e	0

f	0

g	0

h	0

A	0 0 0

B	0 0 0

C	0 0 0

D	0 0 0

E	0 0 0

F	0 0 0

G	0 0 0

H	0 0 0

expression	""

}

SEE ALSO

SoEngineOutput, SoBoolOperation


SoCallback

NAME

SoCallback - provides custom behavior during actions

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoCallback

SYNOPSIS

#include <Inventor/nodes/SoCallback.h>

typedef void	SoCallbackCB(void *userData,
SoAction *action)

Methods from class SoCallback:

SoCallback()

void	setCallback(SoCallbackCB *func,
void *userData = NULL)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node provides a general mechanism for inserting callback functions into a scene graph. The callback function registered with the node is called each time the node is traversed while performing any scene graph action. The callback function is passed a pointer to the action being performed and a user data pointer registered with the callback function. You can use this node to make nonstandard OpenGL calls while rendering. If you do, be careful not to interfere with Open Inventor's use of OpenGL.

If you use a callback node for GL rendering, you should be careful to follow render caching rules. If your callback node can make different rendering calls each time it is traversed, it cannot be cached. In such a case, the node should invalidate any open caches, as in the following example:

void

myCallbackFunc(void *d, SoAction *action) {

    if (action->isOfType(SoGLRenderAction::getClassTypeId())){

       // Make my custom GL calls

       ((MyClass *) d)->myRender();

       // Invalidate the state so that a cache is not made

       SoCacheElement::invalidate(action->getState());

    }

}

METHODS

SoCallback()

Creates a callback node with default settings.

void	setCallback(SoCallbackCB *func,
void *userData = NULL)

Sets pointer to callback function and user data. By default, the function pointer in the node is NULL and does nothing.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoGetBoundingBoxAction, SoPickAction

Calls the specified callback function for all actions.

FILE FORMAT/DEFAULT

Callback {

}

SEE ALSO

SoAction, SoCallbackAction, SoEventCallback


SoCallbackAction

NAME

SoCallbackAction - performs a generic traversal of the scene graph

INHERITS FROM

SoAction > SoCallbackAction

SYNOPSIS

#include <Inventor/actions/SoCallbackAction.h>

typedef void	SoTriangleCB(void *userData,
SoCallbackAction *action,
const SoPrimitiveVertex *v1,
const SoPrimitiveVertex *v2,
const SoPrimitiveVertex *v3)

typedef void	SoLineSegmentCB(void *userData,
SoCallbackAction *action,
const SoPrimitiveVertex *v1,
const SoPrimitiveVertex *v2)

typedef void	SoPointCB(void *userData,
SoCallbackAction *action,
const SoPrimitiveVertex *v)

typedef SoCallbackAction::Response
SoCallbackActionCB(void *userData,
SoCallbackAction *action,
const SoNode *node)

enum Response	{
SoCallbackAction::CONTINUE
Continue traversal as if nothing happened
SoCallbackAction::ABORT
Abort traversal
SoCallbackAction::PRUNE
Do not traverse node's children, but continue traversal
}

Methods from class SoCallbackAction:

SoCallbackAction()

void	addPreCallback(SoType type,
SoCallbackActionCB *cb,
void *data)

void	addPostCallback(SoType type,
SoCallbackActionCB *cb,
void *data)

void	addPreTailCallback(SoCallbackActionCB *cb,
void *data)

void	addPostTailCallback(SoCallbackActionCB *cb,
void *data)

void	addTriangleCallback(SoType type,
SoTriangleCB *cb,
void *data)

void	addLineSegmentCallback(SoType type,
SoLineSegmentCB *cb,
void *data)

void	addPointCallback(SoType type,
SoPointCB *cb,
void *data)

float	getComplexity() const

SoComplexity::Type	getComplexityType() const

int32_t	getNumCoordinates() const

const SbVec3f &	getCoordinate3(int index) const

const SbVec4f &	getCoordinate4(int index) const

SoDrawStyle::Style	getDrawStyle() const

unsigned short	getLinePattern() const

float	getLineWidth() const

float	getPointSize() const

const SbName &	getFontName() const

float	getFontSize() const

SoLightModel::Model	getLightModel() const

const SbVec3f &	getLightAttenuation() const

void	getMaterial(SbColor &ambient,
SbColor &diffuse,
SbColor &specular,
SbColor &emission,
float &shininess,
float &transparency,
int mtlIndex = 0) const

SoMaterialBinding::Binding	getMaterialBinding() const

long	getNumNormals() const

const SbVec3f &	getNormal(int index) const

SoNormalBinding::Binding	getNormalBinding() const

int32_t	getNumProfileCoordinates() const

const SbVec2f &	getProfileCoordinate2(int index) const

const SbVec3f &	getProfileCoordinate3(int index) const

const SoNodeList &	getProfile() const

SoShapeHints::VertexOrdering	getVertexOrdering() const

SoShapeHints::ShapeType	getShapeType() const

SoShapeHints::FaceType	getFaceType() const

float	getCreaseAngle() const

int32_t	getNumTextureCoordinates() const

const SbVec2f &	getTextureCoordinate2(int index) const

const SbVec4f &	getTextureCoordinate4(int index) const

SoTextureCoordinateBinding::Binding	getTextureCoordinateBinding() const

const SbColor &	getTextureBlendColor() const

const unsigned char *	getTextureImage(SbVec2s &size,
int &numComps) const

const SbMatrix &	getTextureMatrix() const

SoTexture2::Model	getTextureModel() const

SoTexture2::Wrap	getTextureWrapS() const

SoTexture2::Wrap	getTextureWrapT() const

const SbMatrix &	getModelMatrix() const

SoUnits::Units	getUnits() const

float	getFocalDistance() const

const SbMatrix &	getProjectionMatrix() const

const SbMatrix &	getViewingMatrix() const

const SbViewVolume &	getViewVolume() const

SoPickStyle::Style	getPickStyle() const

int32_t	getSwitch() const

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action defines a generic traversal of the scene graph. The user can specify callback functions for node types or paths; when those node types or paths are encountered during traversal, the user's callback function is called.

In addition, callback functions can be registered for primitives generated by shapes in the scene graph. Most shape types can generate primitives that represent or approximate their geometries. Triangle primitives are used for all surfaces (such as cubes, face sets, or 3D text), line segment primitives are used for line shapes, and point primitives are used for point shapes. Note that the type of primitives generated for a shape is the same, regardless of drawing style or other properties.

Most of the methods on this class access information from the traversal state. They should be called only by callback functions that are invoked during traversal, so there is a valid state to work with.

METHODS

SoCallbackAction()

The constructor.

void	addPreCallback(SoType type,
SoCallbackActionCB *cb,
void *data)

void	addPostCallback(SoType type,
SoCallbackActionCB *cb,
void *data)

These add a callback function to call when a node of the given type is encountered during traversal. The PreCallback is called just before the node is traversed, and the PostCallback is called just after. The value returned by a callback function indicates whether the action should continue with the traversal.

void	addPreTailCallback(SoCallbackActionCB *cb,
void *data)

void	addPostTailCallback(SoCallbackActionCB *cb,
void *data)

These can be used to set up callback functions to call when the action is applied to a path. The functions are called just before or after the node at the tail of the path is traversed.

void	addTriangleCallback(SoType type,
SoTriangleCB *cb,
void *data)

void	addLineSegmentCallback(SoType type,
SoLineSegmentCB *cb,
void *data)

void	addPointCallback(SoType type,
SoPointCB *cb,
void *data)

Routines to add callbacks for generated primitives (triangles, line segments, and points) for all shapes of the given type. The callback function will be called for each primitive generated for all shapes of or derived from that type.

float	getComplexity() const

SoComplexity::Type	getComplexityType() const

Returns complexity information from the state.

int32_t	getNumCoordinates() const

const SbVec3f &	getCoordinate3(int index) const

const SbVec4f &	getCoordinate4(int index) const

Returns the current coordinates from the state.

SoDrawStyle::Style	getDrawStyle() const

unsigned short	getLinePattern() const

float	getLineWidth() const

float	getPointSize() const

Returns the current drawing style information from the state.

const SbName &	getFontName() const

float	getFontSize() const

Returns the current font information from the state.

SoLightModel::Model	getLightModel() const

const SbVec3f &	getLightAttenuation() const

Returns the current lighting model information from the state.

void	getMaterial(SbColor &ambient,
SbColor &diffuse,
SbColor &specular,
SbColor &emission,
float &shininess,
float &transparency,
int mtlIndex = 0) const

SoMaterialBinding::Binding	getMaterialBinding() const

Returns the current material information from the state. Providing a mtlIndex will return the material defined for that index.

long	getNumNormals() const

const SbVec3f &	getNormal(int index) const

SoNormalBinding::Binding	getNormalBinding() const

Returns the current normal information from the state.

int32_t	getNumProfileCoordinates() const

const SbVec2f &	getProfileCoordinate2(int index) const

const SbVec3f &	getProfileCoordinate3(int index) const

const SoNodeList &	getProfile() const

Returns the current profiles and their coordinates from the state.

SoShapeHints::VertexOrdering	getVertexOrdering() const

SoShapeHints::ShapeType	getShapeType() const

SoShapeHints::FaceType	getFaceType() const

float	getCreaseAngle() const

Returns the current shape hints from the state.

int32_t	getNumTextureCoordinates() const

const SbVec2f &	getTextureCoordinate2(int index) const

const SbVec4f &	getTextureCoordinate4(int index) const

SoTextureCoordinateBinding::Binding	getTextureCoordinateBinding() const

const SbColor &	getTextureBlendColor() const

const unsigned char *	getTextureImage(SbVec2s &size,
int &numComps) const

Returns texture information from the state. getNumTextureCoordinates() returns 0 if texture coordinates are generated by a function. getTextureImage() returns NULL if no texture is enabled.

const SbMatrix &	getTextureMatrix() const

SoTexture2::Model	getTextureModel() const

SoTexture2::Wrap	getTextureWrapS() const

SoTexture2::Wrap	getTextureWrapT() const

Returns the current texture mapping information from the state.

const SbMatrix &	getModelMatrix() const

SoUnits::Units	getUnits() const

Returns the current modeling transformation and the current units from the state.

float	getFocalDistance() const

const SbMatrix &	getProjectionMatrix() const

const SbMatrix &	getViewingMatrix() const

const SbViewVolume &	getViewVolume() const

Returns the current camera and viewing information from the state.

SoPickStyle::Style	getPickStyle() const

Returns the current picking style.

int32_t	getSwitch() const

Returns the current switch value.

SEE ALSO

SoCallback, SoEventCallback, SoShape


SoCallbackList

NAME

SoCallbackList - manages a list of callback functions and associated data

INHERITS FROM

SoCallbackList

SYNOPSIS

#include <Inventor/misc/SoCallbackList.h>

typedef void	SoCallbackListCB(void *userData,
void *callbackData)

Methods from class SoCallbackList:

SoCallbackList()

~SoCallbackList()

void	addCallback(SoCallbackListCB *f,
void *userData = NULL)

void	removeCallback(SoCallbackListCB *f,
void *userData = NULL)

void	clearCallbacks()

int	getNumCallbacks() const

void	invokeCallbacks(void *callbackData)

DESCRIPTION

This class manages a list of callback functions and user data. The user can add a callback function to the list, along with user data. When the callback is invoked, it is passed this user data, along with callback data specified by the invoking routine. The type of this callback data is determined by the invoking routine.

METHODS

SoCallbackList()

~SoCallbackList()

Constructor and destructor.

void	addCallback(SoCallbackListCB *f,
void *userData = NULL)

void	removeCallback(SoCallbackListCB *f,
void *userData = NULL)

Adds a function to or removes a function from the list of callback functions.

void	clearCallbacks()

Clears all callback functions from the list.

int	getNumCallbacks() const

Returns the number of callback functions in the list.

void	invokeCallbacks(void *callbackData)

Invokes each callback function in the list, passing each function the user data supplied when they were registered here, and callbackData, the callback-specific data supplied by the caller.


SoCameraKit

NAME

SoCameraKit - camera nodekit class

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoCameraKit

SYNOPSIS

#include <Inventor/nodekits/SoCameraKit.h>

Parts from class SoCameraKit:

(SoTransform)	transform

(SoCamera)	camera

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoCameraKit:

SoCameraKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

This nodekit class is used to create camera nodes that have a local transformation. SoCameraKit adds two public parts to the basic nodekit: transform and camera.

The camera part is created by default as an SoPerspectiveCamera node, but may later be changed to any subclass of SoCamera.

You can move the camera relative to the rest of the scene by creating and editing the transform part.

SoCameraKit also adds a private part, transformGroup, which is of type SoTransformSeparator. The kit uses this part to contain the effect of transform to move only the camera, while allowing the camera to affect the rest of the scene.

SoCameraKit is derived from SoBaseKit and thus also includes a callbackList part for adding callback nodes.

PARTS

(SoTransform)	transform

A transform that positions and orients the camera relative to the rest of the scene. Private parts keep the effect of the transform part localized. This part is NULL by default, but may be set to any subclass of SoTransform

(SoCamera)	camera

The camera node for this nodekit. The camera part is created by default as an SoPerspectiveCamera node, but may later be changed to any subclass of SoCamera. (e.g., SoPerspectiveCamera, SoOrthographicCamera).

METHODS

SoCameraKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for the class SoCameraKit.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
transform	Transform	--	yes
camera	Camera	PerspectiveCamera	no
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

CameraKit {

callbackList	NULL

transform	NULL

camera	PerspectiveCamera {

}

}

SEE ALSO

SoAppearanceKit, SoBaseKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit


SoCenterballDragger

NAME

SoCenterballDragger - striped ball you rotate and re-center by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoCenterballDragger

SYNOPSIS

#include <Inventor/draggers/SoCenterballDragger.h>

Fields from class SoCenterballDragger:

SoSFRotation	rotation

SoSFVec3f	center

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoCenterballDragger:

SoCenterballDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoCenterballDragger is a composite dragger. Its shape is a sphere defined by three intersecting circles. Where the circles intersect (at the ends of the x, y and z axes) there are sets of small green crosshairs. Dragging a pair of crosshairs translates the entire centerball within the plane of the crosshairs. The interface of the sphere and circles is just like SoTrackballDragger. Dragging a circle rotates about a constrained axis and dragging the areas between them rotates the sphere freely about the center. An invisible but pickable sphere initiates the free-rotation dragging.

When you drag the crosshairs, the center field is updated; there is no translation field. Dragging other parts of the centerball updates the rotation field. As with all draggers, if you change the fields the dragger moves in response.

The draggers used for the crosshair parts are SoTranslate2Draggers, so pressing the <Shift> key allows you to constrain motion to slide along either the local x axis or y axis of that crosshair.. The direction is determined by your initial mouse gesture after pressing the key. Releasing the key removes the constraint.

Remember: This is not an SoTransform! If you want to move other objects with this dragger, you can either:

[a] Use an SoCenterballManip, which is subclassed from SoTransform. The manipulator creates one of these draggers and uses it as the interface to edit the manipulator's fields. (See the SoCenterballManip reference page.)

[b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation node.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoCenterballDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/centerballDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the centerball dragger.

SoSFVec3f	center

Center of rotation and scale of the centerball dragger.

METHODS

SoCenterballDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
translateToCenter	MatrixTransform	--	yes
surroundScale	SurroundScale	--	yes
antiSquish	AntiSquish	--	no
lightModel	LightModel	--	yes
XAxis	Separator	--	yes
YAxis	Separator	--	yes
ZAxis	Separator	--	yes
rotator	RotateSphericalDragger	--	yes
YRotator	RotateCylindricalDragger	--	yes
ZCenterChanger	Translate2Dragger	--	yes
ZRotator	RotateCylindricalDragger	--	yes
YCenterChanger	Translate2Dragger	--	yes
XCenterChanger	Translate2Dragger	--	yes
XRotator	RotateCylindricalDragger	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	centerballRotator

Part:	rotator.rotator

Appearance:	Invisible but pickable sphere

Description:	When picked, initiates free rotation about the center point. Slightly smaller radius than the stripes, so you must pick between the stripes to use it.

Resource:	centerballRotatorActive

Part:	rotator.rotatorActive

Appearance:	Invisible sphere

Description:	Displayed during unconstrained 3D rotation instead of centerballRotator.

Resource:	centerballStripe

Parts:	XRotator.rotator

YRotator.rotator

ZRotator.rotator

Appearance:	White circle aligned with rotation axis.

Description:	When picked, initiates constrained rotation. Each rotator rotates locally about its Y axis. The centerball contains private transform parts that orient the draggers along three different axes.

Resource:	centerballStripeActive

Parts:	XRotator.rotatorActive

YRotator.rotatorActive

ZRotator.rotatorActive

Appearance:	White circle aligned with the rotation axis.

Description:	Displayed during constrained rotation instead of the rotator part. The centerball orients the draggers along three different axes.

Resource:	centerballCenterChanger

Parts:	XCenterChanger.translator

YCenterChanger.translator

ZCenterChanger.translator

Appearance:	Two sets of small green crosshairs, one located at each intersection of axis and ball.

Description:	When picked, initiates 2D translation of ball through space. Edits the center field, which becomes center for subsequent rotations. Each translator works locally in its X-Y plane. The centerball containsprivate transform parts that place the draggers along three different axes.

Resource:	centerballCenterChangerActive

Parts:	XCenterChanger.translatorActive

YCenterChanger.translatorActive

ZCenterChanger.translatorActive

Appearance:	Yellow version of centerballCenterChanger.

Description:	Displayed during 2D translation instead of regular translator part. The centerball places the draggers along three different axes.

Resource:	centerballCenterXAxisFeedback

Parts:	XCenterChanger.xAxisFeedback

YCenterChanger.xAxisFeedback

ZCenterChanger.xAxisFeedback

Appearance:	Double-headed purple arrows, one located at each intersection of axis and ball. Located atop X axis of crosshair.

Description:	Only shown if dragger is moving and the axis is a permitted direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the X direction of the child dragger's local space. The centerball places the draggers along three different axes; so not all of these parts aligns with the X axis in centerball space.

Resource:	centerballCenterYAxisFeedback

Parts:	XCenterChanger.yAxisFeedback

YCenterChanger.yAxisFeedback

ZCenterChanger.yAxisFeedback

Appearance:	Double-headed purple arrows, one located at each intersection of axis and ball. Located atop Y axis of crosshair.

Description:	Only shown if dragger is moving and the axis is a permitted direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the Y direction of the child dragger's local space. The centerball places the draggers along three different axes; so not all of these parts aligns with the Y axis in centerball space.

Resource:	centerballXAxis

Part:	XAxis

Appearance:	Thin yellow line connecting left and right crosshairs.

Description:	Feedback shown alone during rotation about X axis; displayed with centerballYAxis and centerballZAxis while center is dragged.

Resource:	centerballYAxis

Part:	YAxis

Appearance:	Thin yellow line connecting lower and upper crosshairs.

Description:	Feedback shown alone during rotation about Y axis; displayed with centerballXAxis and centerballZAxis while center is dragged.

Resource:	centerballZAxis

Part:	ZAxis

Appearance:	Thin yellow line connecting near and far crosshairs.

Description:	Feedback shown alone during rotation about Z axis; displayed with centerballXAxis and centerballYAxis while center is dragged.

FILE FORMAT/DEFAULT

CenterballDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

center	0 0 0

callbackList	NULL

translateToCenter	MatrixTransform {

matrix 1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1 }

surroundScale	NULL

antiSquish	AntiSquish {

sizing LONGEST_DIAGONAL }

lightModel	LightModel {

model PHONG }

XAxis	<centerballXAxis resource>

YAxis	<centerballYAxis resource>

ZAxis	<centerballZAxis resource>

rotator	RotateSphericalDragger {

}

YRotator	RotateCylindricalDragger {

}

ZCenterChanger	Translate2Dragger {

}

ZRotator	RotateCylindricalDragger {

}

YCenterChanger	Translate2Dragger {

}

XCenterChanger	Translate2Dragger {

}

XRotator	RotateCylindricalDragger {

}

rotator.rotator	<centerballRotator resource>

rotator.rotatorActive	<centerballRotatorActive resource>

XRotator.rotator	<centerballStripe resource>

YRotator.rotator	<centerballStripe resource>

ZRotator.rotator	<centerballStripe resource>

XRotator.rotatorActive	<centerballStripeActive resource>

YRotator.rotatorActive	<centerballStripeActive resource>

ZRotator.rotatorActive	<centerballStripeActive resource>

XCenterChanger.translator	<centerballCenterChanger resource>

YCenterChanger.translator	<centerballCenterChanger resource>

ZCenterChanger.translator	<centerballCenterChanger resource>

XCenterChanger.translatorActive	<centerballCenterChangerActive resource>

YCenterChanger.translatorActive	<centerballCenterChangerActive resource>

ZCenterChanger.translatorActive	<centerballCenterChangerActive resource>

XCenterChanger.xAxisFeedback	<centerballCenterXAxisFeedback resource>

YCenterChanger.xAxisFeedback	<centerballCenterXAxisFeedback resource>

ZCenterChanger.xAxisFeedback	<centerballCenterXAxisFeedback resource>

XCenterChanger.yAxisFeedback	<centerballCenterYAxisFeedback resource>

YCenterChanger.yAxisFeedback	<centerballCenterYAxisFeedback resource>

ZCenterChanger.yAxisFeedback	<centerballCenterYAxisFeedback resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoCenterballManip

NAME

SoCenterballManip - transform node with 3D interface for editing rotation and center

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip > SoCenterballManip

SYNOPSIS

#include <Inventor/manips/SoCenterballManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoCenterballManip:

SoCenterballManip()

static SoType	getClassTypeId()

Methods from class SoTransformManip:

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoCenterballManip is derived from SoTransform (by way of SoTransformManip). When its fields change, nodes following it in the scene graph rotate, scale, and/or translate.

As a subclass of SoTransformManip, this manipulator also has a 3D interface to edit some of its fields. In this case, the interface edits the rotation and center fields.

A manipulator differs from a dragger. When you move a dragger, no other nodes are affected. When you move an SoTransformManip, other nodes move along with it. (See the reference page for SoTransformManip.)

The interface for an SoCenterballManip is exactly the same as that of the SoCenterballDragger. To find out more about the interface, see the reference page for SoCenterballDragger. To find out how the manipulator uses a dragger to provide its interface, see the reference page for SoTransformManip.

On screen, this manipulator will surround the objects influenced by its motion. This is because it turns on the surroundScale part of the dragger. (See the reference page for SoSurroundScale.)

METHODS

SoCenterballManip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

CenterballManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoCenterballDragger, SoHandleBoxManip, SoJackManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoTransform, SoTransformManip


SoClipPlane

NAME

SoClipPlane - clipping plane node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoClipPlane

SYNOPSIS

#include <Inventor/nodes/SoClipPlane.h>

Fields from class SoClipPlane:

SoSFPlane	plane

SoSFBool	on

Methods from class SoClipPlane:

SoClipPlane()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node clips all subsequent shapes in the scene graph to the half-space defined by the plane field. The half-space is the side of the plane in the direction of the plane normal. For example, if the plane is positioned at the origin and the normal is pointing down the positive X axis, everything in the negative X space will be clipped away.

Any number of clipping planes may be active simultaneously, although the graphics library may place a limit on this number during rendering.

FIELDS

SoSFPlane	plane

Plane defining half-space.

SoSFBool	on

Whether clipping plane is active.

METHODS

SoClipPlane()

Creates a clip plane node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Adds the plane to the current list of clipping planes in the state.

FILE FORMAT/DEFAULT

ClipPlane {

plane	1 0 0  0

on	TRUE

}

SEE ALSO

SoCamera, SoShapeHints


SoClipPlaneManip

NAME

SoClipPlaneManip - manipulator to transform a clipping plane

INHERITS FROM

SoBase > SoFieldContainer > SoNode>SoClipPlane > SoClipPlaneManip

SYNOPSIS

#include <Inventor/manips/SoClipPlaneManip.h>

Fields from class SoClipPlaneManip:

SoSFVec3f	draggerPosition

Fields from class SoClipPlane:

SoSFPlane	plane

SoSFBool	on

Methods from class SoClipPlaneManip:

SoClipPlaneManip()

SoDragger *	getDragger()

void	setValue(const SbBox3f &box,
const SbVec3f &planeNormal,
float draggerScaleFactor)

SbBool	replaceNode(SoPath *p)

SbBool	replaceManip(SoPath *p,
SoClipPlane *newOne) const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class defines a manipulator to transform a clipping plane. An SoJackDragger allows the user to rotate and translate the clipping plane.

FIELDS

SoSFVec3f	draggerPosition

Dragger position.

METHODS

SoClipPlaneManip()

Constructor.

SoDragger *	getDragger()

Returns the dragger node being employed by this manip.

void	setValue(const SbBox3f &box,
const SbVec3f &planeNormal,
float draggerScaleFactor)

Convenience method to set the clip plane passing through the center of a bounding box (defined by the parameter box) and oriented by a normal (defined by the parameter planeNormal). The size of the dragger is the max size of the bounding box multiplied by a factor (defined by the parameter draggerScaleFactor).

SbBool	replaceNode(SoPath *p)

Replaces a regular SoClipPlane node with this manipulator.

SbBool	replaceManip(SoPath *p,
SoClipPlane *newOne) const

Replaces this manipulator with a regular SoClipPlane node.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

ClipPlaneManip {

plane	1 0 0  0

on	TRUE

draggerPosition	0 0 0

}

SEE ALSO

SoClipPlane, SoDragger


SoCollisionManager

NAME

SoCollisionManager - class to manage collisions

INHERITS FROM

SoCollisionManager

SYNOPSIS

#include <Inventor/collision/SoCollisionManager.h>

typedef SbBool	SoFilterCollisionCB(void* userData,
const SoPath* object,
const SoPath* scene)

typedef void	SoBBoxCollisionCB(void* userData,
const SoPath* object,
const SoPath* scene)

typedef Resp	SoCollisionCB(void* userData,
const SoCollidingPrimitive* object,
const SoCollidingPrimitive* scene)

enum Resp	{
SoCollisionManager::NEXT_PRIMITIVE,
SoCollisionManager::NEXT_SHAPE,
SoCollisionManager::ABORT
}

struct SoCollidingPrimitive
{
enum PrimitiveType {
LINE_SEGMENT = 2,
TRIANGLE = 3
};
SoPath* path;
Path of the shape
PrimitiveType type;
Type of primitive
SbVec3f vertex [3];
Vertex of the primitive
}

Methods from class SoCollisionManager:

SoCollisionManager(SoPath* object,
SoGroup* scene,
SoTransform* transform )

~SoCollisionManager()

void	setObject(SoPath* object)

SoPath*	getObject() const

void	setScene(SoGroup* scene)

SoGroup*	getScene() const

void 	setTransform(SoTransform* transform)

SoPath*	getTransform() const

void 	setGluingLevel(unsigned int level)

unsigned int	getGluingLevel() const

void 	setObjectBBoxOnly(SbBool flag = TRUE)

SbBool	isObjectBBoxOnly() const

void 	setSceneBBoxOnly(SbBool flag = TRUE)

SbBool	isSceneBBoxOnly() const

void 	setGluing(SbBool flag = TRUE)

SbBool	isGluing() const

void 	activate(SbBool flag = TRUE)

SbBool	isActivated() const

void	setFilterCallback(SoFilterCollisionCB* f,
void* userData = NULL)

void	addBBoxCollisionCallback(SoBBoxCollisionCB* f,
void* userData = NULL)

void	removeBBoxCollisionCallback
(SoBBoxCollisionCB* f,
void* userData = NULL)

void	addCollisionCallback(SoCollisionCB* f,
void* userData = NULL)

void	removeCollisionCallback(SoCollisionCB* f,
void* userData = NULL)

DESCRIPTION

The SoCollisionManager class manages collisions, i.e., it controls the position of an object in a scene, preventing it from colliding with other objects in the scene.

The collision manager references a scene, an object and a transformation. It can prevent collisions between the specified object and other objects within the scene.

It can use the actual primitives of the objects during the computation, or for faster performance, it may use their bounding boxes.

When the referenced transformation changes, the collision manager looks for a collision between the bounding box of the object and the bounding boxes of objects within the scene. If a collision between the bounding boxes is detected, the algorithm can (depending on what the programmer specifies) compute a more precise intersection using the actual primitives of the object and/or the objects of the scene.

The algorithm can call programmer-supplied callback functions when there is a collision between the bounding boxes, and when there is a collision between the primitives of the shapes.

When there is a collision, the collision manager can "glue" the object on the scene. This refers to placing the object at the position just before the first collision that would occur along the transformation path. For example, if an object would collide with (intersect) a wall, the object would be placed directly against the wall.

METHODS

SoCollisionManager(SoPath* object,
SoGroup* scene,
SoTransform* transform )

Constructor.

~SoCollisionManager()

Destructor.

void	setObject(SoPath* object)

SoPath*	getObject() const

Sets/returns the object that will be transformed.

void	setScene(SoGroup* scene)

SoGroup*	getScene() const

Sets/returns the scene the object is interacting with.

void 	setTransform(SoTransform* transform)

SoPath*	getTransform() const

Sets/returns the transformation that will be watched.

void 	setGluingLevel(unsigned int level)

unsigned int	getGluingLevel() const

Sets/returns the gluing level. The larger the number, the more precise the check for intermediate collisions, and the longer the computation will take. If this level is set to 0, the collision manager will act as if the gluing flag was set to FALSE, except the collision callbacks are called with a gluing flag of TRUE. Default value is 1.

void 	setObjectBBoxOnly(SbBool flag = TRUE)

SbBool	isObjectBBoxOnly() const

Sets/returns a flag indicating whether to use the object's bounding box instead of the actual primitives when computing collisions. Default value is FALSE.

void 	setSceneBBoxOnly(SbBool flag = TRUE)

SbBool	isSceneBBoxOnly() const

Sets/returns a flag indicating whether to use the bounding boxes of objects in the scene instead of the actual primitives when computing collisions. Default value is FALSE.

void 	setGluing(SbBool flag = TRUE)

SbBool	isGluing() const

Set/returns a flag indicating that the collision manager should place the object at the position just before the first collision that would occur along the transformation path. For example, if an object would collide with (intersect) a wall, the object would be placed directly against the wall. Default value is FALSE.

void 	activate(SbBool flag = TRUE)

SbBool	isActivated() const

Set/returns a flag to activate the collision manager, i.e. to tell it to watch the transformation and start collision detection computations when the transformation changes. Default value is TRUE.

void	setFilterCallback(SoFilterCollisionCB* f,
void* userData = NULL)

Sets the callback function called when an object shape collides with a scene shape. If the callback function returns TRUE, the Collision Manager looks forward for collisions; else, it aborts searching. If if is NULL, no filter is applied.

void	addBBoxCollisionCallback(SoBBoxCollisionCB* f,
void* userData = NULL)

void	removeBBoxCollisionCallback
(SoBBoxCollisionCB* f,
void* userData = NULL)

Bounding box collision callbacks are called after the bounding box collision detection and before real detection, allowing the programmer to change the ObjectBBoxOnly and SceneBBoxOnly flags. The callback functions are passed the paths of the two nodes whose bounding boxes are colliding.

void	addCollisionCallback(SoCollisionCB* f,
void* userData = NULL)

void	removeCollisionCallback(SoCollisionCB* f,
void* userData = NULL)

Collision callbacks are called when there is a collision. The callback functions receive information about the primitives which collide. If the callback returns NEXT_PRIMITIVE, it will be called for the two next colliding triangles or segments; if it returns NEXT_SHAPE, it will be called for the two next colliding shapes; if it returns ABORT, it will be called only if another transformation generates a collision.

When the gluing flag is TRUE, the object and scene passed to the callback function are NULL because there is no collision.

SEE ALSO

SoIntersectionDetectionAction, SoWinCollisionViewer


SoColorIndex

NAME

SoColorIndex - surface color index node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoColorIndex

SYNOPSIS

#include <Inventor/nodes/SoColorIndex.h>

Fields from class SoColorIndex:

SoMFInt32	index

Methods from class SoColorIndex:

SoColorIndex()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies the color to use for subsequent shapes as an index into the current color table. This is used only for BASE_COLOR lighting (see SoLightModel) in color index mode. Color index mode may be enabled by the window in which rendering occurs.

Since color indices make sense only in the context of OpenGL rendering, this node implements only a method for the SoGLRenderAction.

FIELDS

SoMFInt32	index

Color index.

METHODS

SoColorIndex()

Creates a color index node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Sets the color index for subsequent shapes rendered with BASE_COLOR lighting.

FILE FORMAT/DEFAULT

ColorIndex {

index	1

}

SEE ALSO

SoBaseColor, SoLightModel


SoComplexity

NAME

SoComplexity - shape complexity node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoComplexity

SYNOPSIS

#include <Inventor/nodes/SoComplexity.h>

enum Type	{
SoComplexity::SCREEN_SPACE
Set complexity based on screen size
SoComplexity::OBJECT_SPACE
Set complexity independent of screen size
SoComplexity::BOUNDING_BOX
Draw all shapes as bounding boxes
}

Fields from class SoComplexity:

SoSFEnum	type

SoSFFloat	value

SoSFFloat	textureQuality

Methods from class SoComplexity:

SoComplexity()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node sets the current shape complexity value. This is a heuristic value which provides a hint at what geometric complexity to render shape nodes. Values range from 0 to 1, where 0 means minimum complexity and 1 means maximum complexity. Each shape node interprets complexity in its own way.

Shape complexity always affects rendering and primitive generation for the SoCallbackAction. For some shapes, it also affects picking.

There are three ways to interpret shape complexity, depending on the type field. BOUNDING_BOX complexity ignores the value field and renders all shapes as bounding boxes, using the current material, drawing style, etc. The other two types use the value field to determine the tessellation of shapes into polygons. OBJECT_SPACE complexity uses value directly to determine the tessellation. SCREEN_SPACE complexity depends on value and the projected size of the shape on the screen; a value of 0 produces the minimum tessellation for a shape, and a value of 1 produces a tessellation that is fine enough that each edge of a polygon is about 1 or two pixels in length. Since the projected size depends on the camera position, objects may be tessellated differently every frame if the camera is moving; note that this may have adverse effects on render caching in SoSeparator nodes.

The SoComplexity node also sets a hint for the quality of textures applied to shapes, based on the value of the textureQuality field. The texture quality will take effect at the next Texture2 node; Texture2 nodes previously traversed will not be affected.

FIELDS

SoSFEnum	type

How shape complexity is interpreted.

SoSFFloat	value

Complexity value.

SoSFFloat	textureQuality

Hint about texture quality. A value of 0 indicates that the fastest texturing should be used, while a value of 1 indicates that the best quality texturing should be used.

METHODS

SoComplexity()

Creates a complexity node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Sets the current complexity in the state.

FILE FORMAT/DEFAULT

Complexity {

type	OBJECT_SPACE

value	0.5

textureQuality	0.5

}

SEE ALSO

SoShape, SoShapeHints, SoTexture2


SoComposeMatrix

NAME

SoComposeMatrix - composes a transformation matrix

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoComposeMatrix

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoComposeMatrix:

SoMFVec3f	translation

SoMFRotation	rotation

SoMFVec3f	scaleFactor

SoMFRotation	scaleOrientation

SoMFVec3f	center

Outputs from class SoComposeMatrix:

(SoMFMatrix)	matrix

Methods from class SoComposeMatrix:

SoComposeMatrix()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine has inputs that specify values for translation, rotation, scale, and center of transformation. As output, it produces a transformation matrix that transforms objects into the space specified by the scale, rotation, and translation inputs (in that order).

The input fields can have multiple values, allowing the engine to compose several matrices in parallel. Some inputs may have more values than others. In such cases, the last value of the shorter inputs will be repeated as necessary.

INPUTS

SoMFVec3f	translation

Translation in x, y, and z.

SoMFRotation	rotation

Rotation.

SoMFVec3f	scaleFactor

Scale factors in x, y, and z.

SoMFRotation	scaleOrientation

Rotational space for scaling.

SoMFVec3f	center

Center point for scaling and rotating.

OUTPUTS

(SoMFMatrix)	matrix

Transformation matrix that transforms from object space into the space specified by the inputs.

METHODS

SoComposeMatrix()

Constructor

FILE FORMAT/DEFAULT

ComposeMatrix {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoDecomposeMatrix, SoEngineOutput


SoComposeRotation

NAME

SoComposeRotation - composes a rotation from axis and angle values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoComposeRotation

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoComposeRotation:

SoMFVec3f	axis

SoMFFloat	angle

Outputs from class SoComposeRotation:

(SoMFRotation)	rotation

Methods from class SoComposeRotation:

SoComposeRotation()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine has two inputs, representing an axis of rotation and a rotation angle in radians. As output, the engine composes the inputs into a rotation field.

The input fields can have multiple values, allowing the engine to compose several rotations in parallel. Some inputs may have more values than others. In such cases, the last value of the shorter inputs will be repeated as necessary.

INPUTS

SoMFVec3f	axis

Axis of rotation.

SoMFFloat	angle

Angle of rotation.

OUTPUTS

(SoMFRotation)	rotation

Rotation field, defined by the inputs.

METHODS

SoComposeRotation()

Constructor

FILE FORMAT/DEFAULT

ComposeRotation {

axis	0 0 1

angle	0

}

SEE ALSO

SoComposeRotationFromTo, SoDecomposeRotation, SoEngineOutput


SoComposeRotationFromTo

NAME

SoComposeRotationFromTo - composes a rotation that rotates from one vector into another

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoComposeRotationFromTo

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoComposeRotationFromTo:

SoMFVec3f	from

SoMFVec3f	to

Outputs from class SoComposeRotationFromTo:

(SoMFRotation)	rotation

Methods from class SoComposeRotationFromTo:

SoComposeRotationFromTo()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes two inputs, representing a vector before and after a rotation has been applied. As output, it produces the rotation value that would cause the first vector to transform into the other.

The input fields can have multiple values, allowing the engine to compose several rotations in parallel. Some inputs may have more values than others. In such cases, the last value of the shorter inputs will be repeated as necessary.

INPUTS

SoMFVec3f	from

Vector before the rotation.

SoMFVec3f	to

Vector after the rotation.

OUTPUTS

(SoMFRotation)	rotation

A rotation that transforms one vector into another.

METHODS

SoComposeRotationFromTo()

Constructor

FILE FORMAT/DEFAULT

ComposeRotationFromTo {

from	0 0 1

to	0 0 1

}

SEE ALSO

SoComposeRotation, SoDecomposeRotation, SoEngineOutput


SoComposeVec2f

NAME

SoComposeVec2f - composes 2D vectors from floating-point values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoComposeVec2f

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoComposeVec2f:

SoMFFloat	x

SoMFFloat	y

Outputs from class SoComposeVec2f:

(SoMFVec2f)	vector

Methods from class SoComposeVec2f:

SoComposeVec2f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes two floating-point inputs and composes a 2D floating-point vector.

The input fields can have multiple values, allowing the engine to compose several vectors in parallel. One of the inputs may have more values than others. In such cases, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFFloat	x

The x component.

SoMFFloat	y

The y component.

OUTPUTS

(SoMFVec2f)	vector

Vector composed of x and y components.

METHODS

SoComposeVec2f()

Constructor

FILE FORMAT/DEFAULT

ComposeVec2f {

x	0

y	0

}

SEE ALSO

SoDecomposeVec2f, SoEngineOutput


SoComposeVec3f

NAME

SoComposeVec3f - composes 3D vectors from floating-point values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoComposeVec3f

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoComposeVec3f:

SoMFFloat	x

SoMFFloat	y

SoMFFloat	z

Outputs from class SoComposeVec3f:

(SoMFVec3f)	vector

Methods from class SoComposeVec3f:

SoComposeVec3f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes three floating-point inputs and composes a 3D vector.

The input fields can have multiple values, allowing the engine to compose several vectors in parallel. Some inputs may have more values than others. In such cases, the last value of the shorter inputs will be repeated as necessary.

INPUTS

SoMFFloat	x

The x component

SoMFFloat	y

The y component

SoMFFloat	z

The z component.

OUTPUTS

(SoMFVec3f)	vector

Vector composed of x, y, and z.

METHODS

SoComposeVec3f()

Constructor

FILE FORMAT/DEFAULT

ComposeVec3f {

x	0

y	0

z	0

}

SEE ALSO

SoDecomposeVec3f, SoEngineOutput


SoComposeVec4f

NAME

SoComposeVec4f - composes 4D vectors from floating-point values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoComposeVec4f

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoComposeVec4f:

SoMFFloat	x

SoMFFloat	y

SoMFFloat	z

SoMFFloat	w

Outputs from class SoComposeVec4f:

(SoMFVec4f)	vector

Methods from class SoComposeVec4f:

SoComposeVec4f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes four floating-point inputs and composes a 4D vector.

The input fields can have multiple values, allowing the engine to compose several vectors in parallel. Some inputs may have more values than others. In such cases, the last value of the shorter inputs will be repeated as necessary.

INPUTS

SoMFFloat	x

The x component.

SoMFFloat	y

The y component.

SoMFFloat	z

The z component.

SoMFFloat	w

The w component.

OUTPUTS

(SoMFVec4f)	vector

Vector composed of x, y, z, and w.

METHODS

SoComposeVec4f()

Constructor

FILE FORMAT/DEFAULT

ComposeVec4f {

x	0

y	0

z	0

w	0

}

SEE ALSO

SoDecomposeVec4f, SoEngineOutput


SoComputeBoundingBox

NAME

SoComputeBoundingBox - computes the bounding box and center of a scene graph

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoComputeBoundingBox

SYNOPSIS

#include <Inventor/engines/SoComputeBoundingBox.h>

Inputs from class SoComputeBoundingBox:

SoSFNode	node

SoSFPath	path

Outputs from class SoComputeBoundingBox:

(SoSFVec3f)	min

(SoSFVec3f)	max

(SoSFVec3f)	boxCenter

(SoSFVec3f)	objectCenter

Methods from class SoComputeBoundingBox:

SoComputeBoundingBox()

void	setViewportRegion(const SbViewportRegion &vpReg)

const SbViewportRegion &	getViewportRegion()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine computes the bounding box and center of a scene graph. The scene graph can be defined by a path or by a root node.

If the path input is not NULL, the bounding box of the graph defined by the path will be computed. If path is NULL, but the node input is not NULL, the bounding box is computed on the graph rooted by the node. By default, the two inputs are NULL. If both the inputs are NULL, the outputs are disabled.

The engine uses a default viewport region. If the graph includes screen-based objects (such as SoText2) you can call setViewportRegion() on the engine instance to set up the correct viewport region to use.

INPUTS

SoSFNode	node

Defines the graph for which the bounding box is computed.

SoSFPath	path

Alternatively, defines the graph for which the bounding box is computed.

OUTPUTS

(SoSFVec3f)	min

Minimum point of the computed bounding box.

(SoSFVec3f)	max

Maximum point of the computed bounding box.

(SoSFVec3f)	boxCenter

Center of the computed bounding box.

(SoSFVec3f)	objectCenter

Center of the objects in the graph.

METHODS

SoComputeBoundingBox()

Constructor

void	setViewportRegion(const SbViewportRegion &vpReg)

Sets the viewport region to use for the bounding box computation.

const SbViewportRegion &	getViewportRegion()

Returns the viewport region to use for the bounding box computation.

FILE FORMAT/DEFAULT

ComputeBoundingBox {

node	NULL

path	NULL

}

SEE ALSO

SoEngineOutput, SoGetBoundingBoxAction, SbBox3f


SoConcatenate

NAME

SoConcatenate - joins separate fields into a single multiple-value field

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoConcatenate

SYNOPSIS

#include <Inventor/engines/SoConcatenate.h>

Inputs from class SoConcatenate:

<inputType>	input[10]

Outputs from class SoConcatenate:

(<outputType>)	output

Methods from class SoConcatenate:

SoConcatenate(SoType inputType)

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine joins up to 10 separate fields of a type into a single multiple-valued field of the same type. The type of the input fields can be any subclass of SoMField The type is specified when an instance of the class is created. For example, SoConcatenate(SoMFFloat::getClassTypeId()) creates an engine that concatenates floating-point values.

The input field is a 10-element array, where each element can be connected to single- or multiple-valued fields. All the values in the input are concatenated together to form one multiple-value field. For example, if input[0] contains 10 values and input[1] contains 3 values, the output will contain 13 values.

Note that, unlike the output of most engines, output is a pointer. Note also that by default input does not contain any values, and no value is output from the engine.

INPUTS

<inputType>	input[10]

OUTPUTS

(<outputType>)	output

METHODS

SoConcatenate(SoType inputType)

Constructor. The argument specifies the type of values to concatenate.

FILE FORMAT/DEFAULT

Concatenate {

type	<inputType>

input0	[]

input1	[]

input2	[]

input3	[]

input4	[]

input5	[]

input6	[]

input7	[]

input8	[]

input9	[]

}

SEE ALSO

SoEngineOutput, SoGate, SoSelectOne


SoCone

NAME

SoCone - cone shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoCone

SYNOPSIS

#include <Inventor/nodes/SoCone.h>

enum Part	{
SoCone::SIDES
The conical part
SoCone::BOTTOM
The bottom circular face
SoCone::ALL
All parts
}

Fields from class SoCone:

SoSFBitMask	parts

SoSFFloat	bottomRadius

SoSFFloat	height

Methods from class SoCone:

SoCone()

void	addPart(SoCone::Part part)

void	removePart(SoCone::Part part)

SbBool	hasPart(SoCone::Part part) const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a simple cone whose central axis is aligned with the y-axis. By default, the cone is centered at (0,0,0) and has a size of -1 to +1 in all three directions. The cone has a radius of 1 at the bottom and a height of 2, with its apex at 1. The cone has two parts: the sides and the bottom.

The cone is transformed by the current cumulative transformation and is drawn with the current lighting model, drawing style, material, and geometric complexity.

If the current material binding is PER_PART or PER_PART_INDEXED, the first current material is used for the sides of the cone, and the second is used for the bottom. Otherwise, the first material is used for the entire cone.

When a texture is applied to a cone, it is applied differently to the sides and bottom. On the sides, the texture wraps counterclockwise (from above) starting at the back of the cone. The texture has a vertical seam at the back, intersecting the yz-plane. For the bottom, a circle is cut out of the texture square and applied to the cone's base circle. The texture appears right side up when the top of the cone is tilted away from the camera.

FIELDS

SoSFBitMask	parts

Visible parts of cone.

SoSFFloat	bottomRadius

SoSFFloat	height

These define the cone's height and the radius of the base circle; values must be greater than 0.0.

METHODS

SoCone()

Creates a cone node with default settings.

void	addPart(SoCone::Part part)

void	removePart(SoCone::Part part)

These are convenience functions that make it easy to turn on or off a part of the cone.

SbBool	hasPart(SoCone::Part part) const

This convenience function returns whether a given part is on or off.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws cone based on the current coordinates, materials, drawing style, and so on.

SoRayPickAction

Intersects the ray with the cone. The part of the cone that was picked is available from the SoConeDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses the cone.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle that approximates the cone.

FILE FORMAT/DEFAULT

Cone {

parts	ALL

bottomRadius	1

height	2

}

SEE ALSO

SoConeDetail, SoCube, SoCylinder, SoSphere


SoConeDetail

NAME

SoConeDetail - stores detail information about the SoCone node

INHERITS FROM

SoDetail > SoConeDetail

SYNOPSIS

#include <Inventor/details/SoConeDetail.h>

Methods from class SoConeDetail:

SoConeDetail()

virtual	~SoConeDetail()

int	getPart() const

static SoType	getClassTypeId()

Methods from class SoDetail:

SoDetail *	copy() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a point on a cone. It contains the part of the cone that was hit (sides or bottom).

METHODS

SoConeDetail()

virtual	~SoConeDetail()

Constructor and destructor.

int	getPart() const

Returns the part in the detail. The returned value is one of the SoCone part flags.

static SoType	getClassTypeId()

Returns type identifier for this class.

SEE ALSO

SoCone, SoDetail, SoPickedPoint, SoPrimitiveVertex


SoCoordinate3

NAME

SoCoordinate3 - coordinate point node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoCoordinate3

SYNOPSIS

#include <Inventor/nodes/SoCoordinate3.h>

Fields from class SoCoordinate3:

SoMFVec3f	point

Methods from class SoCoordinate3:

SoCoordinate3()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of 3D coordinates to be used by subsequent vertex-based shape nodes (those derived from SoVertexShape) or shape nodes that use them as control points (such as NURBS curves and surfaces). This node does not produce a visible result during rendering; it simply replaces the current coordinates in the rendering state for subsequent nodes to use.

FIELDS

SoMFVec3f	point

Coordinate point(s).

METHODS

SoCoordinate3()

Creates a coordinate node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Sets coordinates in current traversal state.

FILE FORMAT/DEFAULT

Coordinate3 {

point	0 0 0

}

SEE ALSO

SoCoordinate4, SoVertexShape


SoCoordinate4

NAME

SoCoordinate4 - rational coordinate point node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoCoordinate4

SYNOPSIS

#include <Inventor/nodes/SoCoordinate4.h>

Fields from class SoCoordinate4:

SoMFVec4f	point

Methods from class SoCoordinate4:

SoCoordinate4()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of 3D coordinates to be used by subsequent vertex-based shape nodes (those derived from SoVertexShape) or shape nodes that use them as control points (such as NURBS curves and surfaces). Coordinates are specifed as rational 4-vectors; the corresponding 3D point is computed by dividing the first three components by the fourth. This node does not produce a visible result during rendering; it simply replaces the current coordinates in the rendering state for subsequent nodes to use.

This node exists primarily for use with NURBS curves and surfaces. However, it can be used to define coordinates for any vertex-based shape.

FIELDS

SoMFVec4f	point

Coordinate point(s).

METHODS

SoCoordinate4()

Creates a coordinate node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Sets coordinates in current traversal state.

FILE FORMAT/DEFAULT

Coordinate4 {

point	0 0 0 1

}

SEE ALSO

SoCoordinate4, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoVertexShape


SoCounter

NAME

SoCounter - triggered integer counter

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoCounter

SYNOPSIS

#include <Inventor/engines/SoCounter.h>

Inputs from class SoCounter:

SoSFShort	min

SoSFShort	max

SoSFShort	step

SoSFTrigger	trigger

SoSFShort	reset

Outputs from class SoCounter:

(SoSFShort)	output

(SoSFTrigger)	syncOut

Methods from class SoCounter:

SoCounter()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine is a counter that outputs numbers, starting at a minimum value, increasing by a step value, and ending with a number that does not exceed the maximum value. It outputs the next number whenever the trigger input is touched. When the maximum number is reached, it starts counting from the beginning again.

At any time the counter can be reset to a specific value by setting the reset input field to that value. The next time the counter is triggered it will start counting from there. Note that the counter will always output numbers based on the min, max and step values, and setting the reset value does not affect those input fields. If the reset value is not a legal counter value, the counter will still behave as though it is.

•	If reset is greater than max, the counter is set to max.

•	If reset is less than min, the counter is set to min.

•	If reset is between steps, the counter is set to the lower step value.

Each time a counting cycle is started, the syncOut output is triggered. This output can be used to synchronize some other event with the counting cycle.

INPUTS

SoSFShort	min

Minimum value for the counter.

SoSFShort	max

Maximum value for the counter.

SoSFShort	step

Counter step value.

SoSFTrigger	trigger

Go to the next step.

SoSFShort	reset

At the next trigger, reset the counter to the specified value.

OUTPUTS

(SoSFShort)	output

Counts min-to-max in step increments.

(SoSFTrigger)	syncOut

Triggers at cycle start.

METHODS

SoCounter()

Constructor

FILE FORMAT/DEFAULT

Counter {

min	0

max	1

step	1

trigger

reset	0

}

SEE ALSO

SoTimeCounter, SoEngineOutput


SoCube

NAME

SoCube - cube shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoCube

SYNOPSIS

#include <Inventor/nodes/SoCube.h>

Fields from class SoCube:

SoSFFloat	width

SoSFFloat	height

SoSFFloat	depth

Methods from class SoCube:

SoCube()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a cuboid aligned with the coordinate axes. By default, the cube is centered at (0,0,0) and measures 2 units in each dimension, from -1 to +1. The cube is transformed by the current cumulative transformation and is drawn with the current lighting model, drawing style, material, and geometric complexity.

If the current material binding is PER_PART, PER_PART_INDEXED, PER_FACE, or PER_FACE_INDEXED, materials will be bound to the faces of the cube in this order: front, back, left, right, top, and bottom.

Textures are applied individually to each face of the cube; the entire texture goes on each face. On the front, back, right, and left sides of the cube, the texture is applied right side up. On the top, the texture appears right side up when the top of the cube is tilted toward the camera. On the bottom, the texture appears right side up when the top of the cube is tilted away from the camera.

FIELDS

SoSFFloat	width

SoSFFloat	height

SoSFFloat	depth

Sizes in the x, y, and z dimensions, respectively.

METHODS

SoCube()

Creates a cube node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws cube based on the current coordinates, materials, drawing style, and so on.

SoRayPickAction

Intersects the ray with the cube. The face of the cube that was picked is available from the SoCubeDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses the cube.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle that approximates the cube.

FILE FORMAT/DEFAULT

Cube {

width	2

height	2

depth	2

}

SEE ALSO

SoCone, SoCubeDetail, SoCylinder, SoSphere


SoCubeDetail

NAME

SoCubeDetail - stores detail information about the SoCube node

INHERITS FROM

SoDetail > SoCubeDetail

SYNOPSIS

#include <Inventor/details/SoCubeDetail.h>

Methods from class SoCubeDetail:

SoCubeDetail()

virtual	~SoCubeDetail()

int	getPart() const

static SoType	getClassTypeId()

Methods from class SoDetail:

SoDetail *	copy() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a point on a cube. It contains the part of the cube that was hit.

Part values are as follows:

0	Front

1	Back

2	Left

3	Right

4	Top

5	Bottom

METHODS

SoCubeDetail()

virtual	~SoCubeDetail()

Constructor and destructor.

int	getPart() const

Returns the part in the detail.

static SoType	getClassTypeId()

Returns type identifier for this class.

SEE ALSO

SoCube, SoDetail, SoPickedPoint, SoPrimitiveVertex


SoCylinder

NAME

SoCylinder - cylinder shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoCylinder

SYNOPSIS

#include <Inventor/nodes/SoCylinder.h>

enum Part	{
SoCylinder::SIDES
The cylindrical part
SoCylinder::TOP
The top circular face
SoCylinder::BOTTOM
The bottom circular face
SoCylinder::ALL
All parts
}

Fields from class SoCylinder:

SoSFBitMask	parts

SoSFFloat	radius

SoSFFloat	height

Methods from class SoCylinder:

SoCylinder()

void	addPart(SoCylinder::Part part)

void	removePart(SoCylinder::Part part)

SbBool	hasPart(SoCylinder::Part part) const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a simple capped cylinder centered around the y-axis. By default, the cylinder is centered at (0,0,0) and has a default size of -1 to +1 in all three dimensions. You can use the radius and height fields to create a cylinder with a different size.

The cylinder is transformed by the current cumulative transformation and is drawn with the current lighting model, drawing style, material, and geometric complexity.

If the current material binding is PER_PART or PER_PART_INDEXED, the first current material is used for the sides of the cylinder, the second is used for the top, and the third is used for the bottom. Otherwise, the first material is used for the entire cylinder.

When a texture is applied to a cylinder, it is applied differently to the sides, top, and bottom. On the sides, the texture wraps counterclockwise (from above) starting at the back of the cylinder. The texture has a vertical seam at the back, intersecting the yz-plane. For the top and bottom, a circle is cut out of the texture square and applied to the top or bottom circle. The top texture appears right side up when the top of the cylinder is tilted toward the camera, and the bottom texture appears right side up when the top of the cylinder is tilted away from the camera.

FIELDS

SoSFBitMask	parts

Visible parts of cylinder.

SoSFFloat	radius

SoSFFloat	height

Define the cylinder's height and radius; values must be greater than 0.0.

METHODS

SoCylinder()

Creates a cylinder node with default settings.

void	addPart(SoCylinder::Part part)

void	removePart(SoCylinder::Part part)

These are convenience functions that make it easy to turn on or off a part of the cylinder.

SbBool	hasPart(SoCylinder::Part part) const

This convenience function returns whether a given part is on or off.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws cylinder based on the current coordinates, materials, drawing style, and so on.

SoRayPickAction

Intersects the ray with the cylinder. The part of the cylinder that was picked is available from the SoCylinderDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses the cylinder.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle that approximates the cylinder.

FILE FORMAT/DEFAULT

Cylinder {

parts	ALL

radius	1

height	2

}

SEE ALSO

SoCone, SoCube, SoCylinderDetail, SoSphere


SoCylinderDetail

NAME

SoCylinderDetail - stores detail information about the SoCylinder node

INHERITS FROM

SoDetail > SoCylinderDetail

SYNOPSIS

#include <Inventor/details/SoCylinderDetail.h>

Methods from class SoCylinderDetail:

SoCylinderDetail()

virtual	~SoCylinderDetail()

int	getPart() const

static SoType	getClassTypeId()

Methods from class SoDetail:

SoDetail *	copy() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a point on a cylinder. It contains the part of the cylinder that was hit (sides, top, or bottom).

METHODS

SoCylinderDetail()

virtual	~SoCylinderDetail()

Constructor and destructor.

int	getPart() const

Returns the part in the detail. The returned value is one of the SoCylinder part flags.

static SoType	getClassTypeId()

Returns type identifier for this class.

SEE ALSO

SoCylinder, SoDetail, SoPickedPoint, SoPrimitiveVertex


SoDB

NAME

SoDB - scene graph database class

INHERITS FROM

SoDB

SYNOPSIS

#include <Inventor/SoDB.h>

typedef void	SoDBHeaderCB(void *userData,
SoInput *in)

Methods from class SoDB:

static void	init()

static const char *	getVersion()

static SbBool	read(SoInput *in,
SoNode *&rootNode)

static SbBool	read(SoInput *in,
SoPath *&path)

static SoSeparator *	readAll(SoInput *in)

static SoVRMLGroup *	readAllVRML(SoInput *in) [TGS special]

static void	createRoute(SoNode *pFromNode,
const char * fromEventOut,
SoNode *pToNode,
const char* toEventIn) [TGS special]

static SbBool	isValidHeader(const char *testString)

static SbBool	registerHeader(const SbString &headerString,
SbBool isBinary,
float ivVersion,
SoDBHeaderCB *preCB,
SoDBHeaderCB *postCB,
void *userData)

static SbBool	getHeaderData(const SbString &headerString,
SbBool &isBinary,
float &ivVersion,
SoDBHeaderCB *&preCB,
SoDBHeaderCB *&postCB,
void *&userData,
SbBool substringOK = FALSE)

static int	getNumHeaders()

static SbString	getHeaderString(int i)

static SoField *	createGlobalField(const SbName &name,
SoType type)

static SoField *	getGlobalField(const SbName &name)

static void	renameGlobalField(const SbName &oldName,
const SbName &newName)

static void	setRealTimeInterval(const SbTime &deltaT)

static const SbTime &	getRealTimeInterval()

static void	setDelaySensorTimeout(const SbTime &t)

static const SbTime &	getDelaySensorTimeout()

static int	doSelect(int nfds,
fd_set *readfds,
fd_set *writefds,
fd_set *exceptfds,
struct timeval *userTimeOut)

DESCRIPTION

The SoDB class holds all scene graphs, each representing a 3D scene used by an application. A scene graph is a collection of SoNode objects which come in several varieties (see SoNode). Application programs must initialize the database by calling SoDB::init() before calling any other database routines and before constructing any nodes, paths, functions, or actions. Note that SoDB::init() is called by SoInteraction::init(), SoNodeKit::init(), and SoWin::init(), so if you are calling any of these methods, you do not need to call SoDB::init() directly. All methods on this class are static.

Typical program database initialization and scene reading is as follows:

#include <Inventor/SoDB.h>

#include <Inventor/SoInput.h>

#include <Inventor/nodes/SoSeparator.h>

SoSeparator  *rootSep;

SoInput      in;

SoDB::init();

rootSep = SoDB::readAll(&in);

if (rootSep == NULL)

    printf("Error on read...\n");

 ...

METHODS

static void	init()

Initializes the database. This must be called before calling any other database routines, including the construction of any nodes, paths, engines, or actions.

static const char *	getVersion()

Returns a character string identifying the version of the Open Inventor library in use.

static SbBool	read(SoInput *in,
SoNode *&rootNode)

static SbBool	read(SoInput *in,
SoPath *&path)

Reads a graph from the file specified by the given SoInput, returning a pointer to the resulting root node in rootNode, or a pointer to the resulting path in path. The programmer is responsible for determining which routine to use, based on the contents of the input. These routines return FALSE if any error occurred during reading.

If the passed SoInput was used to open a file and the name of the file contains a directory, SoDB automatically adds the directory to the end of the current directory search path in the SoInput. This means that nested files named in SoFile nodes may be found relative to that directory. The directory is removed from the search path when reading is complete.

static SoSeparator *	readAll(SoInput *in)

Reads all graphs and paths from the file specified by the given SoInput. If there is only one graph in the file and its root is an SoSeparator, a pointer to the root is returned. In all other cases, this creates an SoSeparator, adds the root nodes of all graphs read as children of it, and returns a pointer to it. This returns NULL on error. This processes directory paths in the same way as the other reading routines.

static SoVRMLGroup *	readAllVRML(SoInput *in)	[TGS special]

Reads all graphs and paths from the VRML 2.0 file specified by the given SoInput. If there is only one graph in the file and its root is an SoVRMLGroup, a pointer to the root is returned. In all other cases, this creates an SoVRMLGroup, adds the root nodes to its children field, and returns a pointer to it. This returns NULL on error. This processes directory paths in the same way as the other reading routines.

static void	createRoute(SoNode *pFromNode,
const char * fromEventOut,
SoNode *pToNode,
const char* toEventIn) [TGS special]

Creates a VRML 2.0 ROUTE-TO connection. The connection is made from the pFromNode's fromEventOut eventOut to the pToNodes's toEventIn eventIn. This is equivalent to

ROUTE	pFromNode.fromEventOut
TO	pToNode.toEventIn

in a VRML 2.0 file.

static SbBool	isValidHeader(const char *testString)

This returns TRUE if the given character string is one of the valid Open Inventor file headers, (e.g. "#Inventor V2.0 binary"), or if the string has been registered as a valid header through the registerHeader method.

static SbBool	registerHeader(const SbString &headerString,
SbBool isBinary,
float ivVersion,
SoDBHeaderCB *preCB,
SoDBHeaderCB *postCB,
void *userData)

Registers the given string as a valid header for input files. The string must be 80 characters or less, and start with the comment character '#'. If the passed isBinary flag is true, any file with this header will be read as a binary file. Usually, a user-defined header represents a file format that is a superset of the Open Inventor file format. The ivVersion number indicates which Open Inventor file version this header corresponds to. The user-defined callback functions preCB and postCB are called before and after a file with this header is read. The userData is passed to both callback functions. The method returns TRUE if the header is successfully registered. Note, nothing prevents you from registering the same string multiple times.

static SbBool	getHeaderData(const SbString &headerString,
SbBool &isBinary,
float &ivVersion,
SoDBHeaderCB *&preCB,
SoDBHeaderCB *&postCB,
void *&userData,
SbBool substringOK = FALSE)

Passes back the data registered with the given header string, including the flag specifying whether the string is for a binary file, pointers to the callback functions invoked before and after reading the file, and a pointer to the user data passed to the callback functions. If the given header string does not match any of the registered headers, and the substringOK flag is TRUE, then the method will search for a registered header that is a substring of the given string. The method returns TRUE if a matching registered header, or subheader, was found.

static int	getNumHeaders()

Returns the number of valid headers, including standard Open Inventor headers, and user-registered headers.

static SbString	getHeaderString(int i)

Returns the i'th header.

static SoField *	createGlobalField(const SbName &name,
SoType type)

The database maintains a namespace for global fields, making sure that there is at most one instance of a global field with any given name in the database. This routine is used to create new global fields. If there is no global field with the given name, it will create a new global field with the given name and type. If there is already a global field with the given name and type, it will return it. If there is already a global field with the given name but a different type, this returns NULL.

All global fields must be derived from SoField; typically the result of this routine is cast into the appropriate type; for example:

SoSFInt32 *longField =

    (SoSFInt32 *) SoDB::createGlobalField("Frame",

         SoSFInt32::getClassTypeId());

static SoField *	getGlobalField(const SbName &name)

Returns the global field with the given name, or NULL if there is none. The type of the field may be checked using the SoField::isOfType(), SoField::getClassTypeId(), and SoField::getTypeId() methods.

static void	renameGlobalField(const SbName &oldName,
const SbName &newName)

Renames the global field named oldName. Renaming a global field to an empty name ("") deletes it. If there is already a global field with the new name, that field will be deleted (the getGlobalField method can be used to guard against this).

static void	setRealTimeInterval(const SbTime &deltaT)

The database automatically creates one global field when SoDB::init() is called. The realTime global field, which is of type SoSFTime, can be connected to engines and nodes for real-time animation. The database will automatically update the realTime global field 12 times per second, using a timer sensor. Typically, there will be a node sensor on the root of the scene graph which schedules a redraw whenever the scene graph changes; by updating the realTime global field periodically, scene graphs that are connected to realTime (and are therefore animating) will be redrawn. The rate at which the database updates realTime can be controlled with this routine. Passing in a zero time will disable automatic update of realTime. If there are no enabled connections from the realTime field to any other field, the sensor is automatically disabled. .p Note that the SoSceneManager class automatically updates realTime immediately after redrawing, which will result in as high a frame rate as possible if the scene is continuously animating. The SoDB::setRealTimeInterval method ensures that engines that do not continuously animate (such as SoTimeCounter) will eventually be scheduled.

static const SbTime &	getRealTimeInterval()

Returns how often the database is updating realTime.

static void	setDelaySensorTimeout(const SbTime &t)

This sets the timeout value for sensors that are delay queue sensors (one-shot sensors, data sensors). Delay queue sensors are triggered whenever there is idle time. If a long period of time elapses without any idle time (as when there are continuous events to process), these sensors may not be triggered. Setting this timeout value ensures that if the specified length of time elapses without any idle time, the delay queue sensors will be processed anyway.

static const SbTime &	getDelaySensorTimeout()

Returns the current delay queue timeout value.

static int	doSelect(int nfds,
fd_set *readfds,
fd_set *writefds,
fd_set *exceptfds,
struct timeval *userTimeOut)

In order to keep timer and idle sensors running as expected, it is necessary that an Open Inventor application not block while waiting for input. If the Open Inventor application uses the SoWin component library, this can be handled automatically. However, if the application is using its own event loop, this function is provided as a wrapper around select() that will handle Open Inventor tasks if necessary instead of blocking.

SEE ALSO

SoBase, SoNode, SoEngine, SoField, SoInput, SoFile, SoPath, SoOneShotSensor, SoDataSensor, SoWin


SoDataSensor

NAME

SoDataSensor - abstract base class for sensors attached to parts of a scene

INHERITS FROM

SoSensor > SoDelayQueueSensor > SoDataSensor

SYNOPSIS

#include <Inventor/sensors/SoDataSensor.h>

Methods from class SoDataSensor:

void	setDeleteCallback(SoSensorCB *function,
void *data)

SoNode *	getTriggerNode() const

SoField *	getTriggerField() const

SoPath *	getTriggerPath() const

void	setTriggerPathFlag(SbBool flag)

SbBool	getTriggerPathFlag() const

Methods from class SoDelayQueueSensor:

void	setPriority(uint32_t pri)

uint32_t	getPriority()

static uint32_t	getDefaultPriority()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Data sensors detect changes to scene graph objects (paths, nodes, or fields) and trigger their callback function when the object changes.

Data sensors provide a delete callback that is called just before the object the data sensor is attached to is deleted; note that the callback should not attempt to modify the object in any way, or core dumps may result.

Priority zero data sensors also provide methods that can be called in the callback function to determine exactly which node, field, or path caused the sensor to be triggered.

METHODS

void	setDeleteCallback(SoSensorCB *function,
void *data)

Sets a callback that will be called when the object the sensor is sensing is deleted.

SoNode *	getTriggerNode() const

SoField *	getTriggerField() const

If this is a priority 0 data sensor, returns the node/field that was modified that caused this sensor to trigger. Returns NULL if the sensor was not triggered because a node/field changed (for example, if schedule() is called on the sensor) or if this sensor is not a priority 0 sensor. Note that because one change to the scene graph may cause multiple nodes or fields to be modified (because of field-to-field connections), the node or field returned may not be the only one that changed.

SoPath *	getTriggerPath() const

void	setTriggerPathFlag(SbBool flag)

SbBool	getTriggerPathFlag() const

If this is a priority 0 data sensor, returns a path to the node that caused this sensor to trigger. Because recreating the path to the node that changed is relatively expensive, setTriggerPathFlag(TRUE) must be called before the sensor is scheduled. If it is not called, or if the sensor wasn't triggered because a node changed, this returns NULL. NULL is also returned if this is not a priority 0 sensor.

SEE ALSO

SoNodeSensor, SoPathSensor, SoFieldSensor, SoDelayQueueSensor


SoDebugError

NAME

SoDebugError - debug error handling

INHERITS FROM

SoError > SoDebugError

SYNOPSIS

#include <Inventor/errors/SoDebugError.h>

enum Severity	{
SoDebugError::ERROR
Error
SoDebugError::WARNING
Just a warning
SoDebugError::INFO
No error, just information
}

Methods from class SoDebugError:

static void	setHandlerCallback(SoErrorCB *cb, void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

static SoType	getClassTypeId()

SoDebugError::Severity	getSeverity() const

Methods from class SoError:

const SbString &	getDebugString() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

SoDebugError is used for all errors reported from the debugging version of the Open Inventor library. These errors are typically programmer errors, such as passing a NULL pointer or an out-of-range index. The post() method takes the name of the Open Inventor method that detected the error, to aid the programmer in debugging.

METHODS

static void	setHandlerCallback(SoErrorCB *cb,
void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

Sets/returns handler callback for SoDebugError class.

static SoType	getClassTypeId()

Returns type identifier for SoDebugError class.

SoDebugError::Severity	getSeverity() const

Returns severity of error (for use by handlers).

SEE ALSO

SoMemoryError, SoReadError


SoDecimator

NAME

SoDecimator - encapsulates an algorithm for simplifying shapes through mesh decimation

INHERITS FROM

SoSimplifier > SoDecimator

SYNOPSIS

#include <Inventor/simplifier/SoDecimator.h>

Methods from class SoSimplifier:

SoSimplifier()

~SoSimplifier()

virtual void 	beginShape(ShapeType)

virtual void 	endShape()

virtual void 	setVertex(const SbVec3f&)

void 	setNormal(const SbVec3f&)

void 	setData(int numData, const float*)

void 	setColor(const unsigned long&)

virtual SoNode* 	simplify(float ) = 0

virtual void 	clear()

virtual int 	getNumTriangles()

virtual void 	setVerbosity(SbBool v)

SbBool 	getVerbosity() const

DESCRIPTION

This class implements a mesh decimation algorithm for simplifying shapes.

Not all geometry nodes can be decimated. The following geometry nodes are decimated:

- SoFaceSet
- SoIndexedFaceSet
- SoIndexedNurbsSurface
- SoIndexedTriangleStripSet
- SoNurbsSurface
- SoTriangleStripSet
- SoVRMLIndexedFaceSet

The following geometry nodes are not decimated:

- SoAnnoText3
- SoAsciiText
- SoCone
- SoCube
- SoCylinder
- SoIndexedLineSet
- SoIndexedNurbsCurve
- SoLineSet
- SoNurbsCurve
- SoPointSet
- SoQuadMesh
- SoSphere
- SoText2
- SoText3
- SoVRMLBox
- SoVRMLCone
- SoVRMLElevationGrid
- SoVRMLExtrusion
- SoVRMLIndexedLineSet
- SoVRMLPointSet
- SoVRMLSphere
- SoVRMLText
- Any geometry under an SoLOD
- Any geometry under an SoLevelOfDetail
- Any geometry under an SoLevelOfSimplification
- Any geometry under an SoVRMLLOD

The decimator does not decimate nodes such as SoCone, that adjust their complexity automatically (based on SoComplexity and/or the viewer-requested decimation level). The decimator also does not decimate nodes such as SoVRMLElevationGrid where decimation would not preserve the type of geometry. Decimated geometry is always an indexed face set.

METHODS

SoDecimator()

~SoDecimator()

Constructor and destructor.

SEE ALSO

SoSimplifier, SoSimplifyAction, SoShapeSimplifyAction, SoGlobalSimplifyAction


SoDecomposeMatrix

NAME

SoDecomposeMatrix - decomposes transformation matrices into values for translation, rotation, and scale

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoDecomposeMatrix

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoDecomposeMatrix:

SoMFMatrix	matrix

SoMFVec3f	center

Outputs from class SoDecomposeMatrix:

(SoMFVec3f)	translation

(SoMFRotation)	rotation

(SoMFVec3f)	scaleFactor

(SoMFRotation)	scaleOrientation

Methods from class SoDecomposeMatrix:

SoDecomposeMatrix()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes as input a transformation matrix and a center of transformation. As output the engine produces the translation, rotation and scale values derived from the matrix.

The input fields can have multiple values, allowing the engine to decompose several matrices in parallel. One of the inputs may have more values than the other. In that case, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFMatrix	matrix

The 4x4 transformation matrix.

SoMFVec3f	center

The center of transformations.

OUTPUTS

(SoMFVec3f)	translation

Derived translation in x, y, and z.

(SoMFRotation)	rotation

Derived rotation.

(SoMFVec3f)	scaleFactor

Derived scale values in x, y, and z.

(SoMFRotation)	scaleOrientation

Derived rotational space for scaling.

METHODS

SoDecomposeMatrix()

Constructor

FILE FORMAT/DEFAULT

DecomposeMatrix {

matrix	1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

center	0 0 0

}

SEE ALSO

SoComposeMatrix, SoEngineOutput


SoDecomposeRotation

NAME

SoDecomposeRotation - decomposes rotation values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoDecomposeRotation

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoDecomposeRotation:

SoMFRotation	rotation

Outputs from class SoDecomposeRotation:

(SoMFVec3f)	axis

(SoMFFloat)	angle

Methods from class SoDecomposeRotation:

SoDecomposeRotation()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes as input a rotation, and decomposes it into an axis value and a rotation angle (in radians).

The input can have multiple values, allowing the engine to decompose several rotations in parallel.

INPUTS

SoMFRotation	rotation

Rotation to be decomposed.

OUTPUTS

(SoMFVec3f)	axis

Axis of rotation derived from the input.

(SoMFFloat)	angle

Angle (in radians) derived from the input.

METHODS

SoDecomposeRotation()

Constructor

FILE FORMAT/DEFAULT

DecomposeRotation {

rotation	0 0 1  0

}

SEE ALSO

SoComposeRotation, SoEngineOutput


SoDecomposeVec2f

NAME

SoDecomposeVec2f - decomposes 2D vectors into floating-point values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoDecomposeVec2f

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoDecomposeVec2f:

SoMFVec2f	vector

Outputs from class SoDecomposeVec2f:

(SoMFFloat)	x

(SoMFFloat)	y

Methods from class SoDecomposeVec2f:

SoDecomposeVec2f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes as input a 2D vector, and decomposes it into two single floating-point values.

The input can have multiple values, allowing the engine to decompose several vectors in parallel.

INPUTS

SoMFVec2f	vector

Vector to be decomposed.

OUTPUTS

(SoMFFloat)	x

First component of the vector.

(SoMFFloat)	y

Second component of the vector.

METHODS

SoDecomposeVec2f()

Constructor

FILE FORMAT/DEFAULT

DecomposeVec2f {

vector	0 0

}

SEE ALSO

SoComposeVec2f, SoEngineOutput


SoDecomposeVec3f

NAME

SoDecomposeVec3f - decomposes 3D vectors into floating-point values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoDecomposeVec3f

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoDecomposeVec3f:

SoMFVec3f	vector

Outputs from class SoDecomposeVec3f:

(SoMFFloat)	x

(SoMFFloat)	y

(SoMFFloat)	z

Methods from class SoDecomposeVec3f:

SoDecomposeVec3f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes as input a 3D vector, and decomposes it into three single floating-point values.

The input can have multiple values, allowing the engine to decompose several vectors in parallel.

INPUTS

SoMFVec3f	vector

Vector to be decomposed.

OUTPUTS

(SoMFFloat)	x

First component of the vector.

(SoMFFloat)	y

Second component of the vector.

(SoMFFloat)	z

Third component of the vector.

METHODS

SoDecomposeVec3f()

Constructor

FILE FORMAT/DEFAULT

DecomposeVec3f {

vector	0 0 0

}

SEE ALSO

SoComposeVec3f, SoEngineOutput


SoDecomposeVec4f

NAME

SoDecomposeVec4f - decomposes 4D vectors into floating-point values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoDecomposeVec4f

SYNOPSIS

#include <Inventor/engines/SoCompose.h>

Inputs from class SoDecomposeVec4f:

SoMFVec4f	vector

Outputs from class SoDecomposeVec4f:

(SoMFFloat)	x

(SoMFFloat)	y

(SoMFFloat)	z

(SoMFFloat)	w

Methods from class SoDecomposeVec4f:

SoDecomposeVec4f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes as input a 4D vector, and decomposes it into four single floating-point values.

The input can have multiple values, allowing the engine to decompose several vectors in parallel.

INPUTS

SoMFVec4f	vector

Vector to be decomposed.

OUTPUTS

(SoMFFloat)	x

First component of the vector.

(SoMFFloat)	y

Second component of the vector.

(SoMFFloat)	z

Third component of the vector.

(SoMFFloat)	w

Fourth component of the vector.

METHODS

SoDecomposeVec4f()

Constructor

FILE FORMAT/DEFAULT

DecomposeVec4f {

vector	0 0 0 0

}

SEE ALSO

SoComposeVec4f, SoEngineOutput


SoDelayQueueSensor

NAME

SoDelayQueueSensor - abstract base class for sensors not dependent on time

INHERITS FROM

SoSensor > SoDelayQueueSensor

SYNOPSIS

#include <Inventor/sensors/SoDelayQueueSensor.h>

Methods from class SoDelayQueueSensor:

void	setPriority(uint32_t pri)

uint32_t	getPriority()

static uint32_t	getDefaultPriority()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Delay queue sensors are separate from timer queue sensors (see SoTimerQueueSensor) and provide methods for setting the relative priorities of the sensors in the delay queue (sensors with higher priorities will be triggered first).

Sensors with non-zero priorities are added to the delay queue when scheduled, and are all processed once, in order, when the delay queue is processed, which normally happens as part of your program's main loop (see SoWin::mainLoop() or SoDB::doSelect()). Typically, the delay queue is processed whenever there are no events waiting to be distributed and there are no timer queue sensors waiting to be triggered. The delay queue also has a timeout to ensure that delay queue sensors are triggered even if there are always events or timer sensors waiting; see SoDB::setDelaySensorTimeout().

Sensors with priority 0 are treated specially. Priority 0 sensors are triggered almost immediately after they are scheduled, before the program returns to the main loop. Priority 0 sensors are not necessarily triggered immediately when they are scheduled, however; if they are scheduled as part of the evaluation of a field connection network they may not be triggered until the evaluation of the network is complete. Also, if a priority 0 sensor is scheduled within the callback method of another priority 0 sensor, it will not be triggered until the callback method is complete (also note that if more than one priority 0 sensor is scheduled, the order in which they fire is undefined).

METHODS

void	setPriority(uint32_t pri)

uint32_t	getPriority()

Sets/gets the priority of the sensor. Priorities can be changed at any time; if the priority is changed to zero and it is already scheduled, the sensor is immediately triggered and removed from the queue.

static uint32_t	getDefaultPriority()

Returns the default delay queue sensor priority, which is 100.

virtual void	schedule()

If this sensor's priority is non-zero, adds this sensor to the list of delay queue sensors ready to be triggered. This is a way of making a sensor fire without changing the thing it is sensing.

Calling schedule() within the callback function causes the sensor to be called repeatedly. Because sensors are processed only once every time the delay queue is processed (even if they reschedule themselves), timers and events will still be processed. This should not be done with a priority zero sensor because an infinite loop will result.

virtual void	unschedule()

If this sensor is scheduled, removes it from the delay queue so that it will not be triggered.

virtual SbBool	isScheduled()

Returns TRUE if this sensor has been scheduled and is waiting in the delay queue to be triggered. Sensors are removed from the queue before their callback function is triggered.

SEE ALSO

SoTimerQueueSensor, SoDataSensor, SoFieldSensor, SoIdleSensor, SoOneShotSensor, SoNodeSensor, SoPathSensor


SoDetail

NAME

SoDetail - base class for describing detail information about a shape node

INHERITS FROM

SoDetail

SYNOPSIS

#include <Inventor/details/SoDetail.h>

Methods from class SoDetail:

SoDetail *	copy() const

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

SoDetail is the abstract base class for all detail classes. A detail contains shape-specific information about a particular shape during picking and primitive generation. Subclasses store information based on the particular type of shape.

METHODS

SoDetail *	copy() const

Returns an instance that is a copy of this instance. The caller is responsible for deleting the copy when it is no longer needed.

static SoType	getClassTypeId()

Returns type identifier for this class.

virtual SoType	getTypeId() const

Returns the type identifier for a specific instance.

SbBool	isOfType(SoType type) const

Returns TRUE if this object is of the type specified in type or is derived from that type. Otherwise, it returns FALSE.

SEE ALSO

SoConeDetail, SoCubeDetail, SoCylinderDetail, SoDetailList, SoFaceDetail, SoLineDetail, SoNodeKitDetail, SoPickedPoint, SoPointDetail, SoPrimitiveVertex, SoTextDetail


SoDetailList

NAME

SoDetailList - maintains a list of instances of details

INHERITS FROM

SbPList > SoDetailList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoDetailList:

SoDetailList()

SoDetailList(int size)

SoDetailList(const SoDetailList &l)

~SoDetailList()

void	append(SoDetail *detail)

void	insert(SoDetail *detail,
int addBefore)

void	truncate(int start)

void	copy(const SoDetailList &l)

SoDetailList &	operator =(const SoDetailList &l)

SoDetail *	operator [](int i) const

void	set(int i,
SoDetail *detail)

Methods from class SbPList:

int	find(const void *ptr) const

void	remove(int which)

int	getLength() const

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SbPList holds lists of instances of classes derived from SoDetail.

METHODS

SoDetailList()

Constructor.

SoDetailList(int size)

Constructor that pre-allocates storage for size pointers.

SoDetailList(const SoDetailList &l)

Constructor that copies the contents of another list.

~SoDetailList()

Destructor.

void	append(SoDetail *detail)

Adds a detail to the end of the list.

void	insert(SoDetail *detail,
int addBefore)

Inserts given detail in list before detail with given index.

void	truncate(int start)

Removes all details after one with given index, inclusive. Removed detail instances are deleted.

void	copy(const SoDetailList &l)

Copies a list, making a copy of each detail instance in the list.

SoDetailList &	operator =(const SoDetailList &l)

Copies a list, making a copy of each detail instance in the list.

SoDetail *	operator [](int i) const

Accesses an element of a list.

void	set(int i,
SoDetail *detail)

Sets an element of a list, deleting the old entry first.

SEE ALSO

SoDetail


SoDirectionalLight

NAME

SoDirectionalLight - node representing a directional light source

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLight > SoDirectionalLight

SYNOPSIS

#include <Inventor/nodes/SoDirectionalLight.h>

Fields from class SoDirectionalLight:

SoSFVec3f	direction

Fields from class SoLight:

SoSFBool	on

SoSFFloat	intensity

SoSFColor	color

Methods from class SoDirectionalLight:

SoDirectionalLight()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a directional light source that illuminates along rays parallel to a given 3-dimensional vector.

FIELDS

SoSFVec3f	direction

Illumination direction vector.

METHODS

SoDirectionalLight()

Creates a directional light source node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Activates this light (if so specified) during traversal. All shape nodes that come after this light in the scene graph are illuminated by this light. The light's direction is affected by the current transformation.

FILE FORMAT/DEFAULT

DirectionalLight {

on	TRUE

intensity	1

color	1 1 1

direction	0 0 -1

}

SEE ALSO

SoPointLight, SoSpotLight


SoDirectionalLightDragger

NAME

SoDirectionalLightDragger - directional icon you rotate and translate by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoDirectionalLightDragger

SYNOPSIS

#include <Inventor/draggers/SoDirectionalLightDragger.h>

Fields from class SoDirectionalLightDragger:

SoSFRotation	rotation

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoDirectionalLightDragger:

SoDirectionalLightDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoDirectionalLightDragger is a composite dragger. It looks like a sun with a large arrow coming out of it. The arrow can be rotated about the sun by dragging with the mouse; its orientation is given by the rotation field. You can also drag the sun (and the arrow with it) through 3-space. The location is stored in the translation field.

The dragger uses an SoRotateSphericalDragger for changing the rotation. Instead of using the default spherical geometry, this dragger uses an arrow shape.

The sun is an SoDragPointDragger. Dragging it edits the translation field; conversely, if you change the translation field the sun will move to that new location, bringing the arrow with it. The sun looks and behaves just like the sun in an SoPointLightDragger, as does the material part. See the SoPointLightDragger reference page for details.

Remember: This is not a light source! It just looks like one. If you want to move a light with this dragger, you can either:

[a] Use an SoDirectionalLightManip, which is subclassed from SoLight. It creates an SoDirectionalLightDragger and uses it as the interface to change the direction of its light source (see the SoDirectionalLightManip reference page). The manipulator also edits the material part of this dragger to match the color of light the manipulator is producing. However, the directional light manipulator will ignore the translation field, because a directional light has no location or translation field. So in this case the translation dragger merely allows you to move the physical arrow to wherever you'd like it to be.

[b] Put an SoTransform under an SoTransformSeparator. Add the SoDirectionalLight as the next child. Use a field-to-field connection between the rotation fields of this dragger and the transform node to synchronize the light with this dragger.

[c] Use engines to connect the rotation field of this dragger to the direction field of an SoDirectionalLight. Use the rotation as input to an SoComposeMatrix engine. Then, use an SoTransformVec3f engine to apply that matrix to (0,0,-1), the default light direction.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoDirectionalLightDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/directionalLightDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the rotating part (an arrow by default).

SoSFVec3f	translation

Position of the origin of the directional light dragger.

METHODS

SoDirectionalLightDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
material	Material	--	yes
translatorRotInv	Rotation	--	yes
translator	DragPointDragger	--	yes
rotator	RotateSphericalDragger	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	directionalLightRotatorRotator

Part:	rotator.rotator

Appearance:	white arrow that goes through the sun

Description:	picking this begins rotation of the arrow about the sun-shape

Resource:	directionalLightRotatorRotatorActive

Part:	rotator.rotatorActive

Appearance:	yellow arrow that goes through the sun

Description:	displayed while the arrow is being rotated

Resource:	directionalLightRotatorFeedback

Part:	rotator.feedback

Appearance:	empty Separator

Description:	this disables display of the axes that a rotateSpherical dragger uses by default

Resource:	directionalLightRotatorFeedbackActive

Part:	rotator.feedbackActive

Appearance:	empty Separator

Description:	this disables display of the axes that a rotateSpherical dragger uses by default

Resource:	directionalLightOverallMaterial

Part:	material

Appearance:	white. half strength emissive, half strength diffuse

Description:	sets material for the sun shape when stationary. Resource for the moving sun, directionalLightTranslatorPlaneTranslatorActive, contains a yellow material for highlighting.

Resource:	directionalLightTranslatorPlaneTranslator

Parts:	translator.yzTranslator.translator

translator.xzTranslator.translator

translator.xyTranslator.translator

Appearance:	sun shape with no material

Description:	picking these parts initiates dragging by the yz, xz, and xy planar draggers respectively.

Resource:	directionalLightTranslatorPlaneTranslatorActive

Parts:	translator.yzTranslator.translatorActive

translator.xzTranslator.translatorActive

translator.xyTranslator.translatorActive

Appearance:	yellow sun shape

Description:	shown during planar dragging in the yz, xz, and xy planes respectively.

Resource:	directionalLightTranslatorLineTranslator

Parts:	translator.xTranslator.translator

translator.yTranslator.translator

translator.zTranslator.translator

Appearance:	white cylinder

Description:	picking these parts initiates dragging in the x, y, and z linear draggers respectively.

Resource:	directionalLightTranslatorLineTranslatorActive

Parts:	translator.xTranslator.translatorActive

translator.yTranslator.translatorActive

translator.zTranslator.translatorActive

Appearance:	yellow cylinder

Description:	shown during linear dragging in the x, y, and z directions respectively.

FILE FORMAT/DEFAULT

DirectionalLightDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

rotation	0 0 1  0

callbackList	NULL

material	<directionalLightOverallMaterial resource>

translatorRotInv	NULL

translator	DragPointDragger {

}

rotator	RotateSphericalDragger {

}

rotator.rotator	<directionalLightRotatorRotator resource>

rotator.rotatorActive	<directionalLightRotatorRotatorActive resource>

rotator.feedback	<directionalLightRotatorFeedback resource>

rotator.feedbackActive	<directionalLightRotatorFeedbackActive resource>

translator.yzTranslator.translator	<directionalLightTranslatorPlaneTranslator resource>

translator.xzTranslator.translator	<directionalLightTranslatorPlaneTranslator resource>

translator.xyTranslator.translator	<directionalLightTranslatorPlaneTranslator resource>

translator.yzTranslator.translatorActive	<directionalLightTranslatorPlaneTranslatorActive resource>

translator.xzTranslator.translatorActive	<directionalLightTranslatorPlaneTranslatorActive resource>

translator.xyTranslator.translatorActive	<directionalLightTranslatorPlaneTranslatorActive resource>

translator.xTranslator.translator	<directionalLightTranslatorLineTranslator resource>

translator.yTranslator.translator	<directionalLightTranslatorLineTranslator resource>

translator.zTranslator.translator	<directionalLightTranslatorLineTranslator resource>

translator.xTranslator.translatorActive	<directionalLightTranslatorLineTranslatorActive resource>

translator.yTranslator.translatorActive	<directionalLightTranslatorLineTranslatorActive resource>

translator.zTranslator.translatorActive	<directionalLightTranslatorLineTranslatorActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoDirectionalLightManip

NAME

SoDirectionalLightManip - directional light node with 3D interface for editing direction

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLight > SoDirectionalLight > SoDirectionalLightManip

SYNOPSIS

#include <Inventor/manips/SoDirectionalLightManip.h>

Fields from class SoDirectionalLight:

SoSFVec3f	direction

Fields from class SoLight:

SoSFBool	on

SoSFFloat	intensity

SoSFColor	color

Methods from class SoDirectionalLightManip:

SoDirectionalLightManip()

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoDirectionalLight *newOne ) const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoDirectionalLightManip is the base class for all SoDirectionalLight nodes that have a built-in 3D user interface (this is the only such class provided with the Open Inventor toolkit). Since it is derived from SoDirectionalLight, any changes to its fields result in a change of lighting for nodes that follow it in the scene graph. In this case, the interface edits the direction field. Also, the color of the manipulator's geometry will reflect the color of the light (but you cannot edit the color using this manipulator).

Typically, you will want to replace a regular SoDirectionalLight with an SoDirectionalLightManip (as when the user selects a light to be edited), or vice versa (as when the user is done moving the light and the interface should go away). Use the replaceNode() method to insert a manipulator into a scene graph, and the replaceManip() method to remove it when done.

The SoDirectionalLightManip utilizes an SoDirectionalLightDragger to provide a 3D interface. However, the manipulator differs from the dragger; it lights other objects in the scene because, as an SoDirectionalLight, it alters the state. The field values and movement of the dragger, on the other hand, affect only the dragger itself. To find out more about how the interface works and what each part will do, see the reference page for SoDirectionalLightDragger. The interfaces of the dragger and the manipulator are identical.

The SoDirectionalLightManip utilizes its dragger by adding it as a hidden child. When an action is applied to the manipulator, such as rendering or handling events, the manipulator first traverses the dragger, and then the manipulator adds its lighting parameters to the state. When you click-drag-release over the manipulator, it passes these events down to the dragger, which moves as a result ("I can't help it, I'm a dragger!").

The manipulator maintains consistency between the fields of the dragger and its own fields. Let's say you use the mouse to rotate the dragger. Callbacks ensure that the direction field of the manipulator will change by the same amount, thus changing the lighting of nodes which follow in the scene graph. Similarly, if you set the direction field of the SoDirectionalLightManip, the manipulator will orient the dragger accordingly.

Because the dragger is a hidden child, you can see the dragger on screen and interact with it, but the dragger does not show up when you write the manipulator to file. Also, any SoPath will end at the manipulator. (See the Actions section of this reference page for a complete description of when the dragger is traversed).

If you want to get a pointer to the dragger you can get it from the manipulator using the getDragger() method. You will need to do this if you want to change the geometry of a manipulator, since the geometry actually belongs to the dragger.

METHODS

SoDirectionalLightManip()

Constructor.

SoDragger *	getDragger()

Returns a pointer to the dragger being used by this manipulator. Given this pointer, you can customize the dragger just like you would any other dragger. You can change geometry using the setPart() method, or add callbacks using the methods found in the SoDragger reference page.

SbBool	replaceNode(SoPath *p )

Replaces the tail of the path with this manipulator. The tail of the path must be an SoDirectionalLight node (or subclass thereof). If the path has a nodekit, this will try to use setPart() to insert the manipulator. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the directional light node will be copied to this manipulator, and the light node will be replaced.

The manipulator will not call ref() on the node it is replacing. The old node will disappear if it has no references other than from the input path p and its parent, since this manipulator will be replacing it in both of those places. Nor will the manipulator make any changes to field connections of the old node. The calling process is thus responsible for keeping track of its own nodes and field connections.

SbBool	replaceManip(SoPath *p,
SoDirectionalLight *newOne ) const

Replaces the tail of the path, which must be this manipulator, with the given SoDirectionalLight node. If the path has a nodekit, this will try to use setPart() to insert the new node. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the manipulator will be copied to the directional light node, and the manipulator will be replaced.

The manipulator will not call ref() or unref() on the node which is replacing it, nor will it make any changes to field connections. The calling process is thus responsible for keeping track of its own nodes and field connections.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction

First, traverses the dragger the way an SoGroup would. All draggers place themselves in space, but leave the current transformation unchanged when finished. Then the SoDirectionalLightManip adds a directional light to the state just like its base class, SoDirectionalLight.

SoSearchAction

Searches just like an SoDirectionalLight. Does not search the dragger, which is a hidden child.

SoWriteAction

Writes out just like an SoDirectionalLight. Does not write the dragger, which is a hidden child. If you really need to write valuable information about the dragger, such as customized geometry, you can retrieve the dragger with the getDragger() method and then write it out separately.

FILE FORMAT/DEFAULT

DirectionalLightManip {

on	TRUE

intensity	1

color	1 1 1

direction	0 0 -1

}

SEE ALSO

SoDragger, SoDirectionalLight, SoDirectionalLightDragger, SoPointLightManip, SoSpotLightManip


SoDragPointDragger

NAME

SoDragPointDragger - object you can translate in 3D by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoDragPointDragger

SYNOPSIS

#include <Inventor/draggers/SoDragPointDragger.h>

Fields from class SoDragPointDragger:

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoDragPointDragger:

SoDragPointDragger()

void	setJumpLimit(float limit)

float	getJumpLimit() const

void	showNextDraggerSet()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoDragPointDragger is a compound dragger that translates in all three dimensions when dragged with the mouse.

It is made up of six smaller draggers, which it displays two at a time. Each pair has one plane dragger and one line dragger. The line dragger is oriented perpendicular to the plane, so together the plane/line pair lets you move through all of 3-space.

DragPoint has a total of three such pairs, oriented along the x, y, and z axes of its local space. You can cycle through the three pairs by hitting the <Control> key with the cursor over the dragger. (You need not press the mouse button.)

The line draggers are SoTranslate1Draggers and the plane draggers are SoTranslate2Draggers. So you can use the <Shift> key to constrain the motion of a plane dragger along one of the two axes within the plane, as described in the SoTranslate2Draggers reference page.

DragPoint adds extra feedback parts to provide a more intuitive idea of where you are placed in three-space. There are three feedback planes and three feedback axes; each corresponds to one of the plane or line draggers, but spans a much greater distance. When you drag along a line, that line's larger feedback axis is displayed, and remains anchored in space while the dragger slides along it. This helps establish the motion of the dragger relative to the rest of the scene. Similarly, when you drag within a plane, the larger (but transparent) feedback plane establishes a ground plane for you to move upon. The location of the dragger within the plane is pinpointed by two intersecting axes that always cross below the cursor and extend to the edges of the plane. When you move dragPoint to the edge of the feedback plane (or line), the feedback will jump to a new location in that direction, so that the dragger never leaves the feedback behind.

The primary directions of motion are given by the local space of the dragger. Transforms earlier in the scene will affect the dragger, its children, and the orientation of its directions of motion.

This node has a translation field which always reflects its position in local space. Setting the field moves the dragger to that point. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.

Although the child draggers each have their own resources defining default part geometries, the dragPoint dragger overrides these with a new set of resources. It also defines resources for the feedback parts that it adds. These are detailed in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/dragPointDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	translation

Position of the dragger.

METHODS

SoDragPointDragger()

Constructor.

void	setJumpLimit(float limit)

float	getJumpLimit() const

Set and get the point at which the feedback axes will jump to a new position. For example, if set to .1 (the default), the feedback axes will jump when the dragger gets within 10% of the end of the axis.

void	showNextDraggerSet()

The dragPoint dragger contains three pairs of draggers, each containing a plane dragger and a line dragger (see the Description above). The dragger starts with the (y-line/xz-plane) pair displayed. Calling this method will cycle next through the (z-line/xy-plane), then the (x-line/yz-plane).

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
xTranslator	Translate1Dragger	--	yes
xyTranslator	Translate2Dragger	--	yes
xzTranslator	Translate2Dragger	--	yes
zTranslator	Translate1Dragger	--	yes
yzTranslator	Translate2Dragger	--	yes
yTranslator	Translate1Dragger	--	yes
xFeedback	Separator	--	yes
yFeedback	Separator	--	yes
zFeedback	Separator	--	yes
yzFeedback	Separator	--	yes
xzFeedback	Separator	--	yes
xyFeedback	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	dragPointXTranslatorTranslator

Part:	xTranslator.translator

Appearance:	white cylinder with axis aligned in X direction

Description:	picking this initiates linear motion in X direction

Resource:	dragPointXTranslatorTranslatorActive

Part:	xTranslator.translatorActive

Appearance:	yellow cylinder with axis aligned in X direction

Description:	shown when moving in X direction

Resource:	dragPointYTranslatorTranslator

Part:	yTranslator.translator

Appearance:	white cylinder with axis aligned in Y direction

Description:	picking this initiates linear motion in Y direction

Resource:	dragPointYTranslatorTranslatorActive

Part:	yTranslator.translatorActive

Appearance:	yellow cylinder with axis aligned in Y direction

Description:	shown when moving in Y direction

Resource:	dragPointZTranslatorTranslator

Part:	zTranslator.translator

Appearance:	white cylinder with axis aligned in Z direction

Description:	picking this initiates linear motion in Z direction

Resource:	dragPointZTranslatorTranslatorActive

Part:	zTranslator.translatorActive

Appearance:	yellow cylinder with axis aligned in Z direction

Description:	shown when moving in Z direction

Resource:	dragPointYZTranslatorTranslator

Part:	yzTranslator.translator

Appearance:	white flattened cube within the yz plane of motion

Description:	picking this initiates planar motion in yz plane

Resource:	dragPointYZTranslatorTranslatorActive

Part:	yzTranslator.translatorActive

Appearance:	yellow flattened cube within the yz plane of motion

Description:	shown when moving in yz plane

Resource:	dragPointXZTranslatorTranslator

Part:	xzTranslator.translator

Appearance:	white flattened cube within the xz plane of motion

Description:	picking this initiates planar motion in xz plane

Resource:	dragPointXZTranslatorTranslatorActive

Part:	xzTranslator.translatorActive

Appearance:	yellow flattened cube within the xz plane of motion

Description:	shown when moving in xz plane

Resource:	dragPointXYTranslatorTranslator

Part:	xyTranslator.translator

Appearance:	white flattened cube within the xy plane of motion

Description:	picking this initiates planar motion in xy plane

Resource:	dragPointXYTranslatorTranslatorActive

Part:	xyTranslator.translatorActive

Appearance:	yellow flattened cube within the xy plane of motion

Description:	shown when moving in xy plane

Resource:	dragPointXFeedback

Part:	xFeedback

Appearance:	douple-headed purple arrow

Description:	feedback for motion in x direction

Resource:	dragPointYFeedback

Part:	yFeedback

Appearance:	douple-headed purple arrow

Description:	feedback for motion in y direction

Resource:	dragPointZFeedback

Part:	zFeedback

Appearance:	douple-headed purple arrow

Description:	feedback for motion in z direction

Resource:	dragPointYZFeedback

Part:	yzFeedback

Appearance:	semi-transparent green square in yz plane

Description:	feedback for motion in yz plane

Resource:	dragPointXZFeedback

Part:	xzFeedback

Appearance:	semi-transparent green square in yz plane

Description:	feedback for motion in xz plane

Resource:	dragPointXYFeedback

Part:	xyFeedback

Appearance:	semi-transparent green square in yz plane

Description:	feedback for motion in xy plane

FILE FORMAT/DEFAULT

DragPointDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

callbackList	NULL

xTranslator	Translate1Dragger {

}

xyTranslator	Translate2Dragger {

}

xzTranslator	Translate2Dragger {

}

zTranslator	Translate1Dragger {

}

yzTranslator	Translate2Dragger {

}

yTranslator	Translate1Dragger {

}

xFeedback	<dragPointXFeedback resource>

yFeedback	<dragPointYFeedback resource>

zFeedback	<dragPointZFeedback resource>

yzFeedback	<dragPointYZFeedback resource>

xzFeedback	<dragPointXZFeedback resource>

xyFeedback	<dragPointXYFeedback resource>

xTranslator.translator	<dragPointXTranslatorTranslator resource>

xTranslator.translatorActive	<dragPointXTranslatorTranslatorActive resource>

yTranslator.translator	<dragPointYTranslatorTranslator resource>

yTranslator.translatorActive	<dragPointYTranslatorTranslatorActive resource>

zTranslator.translator	<dragPointZTranslatorTranslator resource>

zTranslator.translatorActive	<dragPointZTranslatorTranslatorActive resource>

yzTranslator.translator	<dragPointYZTranslatorTranslator resource>

yzTranslator.translatorActive	<dragPointYZTranslatorTranslatorActive resource>

xzTranslator.translator	<dragPointXZTranslatorTranslator resource>

xzTranslator.translatorActive	<dragPointXZTranslatorTranslatorActive resource>

xyTranslator.translator	<dragPointXYTranslatorTranslator resource>

xyTranslator.translatorActive	<dragPointXYTranslatorTranslatorActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoDragger

NAME

SoDragger - base class for nodekits that move in response to click-drag-release mouse events

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger

SYNOPSIS

#include <Inventor/draggers/SoDragger.h>

typedef void	SoDraggerCB(void *userData,
SoDragger *dragger)

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks(SbBool newVal)

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoDragger is the base class for all nodekits you move by using the mouse to click-drag-and-release. More specifically, they are operated by a start (mouse button 1 pressed over dragger to pick it), followed by dragging (mouse motion events are interpreted by the dragger and result in some form of motion and/or change to a field), followed by finish (mouse up).

Each dragger has a different paradigm for interpreting mouse motion and changing its fields as a result. Draggers map 2D mouse motion into motion of a point on 3D lines, planes, spheres or cylinders. (See the SbProjector reference pages.) Then they react to this motion of a point through 3-space by scaling, translating, or rotating. For example, SoTranslate2Dragger maps mouse motion onto a 3D plane, then translates to follow the cursor as it moves within that plane.

Every dragger has fields that describe its current state. Scaling draggers have a scaleFactor field, rotational draggers have a rotation field, etc. All draggers have the isActive field, defined in this class. It is TRUE while the dragger is being dragged, FALSE otherwise.

Draggers that have only one part to pick and one motion field are called simple draggers. Examples are the SoRotateDiscDragger, SoScale1Dragger, and SoTranslate2Dragger.

Draggers that create assemblies out of other draggers and then orchestrate the motion of the whole assembly are call composite draggers. SoTransformBoxDragger is a composite dragger made entirely of simple draggers. SoDirectionalLightDragger contains both a simple dragger (SoRotateSphericalDragger) and a composite dragger (SoDragPointDragger) When using a composite dragger, the fields of the composite dragger are the ones you should work with. Draggers lower down in the assemblage usually have zeroed out values. For example, when you drag the face of a transformBox, an SoTranslate2Dragger, the transformBox "steals" the translation from the child dragger and transfers it up to the top of the composite dragger, where it effects all pieces of the assemblage.

Draggers always keep their fields up to date, including while they are being dragged. So you can use field-to-field connections and engines to connect dragger values to other parts of your scene graph. Hence draggers can be easily utilized as input devices for mouse-driven 3D interface elements. You can also register value-changed callbacks, which are called whenever any of the fields is changed.

Also, if you set the field of a dragger through some method other than dragging, (by calling setValue(), for example), the dragger's internal SoFieldSensor will sense this and the dragger will move to satisfy that new value.

This makes it easy to constrain draggers to keep their fields within certain limits: if the limit is exceeded, just set it back to the exceeded maximum or minimum. You can do this even as the dragger is in use, by constraining the field value within a value-changed callback that you add with addValueChangedCallback(). In this case, be sure to temporarily disable the other value-changed callbacks using enableValueChangedCallbacks(). Doing this will prevent infinite-looping; changing the value followed by calling the callbacks which change the value ad infinitum.

When you drag a dragger, the dragger only moves itself. Draggers do not change the state or affect objects that follow in the scene graph. For example a dragger does not ever behave like an SoTransform and change the current transformation matrix. Draggers are not transforms, even if they have field names like translation, rotation, scaleFactor. Many draggers, such as SoTrackballDragger, have a corresponding SoTransformManip, in this case SoTrackballManip. The manipulator is a subclass of SoTransform, and affects other objects in the scene; it uses a trackball dragger to provide its user interface. In this way, draggers are employed extensively by manipulators. Callback functions on the dragger allow its employer to be notified of start, motion, finish, and value changes. In all cases, the callback function is passed a pointer to the dragger which initiated the callback. (See the various reference pages for more details on specific draggers and manipulators).

All draggers are nodekits. However, draggers do not list their parts in the Parts section of the reference page. Instead, there is a section called Dragger Resources, more suited to describe the parts made available to the programmer. Because of space limitations, the Dragger Resources section only appears in the online versions of the reference pages. Each dragger has some parts you can pick on, and other parts that replace them when they are active or moving. These active parts are often just the same geometry in another color. Draggers also have pieces for displaying feedback. Each of these pieces has a default scene graph, as well as a special function within the dragger. Each part also has a resource name. All this information is contained in the DRAGGER RESOURCES section.

Since draggers are nodekits, you can set the parts in any instance of a dragger using setPart().

But draggers also give each part a resource name. When a dragger builds a part, it looks in the global dictionary for the node with that resourceName. By putting a new entry in the dictionary, you can override that default. The default part geometries are defined as resources for each class, and each class has a file you can change to alter the defaults. The files are listed in each dragger's reference page. You can make your program use different default resources for the parts by copying the listed file from the directory %OIVHOME%/data/draggerDefaults into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFBool	isActive

TRUE when mouse is down and dragging, else FALSE.

METHODS

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

Start callbacks are made after the mouse button 1 goes down and the dragger determines that it has been picked. If it is going to begin dragging, it grabs events and invokes the startCallbacks.

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

Motion callbacks are called after each movement of the mouse during dragging.

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

Finish callbacks are made after dragging ends and the dragger has stopped grabbing events.

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

Value-changed callbacks are made after a dragger changes any of its fields. This does not include changes to the isActive field. See also enableValueChangedCallbacks.

SbBool	enableValueChangedCallbacks(SbBool newVal)

You can temporarily disable a dragger's valueChangedCallbacks. The method returns a value that tells you if callbacks were already enabled. Use this method if you write a valueChanged callback of your own and you change one of the dragger's fields within the callback. (For example, when writing a callback to constrain your dragger). Disable first, then change the field, then re-enable the callbacks (if they were enabled to start with). All this prevents you from entering an infinite loop of changing values, calling callbacks which change values, etc.

void	setMinGesture(int pixels)

int	getMinGesture() const

Set and get the number of pixels of movement required to initiate a constraint gesture. Default is 8.

static void	setMinScale(float newMinScale)

static float	getMinScale()

The smallest scale that any dragger will write. If the user attempts to go below this amount, the dragger will set it to this minimum. Default is .001

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

Dragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

callbackList	NULL

}

SEE ALSO

SoInteractionKit, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoDrawStyle

NAME

SoDrawStyle - node that defines the style to use when rendering

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoDrawStyle

SYNOPSIS

#include <Inventor/nodes/SoDrawStyle.h>

enum Style	{
SoDrawStyle::FILLED
Draw filled regions
SoDrawStyle::LINES
Draw only outlines (wireframe)
SoDrawStyle::POINTS
Draw points at vertices
SoDrawStyle::INVISIBLE
Do not draw anything at all
}

Fields from class SoDrawStyle:

SoSFEnum	style

SoSFFloat	pointSize

SoSFFloat	lineWidth

SoSFUShort	linePattern

Methods from class SoDrawStyle:

SoDrawStyle()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the current drawing style for all subsequent shape nodes in a scene graph. SoDrawStyle specifies how primitives should be rendered. The drawing style has no effect on picking or callback primitive generation.

FIELDS

SoSFEnum	style

Drawing style.

SoSFFloat	pointSize

Radius of points (for POINTS style).

SoSFFloat	lineWidth

Width of lines (for LINES style).

SoSFUShort	linePattern

Stipple pattern for lines (for LINES style). Values can range from 0 (invisible) to 0xffff (solid). This specifies how dashed or dotted lines will be drawn.

METHODS

SoDrawStyle()

Creates a drawing style node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current drawing style.

FILE FORMAT/DEFAULT

DrawStyle {

style	FILLED

pointSize	0

lineWidth	0

linePattern	0xffff

}

SEE ALSO

SoLightModel, SoPickStyle, SoShapeHints


SoEdgeFlag

NAME

SoEdgeFlag - class to mark/unmark edges for beveling

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoEdgeFlag

SYNOPSIS

#include <Inventor/nodes/SoEdgeFlag.h>

Fields from class SoEdgeFlag:

SoMFInt32	edgeMarked

SoMFInt32	edgeUnmarked

Methods from class SoEdgeFlag:

SoEdgeFlag()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the current marked/unmarked edges for all subsequent shapes.

The marking/unmarking of the edges is specified using an int_32t array. The meaning of this array and its elements depends on the shape it is applied to.

SoIndexedFaceSet, SoVRMLIndexedFaceSet

For an SoIndexedFaceSet or SoVRMLIndexedFaceSet, each element of the array is an index in the coordIndex field. The vertex corresponding to this index is the first vertex of the edge. The other vertex of the edge is the next vertex in the face according to the order of the vertices in the SoIndexedFaceSet or SoVRMLIndexedFaceSet array. If the next element in the array is -1 (end of face), the next vertex is the first vertex of the current face (as for edge (5,3) in the example below). Otherwise, the next vertex is the next element in the array (as for edge (1,2) in the example below). The same edge can appear in two different faces, but it is not necessary to mark it in both faces; only one mark per edge is needed.

Example:

	0  1  2  3   4  5  6   7  8  9  10 11
coordIndex =	[ 0, 1, 2, -1, 3, 4, 5, -1, 2, 1, 3, -1 ]
edgeMarks =	[ 1 => edge (1, 2),
	6 => edge (5, 3) ]
SoFaceSet

For an SoFaceSet, the marking is a little different from the SoIndexedFaceSet. Each element is an index directly in the coordinate array. This corresponds to the first vertex of the edge; the other is the next vertex in the same face. As each face description in the coordinate array is cyclic, the other vertex is either the next vertex in the array, or the first vertex of the face if it is the end of the face.

Example:

coordinates =	[{0.0, 1.0, 1.0}, // 0  start face 1
	{0.0, 0.0, 1.0}, // 1
	{1.0, 0.0, 1.0}, // 2
	- - - - - - - - - - - - - - - - - - -
	{0.0, 1.0, 1.0}, // 3 start face 2
	{0.0, 0.0, 1.0}, // 4
	{1.0, 0.0, 0.0} ] // 5
numVertices =	[ 3, 3 ]
edgeMarks =	[ 1=> edge ({0.0, 0.0, 1.0}, {1.0, 0.0, 1.0}),
	5 => edge ({1.0, 0.0, 0.0}, {0.0, 1.0, 1.0}) ]
SoTriangleStripSet

For an SoTriangleStripSet, marking an edge is very different from the previous two nodes. If m is a mark, the edge corresponding is computed as follows:

- the first vertex is int(m/2),

- the opposite vertex in the edge is int(m/2) + m%2 + 1; if (m%2) = 0, this is the next vertex, otherwise this is the vertex just after, in the coordinate array.

Example:

coordinates =	[ {0.0, 1.0, 1.0}, // 0 = int(1/2)
	{0.0, 0.0, 1.0}, // 1
	{1.0, 0.0, 1.0}, // 2 = int(1/2) + 1 + (1%2)
	{1.0, 1.0, 1.0}, // 3
	{0.0, 1.0, 1.0}, // 4 = int(8/2)
	{1.0, 0.0, 0.0} ] // 5 = int(8/2) + 1 + (8%2)
edgeMarks =	[ 1=>  edge({0.0, 1.0, 1.0}, {1.0, 0.0, 1.0}),
	8 =>  edge({0.0, 1.0, 1.0}, {1.0, 0.0, 0.0}) ]
SoIndexedTriangleStripSet

An SoIndexedTriangleStripSet works like an SoTriangleStripSet, except that the coordIndex array is used instead of the coordinate array.

SoQuadMesh

For an SoQuadMesh, the principle is the same as for SoTriangleStripSet. If m is the mark, then the corresponding edge is (m/2, n) where n is:

- the vertex just at the right of the vertex m/2 if (m%2) = 0,

- the vertex just below if (m%2) = 1.

Example:

coordinates =	[ {0.0, 1.0, 1.0}, {0.0, 2.0, 2.0}, {0.0, 3.0, 3.0},
	{1.0, 0.0, 1.0}, {2.0, 0.0, 2.0}, {3.0, 0.0, 3.0},
	{0.0, 1.0, 0.0}, {0.0, 2.0, 0.0}, {0.0, 3.0, 0.0} ]
edgeMarks =	[ 1  => edge({0.0, 1.0, 1.0}, {1.0, 0.0, 1.0}),
	14 => edge({0.0, 2.0, 0.0}, {0.0, 3.0, 0.0}) ]
SoCube, SoVRMLBox

For an SoCube or an SoVRMLBox, edges are identified as shown below:

For each value between [0,11] in the flag array, the corresponding edge is marked/unmarked.

SoCone, SoVRMLCone

For an SoCone or an SoVRMLCone, only the edges of the base can be marked/unmarked. The flag array must contain at least one value greater than or equal to 0 to mark/unmark the edges of the base.

SoCylinder, SoVRMLCylinder

For an SoCylinder or an SoVRMLCylinder, only two values in the flag array are significant:

- array index 0: mark/unmark the edges around the bottom of the cylinder,

- array index 1: mark/unmark the edges around the top of the cylinder.

FIELDS

SoMFInt32	edgeMarked

SoMFInt32	edgeUnmarked

These are the fields for marked/unmarked edges.

METHODS

SoEdgeFlag()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

EdgeFlag {

edgeMarked	-1

edgeUnmarked	-1

}

SEE ALSO

SoBevelAction, SoBevelProperty, SoVertexFlag


SoElapsedTime

NAME

SoElapsedTime - basic controllable time source

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoElapsedTime

SYNOPSIS

#include <Inventor/engines/SoElapsedTime.h>

Inputs from class SoElapsedTime:

SoSFTime	timeIn

SoSFFloat	speed

SoSFBool	on

SoSFBool	pause

SoSFTrigger	reset

Outputs from class SoElapsedTime:

(SoSFTime)	timeOut

Methods from class SoElapsedTime:

SoElapsedTime()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine functions as a stopwatch; it outputs the time that has elapsed since it started running. By default, the timeIn input is connected to the realTime global field. It can, however, be connected to any other time source.

The ouput from the engine is the time that has elapsed since it started running, or since the reset input was last triggered. You can affect the speed of the output time by setting the speed scale factor. A value greater than 1.0 will speed up the output, and a value less than 1.0 will slow it down.

If you pause the engine, by setting the pause input to TRUE, it stops updating the timeOut output. When you turn off the pause, it jumps to its current position without losing time. Alternatively, if you want to stop the engine for a while, and then restart it from where it left off, use the on input field.

INPUTS

SoSFTime	timeIn

Running time.

SoSFFloat	speed

Scale factor for time.

SoSFBool	on

TRUE to start running, FALSE to stop.

SoSFBool	pause

TRUE to freeze, FALSE to continue running.

SoSFTrigger	reset

Reset the base time.

OUTPUTS

(SoSFTime)	timeOut

Time elapsed, modified by the speed factor.

METHODS

SoElapsedTime()

Constructor.

FILE FORMAT/DEFAULT

ElapsedTime {

timeIn	<current time>

speed	1

on	TRUE

pause	FALSE

reset

}

SEE ALSO

SoTimeCounter, SoOneShot, SoEngineOutput


SoEngine

NAME

SoEngine - base class for all engines

INHERITS FROM

SoBase > SoFieldContainer > SoEngine

SYNOPSIS

#include <Inventor/engines/SoEngine.h>

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoEngine is the abstract base class for all engines. Engines are objects used for animation and behavior. They are lightweight objects that are connected between nodes, the clock, and other engines to form interesting behaviorial objects (e.g., a spinning windmill).

Engines are used to animate parts of a scene and/or to constrain one part of a scene in relation to some other part of the scene. An engine receives a number of input values, performs some operation on them, and then copies the results into one or more output fields. Both the inputs and the outputs can be connected to other fields or engines in the scene graph. When an engine's output values change, those new values are sent to any fields or engines connected to them.

METHODS

static SoType	getClassTypeId()

Returns the type identifier for the SoEngine class.

virtual int	getOutputs(SoEngineOutputList &list) const

Returns a list of outputs in this engine. Use getOutputName to get the names of the outputs, and use SoEngineOutput::getConnectionType to determine their types.

SoEngineOutput *	getOutput(const SbName &outputName) const

Returns a pointer to the engine output with the given name. If no such output exists, NULL is returned.

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

Returns (in outputName) the name of the engine output (output). Returns FALSE if the engine output is not contained within the engine instance.

SoEngine *	copy() const

Creates and returns an exact copy of the engine. All connections to inputs are copied as is (without copying what's at the other end).

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Look up engine(s) by name.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoBoolOperation, SoCalculator, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoGate, SoInterpolate, SoOnOff, SoOneShot, SoSelectOne, SoTimeCounter, SoTransformVec3f, SoTriggerAny


SoEngineList

NAME

SoEngineList - maintains a list of pointers to engines

INHERITS FROM

SbPList > SoBaseList > SoEngineList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoEngineList:

SoEngineList()

SoEngineList(int size)

SoEngineList(const SoEngineList &l)

~SoEngineList()

void	append(SoEngine *engine)

SoEngine *	operator [](int i) const

SoEngineList &	operator =(const SoEngineList &l)

Methods from class SoBaseList:

void	insert(SoBase *ptr,
int addBefore)

void	remove(int which)

void	truncate(int start)

void	copy(const SoBaseList &l)

void	set(int i,
SoBase *ptr)

void	addReferences(SbBool flag)

Methods from class SbPList:

int	find(const void *ptr) const

int	getLength() const

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SoBaseList holds lists of pointers to SoEngines. It updates reference counts to engines in the list whenever adding or removing pointers.

METHODS

SoEngineList()

Constructor.

SoEngineList(int size)

Constructor that pre-allocates storage for size pointers.

SoEngineList(const SoEngineList &l)

Constructor that copies the contents of another list.

~SoEngineList()

Destructor.

void	append(SoEngine *engine)

Adds an engine to the end of the list.

SoEngine *	operator [](int i) const

Accesses an element of a list.

SoEngineList &	operator =(const SoEngineList &l)

Copies a list, keeping all reference counts correct.

SEE ALSO

SoEngine


SoEngineOutput

NAME

SoEngineOutput - class for all engine outputs

INHERITS FROM

SoEngineOutput

SYNOPSIS

#include <Inventor/engines/SoEngine.h>

Methods from class SoEngineOutput:

SoType	getConnectionType() const

int	getForwardConnections(SoFieldList &list) const

void	enable(SbBool flag)

SbBool	isEnabled() const

SoEngine*	getContainer() const

DESCRIPTION

SoEngineOuput is the class for all engine output fields. There is no public constructor routine for this class. Only the engine classes create instances of SoEngineOutput.

Each engine creates one or more engine outputs. The type of the output is documented in the engine reference pages. There is also an SoEngineOutput method for querying the connection type.

The application can at any time enable or disable the engine outputs. By default the engine outputs are enabled.

METHODS

SoType	getConnectionType() const

Returns the type of field this output can connect to.

int	getForwardConnections(SoFieldList &list) const

Returns the number of fields this output is writing to, and adds pointers to those fields to the given list.

void	enable(SbBool flag)

Enables or disables all connections from this output. If the connections are disabled, values will not be output along them. By default, outputs are enabled.

SbBool	isEnabled() const

Returns TRUE if this output is currently enabled.

SoEngine*	getContainer() const

Returns containing engine.

SEE ALSO

SoEngine


SoEngineOutputList

NAME

SoEngineOutputList - maintains a list of pointers to engine outputs

INHERITS FROM

SbPList > SoEngineOutputList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoEngineOutputList:

SoEngineOutputList()

SoEngineOutputList(int size)

SoEngineOutputList(const SoEngineOutputList &l)

~SoEngineOutputList()

void	append(SoEngineOutput *engineOutput)

void	insert(SoEngineOutput *engineOutput,
int addBefore)

void	set(int i,
SoEngineOutput *engineOutput)

SoEngineOutput *	operator [](int i) const

Methods from class SbPList:

int	find(const void *ptr) const

void	remove(int which)

int	getLength() const

void	truncate(int start)

void	copy(const SbPList &pl)

SbPList &	operator =(const SbPList &pl)

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SbPList holds lists of pointers to SoEngineOutputs. It updates reference counts to engine outputs in the list whenever adding or removing pointers.

METHODS

SoEngineOutputList()

Constructor.

SoEngineOutputList(int size)

Constructor that pre-allocates storage for size pointers.

SoEngineOutputList(const SoEngineOutputList &l)

Constructor that copies the contents of another list.

~SoEngineOutputList()

Destructor.

void	append(SoEngineOutput *engineOutput)

Adds an engine output to the end of the list.

void	insert(SoEngineOutput *engineOutput,
int addBefore)

Inserts the given engine output in the list before the element of the given index.

void	set(int i,
SoEngineOutput *engineOutput)

Sets an element of a list.

SoEngineOutput *	operator [](int i) const

Accesses an element of a list.

SEE ALSO

SoEngineOutput


SoEnvironment

NAME

SoEnvironment - global environment node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoEnvironment

SYNOPSIS

#include <Inventor/nodes/SoEnvironment.h>

enum FogType	{
SoEnvironment::NONE
No fog
SoEnvironment::HAZE
Linear increase in opacity with distance
SoEnvironment::FOG
Exponential increase in opacity
SoEnvironment::SMOKE
Exponential squared increase in opacity
}

Fields from class SoEnvironment:

SoSFFloat	ambientIntensity

SoSFColor	ambientColor

SoSFVec3f	attenuation

SoSFEnum	fogType

SoSFColor	fogColor

SoSFFloat	fogVisibility

Methods from class SoEnvironment:

SoEnvironment()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node describes global environmental attributes such as ambient lighting, light attenuation, and fog.

Ambient lighting is the amount of extra light impinging on each surface point when the lighting model is Phong (see SoLightModel).

Light attenuation affects all subsequent lights in a scene (see SoLight). It is a quadratic function of distance from a light source to a surface point. The three coefficients are specified in the attenuation field. Attenuation works only for light sources with a fixed location, such as point and spot lights.

Fog has one of four types, each of which blends each surface point with the specified fog color. Each type interprets the visibility field to be the distance at which fog totally obscures objects. A visibility value of 0 (the default) causes the SoEnvironment node to set up fog so that the visibility is the distance to the far clipping plane of the current camera.

Note that this node has effect only during rendering, and that it does not inherit field values from other SoEnvironment nodes.

FIELDS

SoSFFloat	ambientIntensity

SoSFColor	ambientColor

Intensity and RGB color of ambient lighting (for Phong lighting).

SoSFVec3f	attenuation

Squared, linear, and constant light attenuation coefficients (in that order) with respect to distance of light from surface (for Phong lighting).

SoSFEnum	fogType

SoSFColor	fogColor

SoSFFloat	fogVisibility

Type of fog, color of fog, and visibility distance, which is the distance at which fog totally obscures objects.

METHODS

SoEnvironment()

Creates an environment node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Sets the current environment parameters to those specified with this node. Successive geometries will be rendered using this environment.

FILE FORMAT/DEFAULT

Environment {

ambientIntensity	0.2

ambientColor	1 1 1

attenuation	0 0 1

fogType	NONE

fogColor	1 1 1

fogVisibility	0

}

SEE ALSO

SoLight, SoLightModel


SoError

NAME

SoError - error handling base class

INHERITS FROM

SoError

SYNOPSIS

#include <Inventor/errors/SoError.h>

typedef void	SoErrorCB(const SoError *error,
void *data)

Methods from class SoError:

static void	setHandlerCallback(SoErrorCB *cb,
void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

const SbString &	getDebugString() const

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

SoError is the base class for all error classes, which provide error handling for applications. There are two facets to errors: posting and handling. An error is posted when some bad condition occurs. Posting is done primarily by the Open Inventor library itself, but extenders can post their own errors. Posting an error creates an instance of the appropriate error class (or subclass) and then passes it to the active error handler. The default handler just prints an appropriate message to stderr. Applications can override this behavior by supplying a different handler (by specifying a callback function).

Each subclass of SoError supports the setHandlerCallback() method, which is used to set the callback function to handle errors. The callback function for a specific error class is always used in preference to that of any base classes when handling errors. The error instance passed to a callback is deleted immediately after the callback is called; an application that wishes to save information from the instance has to copy it out first.

Each error class contains a run-time class type id (SoType) that can be used to determine the type of an instance. The base class defines a character string that represents a detailed error message that is printed by the default handler. All handlers are called by the SoError::handleError() method. When debugging, you can set a breakpoint on this method to stop right before an error is handled.

METHODS

static void	setHandlerCallback(SoErrorCB *cb,
void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

Sets/returns handler callback for SoError class.

const SbString &	getDebugString() const

Returns debug string containing full error information from instance.

static SoType	getClassTypeId()

Returns type identifier for SoError class.

virtual SoType	getTypeId() const

Returns type identifier for error instance.

SbBool	isOfType(SoType type) const

Returns TRUE if instance is of given type or is derived from it.

SEE ALSO

SoDebugError, SoMemoryError, SoReadError


SoEvent

NAME

SoEvent - base class for all events

INHERITS FROM

SoEvent

SYNOPSIS

#include <Inventor/events/SoEvent.h>

Methods from class SoEvent:

SoEvent()

virtual	~SoEvent()

virtual SoType	getTypeId() const

static SoType	getClassTypeId()

SbBool	isOfType(SoType type) const

void	setTime(SbTime t)

SbTime	getTime() const

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

DESCRIPTION

SoEvent is the base class for events in the Open Inventor event model. An event typically represents a user action, such as a mouse button being pressed or a keyboard key being released. SoEvent contains general information found in all Open Inventor events, including the time the event occurred, the position of the locater when the event occurred, and the state of the modifier keys when the event occurred.

METHODS

SoEvent()

virtual	~SoEvent()

Constructor and destructor.

virtual SoType	getTypeId() const

Return the type id for this event instance.

static SoType	getClassTypeId()

Return the type id for the SoEvent class.

SbBool	isOfType(SoType type) const

This returns TRUE if the event is an instance of or derived from an event of the passed type.

void	setTime(SbTime t)

SbTime	getTime() const

Set and get the time at which the event occurred.

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

Set the window pixel location of the cursor when the event occurred. The position is relative to the lower left corner of the window in which the event occurred.

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

Get the viewport pixel location of the cursor when the event occurred, relative to the specified viewport region.

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

Get the normalized location of the cursor when the event occurred, relative to the specified viewport region. The returned value will lie between 0.0 and 1.0.

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

Set whether the modifier keys were down when the event occurred.

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

Get whether the modifier keys were down when the event occurred.

SEE ALSO

SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice, SoWinRenderArea


SoEventCallback

NAME

SoEventCallback - node which invokes callbacks for events

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoEventCallback

SYNOPSIS

#include <Inventor/nodes/SoEventCallback.h>

typedef void	SoEventCallbackCB(void *userData,
SoEventCallback *node)

Methods from class SoEventCallback:

static SoType	getClassTypeId()

SoEventCallback()

void	setPath(SoPath *path)

const SoPath *	getPath()

void	addEventCallback(SoType eventType,
SoEventCallbackCB *f,
void *userData = NULL)

void	removeEventCallback(SoType eventType,
SoEventCallbackCB *f,
void *userData = NULL)

SoHandleEventAction *	getAction() const

const SoEvent *	getEvent() const

const SoPickedPoint *	getPickedPoint() const

void	setHandled()

SbBool	isHandled() const

void	grabEvents()

void	releaseEvents()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoEventCallback will invoke application supplied callback functions during SoHandleEventAction traversal. Methods allow the application to specify which Open Inventor events should trigger callbacks, and which path must be picked, if any, for the callback invocation to occur. The application callback is able to get information about the event and the pick detail, and may grab events, release events, and set whether the event was handled.

If you register more than one callback function in an SoEventCallback node, all the callback functions will be invoked when an event occurs, even if one of the callbacks handles the event. However, if the event is handled by any of the callback functions, no other node in the scene graph will see the event.

METHODS

static SoType	getClassTypeId()

Return the type id for the SoEventCallback class.

SoEventCallback()

Constructor creates an event callback node with no event interest and a NULL path.

void	setPath(SoPath *path)

const SoPath *	getPath()

Set and get the path which must be picked in order for the callbacks to be invoked. If the path is NULL, the callbacks will be invoked for every interesting event, as specified by addEventCallback(), regardless of what is picked. The setPath() method makes its own copy of the passed path.

void	addEventCallback(SoType eventType,
SoEventCallbackCB *f,
void *userData = NULL)

void	removeEventCallback(SoType eventType,
SoEventCallbackCB *f,
void *userData = NULL)

Specifies the callback functions to be invoked for different event types. When invoked, the callback function will be passed the userData, along with a pointer to this SoEventCallback node. For example, passing SoMouseButtonEvent::getClassTypeId() means callbacks will be invoked only when a mouse button is pressed or released. Passing SoEvent::getClassTypeId() for the eventType will cause the callback to be invoked for every event which passes through this event callback node.

SoHandleEventAction *	getAction() const

Returns the SoHandleEventAction currently traversing this node, or NULL if traversal is not taking place. This should be called only from callback functions.

const SoEvent *	getEvent() const

Returns the event currently being handled, or NULL if traversal is not taking place. This should be called only from callback functions.

const SoPickedPoint *	getPickedPoint() const

Returns pick information during SoHandleEventAction traversal, or NULL if traversal is not taking place. This should be called only from callback functions.

void	setHandled()

Tells the node the event was handled. The callback function is responsible for setting whether the event was handled or not. If there is more than one callback function registered with an SoEventCallback node, all of them will be invoked, regardless of whether one has handled the event or not. This should be called only from callback functions.

SbBool	isHandled() const

Returns whether the event has been handled. This should be called only from callback functions.

void	grabEvents()

void	releaseEvents()

Tells the event callback node to grab events or release the grab. While grabbing, the node will consume all events; however, each callback function will only be invoked for events of interest.

FILE FORMAT/DEFAULT

EventCallback {

}

SEE ALSO

SoInteraction, SoSelection, SoHandleEventAction, SoDragger


SoExtSelection

NAME

SoExtSelection - selection node that supports lasso selection and selection of shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoSelection > SoExtSelection

SYNOPSIS

#include <Inventor/nodes/SoExtSelection.h>

typedef SbBool	SoExtSelectionTriangleCB (void *userData,
SoCallbackAction* action,
const SoPrimitiveVertex* v1,
const SoPrimitiveVertex* v2,
const SoPrimitiveVertex* v3)

typedef SbBool	SoExtSelectionLineSegmentCB(void *userData,
SoCallbackAction* action,
const SoPrimitiveVertex* v1,
const SoPrimitiveVertex* v2)

typedef SbBool	SoExtSelectionPointCB(void *userData,
SoCallbackAction* action,
const SoPrimitiveVertex* v1)

enum LassoType	{
SoExtSelection::NOLASSO,
SoExtSelection::LASSO,
SoExtSelection::RECTANGLE
}

enum LassoPolicy	{
SoExtSelection::FULL_BBOX,
SoExtSelection::PART_BBOX,
SoExtSelection::FULL,
SoExtSelection::PART
}

enum LassoMode	{
SoExtSelection::VISIBLE_SHAPES,
SoExtSelection::ALL_SHAPES
(Default)
}

Fields from class SoExtSelection:

SoSFEnum	lassoType

SoSFEnum	lassoPolicy

SoSFEnum	lassoMode

Fields from class SoSelection:

SoSFEnum	policy

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoExtSelection:

SoExtSelection()

void	useOverlay(SbBool flg = TRUE)

SbBool	isUsingOverlay()

SoSeparator*	getOverlaySceneGraph()

void	setOverlayLassoColorIndex(int index)

int	getOverlayLassoColorIndex()

void	setLassoColor(SbColor c)

SbColor	getLassoColor()

void	setLassoWidth(float width)

float	getLassoWidth()

void	setOverlayLassoPattern(unsigned short pattern)

unsigned short	getOverlayLassoPattern()

void	animateOverlayLasso(SbBool flg = TRUE)

SbBool	isOverlayLassoAnimated()

void	setTriangleFilterCallback(SoExtSelectionTriangleCB *cb,
void *userData = NULL)

void	setLineSegmentFilterCallback(SoExtSelectionLineSegmentCB *cb,
void *userData = NULL)

void	setPointFilterCallback(SoExtSelectionPointCB *cb,
void *userData = NULL)

Methods from class SoSelection:

static SoType	getClassTypeId()

void	select(const SoPath *path)

void	select(SoNode *node)

void	deselect(const SoPath *path)

void	deselect(int which)

void	deselect(SoNode *node)

void	toggle(const SoPath *path)

void	toggle(SoNode *node)

SbBool	isSelected(const SoPath *path) const

SbBool	isSelected(SoNode *node) const

void	deselectAll()

int	getNumSelected() const

const SoPathList *	getList() const

SoPath *	getPath(int index) const

SoPath *	operator [](int i) const

void	addSelectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	removeSelectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	addDeselectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	removeDeselectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	addStartCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	removeStartCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	addFinishCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	removeFinishCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	setPickFilterCallback(SoSelectionPickCB *f,
void *userData = NULL,SbBool callOnlyIfSelectable = TRUE)

void	select(SoNode *root,
int numCoord,
SbVec3f* lassoCoord,
const SbViewportRegion &viewport,
SbBool shiftPressed)

void	setPickMatching(SbBool pickTwice)

SbBool	getPickMatching() const

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class extends the functionality of SoSelection to allow the user to select an object or multiple objects by drawing a lasso around the object(s) to be selected. The lasso can be represented as a rectangle between the mouse up and down positions or as a set of lines that the user draws around the objects, depending on the field lassoType. Objects are selected if they are surrounded by the lasso or if the lasso intersects them, depending on the field lassoPolicy, as follows:

- FULL_BBOX: lasso selects objects whose bounding box is completely contained by the lasso

- PART_BBOX: lasso selects objects whose bounding box intersects the lasso (or is contained by the lasso)

- FULL: lasso selects objects whose geometry is completely contained by the lasso

- PART: lasso selects objects whose geometry intersects the lasso (or is contained by the lasso)

FULL and PART require more computation and are generally slower.

A lasso mode controls whether only visible shapes (front shapes) are selectable, by controlling the selection algorithm used, either geometry-based or pixel-based. A specific lasso mode may also be preferred for performance reasons depending on the scene.

Primitive details for selected parts of shapes can be obtained through dedicated callbacks that can be also used to filter the selection. These primitive filter callbacks can be called for each generated primitive.

When using SoExtSelection node, the callback set by setPickFilterCallback will be called only once per selected shape. Only SoPickedPoint::getPath() makes sense for the picked point passed to the pick filter callback in this case. Other SoPickedPoint methods may return undefined results.

Lasso selection can be also be controlled programmatically, without requiring user interaction.

NOTE: The features below which use overlay planes are supported only if the graphics board supports overlay planes.

FIELDS

SoSFEnum	lassoType

Specifies lasso type (none, lasso, or rectangle).

SoSFEnum	lassoPolicy

Specifies the lasso policy. See description above.

SoSFEnum	lassoMode

Specifies the lasso mode (whether ALL_SHAPES or only VISIBLE_SHAPES can be selected). It applies only when the lasso policy is FULL or PART. When the lasso mode is VISIBLE_SHAPES, you will only select visible shapes. That is, if a shape is within (or partially within) the lasso volume, but is hidden by another shape, it will not be selected. VISIBLE_SHAPES mode provides faster performance than ALL_SHAPES (the default).

The algorithm for the ALL_SHAPES mode is based on geometry projection while the VISIBLE_SHAPES mode uses offscreen rendering.

When using VISIBLE_SHAPES, none of the primitive selection callback nodes can be called. This means that you cannot retrieve selection details using this mode.

Unlike the ALL_SHAPES mode or the picking action, the VISIBLE_SHAPES mode does not allow you to select multiple overlapping shapes. You cannot select a shape obscured by another.

METHODS

SoExtSelection()

Constructor.

void	useOverlay(SbBool flg = TRUE)

SbBool	isUsingOverlay()

Sets/gets whether the lasso is drawn in the overlay plane.

SoSeparator*	getOverlaySceneGraph()

Returns the scene graph that should be passed to the render area function setOverlaySceneGraph. Applies only if the lasso is drawn in the overlay plane.

void	setOverlayLassoColorIndex(int index)

int	getOverlayLassoColorIndex()

Sets/gets the lasso color index. Applies only if the lasso is drawn in the overlay plane.

void	setLassoColor(SbColor c)

SbColor	getLassoColor()

Sets/gets the lasso color. Applies only if the lasso is not drawn in the overlay plane.

void	setLassoWidth(float width)

float	getLassoWidth()

Sets/gets the lasso line width.

void	setOverlayLassoPattern(unsigned short pattern)

unsigned	short getOverlayLassoPattern()

Sets/gets the lasso stipple pattern. Values can range from 0 (invisible) to 0xffff (solid). This specifies how dashed or dotted lasso lines will be drawn.

void	animateOverlayLasso(SbBool flg = TRUE)

SbBool	isOverlayLassoAnimated()

Sets/gets the the lasso animation flag. This controls whether the lasso is animated (its line pattern changes) or not.

void	setTriangleFilterCallback(SoExtSelectionTriangleCB *cb,
void *userData = NULL)

void	setLineSegmentFilterCallback(SoExtSelectionLineSegmentCB *cb,
void *userData = NULL)

void	setPointFilterCallback(SoExtSelectionPointCB *cb,
void *userData = NULL)

The primitive filter callbacks can be used to retrieve information about the selected primitives of traversed shape nodes - points, line segments, or triangles - and to filter the shape selection based on the selected primitives. These callbacks are called while traversing the scene graph shapes with an SoCallbackAction started by the SoExtSelection node. Whenever a shape primitive is surrounded by the lasso, the callback is called and receives as argument the action and the primitive. Depending on the shape type, the point, line or triangle callback will be called. See SoCallbackAction.

When a callback returns TRUE, the corresponding shape is selected according to the selection policy. Then the selection stops processing the current shape's primitives and continues with the next shape in the scene graph. When a callback returns FALSE, the action continues normally to process the remaining shape's primitives, allowing you to filter or collect additional primitives.

The primitive filter callbacks are called only when the lassoPolicy is set to SoExtSelection::PART and the lassoMode is set to SoExtSelection::ALL_SHAPES.

It is the responsibility of the application to manage the primitive selection policy. Exactly like SoSelection, the node selection list can only handle paths to nodes and cannot store primitive detail information.

void	select(SoNode *root,
int numCoord,
SbVec3f* lassoCoord,
const SbViewportRegion &viewport,
SbBool shiftPressed)

Simulates interactive selection starting from the root node with the given lasso contour, updating the selection list and triggering any associated callback. Even though the selection operation may not involve a window per se, some nodes need the viewport information to determine their size and placement. The flag shiftPressed simulates the effect of pressing the shift key while selecting, which is applicable along with the SHIFT policy.The lasso will not be drawn when using this method.

FILE FORMAT/DEFAULT

ExtSelection {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

policy	SHIFT

lassoType	NOLASSO

lassoPolicy	FULL_BBOX

lassoMode	ALL_SHAPES

}

SEE ALSO

SoRayPickAction, SoSelection, SoWinRenderArea


SoFaceDetail

NAME

SoFaceDetail - stores detail information about vertex-based shapes made of faces

INHERITS FROM

SoDetail > SoFaceDetail

SYNOPSIS

#include <Inventor/details/SoFaceDetail.h>

Methods from class SoFaceDetail:

SoFaceDetail()

virtual	~SoFaceDetail()

long	getNumPoints() const

const SoPointDetail *	getPoint(int i) const

int32_t	getFaceIndex() const

int32_t	getPartIndex() const

static SoType	getClassTypeId()

Methods from class SoDetail:

SoDetail *	copy() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a point on a face in a vertex-based shape made of faces. The information includes the number of points in the face, the points forming the vertices of the face, and the index of the face within the shape.

Note that when an SoFaceDetail is returned from picking (in an SoPickedPoint), it will contain details for all points defining the face that was intersected. However, when an SoFaceDetail is created for a triangle produced during primitive generation (in an SoPrimitiveVertex), it will contain details for only the three vertices of the triangle.

METHODS

SoFaceDetail()

virtual	~SoFaceDetail()

Constructor and destructor.

long	getNumPoints() const

Returns the number of points in the face.

const SoPointDetail *	getPoint(int i) const

Returns information about the point forming the i'th vertex of the face, represented as an SoPointDetail.

int32_t	getFaceIndex() const

Returns the index of the face within the shape.

int32_t	getPartIndex() const

Returns the index of the part containing the face within the shape.

static SoType	getClassTypeId()

Returns type identifier for this class.

SEE ALSO

SoDetail, SoPickedPoint, SoPrimitiveVertex, SoVertexShape


SoFaceSet

NAME

SoFaceSet - polygonal face shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape > SoFaceSet

SYNOPSIS

#include <Inventor/nodes/SoFaceSet.h>

Fields from class SoFaceSet:

SoMFInt32	numVertices

Fields from class SoNonIndexedShape:

SoSFInt32	startIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoFaceSet:

SoFaceSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a 3D shape formed by constructing faces (polygons) from vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited state. For optimal performance, the vertexProperty field is recommended.

SoFaceSet uses the coordinates in order, starting with the first one. Each face has a number of vertices specified by a value in the numVertices field. For example, an SoFaceSet with numVertices of [3,4,4] would use coordinates 1, 2, and 3 for the first face, coordinates 4, 5, 6, and 7 for the second face, and coordinates 8, 9, 10, and 11 for the third. For improved performance, arrange all the faces with only 3 vertices at beginning of the list, then all faces with 4 vertices, and finally all other faces.

The number of values in the numVertices field indicates the number of faces in the set.

The coordinates of the face set are transformed by the current cumulative transformation. The faces are drawn with the current light model and drawing style.

Treatment of the current material and normal binding is as follows: The PER_PART and PER_FACE bindings specify a material or normal for each face. The _INDEXED bindings are equivalent to their non-indexed counterparts. The default material binding is OVERALL. The default normal binding is PER_VERTEX.

If any normals (or materials) are specified, Open Inventor assumes you provide the correct number of them, as indicated by the binding. You will see unexpected results if you specify fewer normals (or materials) than the shape requires. If no normals are specified, they will be generated automatically.

NOTE: A face set may not render or pick correctly if any of its polygons are self-intersecting or non-planar.

FIELDS

SoMFInt32	numVertices

Number of vertices per face.

METHODS

SoFaceSet()

Creates a face set node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws faces based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks faces based on the current coordinates and transformation. Details about the intersection are returned in an SoFaceDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all vertices of the face set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle generated from each face in the set.

FILE FORMAT/DEFAULT

FaceSet {

vertexProperty	NULL

startIndex	0

numVertices	-1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoIndexedFaceSet, SoFaceDetail, SoVertexProperty


SoField

NAME

SoField - base class for all fields

INHERITS FROM

SoField

SYNOPSIS

#include <Inventor/fields/SoField.h>

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

SbBool	connectFrom(SoVRMLInterpOutput *interpOutput)

SbBool	appendConnection(SoField *field)

SbBool	appendConnection(SoEngineOutput *engineOutput)

SbBool	appendConnection(SoVRMLInterpOutput *interpOutput)

void	disconnect()

void	disconnect(SoField *field)

void	disconnect(SoEngineOutput *engineOutput)

void	disconnect(SoVRMLInterpOutput *interpOutput)

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	isConnectedFromVRMLInterp() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

SbBool	getConnectedVRMLInterp(SoVRMLInterpOutput *&interpOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

int	getNumConnections()

int	getConnections(SoFieldList &list)

SoFieldContainer *	getContainer() const

DESCRIPTION

SoField is the abstract base class for all fields. Fields are the data elements contained within nodes and are the input values for engines. Each node or engine class specifies a set of fields and associates a name with each. These names define the semantics of the field (e.g., the SoCube node contains three float fields named width, height, and depth). Field classes provide the access methods that indirectly allow editing and querying of data within nodes.

There are two abstract subclasses of SoField: SoSField is the base class for all single-valued field classes and SoMField is the base class for all multiple-valued fields, which contain dynamic arrays of values. Subclasses of SoSField have an SoSF prefix, and subclasses of SoMField have an SoMF prefix. See the reference pages for SoSField and SoMField for additional methods.

Fields are typically constructed only within node or engine instances; if you need a field that is not part of a node or engine, you can create a GlobalField; see the methods on SoDB for creating global fields.

Fields can be connected either directly to another field, or can be connected to the output of an engine. The value of a field with a connection will change when the thing it is connected to changes. For example, consider a field "A" that is connected from "B" (by A->connectFrom(B)). When B's value is changed, A's value will also change. Note that A and B may have different values, even if they are connected: if A's value is set after B's value, A's value will be different from B's until B's value is set.

A field can be connected to several other fields, but can be connected from only one source.

It is possible (and often useful) to create loops of field connections (for example, A connected from B and B connected from A). If there are loops, then the rule is that the last setValue() done overrides any connections in to that value. You can think of setting the value of a field as immediately propagating that value forward into all the fields it is connected to, with the propagation stopping at the place where the original setValue() occurred if there is a connection loop. (Actually, a more efficient mechanism than this is used, but the semantics are the same.)

If you try to connect two fields of differing types, Open Inventor will automatically try to insert a field converter engine between them to convert values from one type into the other. Open Inventor has most reasonable conversions built-in (multiple-valued field to single-valued and vice versa, anything to SoSFString, anything to SoSFTrigger, float/short/unsigned short/int32_t/uint32_t/etc numeric conversions, etc). You can add field converters using SoDB's extender method addConverter(); see the SoDB.h header file for details. You can also find out if a converter is available with the SoDB::getConverter() method.

Fields each define their own file format for reading and being written to files, but all fields follow the same conventions:

Fields in a node or engine are written as the name of the field followed by the field's value; fields are not written if they have not been modified since they were created (if they have their default value).

The ignored flag is written as a "~" character after the field's value (if the field's value is its default value, just the "~" is written).

Field connections are written as an "=" followed by the container of the field or engine output that the field is connected to, followed by a "." and the name of the field or engine output. For example:

DEF node1 Transform  translation 1 1 1

DEF node2 Scale  scaleFactor 1 1 1 = USE node1.translation

Global fields are written as part of an internal SoFieldContainer class called GlobalField, which writes out an SoSFName field named type whose value is the type of the global field, followed by a field of that type whose name is the name of the global field. For example, a global uint32_t field called "FrameCounter" whose value is 494 would be written as:

GlobalField{

type SoSFUInt32

FrameCounter 494

}

METHODS

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

Sets/gets the ignore flag for this field. When a field's ignore flag is set to TRUE, the field is not used during traversal for rendering and other actions. This flag enables you to ignore certain fields in a node and to use others. For example, to ignore the specular color in a material node so the value is inherited from the previous material. Some fields are not inherited and are thus not affected by the Ignore flag.

Examples of fields that are not inherited are the fields of shape nodes, light-source nodes, some groups, and cameras, as well as the fields in the SoEnvironment node. If you set the Ignore flag for a field whose values are not inherited, Open Inventor simply uses the field's default values.

The default value for this flag is FALSE.

SbBool	isDefault() const

Gets the state of default flag of the field. This flag will be TRUE for any field whose value is not modified after construction and will be FALSE for those that have changed (each node or engine determines what the default values for its fields are). Note: the state of this flag should not be set explicitly from within applications.

static SoType	getClassTypeId()

Return the type identifier for this field class.

virtual SoType	getTypeId() const

Return the type identifier for this field instance (SoField *).

virtual SbBool	isOfType(SoType type) const

Returns TRUE if this field is the given type or derived from that type. This is typically used with the getClassTypeId() method to determine the type of an SoField * at run-time:

SoField *field = ....;

if (field->isOfType(SoSFFloat::getClassTypeId()))

    SoSFFloat *floatField = (SoSFFloat *)field);

    floatField->setValue(4.5);

SbBool	set(const char *valueString)

Sets the field to the given value, which is an ASCII string in the Open Inventor file format. Each field subclass defines its own file format; see their reference pages for information on their file format. The string should contain only the field's value, not the field's name (e.g., "1.0", not "width 1.0"). This method returns TRUE if the string is valid, FALSE if it is not.

void	get(SbString &valueString)

Returns the value of the field in the Open Inventor file format, even if the field has its default value.

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

Return TRUE (FALSE) if this field is of the same type and has the same value as f.

void	touch()

Simulates a change to the field, causing attached sensors to fire, connected fields and engines to be marked as needing evaluation, and so forth. Calling touch() on an instance of a derived field class is equivalent to calling setValue(getValue()) using the derived class's methods, except that the field's isDefault() status remains unchanged.

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

SbBool	connectFrom(SoVRMLInterpOutput *interpOutput)

Connects this field to another field or from an engine output. If the field was connected to something before, it will be automatically disconnected (a field may have only one connection writing into it at a time). Unless connections to the field are disabled (see enableConnection()), the field's value will be set to the value of the thing it is connected to.

SbBool	appendConnection(SoField *field)

SbBool	appendConnection(SoEngineOutput *engineOutput)

SbBool	appendConnection(SoVRMLInterpOutput *interpOutput)

Appends this field to the list of connections from another field, engineOutput or interpOutput. Previous connections remain unchanged. Unless connections to the field are disabled, the field value will be set to that of the field, engineOutput or interpOutput that was last touched.

void	disconnect()

Disconnect the field from whatever it was connected to. This does nothing if the field was not connected.

void	disconnect(SoField *field)

void	disconnect(SoEngineOutput *engineOutput)

void	disconnect(SoVRMLInterpOutput *interpOutput)

Disconnect the field from the requested field, engineOutput or interpOutput. All other connections remain.

SbBool	isConnected() const

Returns TRUE if the field is connected to anything.

SbBool	isConnectedFromField() const

Returns TRUE if the field is connected to another field.

SbBool	isConnectedFromVRMLInterp() const

Returns TRUE if the field is connected to a VRML interpOutput.

SbBool	getConnectedField(SoField *&writingField) const

Returns TRUE if this field is being written into by another field, and returns the field it is connected to in writingField. Returns FALSE and does not modify writingField if it is not connected to a field.

SbBool	isConnectedFromEngine() const

Returns TRUE if the field is connected to an engine's output.

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

Returns TRUE if this field is being written into by an engine, and returns the engine output it is connected to in engineOutput. Returns FALSE and does not modify engineOutput if it is not connected to an engine.

SbBool	getConnectedVRMLInterp(SoVRMLInterpOutput *&interpOutput) const

Returns the VRMLInterpolator output field is connected to. Returns FALSE if there is no connection of the appropriate type.

void	enableConnection(SbBool flag)

Field connections may be enabled and disabled. Disabling a field's connection is almost exactly like disconnecting it; the only difference is that you can later re-enable the connection by calling enableConnection(TRUE). Note that disconnecting an engine output can cause the engine's reference count to be decremented and the engine to be deleted, but disabling the connection does not decrement its reference count.

Re-enabling a connection will cause the value of the field to be changed to the engine output or field to which it is connected.

A field's connection-enabled status is maintained even if the field is disconnected or reconnected. By default, connections are enabled.

SbBool	isConnectionEnabled() const

Returns FALSE if connections to this field are disabled. Note that this may return FALSE even if the field is not connected to anything.

int	getForwardConnections(SoFieldList &list) const

Adds pointers to all of the fields that this field is writing into (either fields in nodes, global fields or engine inputs) to the given field list, and returns the number of forward connections.

int	getNumConnections()

Returns the number of connections to this field.

int	getConnections(SoFieldList &list)

Returns a list of the connections to this field.

SoFieldContainer *	getContainer() const

Returns the object that contains this field. The type of the object will be either SoNode, SoEngine, or will be a global field container (note that the global field container class is internal to Open Inventor; see the methods for creating and accessing global fields on SoDB). For example:

SoFieldContainer *f = field->getContainer();

if (f->isOfType(SoNode::getClassTypeId())){

     ... do something ...

}else if (f->isOfType(SoEngine::getClassTypeId())){

     ... do something else ...

}else{

     ... it must be a global field.  We can figure out its name, but that is about it:

     const SbName &globalFieldName = f->getName();

}

SEE ALSO

SoSField, SoMField, SoNode, SoDB


SoFieldContainer

NAME

SoFieldContainer - abstract base class for objects that contain fields

INHERITS FROM

SoBase > SoFieldContainer

SYNOPSIS

#include <Inventor/fields/SoFieldContainer.h>

Methods from class SoFieldContainer:

static SoType	getClassTypeId()

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

virtual SoField *	getEventIn(const SbName &fieldName) const

virtual SoField *	getEventOut(const SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoFieldContainer is the abstract base class for engines and nodes. It contains methods for finding out what fields an object has, controlling notification, and for dealing with all of the fields of an object at once.

The fields of an engine are its inputs. Note that even though an engine's output corresponds to a specific type of field, an engine output is not a field.

METHODS

static SoType	getClassTypeId()

Returns the type of this class.

void	setToDefaults()

Sets all fields in this object to their default values.

SbBool	hasDefaultValues() const

Returns TRUE if all of the object's fields have their default values. This will return TRUE even if a field's isDefault() method returns FALSE - for example, if a field's default value is 0.0 and you setValue(0.0) that field, the default flag will be set to FALSE (because it would be too slow to compare the field against its default value every time setValue is called). However, hasDefaultValues() would return TRUE in this case.

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

Returns TRUE if this object's fields are exactly equal to fc's fields. If fc is not exactly same type as this object, FALSE is returned.

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

Copies the contents of fc's fields into this object's fields. fc must be the same type as this object. If copyConnections is TRUE, then if any of fc's fields are connected then this object's fields will also be connected to the same source.

SbBool	set(const char *fieldDataString)

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. TRUE is returned if the string was valid Open Inventor file format. For example, you could set the fields of an SoCube by doing:

SoCube *cube = ....

cube->set("width 1.0 height 2.0 depth 3.2");

void	get(SbString &fieldDataString)

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. Fields whose isDefault() bit is set will not be part of the string. You can use the field->get() method to get a field's value as a string even if has its default value.

virtual int	getFields(SoFieldList &resultList) const

Appends pointers to all of this object's fields to resultList, and returns the number of fields appended. The types of the fields can be determined using field->isOfType() and field->getTypeId(), and their names can be determined by passing the field pointers to the getFieldName() method (see below).

virtual SoField *	getField(const SbName &fieldName) const

Returns a pointer to the field of this object whose name is fieldName. Returns NULL if there is no field with the given name.

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

Returns the name of the given field in the fieldName argument. Returns FALSE if field is not a member of this object.

virtual SoField *	getEventIn(const SbName &fieldName) const

Returns a pointer to the eventIn with the given name. If no such eventIn exists, NULL is returned.

virtual SoField *	getEventOut(const SbName &fieldName) const

Returns a pointer to the eventOut with the given name. If no such eventOut exists, NULL is returned.

SbBool	isNotifyEnabled() const

Notification is the process of telling interested objects that this object has changed. Notification is needed to make engines and sensors function, is used to keep SoPaths up to date when the scene graph's topology changes, and is also used to invalidate rendering or bounding box caches.

Notification is normally enabled, but can be disabled on a node by node (or engine by engine) basis. If you are making extensive changes to a large part of the scene graph then disabling notification can increase performance, at the expense of increased responsibility for making sure that any interested engines, sensors or paths are kept up to date.

For example, if you will be making a lot of changes to a small part of your scene graph and you know that there are no engines or sensors attached to nodes in that part of the scene graph, you might disable notification on the nodes you are changing, modify them, re-enable notification, and then touch() one of the nodes to cause a redraw.

However, you should profile your application and make sure that notification is taking a significant amount of time before going to the trouble of manually controlling notification.

SbBool	enableNotify(SbBool flag)

Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE). The returned Boolean value indicates whether notification was enabled immediately prior to applying this method.

SEE ALSO

SoSField, SoMField, SoNode, SoDB


SoFieldList

NAME

SoFieldList - maintains a list of pointers to fields

INHERITS FROM

SbPList > SoFieldList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoFieldList:

SoFieldList()

SoFieldList(int size)

SoFieldList(const SoFieldList &l)

~SoFieldList()

void	append(SoField *ptr)

void	insert(SoField *ptr,
int addBefore)

SoField *	operator [](int i) const

void	set(int i,
SoField *field)

Methods from class SbPList:

int	find(const void *ptr) const

void	remove(int which)

int	getLength() const

void	truncate(int start)

void	copy(const SbPList &pl)

SbPList &	operator =(const SbPList &pl)

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SbPList holds lists of pointers to instances of classes derived from SoField.

METHODS

SoFieldList()

Constructor.

SoFieldList(int size)

Constructor that pre-allocates storage for size pointers.

SoFieldList(const SoFieldList &l)

Constructor that copies the contents of another list.

~SoFieldList()

Destructor.

void	append(SoField *ptr)

Adds a pointer to the end of the list.

void	insert(SoField *ptr,
int addBefore)

Inserts given pointer in list before pointer with given index.

SoField *	operator [](int i) const

Accesses an element of a list.

void	set(int i,
SoField *field)

Sets an element of a list.

SEE ALSO

SoField


SoFieldSensor

NAME

SoFieldSensor - sensor class that can be attached to Open Inventor fields

INHERITS FROM

SoSensor > SoDelayQueueSensor > SoDataSensor > SoFieldSensor

SYNOPSIS

#include <Inventor/sensors/SoFieldSensor.h>

Methods from class SoFieldSensor:

SoFieldSensor()

SoFieldSensor(SoSensorCB *func,
void *data)

~SoFieldSensor()

void	attach(SoField *field)

void	detach()

SoField *	getAttachedField() const

Methods from class SoDataSensor:

void	setDeleteCallback(SoSensorCB *function,
void *data)

SoNode *	getTriggerNode() const

SoField *	getTriggerField() const

SoPath *	getTriggerPath() const

void	setTriggerPathFlag(SbBool flag)

SbBool	getTriggerPathFlag() const

Methods from class SoDelayQueueSensor:

void	setPriority(uint32_t pri)

uint32_t	getPriority()

static uint32_t	getDefaultPriority()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Field sensors detect changes to fields, calling a callback function whenever the field changes. The field may be part of a node, an input of an engine, or a global field.

METHODS

SoFieldSensor()

SoFieldSensor(SoSensorCB *func,
void *data)

Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

~SoFieldSensor()

Destroys the sensor, freeing up any memory associated with it after unscheduling it.

void	attach(SoField *field)

void	detach()

SoField *	getAttachedField() const

The attach() method makes this sensor detect changes to the given field. The detach() method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph. The getAttachedField() method returns the field that this sensor is sensing, or NULL if it is not attached to any field.

SEE ALSO

SoNodeSensor, SoPathSensor, SoDataSensor


SoFile

NAME

SoFile - node that reads children from a named file

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoFile

SYNOPSIS

#include <Inventor/nodes/SoFile.h>

Fields from class SoFile:

SoSFString	name

Methods from class SoFile:

SoFile()

SoGroup *	copyChildren() const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a subgraph that was read from a named input file. When an SoFile node is written out, just the field containing the name of the file is written; no children are written out. When an SoFile is encountered during reading, reading continues from the named file, and all nodes read from the file are added as hidden children of the file node.

Whenever the name field changes, any existing children are removed and the contents of the new file is read in. The file node remembers what directory the last file was read from and will read the new file from the same directory after checking the standard list of directories (see SoInput), assuming the field isn't set to an absolute path name.

The children of an SoFile node are hidden; there is no way of accessing or editing them. If you wish to edit the contents of an SoFile node, you can modify the contents of the named file and then "touch" the name field (see SoField). Alternatively, you can use the copyChildren() method to get a editable copy of the file node's children. Note that this does not affect the original file on disk, however.

FIELDS

SoSFString	name

Name of file from which to read children.

METHODS

SoFile()

Creates a file node with default settings.

SoGroup *	copyChildren() const

Returns a new SoGroup containing copies of all of the file node's children.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction

Traverses its children just as SoGroup does.

SoRayPickAction

Traverses its hidden children, but, if intersections are found, generates paths that end at the SoFile node.

SoWriteAction

Writes just the name field and no children.

FILE FORMAT/DEFAULT

File {

name	"<Undefined file>"

}

SEE ALSO

SoInput, SoPath


SoFont

NAME

SoFont - node that defines font type and size for text

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoFont

SYNOPSIS

#include <Inventor/nodes/SoFont.h>

Fields from class SoFont:

SoSFName	name

SoSFFloat	size

Methods from class SoFont:

SoFont()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the current font type and point size for all subsequent text shapes in the scene graph. Depending on the font selected, text shapes may be generated as triangles (normal font) or lines (stroke font, see below).

Fonts on Win32 Systems

There is a new Win32-specific convention for the font name specified in SoFont nodes. Unix (.ie. Adobe Type1) outline fonts typically have a separate "font name" for each style of the font. TrueType outline fonts typically have a single "family name" plus a "style". Therefore Open Inventor now recognizes a font name with the form "family : style". For example:

Unix	"Times-Roman-Bold"

Win32:	"Times New Roman : Bold"

Note that TrueType font names can, and often do, contain spaces. Spaces before and after the ':' (colon) character are considered white space. The default font is the TrueType "Times New Roman" font.

Typical family names include:

Arial
Courier New
Times New Roman

Typical style names include:

Bold
Italic
Bold Italic

Other family and style names may be available on a particular system. Use the "Fonts" applet in the Windows "Control Panel" to display the available (installed) fonts. Only TrueType fonts can be used in Open Inventor. The family and style names listed above should be available on every Windows machine. Using other names may cause your program to be non-portable. If Open Inventor cannot find the specified family or style, it uses the first TrueType font in the list displayed by the Control Panel.

Note: In non-English versions of Windows, the style names shown in the Control Panel may be specific to that language. For example, in French versions of Windows, "Gras" and "Italique" appear instead of "Bold" and "Italic". Open Inventor recognizes the language-specific style names for the version of Windows currently being used. In addition,Open Inventor always recognizes the English style names. For portability we recommend using the English style names.

Fonts on Unix

Environment variable OIV_PSFONT_PATH takes a colon-separated list of directories to search for Type1 (PostScript) fonts. If OIV_PSFONT_PATH is not set, Open Inventor searches a default path which depends on the platform.

Solaris	/usr/openwin/lib/X11/fonts/Type1/outline
AIX	/usr/lib/X11/fonts/Type1/DPS
HP-UX	/usr/lib/X11/fonts/type1.st/typefaces
OSF	/usr/lib/X11/fonts/Type1Adobe
Linux	/usr/lib/X11/fonts/100dpi
Other	/usr/lib/DPS/outline/base

We recommend setting OIV_PSFONT_PATH to $OIVHOME/data/fonts:<default path described above>. For instance, for Solaris set OIV_PSFONT_PATH to

$OIVHOME/data/fonts:/usr/openwin/lib/X11/fonts/Type1/outline

Stroke Fonts

Stroke fonts, which are drawn with vectors rather than triangles, can provide higher performance, and also better readability at small sizes. Stroke fonts can be used with SoText3 and SoAnnoText3, but not with other text nodes, such as SoAsciiText. Stroke fonts cannot be extruded.

To use a stroke font, specify one of the following stroke font names:

"TGS_Simplex_TGS"
"TGS_Simplex_Roman"
"TGS_Complex_Roman"
"TGS_Duplex_Roman"
"TGS_Triplex_Roman"
"TGS_Simplex_Script"
"TGS_Complex_Script"
"TGS_Simplex_Greek"
"TGS_Complex_Greek"
"TGS_Gothic_German"
"TGS_Gothic_Italian"
"TGS_Gothic_English"
"TGS_Complex_Cyrillic"
"TGS_Upper_Case_Mathematics"
"TGS_Lower_Case_Mathematics"
"TGS_Music"
"TGS_Meteorology"
"TGS_Symbols"
"TGS_Astrology"
"TGS_Complex_Italic"
"TGS_Triplex_Italic"

The following figure shows an assortment of characters from each stroke font.

Stroked fonts are subject to the current line attributes, line width and line pattern, which are specified with SoDrawStyle.

By default, the stroke font files are found in %OIVHOME%/data/fonts. If you move them to a different directory, you must set the environment variable IV_STROKE_FONT_PATH to be the path to the new directory.

Stroke Fonts - Kanji and Katakana

Additional stroke font files are available for Kanji and Katakana output. To produce Kanji or Katakana stroke output, set the font to any one of the stroke font names. Then, for the text string, pass the desired multi-byte character string (MBCS) to Open Inventor, using the usual techniques. The font file name is not used except as a flag to indicate that stroke output should be produced.

On Win32 systems, if the current font is not one of the stroke fonts, the MBCS text string will be displayed using a Windows font.

FIELDS

SoSFName	name

This field defines the font name as a TrueType name. For example, Times Roman would be specified as "Times New Roman".

SoSFFloat	size

This field defines the font size. The value is in points for 2D text and is in the current units for 3D text.

METHODS

SoFont()

Creates a font node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Sets the font name and size in the current traversal state.

FILE FORMAT/DEFAULT

Font {

name	"defaultFont"

size	10

}

SEE ALSO

SoAnnoText3, SoText2, SoText3


SoFontStyle

NAME

SoFontStyle - simple 3D text shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoFont > SoFontStyle

SYNOPSIS

#include <Inventor/nodes/SoFontStyle.h>

enum Family	{
SoFontStyle::SERIF
Use Serif style (such as Times-Roman)
SoFontStyle::SANS
Use Sans Serif style (such as Helvetica)
SoFontStyle::TYPEWRITER
Use fixed pitch style (such as Courier)
}

enum Style	{
SoFontStyle::NONE
No modification to Family
SoFontStyle::BOLD
Embolden Family
SoFontStyle::ITALIC
Italicize or slant Family
}

Fields from class SoFontStyle:

SoSFEnum	family

SoSFBitMask	style

Fields from class SoFont:

SoSFName	name

SoSFFloat	size

Methods from class SoFontStyle:

SoFontStyle()

static SoType	getClassTypeId()

SbString	getFontName()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the current font family and style for all subsequent text shapes in the scene graph. The node was implemented to support VRML 1.0. If you are using VRML 2.0, you should use SoVRMLFontStyle rather than this node.

On Windows, the font families are mapped as follows:

SERIF	Times New Roman
SANS	Arial
TYPEWRITER	Courier New
FIELDS

SoSFEnum	family

Defines the family of font to use.

SoSFBitMask	style

Defines style modifications to the chosen font, either bold or italic or no change.

METHODS

SoFontStyle()

Creates a font style node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

SbString	getFontName()

Returns the font name used by this node based on the settings of family and style.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Sets the font family and style in the current traversal state.

FILE FORMAT/DEFAULT

FontStyle {

name	"defaultFont"

size	10

family	SERIF

style	NONE

}

SEE ALSO

SoAsciiText, SoFont, SoText2, SoText3


SoGLRenderAction

NAME

SoGLRenderAction - renders a scene graph using OpenGL

INHERITS FROM

SoAction > SoGLRenderAction

SYNOPSIS

#include <Inventor/actions/SoGLRenderAction.h>

typedef AbortCode	SoGLRenderAbortCB(void *userData)

typedef void	SoGLRenderPassCB(void *userData)

enum TransparencyType	{
SoGLRenderAction::SCREEN_DOOR
Uses stipple patterns for screen-door transparency
SoGLRenderAction::ADD
Uses additive alpha blending
SoGLRenderAction::DELAYED_ADD
Uses additive blending, rendering all transparent objects after opaque ones
SoGLRenderAction::SORTED_OBJECT_ADD
Same as DELAYED_ADD, but sorts transparent objects by distances of bounding boxes from camera
SoGLRenderAction::BLEND
Uses multiplicative alpha blending
SoGLRenderAction::DELAYED_BLEND
Uses multiplicative alpha blending, rendering all transparent objects after opaque ones
SoGLRenderAction::SORTED_OBJECT_BLEND
Same as DELAYED_BLEND, but sorts transparent objects by distances of bounding boxes from camera
}

enum AbortCode	{
SoGLRenderAction::CONTINUE
Continue traversal as usual
SoGLRenderAction::ABORT
Stop traversing the rest of the graph
SoGLRenderAction::PRUNE
Do not traverse this node or its children, but continue
SoGLRenderAction::DELAY
Delay rendering of this node until the second pass
}

Methods from class SoGLRenderAction:

SoGLRenderAction(const SbViewportRegion &viewportRegion)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setUpdateArea(const SbVec2f &origin,
const SbVec2f &size)

void	getUpdateArea(SbVec2f &origin,
SbVec2f &size) const

void	setAbortCallback(SoGLRenderAbortCB *func,
void *userData)

void	setTransparencyType(TransparencyType type)

TransparencyType	getTransparencyType() const

void	setSmoothing(SbBool smooth)

SbBool	isSmoothing() const

void	setNumPasses(int num)

int	getNumPasses() const

void	setPassUpdate(SbBool flag)

SbBool	isPassUpdate() const

void	setPassCallback(SoGLRenderPassCB *func,
void *userData)

void	setCacheContext(uint32_t context)

uint32_t	getCacheContext() const

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class traverses a scene graph and renders it using the OpenGL graphics library. It assumes that a valid window has been created and initialized for proper OpenGL rendering. The SoWinRenderArea class or any of its subclasses may be used to create such a window.

METHODS

SoGLRenderAction(const SbViewportRegion &viewportRegion)

Constructor. The parameter defines the viewport region into which rendering will take place.

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Changes/returns viewport region to use for rendering.

void	setUpdateArea(const SbVec2f &origin,
const SbVec2f &size)

void	getUpdateArea(SbVec2f &origin,
SbVec2f &size) const

Sets/returns the current update area, which is the rectangular area of the viewport region that will actually be rendered into. This can be used for partial updates in applications that can manage them. The update area is specified in normalized viewport coordinates, where (0,0) is the lower left corner of the viewport and (1,1) is the upper right corner. The area is specified or returned as an origin and a size.

void	setAbortCallback(SoGLRenderAbortCB *func,
void *userData)

Sets callback to call during rendering to test for an abort condition. It will be called for each node that is traversed. This allows applications to terminate rendering prematurely if some condition occurs. The callback function should return one of the AbortCode codes to indicate whether traversal should continue. Use of the various codes in a callback can allow applications to modify Open Inventor's default order of rendering objects in a scene graph.

void	setTransparencyType(TransparencyType type)

TransparencyType	getTransparencyType() const

Sets/returns transparency quality level to use when rendering. The default is SCREEN_DOOR. (Note that SCREEN_DOOR transparency does not work in the case where transparency values are specified for each vertex of a shape. If this is the case, use one of the other transparency types.)

void	setSmoothing(SbBool smooth)

SbBool	isSmoothing() const

Sets/returns smoothing flag. When on, smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. The default is FALSE.

void	setNumPasses(int num)

int	getNumPasses() const

Sets/returns number of rendering passes for multipass rendering. Specifying more than one pass will result in antialiasing of the rendered scene, using OpenGL's accumulation buffer. (Camera nodes typically move their viewpoints a little bit for each pass to achieve the antialiasing.) Each additional pass provides better antialiasing, but requires more rendering time The default is 1 pass.

void	setPassUpdate(SbBool flag)

SbBool	isPassUpdate() const

Sets/returns a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement (default is FALSE).

void	setPassCallback(SoGLRenderPassCB *func,
void *userData)

Sets a callback function to invoke between passes when antialiasing. Passing NULL (which is the default state) will cause a clear of the color and depth buffers to be performed.

void	setCacheContext(uint32_t context)

uint32_t	getCacheContext() const

Sets/returns the OpenGL cache context. A cache context is just an integer identifying when OpenGL display lists (which are used for render caching) can be shared between render actions; for example, see the documentation on GLX contexts for information on when OpenGL display lists can be shared between GLX windows.

SEE ALSO

SoSeparator, SoWinRenderArea


SoGate

NAME

SoGate - selectively copies its input to its output

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoGate

SYNOPSIS

#include <Inventor/engines/SoGate.h>

Inputs from class SoGate:

SoSFBool	enable

SoSFTrigger	trigger

<inputType>	input

Outputs from class SoGate:

(<outputType>)	output

Methods from class SoGate:

SoGate(SoType inputType)

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine selectively copies its input to its output. The type of the input field can be any subclass of SoMField. The type is specified when an instance of the class is created. For example, SoGate(SoMFFloat::getClassTypeId()) creates an engine that copies floating-point values.

The enable input controls continuous flow-through of values. While enable is TRUE, the input will be copied to the output. Alternatively, by touching the trigger input, you can copy a single value from the input to the output.

Note that unlike most other engine fields, input and output are pointers. Note also that by default input does not contain any values.

INPUTS

SoSFBool	enable

Enable continous flow-through.

SoSFTrigger	trigger

Copy a single value.

<inputType>	input

The value that is copied to the output when the gate is open.

OUTPUTS

(<outputType>)	output

Contains a copy of the input value if the gate is open.

METHODS

SoGate(SoType inputType)

Constructor. The argument specifies the type of the input field.

FILE FORMAT/DEFAULT

Gate {

type	<inputType>

input	[]

enable	FALSE

trigger

}

SEE ALSO

SoEngineOutput, SoConcatenate, SoSelectOne


SoGetBoundingBoxAction

NAME

SoGetBoundingBoxAction - computes bounding box of a scene

INHERITS FROM

SoAction > SoGetBoundingBoxAction

SYNOPSIS

#include <Inventor/actions/SoGetBoundingBoxAction.h>

enum ResetType	{
SoGetBoundingBoxAction::TRANSFORM
Transformation
SoGetBoundingBoxAction::BBOX
Bounding box
SoGetBoundingBoxAction::ALL
Both transform and bounding box
}

Methods from class SoGetBoundingBoxAction:

SoGetBoundingBoxAction(const SbViewportRegion &viewportRegion)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

SbBox3f	getBoundingBox() const

SbXfBox3f &	getXfBoundingBox()

const SbVec3f &	getCenter() const

void	setInCameraSpace(SbBool flag)

SbBool	isInCameraSpace() const

void	setResetPath(const SoPath *path,
SbBool resetBefore = TRUE,
ResetType what = ALL)

const SoPath *	getResetPath() const

SbBool	isResetPath() const

SbBool	isResetBefore() const

SoGetBoundingBoxAction::ResetType	getWhatReset() const

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class is used to compute a 3D bounding box enclosing objects defined by a scene graph. The box is a rectangular prism. The action also computes the center point, which is defined differently for different objects. (For example, the center of an SoFaceSet is the average of its vertices' coordinates.) For a group, the center point is defined as the average of the centers of all shapes in it.

Each bounding box is calculated as an SbXfBox3f, where the transformation matrix is defined so that the bounding box can be stored in the object space of the SoShape. When two bounding boxes are combined by a group node, the combination is performed so as to produce the smaller untransformed box. The result of the calculation by the action can be returned as an SbXfBox3f or as a world-space-aligned SbBox3f.

To calculate the bounding box of a subgraph bounded by two paths, specify the left edge of the subgraph with setResetPath(), and apply the action to the path that defines the right edge of the subgraph. The accumulated bounding box and transformation will be reset when the tail of the reset path is traversed.

If the subgraph being traversed does not contain any shapes, the returned bounding box will be empty (that is, box.isEmpty() will return TRUE).

METHODS

SoGetBoundingBoxAction(const SbViewportRegion &viewportRegion)

Constructor takes viewport region to use for picking. Even though the bounding box computation may not involve a window per se, some nodes need this information to determine their size and placement.

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Sets/returns current viewport region to use for action.

SbBox3f	getBoundingBox() const

Returns computed bounding box in world space.

SbXfBox3f &	getXfBoundingBox()

Returns computed bounding box before transformation into world space.

const SbVec3f &	getCenter() const

Returns computed center point in world space.

void	setInCameraSpace(SbBool flag)

Set this flag to TRUE if you want the returned bounding box to be in the space of whatever camera is in the graph. Camera space is defined to have the viewpoint at the origin, with the direction of view along the negative z axis. This space can be used to determine distances of objects from the camera.

SbBool	isInCameraSpace() const

Returns camera space flag.

void	setResetPath(const SoPath *path,
SbBool resetBefore = TRUE,
ResetType what = ALL)

If a non-NULL path is specified, the action will reset the computed bounding box to be empty and/or the current transformation to identity. The resetBefore flag indicates whether to perform the reset before or after the tail node of the path is traversed.

const SoPath *	getResetPath() const

Returns the current reset path, or NULL.

SbBool	isResetPath() const

Returns TRUE if the current reset path is not NULL.

SbBool	isResetBefore() const

Returns TRUE if the resetBefore flag was specified for the reset path.

SoGetBoundingBoxAction::ResetType	getWhatReset() const

Returns what flags were specified to be reset for the reset path.

SEE ALSO

SbBox3f, SbXfBox3f, SoGetMatrixAction


SoGetMatrixAction

NAME

SoGetMatrixAction - computes transformation matrix for subgraph

INHERITS FROM

SoAction > SoGetMatrixAction

SYNOPSIS

#include <Inventor/actions/SoGetMatrixAction.h>

Methods from class SoGetMatrixAction:

SoGetMatrixAction(const SbViewportRegion &newRegion)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

SbMatrix &	getMatrix()

SbMatrix &	getInverse()

SbMatrix &	getTextureMatrix()

SbMatrix &	getTextureInverse()

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action computes transformation matrices for a given subgraph. It computes the cumulative transformation matrix and its inverse, along with a cumulative texture transformation matrix and its inverse.

This action is unlike most others in that it does not traverse downwards from groups. When applied to a node, it computes the matrix for just that node. (This makes sense for transformation nodes, but not for others, really.) It is much more useful when applied to a path. When applied to a path, it gathers the transformation info for all nodes in the path and those that affect nodes in the path, but it stops when it hits the last node in the path; it does not traverse downwards from it as other actions (such as rendering) do. This behavior makes the most sense for this action.

METHODS

SoGetMatrixAction(const SbViewportRegion &newRegion)

Constructor takes viewport region to use for picking. Even though the matrix computation may not involve a window per se, some nodes need this information to determine their placement.

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Sets/returns current viewport region to use for action.

SbMatrix &	getMatrix()

SbMatrix &	getInverse()

Returns cumulative transformation matrix and its inverse. Warning: the matrices returned by these routines should not be changed (unless you are implementing your own transformation nodes).

SbMatrix &	getTextureMatrix()

SbMatrix &	getTextureInverse()

Returns cumulative texture transformation matrix and its inverse. Warning: the matrices returned by these routines should not be changed (unless you are implementing your own transformation nodes).

SEE ALSO

SoGetBoundingBoxAction


SoGetPrimitiveCountAction

NAME

SoGetPrimitiveCountAction - counts number of primitives in scene

INHERITS FROM

SoAction > SoGetPrimitiveCountAction

SYNOPSIS

#include <Inventor/actions/SoGetPrimitiveCountAction.h>

Methods from class SoGetPrimitiveCountAction:

SoGetPrimitiveCountAction()

virtual	~SoGetPrimitiveCountAction()

int32_t	getTriangleCount() const

int32_t	getLineCount() const

int32_t	getPointCount() const

int32_t	getTextCount() const

int32_t	getImageCount() const

SbBool	containsNoPrimitives()

SbBool	containsNonTriangleShapes()

void	setDecimationValue(SoDecimationTypeElement::Type type,
float percentage = 1.0)

SoDecimationTypeElement::Type	getDecimationType()

SbBool	is3DTextCountedAsTriangles()

void	setCount3DTextAsTriangles(SbBool treatAsTris)

SbBool	canApproximateCount()

void	setCanApproximate(SbBool onOff)

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class counts the number of rendering primitives a scene would use to render.  This can be used as an approximation of how long the scene would take to render. The primitives are divided into five categories: triangles, lines, points, text objects, and images.

After applying the action to a path or scene graph, the results can be obtained with the functions getTriangleCount(), getLineCount(), etc. The decimation value can be altered before applying, which is useful for finding the minimum and maximum number of primitives the scene requires (use LOWEST and HIGHEST).

3D Text, such as SoText3, SoVRMLText and SoAsciiText, can be counted as either text or triangles. The function setCount3DTextAsTriangles() will determine how these objects are counted.

Some shapes, such as trimmed NURBS surfaces, can answer quicker if they are allowed to approximate how many primitives they will use instead of calculating an exact answer. If an exact answer is not required, passing TRUE to setCanApproximate() will speed the action.

METHODS

SoGetPrimitiveCountAction()

virtual	~SoGetPrimitiveCountAction()

Constructor and destructor.

int32_t	getTriangleCount() const

int32_t	getLineCount() const

int32_t	getPointCount() const

int32_t	getTextCount() const

int32_t	getImageCount() const

Returns counted number of primitives, one function for each type.

SbBool	containsNoPrimitives()

Returns TRUE if scene contains no primitives of any kind.

SbBool	containsNonTriangleShapes()

Returns TRUE if scene contains some primitives that are not triangles.

void	setDecimationValue(SoDecimationTypeElement::Type type,
float percentage = 1.0)

SoDecimationTypeElement::Type	getDecimationType()

Sets decimation type and percentage. Percentage should be a number between 0.0 and 1.0 (1.0 is full complexity).

Type is one of :

SoDecimationTypeElement::LOWEST
Lowest complexity possible for scene.

SoDecimationTypeElement::HIGHEST
Highest complexity possible for scene.

SoDecimationTypeElement::AUTOMATIC
Scene uses decimation percentage; LODs calculate range value and then adjust them with percentage.

SoDecimationTypeElement::PERCENTAGE
Scene uses decimation percentage; LODs use child based solely on decimation without looking at camera position.

SbBool	is3DTextCountedAsTriangles()

void	setCount3DTextAsTriangles(SbBool treatAsTris)

SoText3 can be counted two ways, as a triangle-based shaped, or as a text-based shape. This determines how SoText3 should be handled. The default is TRUE (SoText3 adds to the triangle count, not the text counter).

SbBool	canApproximateCount()

void	setCanApproximate(SbBool onOff)

Some shapes may be able to guess an approximate number of triangles without actually counting. In the interests of speed, and depending on how the results are used, a flag is available to allow shapes to approximate their count. The default is FALSE.

SEE ALSO

SoAction, SoLevelOfSimplification, SoOctreeOrdering, SoRenderList, SoValueOrdering


SoGlobalSimplifyAction

NAME

SoGlobalSimplifyAction - traverses the scene graph and collects all the triangles in a single list. This list is then simplified and the result is stored in a new scene graph.

INHERITS FROM

SoAction > SoSimplifyAction > SoGlobalSimplifyAction

SYNOPSIS

#include <Inventor/actions/SoGlobalSimplifyAction.h>

Methods from class SoGlobalSimplifyAction:

SoGlobalSimplifyAction(SoSimplifier *_simplifier)

~SoGlobalSimplifyAction()

void 	setSimplificationStrategy(Strategy st)

Strategy 	getSimplificationStrategy()

SoSeparator *	getSimplifiedSceneGraph()

void	generateNormals(SbBool g)

SbBool	areNormalGenerated() const

void	setCatchAllShapesFlag(SbBool c)

SbBool 	areAllShapesCatched() const

void 	addShapeHintsNode(SbBool a)

SbBool 	isShapeHintAdded() const

Methods from class SoSimplifyAction:

void	setSimplificationLevels(int num, const float levels[])

const float *	getSimplificationLevels() const

int	getNumSimplificationLevels() const

void	setRanges(int num, const float newRanges[])

const float *	getRanges() const

int	getNumRanges() const

void	setSizeFactor(float size)

float	getSizeFactor() const

void	setInlineLOD(SbBool i)

SbBool	isInlineLOD() const

void	setUrlName(const SbString name)

const SbString 	getUrlName() const

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

void	setMinTriangles(int mt)

int	getMinTriangles() const

void	setRenderCulling(SbBool r)

int	isRenderCulling() const

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class traverses the scene graph and collects all the triangles in a single list. This list is then simplified and the result is stored in a new scene graph.

The SoGlobalSimplifyAction provides two simplification strategies:

- SIMPLIFY_GLOBALLY: all the triangles found in the scene graph are collected in a single object. Then this object is simplified.

- SIMPLIFY_BY_SUBGROUP: triangles are collected until a material change or a separator is found.

The generateNormals flag can be used to force per-vertex normal computation during an SoGlobalSimplifyAction. When not set, objects may appear faceted instead of appearing smooth. Setting the addShapeHints flag to TRUE tells Open Inventor to build normals at run-time.

By default the SoGlobalSimplifyAction collects all the triangles even if they are part of a simple shape (cube, cone, sphere, text3...). Setting the addShapeHints flag to FALSE tells the action to collect triangles only if they belong to a complex shape.

The getSimplifiedSceneGraph() method returns the root of the new scene graph after applying the SoGlobalSimplifyAction.

METHODS

SoGlobalSimplifyAction(SoSimplifier *_simplifier)

~SoGlobalSimplifyAction()

Constructor and destructor. The algorithm used for simplifying is defined by the SoSimplifier class that is passed in the constructor.

void 	setSimplificationStrategy(Strategy st)

Strategy 	getSimplificationStrategy()

Sets/gets the strategy used to determine how to group triangles into the simplified shapes. The choices are SIMPLIFY_GLOBALLY and SIMPLIFY_BY_SUBGROUP.

SoSeparator *	getSimplifiedSceneGraph()

This returns the new scene graph which contains the simplified result.

void	generateNormals(SbBool g)

SbBool	areNormalGenerated() const

If true, per-vertex normals are calculated while simplifying.

void 	addShapeHintsNode(SbBool a)

SbBool 	isShapeHintAdded() const

If true, a shapeHints node is added to force smooth normals if they were not generated, and to turn on two-sided lighting.

void	setCatchAllShapesFlag(SbBool c)

SbBool 	areAllShapesCatched() const

If true, simple shapes such as SoSphere, SoCone, etc. are faceted and simplified also. If false, then they are ignored.

SEE ALSO

SoAction, SoLevelOfSimplification, SoShapeSimplifyAction, SoSimplifyAction


SoGroup

NAME

SoGroup - base class for all group nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup

SYNOPSIS

#include <Inventor/nodes/SoGroup.h>

Methods from class SoGroup:

SoGroup()

SoGroup(int nChildren)

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the base class for all group nodes. SoGroup is a node that contains an ordered list of child nodes. The ordering of the child nodes represents the traversal order for all operations (for example, rendering, picking, and so on). This node is simply a container for the child nodes and does not alter the traversal state in any way. During traversal, state accumulated for a child is passed on to each successive child and then to the parents of the group (SoGroup does not push or pop traversal state as SoSeparator does).

METHODS

SoGroup()

Creates an empty group node.

SoGroup(int nChildren)

Constructor that takes approximate number of children. Space is allocated for pointers to the children, but the group does not contain any actual child nodes.

void	addChild(SoNode *child)

Adds a child as last one in group.

void	insertChild(SoNode *child,
int newChildIndex)

Adds a child so that it becomes the one with the given index.

SoNode *	getChild(int index) const

Returns pointer to child node with the given index.

int	findChild(const SoNode *child) const

Finds index of given child within group. Returns -1 if not found.

int	getNumChildren() const

Returns number of children.

void	removeChild(int index)

Removes child with given index from group.

void	removeChild(SoNode *child)

Removes first instance of given child from group.

void	removeAllChildren()

Removes all children from group.

void	replaceChild(int index,
SoNode *newChild)

Replaces child with given index with new child.

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Replaces first instance of given child with new child.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction

Traverses each child in order.

SoGetMatrixAction

Does nothing unless the group is in the middle of the path chain the action is being applied to. If so, the children up to and including the next node in the chain are traversed.

SoSearchAction

If searching for group nodes, compares with this group. Otherwise, continues to search children.

SoWriteAction

Writes out the group node. This method also deals with any field data associated with the group node. As a result, this method is used for most subclasses of SoGroup as well.

FILE FORMAT/DEFAULT

Group {

}

SEE ALSO

SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch


SoHandleBoxDragger

NAME

SoHandleBoxDragger - box you can scale, stretch and translate by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoHandleBoxDragger

SYNOPSIS

#include <Inventor/draggers/SoHandleBoxDragger.h>

Fields from class SoHandleBoxDragger:

SoSFVec3f	scaleFactor

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoHandleBoxDragger:

SoHandleBoxDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoHandleBoxDragger is a dragger shaped like a wireframe box with small corner cubes mounted on each corner. Click and drag any of these cubes to scale the box uniformly. Six other center cubes are centered on the sides of the box; white lines connect them to the center of the dragger. Drag one of the center cubes along its line to stretch the box in that direction. Dragging a face of the box translates the dragger within that plane.

While you drag a face of the box, purple feedback arrows display the possible directions of motion. Press the <Shift> key to constrain the motion to one of the two major directions in the plane. The constraint direction is chosen based on the next user gesture. Press the <Control> key and the dragger will translate perpendicular to that plane. The translation field is modified as the face is dragged.

By default, dragging any of the small cubes scales about the center of the object. Pressing the <Control> key changes this: A corner cube will scale about its opposite corner. A center cube will scale about the center of its opposite face. Dragging one of the small cubes will usually result in changes to both the scaleFactor and translation fields. This is because any scale about a point other than the origin has a translation element.

As with all draggers, if you change the fields the dragger will move to match the new settings.

Remember: This is not an SoTransform!. If you want to move other objects with this dragger, you can either:

[a] Use an SoHandleBoxManip, which is subclassed from SoTransform. It creates one of these draggers and uses it as the interface to change its fields. (see the SoHandleBoxManip reference page).

[b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation node.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoHandleBoxDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/handleBoxDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	scaleFactor

Scale of the dragger.

SoSFVec3f	translation

Position of the dragger.

METHODS

SoHandleBoxDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
surroundScale	SurroundScale	--	yes
translator1	Separator	--	yes
translator1Active	Separator	--	yes
translator2	Separator	--	yes
translator2Active	Separator	--	yes
translator3	Separator	--	yes
translator3Active	Separator	--	yes
translator4	Separator	--	yes
translator4Active	Separator	--	yes
translator5	Separator	--	yes
translator5Active	Separator	--	yes
translator6	Separator	--	yes
translator6Active	Separator	--	yes
extruder1	Separator	--	yes
extruder1Active	Separator	--	yes
extruder2	Separator	--	yes
extruder2Active	Separator	--	yes
extruder3	Separator	--	yes
extruder3Active	Separator	--	yes
extruder4	Separator	--	yes
extruder4Active	Separator	--	yes
extruder5	Separator	--	yes
extruder5Active	Separator	--	yes
extruder6	Separator	--	yes
extruder6Active	Separator	--	yes
uniform1	Separator	--	yes
uniform1Active	Separator	--	yes
uniform2	Separator	--	yes
uniform2Active	Separator	--	yes
uniform3	Separator	--	yes
uniform3Active	Separator	--	yes
uniform4	Separator	--	yes
uniform4Active	Separator	--	yes
uniform5	Separator	--	yes
uniform5Active	Separator	--	yes
uniform6	Separator	--	yes
uniform6Active	Separator	--	yes
uniform7	Separator	--	yes
uniform7Active	Separator	--	yes
uniform8	Separator	--	yes
uniform8Active	Separator	--	yes
arrow1	Separator	--	yes
arrow2	Separator	--	yes
arrow3	Separator	--	yes
arrow4	Separator	--	yes
arrow5	Separator	--	yes
arrow6	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	handleBoxTranslator1

Part:	translator1

Appearance:	White Line-Style Square

Description:	Top face of handleBox. Picking this initiates scaling in x-z plane.

Resource:	handleBoxTranslator2

Part:	translator2

Appearance:	White Line-Style Square

Description:	Bottom face of handleBox. Picking this initiates scaling in x-z plane.

Resource:	handleBoxTranslator3

Part:	translator3

Appearance:	White Line-Style Square

Description:	Left face of handleBox. Picking this initiates scaling in y-z plane.

Resource:	handleBoxTranslator4

Part:	translator4

Appearance:	White Line-Style Square

Description:	Right face of handleBox. Picking this initiates scaling in y-z plane.

Resource:	handleBoxTranslator5

Part:	translator5

Appearance:	White Line-Style Square

Description:	Front face of handleBox. Picking this initiates scaling in x-y plane.

Resource:	handleBoxTranslator6

Part:	translator6

Appearance:	White Line-Style Square

Description:	Back face of handleBox. Picking this initiates scaling in x-y plane.

Resource:	handleBoxTranslator1Active

Part:	translator1Active

Appearance:	Yellow version of handleBoxTranslator1

Description:	Replaces handleBoxTranslator1 during dragging.

Resource:	handleBoxTranslator2Active

Part:	translator2Active

Appearance:	Yellow version of handleBoxTranslator2

Description:	Replaces handleBoxTranslator2 during dragging.

Resource:	handleBoxTranslator3Active

Part:	translator3Active

Appearance:	Yellow version of handleBoxTranslator3

Description:	Replaces handleBoxTranslator3 during dragging.

Resource:	handleBoxTranslator4Active

Part:	translator4Active

Appearance:	Yellow version of handleBoxTranslator4

Description:	Replaces handleBoxTranslator4 during dragging.

Resource:	handleBoxTranslator5Active

Part:	translator5Active

Appearance:	Yellow version of handleBoxTranslator5

Description:	Replaces handleBoxTranslator5 during dragging.

Resource:	handleBoxTranslator6Active

Part:	translator6Active

Appearance:	Yellow version of handleBoxTranslator6

Description:	Replaces handleBoxTranslator6 during dragging.

Resource:	handleBoxExtruder1

Part:	extruder1

Appearance:	Small white cube at (0,1.25,0) with line to origin

Description:	Selecting this part initiates 1-D scaling along Y axis.

Resource:	handleBoxExtruder2

Part:	extruder2

Appearance:	Small white cube at (0,-1.25,0) with line to origin

Description:	Selecting this part initiates 1-D scaling along Y axis.

Resource:	handleBoxExtruder3

Part:	extruder3

Appearance:	Small white cube at (-1.25,0,0) with line to origin

Description:	Selecting this part initiates 1-D scaling along X axis.

Resource:	handleBoxExtruder4

Part:	extruder4

Appearance:	Small white cube at (1.25,0,0) with line to origin

Description:	Selecting this part initiates 1-D scaling along X axis.

Resource:	handleBoxExtruder5

Part:	extruder5

Appearance:	Small white cube at (0,0,1.25) with line to origin

Description:	Selecting this part initiates 1-D scaling along Z axis.

Resource:	handleBoxExtruder6

Part:	extruder6

Appearance:	Small white cube at (0,0,-1.25) with line to origin

Description:	Selecting this part initiates 1-D scaling along Z axis.

Resource:	handleBoxExtruder1Active

Part:	extruder1Active

Appearance:	Yellow version of handleBoxExtruder1

Description:	Replaces handleBoxExtruder1 during dragging.

Resource:	handleBoxExtruder2Active

Part:	extruder2Active

Appearance:	Yellow version of handleBoxExtruder1

Description:	Replaces handleBoxExtruder1 during dragging.

Resource:	handleBoxExtruder3Active

Part:	extruder3Active

Appearance:	Yellow version of handleBoxExtruder3

Description:	Replaces handleBoxExtruder3 during dragging.

Resource:	handleBoxExtruder4Active

Part:	extruder4Active

Appearance:	Yellow version of handleBoxExtruder4

Description:	Replaces handleBoxExtruder4 during dragging.

Resource:	handleBoxExtruder5Active

Part:	extruder5Active

Appearance:	Yellow version of handleBoxExtruder5

Description:	Replaces handleBoxExtruder5 during dragging.

Resource:	handleBoxExtruder6Active

Part:	extruder6Active

Appearance:	Yellow version of handleBoxExtruder6

Description:	Replaces handleBoxExtruder6 during dragging.

Resource:	handleBoxUniform1

Part:	uniform1

Appearance:	Small white cube in (+x+y+z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform2

Part:	uniform2

Appearance:	Small white cube in (+x+y-z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform3

Part:	uniform3

Appearance:	Small white cube in (+x-y+z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform4

Part:	uniform4

Appearance:	Small white cube in (+x-y-z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform5

Part:	uniform5

Appearance:	Small white cube in (-x+y+z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform6

Part:	uniform6

Appearance:	Small white cube in (-x+y-z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform7

Part:	uniform7

Appearance:	Small white cube in (-x-y+z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform8

Part:	uniform8

Appearance:	Small white cube in (-x-y-z) corner of handleBox

Description:	Picking this initiates uniform scaling.

Resource:	handleBoxUniform1Active

Part:	uniform1Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxUniform2Active

Part:	uniform2Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxUniform3Active

Part:	uniform3Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxUniform4Active

Part:	uniform4Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxUniform5Active

Part:	uniform5Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxUniform6Active

Part:	uniform6Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxUniform7Active

Part:	uniform7Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxUniform8Active

Part:	uniform8Active

Appearance:	Yellow version of handleBoxUniform1Active

Description:	Replaces handleBoxUniform1Active during dragging.

Resource:	handleBoxArrow1

Part:	arrow1

Appearance:	Purple Arrow, pointing up

Description:	Displayed when translating if Y direction is permitted.

Resource:	handleBoxArrow2

Part:	arrow2

Appearance:	Purple Arrow, pointing down

Description:	Displayed when translating if Y direction is permitted.

Resource:	handleBoxArrow3

Part:	arrow3

Appearance:	Purple Arrow, pointing left

Description:	Displayed when translating if X direction is permitted.

Resource:	handleBoxArrow4

Part:	arrow4

Appearance:	Purple Arrow, pointing right

Description:	Displayed when translating if X direction is permitted.

Resource:	handleBoxArrow5

Part:	arrow5

Appearance:	Purple Arrow, pointing forward

Description:	Displayed when translating if Z direction is permitted.

Resource:	handleBoxArrow6

Part:	arrow6

Appearance:	Purple Arrow, pointing backward

Description:	Displayed when translating if Z direction is permitted.

FILE FORMAT/DEFAULT

HandleBoxDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

scaleFactor	1 1 1

callbackList	NULL

surroundScale	NULL

translator1	<handleBoxTranslator1 resource>

translator1Active	<handleBoxTranslator1Active resource>

translator2	<handleBoxTranslator2 resource>

translator2Active	<handleBoxTranslator2Active resource>

translator3	<handleBoxTranslator3 resource>

translator3Active	<handleBoxTranslator3Active resource>

translator4	<handleBoxTranslator4 resource>

translator4Active	<handleBoxTranslator4Active resource>

translator5	<handleBoxTranslator5 resource>

translator5Active	<handleBoxTranslator5Active resource>

translator6	<handleBoxTranslator6 resource>

translator6Active	<handleBoxTranslator6Active resource>

extruder1	<handleBoxExtruder1 resource>

extruder1Active	<handleBoxExtruder1Active resource>

extruder2	<handleBoxExtruder2 resource>

extruder2Active	<handleBoxExtruder2Active resource>

extruder3	<handleBoxExtruder3 resource>

extruder3Active	<handleBoxExtruder3Active resource>

extruder4	<handleBoxExtruder4 resource>

extruder4Active	<handleBoxExtruder4Active resource>

extruder5	<handleBoxExtruder5 resource>

extruder5Active	<handleBoxExtruder5Active resource>

extruder6	<handleBoxExtruder6 resource>

extruder6Active	<handleBoxExtruder6Active resource>

uniform1	<handleBoxUniform1 resource>

uniform1Active	<handleBoxUniform1Active resource>

uniform2	<handleBoxUniform2 resource>

uniform2Active	<handleBoxUniform2Active resource>

uniform3	<handleBoxUniform3 resource>

uniform3Active	<handleBoxUniform3Active resource>

uniform4	<handleBoxUniform4 resource>

uniform4Active	<handleBoxUniform4Active resource>

uniform5	<handleBoxUniform5 resource>

uniform5Active	<handleBoxUniform5Active resource>

uniform6	<handleBoxUniform6 resource>

uniform6Active	<handleBoxUniform6Active resource>

uniform7	<handleBoxUniform7 resource>

uniform7Active	<handleBoxUniform7Active resource>

uniform8	<handleBoxUniform8 resource>

uniform8Active	<handleBoxUniform8Active resource>

arrow1	<handleBoxArrow1 resource>

arrow2	<handleBoxArrow2 resource>

arrow3	<handleBoxArrow3 resource>

arrow4	<handleBoxArrow4 resource>

arrow5	<handleBoxArrow5 resource>

arrow6	<handleBoxArrow6 resource>

}

NOTE

Unlike most multi-function draggers, SoHandleBoxDragger is not a compound dragger made up of other draggers that perform its smaller tasks. This is not because it was inappropriate, but because was written before implementation of the methods that synchronize multiple child draggers. The younger SoTransformBoxDragger has similarities to the handle box dragger, but the transform box dragger is a compound dragger.

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoHandleBoxManip

NAME

SoHandleBoxManip - transform node with 3D Interface for editing ScaleFactor and Translation

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip > SoHandleBoxManip

SYNOPSIS

#include <Inventor/manips/SoHandleBoxManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoHandleBoxManip:

SoHandleBoxManip()

static SoType	getClassTypeId()

Methods from class SoTransformManip:

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoHandleBoxManip is derived from SoTransform (by way of SoTransformManip). When its fields change, nodes following it in the scene graph rotate, scale, and/or translate.

As a subclass of SoTransformManip, this manip also has a 3D interface to edit some of its fields. In this case, the interface edits the scaleFactor and translation fields.

A manipulator differs from a dragger. When you move a dragger, no other nodes are affected. When you move an SoTransformManip, other nodes move along with it. (See the reference page for SoTransformManip).

The interface for an SoHandleBoxManip is exactly the same as that of the SoHandleBoxDragger. To find out more about the interface, see the reference page for SoHandleBoxDragger. To find out how the manipulator uses a dragger to provide its interface, see the reference page for SoTransformManip.

On screen, this manip will surround the objects influenced by its motion. This is because it turns on the surroundScale part of the dragger (See the reference page for SoSurroundScale)

METHODS

SoHandleBoxManip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

HandleBoxManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoCenterballManip, SoHandleBoxDragger, SoJackManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoTransform, SoTransformManip


SoHandleEventAction

NAME

SoHandleEventAction - allows nodes in a graph to receive input events

INHERITS FROM

SoAction > SoHandleEventAction

SYNOPSIS

#include <Inventor/actions/SoHandleEventAction.h>

Methods from class SoHandleEventAction:

SoHandleEventAction(const SbViewportRegion &viewportRegion)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setEvent(const SoEvent *ev)

const SoEvent *	getEvent() const

void	setHandled()

SbBool	isHandled() const

void	setGrabber(SoNode *node)

void	releaseGrabber()

SoNode *	getGrabber() const

void	setPickRoot(SoNode *node)

SoNode *	getPickRoot() const

void	setPickRadius(float radiusInPixels)

const SoPickedPoint *	getPickedPoint()

const SoPickedPointList &	getPickedPointList()

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class is used to allow nodes in a scene graph to handle input events. It is usually invoked from a component derived from SoWinRenderArea when the component receives a window system event.

Manipulator, dragger and selection nodes respond to and process events. Most other group nodes just pass the event to their children, while most other nodes simply ignore the action entirely. Once a node has indicated to the action that it has handled the event, traversal stops.

A node that handles an event can also grab future events. Once it has done so, all events will be sent directly to that node, with no traversal taking place, until the node releases the grab.

METHODS

SoHandleEventAction(const SbViewportRegion &viewportRegion)

Constructor takes viewport region to use; this is needed to perform a pick operation when requested.

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Sets/returns current viewport region to use for action.

void	setEvent(const SoEvent *ev)

const SoEvent *	getEvent() const

Sets/returns the event being handled.

void	setHandled()

SbBool	isHandled() const

Sets/returns whether any node has yet handled the event.

void	setGrabber(SoNode *node)

Initiates grabbing of future events. All events will be sent to the given node until the grab is released.

void	releaseGrabber()

Releases the grab.

SoNode *	getGrabber() const

Returns the node that is currently grabbing events, or NULL if there is none.

void	setPickRoot(SoNode *node)

SoNode *	getPickRoot() const

Sets/returns the root node used for initiating a pick action for those nodes that want to know what is under the cursor.

void	setPickRadius(float radiusInPixels)

Set the radius (in pixels) around the viewport-space point through which the ray passes when doing ray picking. Ray picking is performed when getPickedPoint() is called. The pick radius set here is used when testing the ray against lines and points.

const SoPickedPoint *	getPickedPoint()

Returns the frontmost object hit (as an SoPickedPoint) by performing a pick based on the mouse location specified in the event for which the action is being applied. The first time this is called for a particular event, an SoRayPickAction is applied to find this object; subsequent calls for the same event return the same information. The storage for the picked point remains valid as long as the action is not re-applied or deleted.

const SoPickedPointList &	getPickedPointList()

Returns a list of objects intersected by a picking operation, sorted from nearest to farthest.

SEE ALSO

SoEvent, SoPickedPoint, SoRayPickAction


SoIdleSensor

NAME

SoIdleSensor - sensor for one-time only callbacks when the application is idle

INHERITS FROM

SoSensor > SoDelayQueueSensor > SoIdleSensor

SYNOPSIS

#include <Inventor/sensors/SoIdleSensor.h>

Methods from class SoIdleSensor:

SoIdleSensor()

SoIdleSensor(SoSensorCB *func,
void *data)

~SoIdleSensor()

Methods from class SoDelayQueueSensor:

void	setPriority(uint32_t pri)

uint32_t	getPriority()

static uint32_t	getDefaultPriority()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

An idle sensor is almost exactly like an SoOneShotSensor, except that it is only triggered when there are no timer queue sensors waiting to be triggered and there are no events waiting to be processed; that is, idle sensors will not be triggered if the delay queue is processed because the delay queue timeout expires. If the delay queue timeout is disabled (see SoDB::setDelaySensorTimeout().), idle and one-shot sensors are exactly the same.

Note that idle sensors do not reschedule themselves. Inventor 1 idle sensors were always scheduled; call schedule() in the callback function to duplicate that behavior.

See the SoOneShotSensor manual page for more information.

METHODS

SoIdleSensor()

SoIdleSensor(SoSensorCB *func,
void *data)

Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

~SoIdleSensor()

Destroys the sensor, freeing up any memory associated with it after unscheduling it.

SEE ALSO

SoOneShotSensor, SoDelayQueueSensor


SoImage

NAME

SoImage - displays an image that always faces the camera

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoImage

SYNOPSIS

#include <Inventor/nodes/SoImage.h>

enum HorAlignment	{
SoImage::LEFT,
SoImage::CENTER,
SoImage::RIGHT
}

enum VertAlignment	{
SoImage::BOTTOM,
SoImage::HALF,
SoImage::TOP
}

Fields from class SoImage:

SoSFString	filename

SoSFImage	image

SoSFEnum	horAlignment

SoSFEnum	vertAlignment

SoSFInt32	width

SoSFInt32	height

Methods from class SoImage:

SoImage()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoImage node allows you to display an image without using the texture facilities. The image is a 2D image attached to a 3D point. It will always be parallel to the screen.

The image can be read from the file specified by the filename field. Once the image has been read, the image field contains the image data. However, this field is marked so the image is not written out when the image node is written to a file. To turn off the image, set the filename field to an empty string ("").

Images can also be specified in memory by setting the image field to contain the image data. Doing so resets the file name to the empty string.

This node can be useful for placing a logo in the scene, or for attaching an icon or marker to a 3D point. By default, the image is not scaled. If the width and/or height are specified, the image is scaled to the specified size.

FIELDS

SoSFString	filename

Names file from which to read image. The following file formats are supported: SGI RGB, GIF, JPEG, PNG, and (Windows only) BMP. If the filename is not an absolute path name, the list of directories maintained by SoInput is searched. If the texture is not found in any of those directories, then the file is searched for relative to the directory from which the SoImage node was read. For example, if an SoImage node with a filename of "../tofu.rgb" is read from /usr/people/bob/models/food.iv, then /usr/people/bob/tofu.rgb will be read (assuming tofu.rgb isn't found in the directories maintained by SoInput).

SoSFImage	image

Contains an in-memory representation of the image. It is either the contents of the file read from filename, an image read directly from an Open Inventor file, or an image set programmatically using the methods provided by SoSFImage.

SoSFEnum	horAlignment

SoSFEnum	vertAlignment

Horizontal and vertical alignment.

SoSFInt32	width

SoSFInt32	height

Width and height of image in modeling coordinates(optional).

METHODS

SoImage()

Constructor.

ACTION BEHAVIOR

SoGLRenderAction

Draws the image parallel to the screen.

SoRayPickAction

Picks the image based on the current transformation and view.

SoGetPrimitiveCountAction

Increments the number of images by 1.

FILE FORMAT/DEFAULT

Image{

filename	" "

image	0 0 0

horAlignment	LEFT

vertAlignment	BOTTOM

width	-1

height	-1

}

SEE ALSO

SoMarkerSet, SoTexture2


SoIndexedFaceSet

NAME

SoIndexedFaceSet - indexed polygonal face shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoIndexedShape > SoIndexedFaceSet

SYNOPSIS

#include <Inventor/nodes/SoIndexedFaceSet.h>

Fields from class SoIndexedShape:

SoMFInt32	coordIndex

SoMFInt32	materialIndex

SoMFInt32	normalIndex

SoMFInt32	textureCoordIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoIndexedFaceSet:

SoIndexedFaceSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a 3D shape formed by constructing faces (polygons) from vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited state. For optimal performance, the vertexProperty field is recommended.

SoIndexedFaceSet uses the indices in the coordIndex field (from SoIndexedShape) to specify the polygonal faces. An index of SO_END_FACE_INDEX (-1) indicates that the current face has ended and the next one begins. For improved performance, arrange all the faces with only 3 vertices at beginning of the list, then all faces with 4 vertices, and finally all other faces.

The vertices of the faces are transformed by the current transformation matrix. The faces are drawn with the current light model and drawing style.

Treatment of the current material and normal binding is as follows: The PER_PART and PER_FACE bindings specify a material or normal for each face. PER_VERTEX specifies a material or normal for each vertex. The corresponding _INDEXED bindings are the same, but use the materialIndex or normalIndex indices (see SoIndexedShape). The default material binding is OVERALL. The default normal binding is PER_VERTEX_INDEXED.

If any normals (or materials) are specified, Open Inventor assumes you provide the correct number of them, as indicated by the binding. You will see unexpected results if you specify fewer normals (or materials) than the shape requires. If no normals are specified, they will be generated automatically.

Textures are applied as described for the SoIndexedShape class.

NOTE: An indexed face set may not render or pick correctly if any of its polygons are self-intersecting or non-planar.

METHODS

SoIndexedFaceSet()

Creates an indexed face set node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws faces based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks faces based on the current coordinates and transformation. Details about the intersection are returned in an SoFaceDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all vertices of the face set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle generated from each face in the set.

FILE FORMAT/DEFAULT

IndexedFaceSet {

vertexProperty	NULL

coordIndex	0

materialIndex	-1

normalIndex	-1

textureCoordIndex	-1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoFaceDetail, SoFaceSet, SoVertexProperty


SoIndexedLineSet

NAME

SoIndexedLineSet - indexed polyline shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoIndexedShape > SoIndexedLineSet

SYNOPSIS

#include <Inventor/nodes/SoIndexedLineSet.h>

Fields from class SoIndexedShape:

SoMFInt32	coordIndex

SoMFInt32	materialIndex

SoMFInt32	normalIndex

SoMFInt32	textureCoordIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoIndexedLineSet:

SoIndexedLineSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a 3D shape formed by constructing polylines from vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.

SoIndexedLineSet uses the indices in the coordIndex field (from SoIndexedShape) to specify the polylines. An index of SO_END_LINE_INDEX (-1) indicates that the current polyline has ended and the next one begins.

The coordinates of the line set are transformed by the current cumulative transformation. The lines are drawn with the current light model and drawing style (drawing style FILLED is treated as LINES).

Treatment of the current material and normal binding is as follows: The PER_PART binding specifies a material or normal for each segment of the line. The PER_FACE binding specifies a material or normal for each polyline. PER_VERTEX specifies a material or normal for each vertex. The corresponding _INDEXED bindings are the same, but use the materialIndex or normalIndex indices (see SoIndexedShape). The default material binding is OVERALL. The default normal binding is PER_VERTEX_INDEXED

The current complexity value has no effect on the rendering of indexed line sets.

METHODS

SoIndexedLineSet()

Creates an indexed line set node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws lines based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks lines based on the current coordinates and transformation. Details about the intersection are returned in an SoLineDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all vertices of the line set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.

SoCallbackAction

If any line segment callbacks are registered with the action, they will be invoked for each successive segment in the line set.

FILE FORMAT/DEFAULT

IndexedLineSet {

vertexProperty	NULL

coordIndex	0

materialIndex	-1

normalIndex	-1

textureCoordIndex	-1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoLineDetail, SoLineSet, SoVertexProperty


SoIndexedNurbsCurve

NAME

SoIndexedNurbsCurve - indexed NURBS curve shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoIndexedNurbsCurve

SYNOPSIS

#include <Inventor/nodes/SoIndexedNurbsCurve.h>

Fields from class SoIndexedNurbsCurve:

SoSFInt32	numControlPoints

SoMFInt32	coordIndex

SoMFFloat	knotVector

Methods from class SoIndexedNurbsCurve:

SoIndexedNurbsCurve()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class represents a NURBS curve based on the knot vector and the control points that you specify. The knotVector field specifies a floating-point array of values; the values are the coordinates of the knot points in the curve, and you must enter them in non-decreasing order. The numControlPoints field specifies the number of control points the curve will have and will use the current coordinates that are indexed from the coordIndex field.

You can get a curve of minimum order (2) by specifying two more knots than control points and having at least two control points. This curve would be a set of line segments connecting the control points together.

You can get a curve of maximum order (8) by specifying 8 more knots than control points and having at least 8 control points. In this curve, each control point would have influence on a larger portion of the curve than with curves of lesser order.

The control points of the curve are transformed by the current transformation matrix. The curve is drawn with the current lighting model and drawing style (drawing style FILLED is treated as LINES). The coordinates, normals, and texture coordinates of a NURBS curve are generated, so you cannot bind explicit normals or texture coordinates to a NURBS curve.

The approximation of the curve by line segments is affected by the current complexity value.

FIELDS

SoSFInt32	numControlPoints

Number of control points for the curve.

SoMFInt32	coordIndex

Coordinate indices for the control points.

SoMFFloat	knotVector

The knot vector for the curve. Values must be in non-decreasing order.

METHODS

SoIndexedNurbsCurve()

Creates an indexed NURBS curve node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws the curve based on the current coordinates, material, and so on.

SoRayPickAction

Picks the curve based on the current coordinates and transformation.

SoGetBoundingBoxAction

Computes the bounding box that encloses all control points of the curve with the current transformation applied to them. Sets the center to the average of the control points.

SoCallbackAction

If any line segment callbacks are registered with the action, they will be invoked for each successive segment approximating the curve.

FILE FORMAT/DEFAULT

IndexedNurbsCurve {

numControlPoints	0

coordIndex	0

knotVector	0

}

SEE ALSO

SoNurbsCurve, SoIndexedNurbsSurface


SoIndexedNurbsSurface

NAME

SoIndexedNurbsSurface - indexed NURBS surface shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoIndexedNurbsSurface

SYNOPSIS

#include <Inventor/nodes/SoIndexedNurbsSurface.h>

Fields from class SoIndexedNurbsSurface:

SoSFInt32	numUControlPoints

SoSFInt32	numVControlPoints

SoMFInt32	coordIndex

SoMFFloat	uKnotVector

SoMFFloat	vKnotVector

SoSFInt32	numSControlPoints

SoSFInt32	numTControlPoints

SoMFInt32	textureCoordIndex

SoMFFloat	sKnotVector

SoMFFloat	tKnotVector

Methods from class SoIndexedNurbsSurface:

SoIndexedNurbsSurface()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This shape node represents a NURBS surface based on the knot vectors and the control points that you specify. The uKnotVector and vKnotVector fields specify floating-point arrays of values; the values are the coordinates of the knot points in the surface, and you must enter them in non-decreasing order. The numUControlPoints and numVControlPoints fields specify the number of control points the surface will have in the U and V parametric directions, and will use the current coordinates that are indexed from the coordIndex field.

You can get a surface of minimum order (2) in the U or V directions by specifying two more knots than control points in that direction and having at least two control points in that direction. This surface would appear creased in one direction.

You can get a surface of maximum order (8) in the U or V directions by specifying eight more knots than control points in that direction and having at least eight control points in that direction.

The control points of the NURBS surface are transformed by the current cumulative transformation. The surface is drawn with the current light model and drawing style. The coordinates, normals, and texture coordinates of a surface are generated, so you cannot bind explicit normals or texture coordinates to a NURBS surface. The first material in the state is applied to the entire surface.

The surface is trimmed according to the currently defined profiles curves.

When default texture coordinates are applied to a NURBS surface, the edges of the texture square are stretched to fit the surface. The axes of the texture are called S and T; S is horizontal and T is vertical. The axes of the NURBS surface are called U and V; U is horizontal and V is vertical. You can also define texture coordinates explicitly with the S,T location point, the knot vectors, and the current texture coordinates.

FIELDS

SoSFInt32	numUControlPoints

SoSFInt32	numVControlPoints

Number of control points in the U and V directions.

SoMFInt32	coordIndex

Coordinate indices.

SoMFFloat	uKnotVector

SoMFFloat	vKnotVector

The knot vectors in the U and V directions.

SoSFInt32	numSControlPoints

SoSFInt32	numTControlPoints

Number of control points in the S and T directions.

SoMFInt32	textureCoordIndex

Texture coordinate indices.

SoMFFloat	sKnotVector

SoMFFloat	tKnotVector

The knot vectors in the S and T directions.

METHODS

SoIndexedNurbsSurface()

Creates an indexed NURBS surface node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws the surface based on the current coordinates, material, and so on.

SoRayPickAction

Picks the surface based on the current coordinates and transformation.

SoGetBoundingBoxAction

Computes the bounding box that encloses all control points of the surface with the current transformation applied to them. Sets the center to the average of the control points.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle approximating the surface.

FILE FORMAT/DEFAULT

IndexedNurbsSurface {

numUControlPoints	0

numVControlPoints	0

numSControlPoints	0

numTControlPoints	0

coordIndex	0

uKnotVector	0

vKnotVector	0

sKnotVector	0

tKnotVector	0

textureCoordIndex	-1

}

SEE ALSO

SoIndexedNurbsCurve, SoNurbsSurface, SoProfile


SoIndexedShape

NAME

SoIndexedShape - abstract base class for all indexed vertex-based shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoIndexedShape

SYNOPSIS

#include <Inventor/nodes/SoIndexedShape.h>

Fields from class SoIndexedShape:

SoMFInt32	coordIndex

SoMFInt32	materialIndex

SoMFInt32	normalIndex

SoMFInt32	textureCoordIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoIndexedShape:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is the abstract base class for all vertex-based shapes that are constructed from indices, including SoIndexedFaceSet, SoIndexedTriangleStripSet, and SoIndexedLineSet. SoIndexedShape defines fields that are used in all of its subclasses.

All subclasses of SoNonIndexedShape construct objects by using the coordinates specified by the vertexProperty field (from SoVertexShape), or the current inherited coordinates. The coordIndex field defined by this class contains the indices into the current coordinates of the vertices of the shape. These indices are also used for materials, normals, or texture coordinates when the appropriate binding is PER_VERTEX_INDEXED.

Material and normal bindings are interpreted as follows for each subclass:

OVERALL	One material for the entire shape.
PER_PART	Specific to the subclass.
PER_PART_INDEXED	Same as PER_PART, using indices from the materialIndex or normalIndex field.
PER_FACE	Specific to the subclass.
PER_FACE_INDEXED	Same as PER_FACE, using indices from the materialIndex or normalIndex field.
PER_VERTEX	One material per vertex.
PER_VERTEX_INDEXED	One material per vertex, using indices from the materialIndex or normalIndex field.
When any _INDEXED binding is used for materials or normals, the materialIndex or normalIndex field is used to determine the indices for the materials or normals. If this field contains a single value of -1 (the default), the coordinate indices from the coordIndex field are used as well for materials or normals. When the binding is PER_VERTEX_INDEXED, indices in these fields that correspond to negative indices in coordIndex are skipped; for other index bindings all the values in the fields are used, in order.

Explicit texture coordinates (as defined by SoTextureCoordinate2) may be bound to vertices of an indexed shape consecutively (if the texture coordinate binding is PER_VERTEX) or by using the indices in the textureCoordIndex field (if the binding is PER_VERTEX_INDEXED). As with all vertex-based shapes, if there is a current texture but no texture coordinates are specified, a default texture coordinate mapping is calculated using the bounding box of the shape.

Be sure that the indices contained in the coordIndex, materialIndex, normalIndex, and textureCoordIndex fields are valid with respect to the current state, or errors will occur.

FIELDS

SoMFInt32	coordIndex

The indices of the coordinates that the shape uses as its vertices. The coordinates connect to form faces, lines, or other shapes. Each subclass defines special negative indices to use to indicate separation between faces, lines, and so on.

SoMFInt32	materialIndex

SoMFInt32	normalIndex

SoMFInt32	textureCoordIndex

The indices of the materials, normals, and texture coordinates that are used for the shape. These fields are used only when the appropriate binding is one of the _INDEXED bindings. By default, the values of these fields indicate that the coordinate indices should be used for materials, normals, or texture coordinates as well.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoIndexedFaceSet, SoIndexedLineSet, SoIndexedTriangleStripSet, SoMaterialBinding, SoNonIndexedShape, SoNormalBinding, SoShapeHints, SoTextureCoordinateBinding


SoIndexedTriangleStripSet

NAME

SoIndexedTriangleStripSet - indexed triangle strip set shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoIndexedShape > SoIndexedTriangleStripSet

SYNOPSIS

#include <Inventor/nodes/SoIndexedTriangleStripSet.h>

Fields from class SoIndexedShape:

SoMFInt32	coordIndex

SoMFInt32	materialIndex

SoMFInt32	normalIndex

SoMFInt32	textureCoordIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoIndexedTriangleStripSet:

SoIndexedTriangleStripSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This shape node constructs triangle strips out of vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.

SoIndexedTriangleStripSet uses the indices in the coordIndex field (from SoIndexedShape) to specify the vertices of the triangle strips. An index of SO_END_STRIP_INDEX (-1) indicates that the current strip has ended and the next one begins.

The vertices of the faces are transformed by the current transformation matrix. The faces are drawn with the current light model and drawing style.

Treatment of the current material and normal binding is as follows: PER_PART specifies a material or normal per strip. PER_FACE binding specifies a material or normal for each triangle. PER_VERTEX specifies a material or normal for each vertex. The corresponding _INDEXED bindings are the same, but use the materialIndex or normalIndex indices (see SoIndexedShape). The default material binding is OVERALL. The default normal binding is PER_VERTEX_INDEXED

If any normals (or materials) are specified, Open Inventor assumes you provide the correct number of them, as indicated by the binding. You will see unexpected results if you specify fewer normals (or materials) than the shape requires. If no normals are specified, they will be generated automatically.

METHODS

SoIndexedTriangleStripSet()

Creates an indexed triangle strip set node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws a strip set based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks on the strip set based on the current coordinates and transformation. Details about the intersection are returned in an SoFaceDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all vertices of the strip set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle forming the strips of the set.

FILE FORMAT/DEFAULT

IndexedTriangleStripSet {

vertexProperty	NULL

coordIndex	0

materialIndex	-1

normalIndex	-1

textureCoordIndex	-1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoFaceDetail, SoIndexedFaceSet, SoTriangleStripSet, SoVertexProperty


SoInfo

NAME

SoInfo - node containing information text string

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoInfo

SYNOPSIS

#include <Inventor/nodes/SoInfo.h>

Fields from class SoInfo:

SoSFString	string

Methods from class SoInfo:

SoInfo()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class defines a information node in the scene graph. This node has no effect during traversal. It is used to store information in the scene graph, typically for application-specific purposes, copyright messages, or other strings. This node differs from the SoLabel node in that it stores its information in an SbString instead of an SbName; the SbString is more efficient for storing long strings that don't have to be accessed very often. Use an SoLabel node for short strings that have to be accessed more often.

FIELDS

SoSFString	string

Defines the info string value as an SbString.

METHODS

SoInfo()

Creates an info node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

Info {

string	"<Undefined info>"

}

SEE ALSO

SbString, SoLabel


SoInput

NAME

SoInput - used to read Open Inventor data files

INHERITS FROM

SoInput

SYNOPSIS

#include <Inventor/SoInput.h>

Methods from class SoInput:

SoInput()

~SoInput()

static void	addDirectoryFirst(const char *dirName)

static void	addDirectoryLast(const char *dirName)

static void	addEnvDirectoriesFirst(const char *envVarName,
const char *pathSep=";") 	[Win32]
const char *pathSep=":  \t")	[Unix]

static void	addEnvDirectoriesLast(const char *envVarName
const char *pathSep=";") 	[Win32]
const char *pathSep=":  \t")	[Unix]

static void	removeDirectory(const char *dirName)

static void	clearDirectories()

static const SbStringList &	getDirectories()

void	setFilePointer(FILE *newFP)

SbBool	openFile(const char *fileName,
SbBool okIfNotFound = FALSE)

SbBool	pushFile(const char *fileName)

closeFile()

SbBool	isValidFile()

FILE *	getCurFile() const

const char *	getCurFileName() const

void	setBuffer(void *bufPointer,
size_t bufSize)

SbString	getHeader()

float	getIVVersion()

DESCRIPTION

This class is used by the SoDB reading routines when reading Open Inventor data files. It supports both ASCII (default) and binary Open Inventor formats. Users can also register additional valid file headers. When reading, SoInput skips over Open Inventor comments (from '#' to end of line) and can stack input files. When EOF is reached, the stack is popped. This class can also be used to read from a buffer in memory.

METHODS

SoInput()

~SoInput()

Constructor and destructor. The default SoInput reads from stdin. The destructor closes any files opened by the SoInput.

static void	addDirectoryFirst(const char *dirName)

static void	addDirectoryLast(const char *dirName)

static void	addEnvDirectoriesFirst(const char *envVarName,
const char *pathSep=";") 	[Win32]
const char *pathSep=":  \t")	[Unix]

static void	addEnvDirectoriesLast(const char *envVarName
const char *pathSep=";") 	[Win32]
const char *pathSep=":  \t")	[Unix]

The SoInput class maintains a global list of directories that is searched to find files when opening them. Directories are searched in order. Each of these routines adds directories to the list, either at the beginning ("First") or the end ("Last"). The last two routines add directories named in the value of the given environment variable. On Windows, directory names are normally separated by semi-colons. On Unix systems, directory names are normally separated by colons or whitespace.

static void	removeDirectory(const char *dirName)

Removes named directory from the list.

static void	clearDirectories()

Clears the list of directories (including the current directory).

static const SbStringList &	getDirectories()

Returns the list of directories as an SbStringList.

void	setFilePointer(FILE *newFP)

Sets file pointer to read from. Clears the stack of input files if necessary.

SbBool	openFile(const char *fileName,
SbBool okIfNotFound = FALSE)

Opens named file, sets file pointer to result. Clears the stack of input files if necessary. This returns FALSE on error; if okIfNotFound is FALSE (the default), this prints an error message if the file could not be found.

SbBool	pushFile(const char *fileName)

Opens named file, pushing the resulting file pointer onto the stack. Returns FALSE on error.

closeFile()

Closes all files on stack opened with openFile() or pushFile().

SbBool	isValidFile()

Returns TRUE if the currently open file is a valid Open Inventor file; that is, it begins with a valid Open Inventor header, or one that has been registered with SoDB::registerHeader.

FILE *	getCurFile() const

Returns a pointer to the current file, or NULL if reading from a buffer.

const char *	getCurFileName() const

Returns full name (including directory path) of current file, or NULL if reading from a buffer.

void	setBuffer(void *bufPointer,
size_t bufSize)

Sets an in-memory buffer to read from, along with its size.

SbString	getHeader()

Returns the header of the file being read.

float	getIVVersion()

Returns the Open Inventor file version of the file being read (e.g. 2.1). If the file has a header registered through SoDB::registerHeader(), the returned version is the Open Inventor version registered with the header.

SEE ALSO

SoDB, SoOutput, SoTranReceiver


SoInteraction

NAME

SoInteraction - initializes Open Inventor interaction classes

INHERITS FROM

SoInteraction

SYNOPSIS

#include <Inventor/SoInteraction.h>

Methods from class SoInteraction:

static void	init()

DESCRIPTION

SoInteraction consists of one static function which initializes all Open Inventor interaction classes, as well as nodekits and the database. Note that SoInteraction::init() is already called by SoWin::init().

METHODS

static void	init()

This calls SoDB::init() and SoNodeKit::init(), calls initClasses() on SoDragger, and calls initClass() on the following classes: SoAntiSquish, SoBoxHighlightRenderAction, SoCenterballManip, SoDirectionalLightManip, SoHandleBoxManip, SoInteractionKit, SoJackManip, SoLineHighlightRenderAction, SoPointLightManip, SoSelection, SoSpotLightManip, SoSurroundScale, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, and SoTransformManip.

SEE ALSO

SoDB, SoNodeKit, SoWin


SoInteractionKit

NAME

SoInteractionKit - base class for all interaction nodekit classes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit

SYNOPSIS

#include <Inventor/nodekits/SoInteractionKit.h>

enum CacheEnabled	{
SoInteractionKit::OFF
Never build or use a cache
SoInteractionKit::ON
Always try to build a cache
SoInteractionKit::AUTO
Automatic caching
}

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoInteractionKit:

SoInteractionKit()

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

This is the base class for all classes of interaction nodekits. Currently, the only subclass is SoDragger, which reacts to click-drag-release events from the mouse.

This node has four fields corresponding to those of an SoSeparator: They are renderCaching, boundingBoxCaching, renderCulling, and pickCulling. They behave the same here as they do for an SoSeparator

The setPartAsPath() method provides support for creating "stand-in" objects for parts in the interaction kit. The "stand-in", or "surrogate" part, is a path to an object that lies somewhere else in the scene graph.

FIELDS

SoSFEnum	renderCaching

Set render caching mode. Default is AUTO.

SoSFEnum	boundingBoxCaching

Set bounding box caching mode. Default is ON. Setting this value to AUTO is equivalent to ON - automatic culling is not implemented.

SoSFEnum	renderCulling

Set render culling mode. Default is OFF. Setting this value to AUTO is equivalent to ON - automatic culling is not implemented.

SoSFEnum	pickCulling

Set pick caching mode. Default is AUTO.

METHODS

SoInteractionKit()

Constructor.

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Sets any public part in the interaction kit as a "surrogate" path instead. The object at the end of the path serves as a stand-in when a pick occurs, and can thus initiate interaction.

Instead of the usual setPart(), which replaces partName with a new node, this will remove the node being used for partName from the scene and remember the surrogatePath you give it. Later, any pick on surrogatePath will be regarded as a pick on partName.

For example, set the XRotator part of an SoTrackballDragger to be the path to an object in the scene. The rest of the trackball will look the same, but the XRotator stripe will disappear. However, click the mouse on the object at the end of surrogatePath and the ball will start to drag in rotation around its X axis.

Note that this is different from setting the part to be the node at the end of the path. When you set the part as a node, a second instance will be drawn in the local space of the interaction kit. When you set it as a path, the object itself is used, not a copy.

The partName may be any part name that follows the nodekit syntax for parts, such as childList[0].shape or rotator.rotatorActive. (See the getPart() method in the SoBaseKit reference page for a complete description.)

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for the class SoInteractionKit.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

InteractionKit {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

callbackList	NULL

}

SEE ALSO

SoBaseKit, SoInteraction, SoNodeKitDetail, SoNodeKitPath, SoNodekitCatalog, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoInterpolate

NAME

SoInterpolate - base class for all interpolator engines

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoInterpolate

SYNOPSIS

#include <Inventor/engines/SoInterpolate.h>

Inputs from class SoInterpolate:

SoSFFloat	alpha

Outputs from class SoInterpolate:

(SoMFFloat)	output

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoInterpolate is the abstract base class for all interpolator engines. An interpolator engine linearly interpolates between two values, based on the alpha input value. The alpha value should be between 0.0 and 1.0. The interpolator engines derived from this class define the input fields that are to be interpolated.

INPUTS

SoSFFloat	alpha

Interpolation control value.

OUTPUTS

(SoMFFloat)	output

Interpolated value. The type of the output value is the same as the type of the input values, which is specified by the derived classes.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoEngineOutput, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f


SoInterpolateFloat

NAME

SoInterpolateFloat - interpolates floating-point values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoInterpolate > SoInterpolateFloat

SYNOPSIS

#include <Inventor/engines/SoInterpolate.h>

Inputs from class SoInterpolateFloat:

SoMFFloat	input0

SoMFFloat	input1

Inputs from class SoInterpolate:

SoSFFloat	alpha

Outputs from class SoInterpolate:

(SoMFFloat)	output

Methods from class SoInterpolateFloat:

SoInterpolateFloat()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine linearly interpolates between two floating-point values, based on the alpha input value. The alpha value should be between 0.0 and 1.0.

The input fields can have multiple values, allowing the engine to interpolate several objects in parallel. One of the inputs may have more values than the other. In that case, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFFloat	input0

SoMFFloat	input1

The engine linearly interpolates from input0 to input1.

METHODS

SoInterpolateFloat()

Constructor.

FILE FORMAT/DEFAULT

InterpolateFloat {

alpha	0

input0	0

input1	1

}

SEE ALSO

SoEngineOutput, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f


SoInterpolateRotation

NAME

SoInterpolateRotation - interpolates rotation values

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoInterpolate > SoInterpolateRotation

SYNOPSIS

#include <Inventor/engines/SoInterpolate.h>

Inputs from class SoInterpolateRotation:

SoMFRotation	input0

SoMFRotation	input1

Inputs from class SoInterpolate:

SoSFFloat	alpha

Outputs from class SoInterpolate:

(SoMFRotation)	output

Methods from class SoInterpolateRotation:

SoInterpolateRotation()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine linearly interpolates between two rotation values, based on the alpha input value. The alpha value should be between 0.0 and 1.0.

The input fields can have multiple rotations, allowing the engine to interpolate several objects in parallel. One of the inputs may have more values than the other. In that case, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFRotation	input0

SoMFRotation	input1

The engine linearly interpolates from input0 to input1.

METHODS

SoInterpolateRotation()

Constructor.

FILE FORMAT/DEFAULT

InterpolateRotation {

alpha	0

input0	0 0 1  0

input1	0 0 1  0

}

SEE ALSO

SoEngineOutput, SoInterpolateFloat, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f


SoInterpolateVec2f

NAME

SoInterpolateVec2f - interpolates 2D floating-point vectors

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoInterpolate > SoInterpolateVec2f

SYNOPSIS

#include <Inventor/engines/SoInterpolate.h>

Inputs from class SoInterpolateVec2f:

SoMFVec2f	input0

SoMFVec2f	input1

Inputs from class SoInterpolate:

SoSFFloat	alpha

Outputs from class SoInterpolate:

(SoMFVec2f)	output

Methods from class SoInterpolateVec2f:

SoInterpolateVec2f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine linearly interpolates between two 2D vectors, based on the alpha input value. The alpha value should be between 0.0 and 1.0.

The input fields can have multiple vectors, allowing the engine to interpolate several objects in parallel. One of the inputs may have more values than the other. In that case, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFVec2f	input0

SoMFVec2f	input1

The engine linearly interpolates from input0 to input1.

METHODS

SoInterpolateVec2f()

Constructor.

FILE FORMAT/DEFAULT

InterpolateVec2f {

alpha	0

input0	0 0

input1	0 0

}

SEE ALSO

SoEngineOutput, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec3f, SoInterpolateVec4f


SoInterpolateVec3f

NAME

SoInterpolateVec3f - interpolates 3D floating-point vectors

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoInterpolate > SoInterpolateVec3f

SYNOPSIS

#include <Inventor/engines/SoInterpolate.h>

Inputs from class SoInterpolateVec3f:

SoMFVec3f	input0

SoMFVec3f	input1

Inputs from class SoInterpolate:

SoSFFloat	alpha

Outputs from class SoInterpolate:

(SoMFVec3f)	output

Methods from class SoInterpolateVec3f:

SoInterpolateVec3f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine linearly interpolates between two 3D vectors, based on the alpha input value. The alpha value should be between 0.0 and 1.0.

The input fields can have multiple vectors, allowing the engine to interpolate several objects in parallel. One of the inputs may have more values than the other. In that case, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFVec3f	input0

SoMFVec3f	input1

The engine linearly interpolates from input0 to input1.

METHODS

SoInterpolateVec3f()

Constructor.

FILE FORMAT/DEFAULT

InterpolateVec3f {

alpha	0

input0	0 0 0

input1	0 0 0

}

SEE ALSO

SoEngineOutput, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec4f


SoInterpolateVec4f

NAME

SoInterpolateVec4f - interpolates 4D floating-point vectors

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoInterpolate > SoInterpolateVec4f

SYNOPSIS

#include <Inventor/engines/SoInterpolate.h>

Inputs from class SoInterpolateVec4f:

SoMFVec4f	input0

SoMFVec4f	input1

Inputs from class SoInterpolate:

SoSFFloat	alpha

Outputs from class SoInterpolate:

(SoMFVec4f)	output

Methods from class SoInterpolateVec4f:

SoInterpolateVec4f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine linearly interpolates between two 4D vectors, based on the alpha input value. The alpha value should be between 0.0 and 1.0.

The input fields can have multiple vectors, allowing the engine to interpolate several objects in parallel. One of the inputs may have more values than the other. In that case, the last value of the shorter input will be repeated as necessary.

INPUTS

SoMFVec4f	input0

SoMFVec4f	input1

The engine linearly interpolates from input0 to input1.

METHODS

SoInterpolateVec4f()

Constructor.

FILE FORMAT/DEFAULT

InterpolateVec4f {

alpha	0

input0	0 0 0 0

input1	0 0 0 0

}

SEE ALSO

SoEngineOutput, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f


SoIntersectionDetectionAction

NAME

SoIntersectionDetectionAction - class to detect intersections

INHERITS FROM

SoAction > SoIntersectionDetectionAction

SYNOPSIS

#include <Inventor/collision/SoIntersectionDetectionAction.h>

typedef SbBool	SoIntersectionFilterCB(void* userData,
const SoPath* shape1,
const SoPath* shape2)

typedef Resp	SoIntersectionCB(void* userData,
const SoIntersectingPrimitive* p1,
const SoIntersectingPrimitive* p2)

enum Resp	{
SoIntersectionDetectionAction::NEXT_PRIMITIVE,
SoIntersectionDetectionAction::NEXT_SHAPE,
SoIntersectionDetectionAction::ABORT
}

struct SoIntersectingPrimitive {
enum PrimitiveType {
LINE_SEGMENT = 2,
TRIANGLE = 3
};
SoPath* path;
Path of the shape
PrimitiveType type;
Type of primitive
SbVec3f vertex [3];
Vertex of the primitive
(Modeling coordinates)
SbVec3f xf_vertex [3];
Vertex of the primitive
(World coordinates)
}

Methods from class SoIntersectionDetectionAction:

SoIntersectionDetectionAction()

~SoIntersectionDetectionAction()

void	setFilterCallback(SoIntersectionFilterCB* f,
void* userData = NULL)

void	addIntersectionCallback(SoIntersectionCB* f,
void* userData = NULL)

void	removeIntersectionCallback(SoIntersectionCB* f,
void* userData = NULL)

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action allows the programmer to analyze a scene graph to know which pairs of objects within the scene intersect.

The action first detects intersections between pairs of bounding boxes. If such an intersection occurs, the programmer can abort the action or allow it to determine if the primitives of the objects actually collide.

The algorithm can call programmer-supplied callback functions when there is an intersection between two objects.

METHODS

SoIntersectionDetectionAction()

Constructor.

~SoIntersectionDetectionAction()

Destructor.

void	setFilterCallback(SoIntersectionFilterCB* f,
void* userData = NULL)

Sets a filter which allow the user to continue or not the intersection finding for a pair of shapes. If the callback returns TRUE, the action search for real intersections, else it goes to the next shape pair.

void	addIntersectionCallback(SoIntersectionCB* f,
void* userData = NULL)

void	removeIntersectionCallback(SoIntersectionCB* f,
void* userData = NULL)

Adds/removes a callback to be called when there is an intersection.

SEE ALSO

SoCollisionManager, SoWinCollisionViewer


SoJackDragger

NAME

SoJackDragger - jack-shaped object you rotate, translate, or scale by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoJackDragger

SYNOPSIS

#include <Inventor/draggers/SoJackDragger.h>

Fields from class SoJackDragger:

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoJackDragger:

SoJackDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoJackDragger is a composite dragger in the shape of a jack from the children's game jacks. Three lines along the x, y, and z axes form the central star shape, which you can drag with the mouse to rotate the jack. Dragging any of the small cubes mounted at the end of the axes will scale the jack uniformly in all 3 dimensions. At the core of the jack is an SoDragPointDragger for translating the jack.

Each of these shapes is a different dragger with the default geometry changed. All of them are parts of the jack dragger, which keeps them moving together. The star is an SoRotateSphericalDragger, and dragging it updates the rotation field of the jack dragger. The small cubes are an SoScaleUniformDragger, tied to the scaleFactor field. The position of the SoDragPointDragger is given by the translation field. As with all draggers, if you change the fields the dragger will move to match the new settings.

Remember: This is not an SoTransform!. If you want to move other objects with this dragger, you can either:

[a] Use an SoJackManip, which is subclassed from SoTransform. It creates one of these draggers and uses it as the interface to change its fields. (see the SoJackManip reference page).

[b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation node.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoJackDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/jackDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the dragger.

SoSFVec3f	scaleFactor

Scale of the dragger.

SoSFVec3f	translation

Position of the dragger.

METHODS

SoJackDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
surroundScale	SurroundScale	--	yes
antiSquish	AntiSquish	--	no
scaler	ScaleUniformDragger	--	yes
rotator	RotateSphericalDragger	--	yes
translator	DragPointDragger	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	jackRotatorRotator

Part:	rotator.rotator

Appearance:	The 'star' of the jack. Set of 3 white axes (lines)

Description:	Picking star begins rotational dragging of the jackDragger.

Resource:	jackRotatorRotatorActive

Part:	rotator.rotatorActive

Appearance:	Yellow version of the rotator.rotator part.

Description:	Displayed while the jackDragger is being rotated

Resource:	jackRotatorFeedback

Part:	rotator.feedback

Appearance:	Empty separator

Description:	Removes any feedback geometry created in the constructor of the SoRotateSphericalDragger.

Resource:	jackRotatorFeedbackActive

Part:	rotator.feedbackActive

Appearance:	Empty separator

Description:	Removes any feedbackActive geometry created in the constructor of the SoRotateSphericalDragger.

Resource:	jackScalerScaler

Part:	scaler.scaler

Appearance:	Six small white cubes, the tips of the rotator star

Description:	Picking this initiates uniform 3D scaling of the dragger.

Resource:	jackScalerScalerActive

Part:	scaler.scalerActive

Appearance:	Yellow version of the scaler.scaler resource.

Description:	Displayed while the dragger is being scaled.

Resource:	jackScalerFeedback

Part:	scaler.feedback

Appearance:	Empty separator

Description:	Removes any feedback geometry created in the constructor of the SoScaleUniformDragger.

Resource:	jackScalerFeedbackActive

Part:	scaler.feedbackActive

Appearance:	Empty separator

Description:	Removes any feedbackActive geometry created in the constructor of the SoScaleUniformDragger.

Resource:	jackTranslatorLineTranslator

Parts:	translator.xTranslator.translator

translator.yTranslator.translator

translator.zTranslator.translator

Appearance:	Skinny white cylinder aligned with axes of motion

Description:	Picking these parts initiates dragging in the x, y, and z linear draggers respectively.

Resource:	jackTranslatorLineTranslatorActive

Parts:	translator.xTranslator.translatorActive

translator.yTranslator.translatorActive

translator.zTranslator.translatorActive

Appearance:	Skinny yellow cylinder aligned with axes of motion

Description:	Shown during linear dragging in the x, y, and z directions respectively.

Resource:	jackTranslatorPlaneTranslator

Parts:	translator.yzTranslator.translator

translator.xzTranslator.translator

translator.xyTranslator.translator

Appearance:	White flattened cube, drawn in wireframe

Description:	Picking these parts initiates dragging by the yz, xz, and xy planar draggers respectively.

Resource:	jackTranslatorPlaneTranslatorActive

Parts:	translator.yzTranslator.translatorActive

translator.xzTranslator.translatorActive

translator.xyTranslator.translatorActive

Appearance:	Yellow flattened cube, drawn in wireframe

Description:	Shown during planar dragging in the yz, xz, and xy planes respectively.

Resource:	jackTranslatorXFeedback

Part:	xFeedback

Appearance:	Double-headed purple arrow

Description:	Feedback for motion in x direction

Resource:	jackTranslatorYFeedback

Part:	yFeedback

Appearance:	Double-headed purple arrow

Description:	Feedback for motion in y direction

Resource:	jackTranslatorZFeedback

Part:	zFeedback

Appearance:	Double-headed purple arrow

Description:	Feedback for motion in z direction

Resource:	jackTranslatorYZFeedback

Part:	yzFeedback

Appearance:	Semi-transparent green square in yz plane

Description:	Feedback for motion in yz plane

Resource:	jackTranslatorXZFeedback

Part:	xzFeedback

Appearance:	Semi-transparent green square in yz plane

Description:	Feedback for motion in xz plane

Resource:	jackTranslatorXYFeedback

Part:	xyFeedback

Appearance:	Semi-transparent green square in yz plane

Description:	Feedback for motion in xy plane

FILE FORMAT/DEFAULT

JackDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

translation	0 0 0

scaleFactor	1 1 1

callbackList	NULL

surroundScale	NULL

antiSquish	AntiSquish {

sizing BIGGEST_DIMENSION }

scaler	ScaleUniformDragger {

}

rotator	RotateSphericalDragger {

}

translator	DragPointDragger {

}

rotator.rotator	<jackRotatorRotator resource>

rotator.rotatorActive	<jackRotatorRotatorActive resource>

rotator.feedback	<jackRotatorFeedback resource>

rotator.feedbackActive	<jackRotatorFeedbackActive resource>

scaler.scaler	<jackScalerScaler resource>

scaler.scalerActive	<jackScalerScalerActive resource>

scaler.feedback	<jackScalerFeedback resource>

scaler.feedbackActive	<jackScalerFeedbackActive resource>

translator.xTranslator.translator	<jackTranslatorLineTranslator resource>

translator.yTranslator.translator	<jackTranslatorLineTranslator resource>

translator.zTranslator.translator	<jackTranslatorLineTranslator resource>

translator.xTranslator.translatorActive	<jackTranslatorLineTranslatorActive resource>

translator.yTranslator.translatorActive	<jackTranslatorLineTranslatorActive resource>

translator.zTranslator.translatorActive	<jackTranslatorLineTranslatorActive resource>

translator.yzTranslator.translator	<jackTranslatorPlaneTranslator resource>

translator.xzTranslator.translator	<jackTranslatorPlaneTranslator resource>

translator.xyTranslator.translator	<jackTranslatorPlaneTranslator resource>

translator.yzTranslator.translatorActive	<jackTranslatorPlaneTranslatorActive resource>

translator.xzTranslator.translatorActive	<jackTranslatorPlaneTranslatorActive resource>

translator.xyTranslator.translatorActive	<jackTranslatorPlaneTranslatorActive resource>

xFeedback	<jackTranslatorXFeedback resource>

yFeedback	<jackTranslatorYFeedback resource>

zFeedback	<jackTranslatorZFeedback resource>

yzFeedback	<jackTranslatorYZFeedback resource>

xzFeedback	<jackTranslatorXZFeedback resource>

xyFeedback	<jackTranslatorXYFeedback resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoJackManip

NAME

SoJackManip - transform node with 3D interface for rotating, scaling, and translating

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip > SoJackManip

SYNOPSIS

#include <Inventor/manips/SoJackManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoJackManip:

SoJackManip()

static SoType	getClassTypeId()

Methods from class SoTransformManip:

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoJackManip is derived from SoTransform (by way of SoTransformManip). When its fields change, nodes following it in the scene graph rotate, scale, and/or translate.

As a subclass of SoTransformManip, this manip also has a 3D interface to edit some of its fields. In this case, the interface edits the scaleFactor, rotation and translation fields.

A manipulator differs from a dragger. When you move a dragger, no other nodes are affected. When you move an SoTransformManip, other nodes move along with it. (See the reference page for SoTransformManip).

The interface for an SoJackManip is exactly the same as that of the SoJackDragger. To find out more about the interface, see the reference page for SoJackDragger. To find out how the manipulator uses a dragger to provide its interface, see the reference page for SoTransformManip.

On screen, this manip will surround the objects influenced by its motion. This is because it turns on the surroundScale part of the dragger (See the reference page for SoSurroundScale)

METHODS

SoJackManip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

JackManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoCenterballManip, SoHandleBoxManip, SoJackDragger, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoTransform, SoTransformManip


SoKeyboardEvent

NAME

SoKeyboardEvent - keyboard key press and release events

INHERITS FROM

SoEvent > SoButtonEvent > SoKeyboardEvent

SYNOPSIS

#include <Inventor/events/SoKeyboardEvent.h>

#define SO_KEY_PRESS_EVENT(EVENT,KEY)   (SoKeyboardEvent::isKeyPressEvent(EVENT,SoKeyboardEvent::KEY))

#define SO_KEY_RELEASE_EVENT(EVENT,KEY)   (SoKeyboardEvent::isKeyReleaseEvent(EVENT,SoKeyboardEvent::KEY))

enum Key	{
SoKeyboardEvent::ANY
SoKeyboardEvent::LEFT_SHIFT
SoKeyboardEvent::RIGHT_SHIFT
SoKeyboardEvent::LEFT_CONTROL
SoKeyboardEvent::RIGHT_CONTROL
SoKeyboardEvent::LEFT_ALT
SoKeyboardEvent::RIGHT_ALT
SoKeyboardEvent::NUMBER_0
SoKeyboardEvent::NUMBER_1
SoKeyboardEvent::NUMBER_2
SoKeyboardEvent::NUMBER_3
SoKeyboardEvent::NUMBER_4
SoKeyboardEvent::NUMBER_5
SoKeyboardEvent::NUMBER_6
SoKeyboardEvent::NUMBER_7
SoKeyboardEvent::NUMBER_8
SoKeyboardEvent::NUMBER_9
SoKeyboardEvent::A
SoKeyboardEvent::B
SoKeyboardEvent::C
SoKeyboardEvent::D
SoKeyboardEvent::E
SoKeyboardEvent::F
SoKeyboardEvent::G
SoKeyboardEvent::H
SoKeyboardEvent::I
SoKeyboardEvent::J
SoKeyboardEvent::K
SoKeyboardEvent::L
SoKeyboardEvent::M
SoKeyboardEvent::N
SoKeyboardEvent::O
SoKeyboardEvent::P
SoKeyboardEvent::Q
SoKeyboardEvent::R
SoKeyboardEvent::S
SoKeyboardEvent::T
SoKeyboardEvent::U
SoKeyboardEvent::V
SoKeyboardEvent::W
SoKeyboardEvent::X
SoKeyboardEvent::Y
SoKeyboardEvent::Z
SoKeyboardEvent::HOME
SoKeyboardEvent::LEFT_ARROW
SoKeyboardEvent::UP_ARROW
SoKeyboardEvent::RIGHT_ARROW
SoKeyboardEvent::DOWN_ARROW
SoKeyboardEvent::PAGE_UP
SoKeyboardEvent::PAGE_DOWN
SoKeyboardEvent::PRIOR
SoKeyboardEvent::NEXT
SoKeyboardEvent::END
SoKeyboardEvent::PAD_ENTER
SoKeyboardEvent::PAD_F1
SoKeyboardEvent::PAD_F2
SoKeyboardEvent::PAD_F3
SoKeyboardEvent::PAD_F4
SoKeyboardEvent::PAD_0
SoKeyboardEvent::PAD_1
SoKeyboardEvent::PAD_2
SoKeyboardEvent::PAD_3
SoKeyboardEvent::PAD_4
SoKeyboardEvent::PAD_5
SoKeyboardEvent::PAD_6
SoKeyboardEvent::PAD_7
SoKeyboardEvent::PAD_8
SoKeyboardEvent::PAD_9
SoKeyboardEvent::PAD_ADD
SoKeyboardEvent::PAD_SUBTRACT
SoKeyboardEvent::PAD_MULTIPLY
SoKeyboardEvent::PAD_DIVIDE
SoKeyboardEvent::PAD_SPACE
SoKeyboardEvent::PAD_TAB
SoKeyboardEvent::PAD_INSERT
SoKeyboardEvent::PAD_DELETE
SoKeyboardEvent::PAD_PERIOD
SoKeyboardEvent::F1
SoKeyboardEvent::F2
SoKeyboardEvent::F3
SoKeyboardEvent::F4
SoKeyboardEvent::F5
SoKeyboardEvent::F6
SoKeyboardEvent::F7
SoKeyboardEvent::F8
SoKeyboardEvent::F9
SoKeyboardEvent::F10
SoKeyboardEvent::F11
SoKeyboardEvent::F12
SoKeyboardEvent::BACKSPACE
SoKeyboardEvent::TAB
SoKeyboardEvent::RETURN
SoKeyboardEvent::ENTER
SoKeyboardEvent::PAUSE
SoKeyboardEvent::SCROLL_LOCK
SoKeyboardEvent::ESCAPE
SoKeyboardEvent::KEY_DELETE	[Win32 only]
SoKeyboardEvent::DELETE	[Any platform other than Win32]
SoKeyboardEvent::PRINT
SoKeyboardEvent::INSERT
SoKeyboardEvent::NUM_LOCK
SoKeyboardEvent::CAPS_LOCK
SoKeyboardEvent::SHIFT_LOCK
SoKeyboardEvent::SPACE
SoKeyboardEvent::APOSTROPHE
SoKeyboardEvent::COMMA
SoKeyboardEvent::MINUS
SoKeyboardEvent::PERIOD
SoKeyboardEvent::SLASH
SoKeyboardEvent::SEMICOLON
SoKeyboardEvent::EQUAL
SoKeyboardEvent::BRACKETLEFT
SoKeyboardEvent::BACKSLASH
SoKeyboardEvent::BRACKETRIGHT
SoKeyboardEvent::GRAVE
}

Methods from class SoKeyboardEvent:

SoKeyboardEvent()

static SoType	getClassTypeId()

void	setKey(SoKeyboardEvent::Key whichKey)

SoKeyboardEvent::Key	getKey() const

static SbBool	isKeyPressEvent(const SoEvent *e,
SoKeyboardEvent::Key whichKey)

static SbBool	isKeyReleaseEvent(const SoEvent *e,
SoKeyboardEvent::Key whichKey)

char	getPrintableCharacter() const

Methods from class SoButtonEvent:

void	setState(SoButtonEvent::State s)

SoButtonEvent::State	getState() const

Methods from class SoEvent:

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

void	setTime(SbTime t)

SbTime	getTime() const

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

DESCRIPTION

SoKeyboardEvent represents keyboard key press and release events in the Open Inventor event model.

METHODS

SoKeyboardEvent()

Constructor.

static SoType	getClassTypeId()

Return the type id for the SoKeyboardEvent class.

void	setKey(SoKeyboardEvent::Key whichKey)

SoKeyboardEvent::Key	getKey() const

Set and get which key generated the event.

static SbBool	isKeyPressEvent(const SoEvent *e,
SoKeyboardEvent::Key whichKey)

static SbBool	isKeyReleaseEvent(const SoEvent *e,
SoKeyboardEvent::Key whichKey)

Returns whether the passed event is a keyboard press or release event of the passed key. When SoKeyboardEvent::ANY is passed, this returns TRUE if the event represents a keyboard press or release of any key.

char	getPrintableCharacter() const

Convenience routine that returns the character representing the key, if it's printable. If not, this returns NULL ('\0').

SEE ALSO

SoEvent, SoButtonEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice


SoLOD

NAME

SoLOD - distance-based level-of-detail switching group node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoLOD

SYNOPSIS

#include <Inventor/nodes/SoLOD.h>

Fields from class SoLOD:

SoMFFloat	range

SoSFVec3f	center

Methods from class SoLOD:

SoLOD()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node is used to allow applications to switch between various representations of objects automatically. The children of this node typically represent the same object or objects at varying levels of detail, from highest detail to lowest. The distance from the world-space eye point to the transformed center of the LOD is computed, and one child is drawn, based on the values in the ranges field.

More precisely, if the distance from the world-space eyepoint to the transformed center is D and the ranges array contains LAST_RANGE+1 values (numbered 0...LAST_RANGE), then:

    if D < ranges[0]	: Child 0 is drawn

    else if ranges[i-1] < D < ranges[i]	: Child i is drawn

    else if D > ranges[LAST_RANGE]	: Child LAST_RANGE+1 is drawn

Thus, N ranges and N+1 children should be specified. If you specify too few children, the last child will be used for the extra ranges. If you specify too few ranges, the extra children will never be used.

It is often useful to define the lowest detail child to be an SoInfo node. This causes the object to completely disappear if it is far enough away from the eyepoint. Defining the highest detail child to be an SoInfo node can also be useful if you want the object to disappear if it gets too close to the eyepoint.

FIELDS

SoMFFloat	range

World-space distances to use as switching criteria.

SoSFVec3f	center

Object-space center of the model.

METHODS

SoLOD()

Creates a distance-based level-of-detail node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoCallbackAction

Only the child with the appropriate level of detail is traversed.

others

All implemented as for SoGroup.

FILE FORMAT/DEFAULT

LOD {

center	0 0 0

range	[  ]

}

SEE ALSO

SoSwitch, SoGroup


SoLabel

NAME

SoLabel - node containing label text string

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLabel

SYNOPSIS

#include <Inventor/nodes/SoLabel.h>

Fields from class SoLabel:

SoSFName	label

Methods from class SoLabel:

SoLabel()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class defines a label node in the scene graph. This node has no effect during traversal. It is used to store text labels in the scene graph, typically for application-specific identification of subgraphs when node naming is not appropriate.

FIELDS

SoSFName	label

Defines the label string value as an SbName.

METHODS

SoLabel()

Creates a label node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

Label {

label	"<Undefined label>"

}

SEE ALSO

SbName, SoInfo


SoLevelOfDetail

NAME

SoLevelOfDetail - level-of-detail switching group node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoLevelOfDetail

SYNOPSIS

#include <Inventor/nodes/SoLevelOfDetail.h>

Fields from class SoLevelOfDetail:

SoMFFloat	screenArea

Methods from class SoLevelOfDetail:

SoLevelOfDetail()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The children of this node typically represent the same object or objects at varying levels of detail, from highest detail to lowest. The size of the objects when projected into the viewport is used to determine which version to use (i.e., which child to traverse).

The size is computed as the area of the screen rectangle enclosing the projection of the 3D bounding box that encloses all of the children. When rendering, this size is compared to the values in the screenArea field. If the size is greater than the first value, child 0 is traversed. If it is smaller than the first, but greater than the second, child 1 is traversed, and so on. If there are fewer children than are required by this rule, the last child is traversed. The screenArea field contains just 0 by default, so the first child is always traversed.

The size calculation takes the current complexity into account. If the complexity is 0 or is of type BOUNDING_BOX, the last child is always traversed. If the complexity is less than .5, the computed size is scaled down appropriately to use (possibly) a less detailed representation. If the complexity is greater than .5, the size is scaled up. At complexity 1, the first child is always used.

Note that the SoLOD node is similar to SoLevelOfDetail, except the switching between levels in the SoLOD node is based on distance from the camera, which is faster than using screen area.

FIELDS

SoMFFloat	screenArea

Areas to use for comparison

METHODS

SoLevelOfDetail()

Creates a level-of-detail node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoCallbackAction

Only the child with the appropriate level of detail is traversed.

SoGetBoundingBoxAction

The box that encloses all children is computed. (This is the box that is needed to compute the projected size.)

others

All implemented as for SoGroup.

FILE FORMAT/DEFAULT

LevelOfDetail {

screenArea	0

}

SEE ALSO

SoLOD, SoComplexity, SoSwitch, SoGroup


SoLevelOfSimplification

NAME

SoLevelOfSimplification - level-of-detail switching node designed for grouping simplified versions of the same shape

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoLOD > SoLevelOfSimplification

SYNOPSIS

#include <Inventor/nodes/SoLevelOfSimplification.h>

Fields from class SoLevelOfSimplification:

SoMFFloat	percentages

SoSFInt32	numTriangles

Fields from class SoLOD:

SoMFFloat	range

SoSFVec3f	center

Methods from class SoLevelOfSimplification:

SoLevelOfSimplification()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node is used to group the results of simplifying a shape, such that every child represents same the model but with a different number of primitives. Since it is derived from SoLOD, it can behave as a distance-based level-of-detail node; however, it also responds to the decimation percentage element. It records what percentage decimation each child is, and then chooses the appropriate child based on the DecimationPercentage and DecimationType elements.

You should specify N percentages for N+1 children. If the DecimationType is HIGHEST or LOWEST, then the LevelOfSimplification node will automatically choose the first or last child, respectively. If the DecimationType is PERCENTAGE, then the node will choose child "i" based on the decimation percentage element value such that:

percentages[i-1] <= DecimationPercentage < percentages[i]

If the DecimationType is AUTOMATIC, then the then the child is chosen based on the range value in the usual SoLOD manner, but no child greater than the value of the DecimationPercentage element will be chosen.

This node also has a field for recording how many triangles the full detail child contains. This allows this node to answer a GetPrimitiveCountAction without traversing its children. This is a benefit when some children contain WWWInlines, a common occurrence. If the children contain some non-triangle primitives, then the field should be -1 which will force the node to traverse its children during GetPrimitiveCountAction.

FIELDS

SoMFFloat	percentage

Percentage decimation for each child. Should be numbers between 0.0 and 1.0, with 1.0 representing full detail and 0.0 representing bounding box detail.

SoSFInt32	numTriangles

Number of triangles in highest (1.0) case. Can be -1 if unknown or if children contain primitives other than triangles.

METHODS

Methods from class SoLevelOfSimplification:

SoLevelOfSimplification()

Creates level-of-simplification node with default settings.

static SoType	getClassTypeId()

Return type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoCallbackAction

Only the child with the appropriate level of detail is traversed.

SoGetPrimitiveCountAction

A child is chosen in the same way as in GLRender. If the numTriangles field is greater than 0, the percentage value for this child is multiplied by the numTriangles value and this value is added to the PrimitiveCount without traversing the child. If numTriangles is less than or equal to 0, then the child is traversed to get the count.

Other actions

Implemented as for SoGroup

FILE FORMAT/DEFAULT

LevelOfSimplification {

percentages	[]

numTriangles	-1

}

SEE ALSO

SoGetPrimitiveCountAction, SoLOD, SoOctreeOrdering, SoRenderList, SoValueOrdering


SoLight

NAME

SoLight - abstract base class for all light source nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLight

SYNOPSIS

#include <Inventor/nodes/SoLight.h>

Fields from class SoLight:

SoSFBool	on

SoSFFloat	intensity

SoSFColor	color

Methods from class SoLight:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoLight is the abstract base class for all light nodes. A light node defines an illumination source that may affect subsequent shapes in the scene graph, depending on the current lighting style. Light sources are affected by the current transformation. A light node under a separator does not affect any objects outside that separator.

You can also use a node kit to create a light; see the reference page for SoLightKit.

FIELDS

SoSFBool	on

Determines whether the source is active or inactive. When inactive, the source does not illuminate at all.

SoSFFloat	intensity

Illumination intensity of light source. Valid values range from 0.0 (no illumination) to 1.0 (maximum illumination).

SoSFColor	color

Light source illumination color.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Activates this light (if so specified) during traversal. All shape nodes that come after this light in the scene graph are illuminated by this light.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoDirectionalLight, SoEnvironment, SoLightKit, SoLightModel, SoMaterial, SoPointLight, SoSpotLight


SoLightKit

NAME

SoLightKit - light nodekit class

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoLightKit

SYNOPSIS

#include <Inventor/nodekits/SoLightKit.h>

Parts from class SoLightKit:

(SoTransform)	transform

(SoLight)	light

(SoNode)	icon

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoLightKit:

SoLightKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

This nodekit class is used to create light nodes that have a local transformation and a geometry icon to represent the light source. SoLightKit adds three public parts to the basic nodekit: transform, light, and icon.

SoLightKit creates an SoDirectionalLight as the light part by default - all other parts are NULL at creation.

You can move the light relative to the rest of the scene by creating and editing the transform part.

You can add a geometrical representation for the light by setting the icon part to be any scene graph you like.

SoLightKit also adds two private parts. An SoTransformSeparator contains the effect of transform to move only the light and icon, while allowing the light to illuminate the rest of the scene. The second private part is an SoSeparator, which keeps property nodes within the icon geometry from affecting the rest of the scene. It also serves to cache the icon even when the light or transform is changing.

SoLightKit is derived from SoBaseKit and thus also includes a callbackList part for adding callback nodes.

PARTS

(SoTransform)	transform

This part positions and orients the light and icon relative to the rest of the scene. Its effect is kept local to this nodekit by a private part of type SoTransformSeparator. The transform part is NULL by default. If you ask for transform using getPart(), an SoTransform will be returned. But you may set the part to be any subclass of SoTransform. For example, set the transform to be an SoDragPointManip and the light to be an SoPointLight. Then you can move the light by dragging the manipulator with the mouse.

(SoLight)	light

The light node for this nodekit. This can be set to any node derived from SoLight. An SoDirectionalLight is created by default, and it is also the type of light returned when the you request that the nodekit build a light for you.

(SoNode)	icon

This part is a user-supplied scene graph that represents the light source. It is NULL by default - an SoCube is created by the lightkit when a method requires it to build the part itself.

METHODS

SoLightKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for the class SoLightKit.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
transform	Transform	--	yes
light	Light	DirectionalLight	no
icon	Node	Cube	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

LightKit {

callbackList	NULL

transform	NULL

light	DirectionalLight {

}

icon	NULL

}

SEE ALSO

SoAppearanceKit, SoBaseKit, SoCameraKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit


SoLightModel

NAME

SoLightModel - node that defines the lighting model to use when rendering

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLightModel

SYNOPSIS

#include <Inventor/nodes/SoLightModel.h>

enum Model	{
SoLightModel::BASE_COLOR
Use only the base (diffuse) object color
SoLightModel::PHONG
Use Phong lighting model
}

Fields from class SoLightModel:

SoSFEnum	model

Methods from class SoLightModel:

SoLightModel()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the lighting model to be used when rendering subsequent shapes. The lighting model is specified in the model field. When the default model (Phong lighting) is used, light sources are required in a scene for objects to be easily visible.

FIELDS

SoSFEnum	model

Lighting model to use

METHODS

SoLightModel()

Creates a light model node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current lighting model in the state.

FILE FORMAT/DEFAULT

LightModel {

model	PHONG

}

SEE ALSO

SoBaseColor, SoEnvironment, SoLight, SoMaterial


SoLineDetail

NAME

SoLineDetail - stores detail information about vertex-based shapes made of line segments

INHERITS FROM

SoDetail > SoLineDetail

SYNOPSIS

#include <Inventor/details/SoLineDetail.h>

Methods from class SoLineDetail:

SoLineDetail()

virtual	~SoLineDetail()

const SoPointDetail *	getPoint0() const

const SoPointDetail *	getPoint1() const

int32_t	getLineIndex() const

int32_t	getPartIndex() const

static SoType	getClassTypeId()

Methods from class SoDetail:

SoDetail *	copy() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a point on a line segment in a vertex-based shape made of line segments. The information includes the points at the ends of the segment, and the index of the segment within the shape.

METHODS

SoLineDetail()

virtual	~SoLineDetail()

Constructor and destructor.

const SoPointDetail *	getPoint0() const

const SoPointDetail *	getPoint1() const

These return information about the two points forming the end vertices of the line segment, represented as an SoPointDetail.

int32_t	getLineIndex() const

Returns the index of the line the segment is part of within a shape, such as the third line within an SoLineSet.

int32_t	getPartIndex() const

Returns the index of the part containing the line segment within the shape. Usually, the part index is the same as the line segment index, such as the fifth segment overall within an SoLineSet.

static SoType	getClassTypeId()

Returns type identifier for this class.

SEE ALSO

SoDetail, SoPickedPoint, SoPrimitiveVertex, SoVertexShape


SoLineHighlightRenderAction

NAME

SoLineHighlightRenderAction - selection highlight style

INHERITS FROM

SoAction > SoGLRenderAction > SoLineHighlightRenderAction

SYNOPSIS

#include <Inventor/actions/SoLineHighlightRenderAction.h>

Methods from class SoLineHighlightRenderAction:

SoLineHighlightRenderAction()

virtual void	apply(SoNode *node)

void	setVisible(SbBool b)

SbBool	isVisible() const

void	setColor(const SbColor &c)

SbColor &	getColor()

void	setLinePattern(unsigned short pattern)

unsigned short	getLinePattern()

void	setLineWidth(float width)

float	getLineWidth()

Methods from class SoGLRenderAction:

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setUpdateArea(const SbVec2f &origin,
const SbVec2f &size)

void	getUpdateArea(SbVec2f &origin,
SbVec2f &size) const

void	setAbortCallback(SoGLRenderAbortCB *func,
void *userData)

void	setTransparencyType(TransparencyType type)

TransparencyType	getTransparencyType() const

void	setSmoothing(SbBool smooth)

SbBool	isSmoothing() const

void	setNumPasses(int num)

int	getNumPasses() const

void	setPassUpdate(SbBool flag)

SbBool	isPassUpdate() const

void	setPassCallback(SoGLRenderPassCB *func,
void *userData)

void	setCacheContext(uint32_t context)

uint32_t	getCacheContext() const

Methods from class SoAction:

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

SoLineHighlightRenderAction is a render action which renders the specified scene graph, then renders each selected object again in wireframe. Selected objects are specified by the first SoSelection node in the scene to which this action is applied. If there is no renderable geometry in a selected object, no highlight is rendered for that object. A highlight render action can be passed to the setGLRenderAction() method of SoWinRenderArea to have an effect on scene graphs.

METHODS

SoLineHighlightRenderAction()

Constructor.

virtual void	apply(SoNode *node)

This renders the passed scene graph, and also renders each selected object in wireframe, as specified by the first SoSelection node found in the scene graph.

void	setVisible(SbBool b)

This provides a convenient mechanism for turning highlights off or back on. When FALSE is passed, subsequent calls to apply() render the scene graph without rendering highlights. The application is responsible for forcing a redraw of the scene after changing this state. The default visibility is on.

SbBool	isVisible() const

Returns whether highlights will be rendered or not.

void	setColor(const SbColor &c)

SbColor &	getColor()

Set and get the color of the highlight. Default is red (1,0,0). The application is responsible for forcing a redraw of the scene to see the effects of this change.

void	setLinePattern(unsigned short pattern)

unsigned short	getLinePattern()

Set and get the line pattern of the highlight. Default is solid, 0xffff. The pattern of bits in the passed variable specifies the pattern of the line. See SoDrawStyle for more information. The application is responsible for forcing a redraw of the scene to see the effects of this change.

void	setLineWidth(float width)

float	getLineWidth()

Set and get the line width of the highlight. Default is 3. The application is responsible for forcing a redraw of the scene to see the effects of this change.

EXAMPLE

Here is an example of how a line highlight can be specified for a particular selection node and render area.

    SoWinRenderArea *myRenderArea;

    SoSelection *mySelection;

    // Set the highlight render action

    myRenderArea->setGLRenderAction(

        new SoLineHighlightRenderAction());

    // Automatic redraw on selection changes

    myRenderArea->redrawOnSelectionChange(mySelection);

SEE ALSO

SoBoxHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea, SoDrawStyle, SoInteraction


SoLineSet

NAME

SoLineSet - polyline shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape > SoLineSet

SYNOPSIS

#include <Inventor/nodes/SoLineSet.h>

Fields from class SoLineSet:

SoMFInt32	numVertices

Fields from class SoNonIndexedShape:

SoSFInt32	startIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoLineSet:

SoLineSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a 3D shape formed by constructing polylines from vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.

SoLineSet uses the coordinates in order, starting with the first one. Each line has a number of vertices specified by a value in the numVertices field. For example, an SoLineSet with a numVertices of [3,4,2] would use coordinates 1, 2, and 3 for the first line, coordinates 4, 5, 6, and 7 for the second line, and coordinates 8 and 9 for the third.

The number of values in the numVertices field indicates the number of polylines in the set.

The coordinates of the line set are transformed by the current cumulative transformation. The lines are drawn with the current light model and drawing style (drawing style FILLED is treated as LINES).

Treatment of the current material and normal binding is as follows: The PER_PART binding specifies a material or normal for each segment of the line. The PER_FACE binding specifies a material or normal for each polyline. The _INDEXED bindings are equivalent to their non-indexed counterparts. The default material binding is OVERALL. The default normal binding is PER_VERTEX.

The current complexity value has no effect on the rendering of line sets.

FIELDS

SoMFInt32	numVertices

Number of vertices per polyline.

METHODS

SoLineSet()

Creates a line set node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws lines based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks lines based on the current coordinates and transformation. Details about the intersection are returned in an SoLineDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all vertices of the line set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.

SoCallbackAction

If any line segment callbacks are registered with the action, they will be invoked for each successive segment in the line set.

FILE FORMAT/DEFAULT

LineSet {

vertexProperty	NULL

startIndex	0

numVertices	-1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoIndexedLineSet, SoLineDetail, SoVertexProperty


SoLinearProfile

NAME

SoLinearProfile - piecewise-linear profile curve

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoProfile > SoLinearProfile

SYNOPSIS

#include <Inventor/nodes/SoLinearProfile.h>

Fields from class SoProfile:

SoMFInt32	index

SoSFEnum	linkage

Methods from class SoLinearProfile:

SoLinearProfile()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies a piecewise-linear curve that is used as a profile for either a trimming patch of a NURBS surface or for the bevel of SoText3. The index field indexes into the current profile coordinates (specified in an SoProfileCoordinate2 or SoProfileCoordinate3 node). If the last value of the index field is SO_LINEAR_PROFILE_USE_REST_OF_VERTICES (-1), all remaining coordinates in the current coordinates will be used, starting with the coordinate after the previous index (all coordinates will be used if SO_LINEAR_PROFILE_USE_REST_OF_VERTICES is the only value in the index field). For example, if index contains the values [2,0,-1] and there are 4 profile coordinates (0-3), it is as if the index field contains [2,0,1,2,3].

METHODS

SoLinearProfile()

Creates a linear profile node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoCallbackAction

Adds a profile to the current state.

FILE FORMAT/DEFAULT

LinearProfile {

index	0

linkage	START_FIRST

}

SEE ALSO

SoNurbsProfile, SoProfileCoordinate2, SoProfileCoordinate3


SoLocateHighlight

NAME

SoLocateHighlight - special separator that performs locate highlighting

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoLocateHighlight

SYNOPSIS

#include <Inventor/nodes/SoLocateHighlight.h>

enum Modes	{
SoLocateHighlight::AUTO
Highlight when mouse is over
SoLocateHighlight::ON
Always highlight
SoLocateHighlight::OFF
Never highlight (default)
}

enum Styles	{
SoLocateHighlight::EMISSIVE
Changes emissive color only (default)
SoLocateHighlight::EMISSIVE_DIFFUSE
Changes emissive and diffuse colors
}

Fields from class SoLocateHighlight:

SoSFColor	color

SoSFEnum	style

SoSFEnum	mode

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoLocateHighlight:

SoLocateHighlight()

static SoType	getClassTypeId()

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This is a subclass of SoSeparator that redraws itself in a different color when the cursor is over the contents of the separator.

The redraw happens for that separator only and not the entire window (redraw along the handle event pick path) and in the front buffer, to efficiently track the mouse motion. The highlighted redraw overrides the emissive and/or diffuse color of the subgraph based on the field values in this node.

NOTE: when using SoLightModel::BASE_COLOR (to turn lighting off) only the diffuse color will be used to render objects, so EMISSIVE_DIFFUSE must be used for this node to have any effect.

To override the default mode (off), set environment variable IV_ALLOW_LOCATE_HIGHLIGHT to 1. This will allow locate highlighting to happen by default.

FIELDS

SoSFColor	color

Highlighting color - default [.3, .3, .3]

SoSFEnum	style

Highlighting draw style - default EMISSIVE.

SoSFEnum	mode

Whether to highlight or not - default AUTO.

METHODS

SoLocateHighlight()

Creates a LocateHighlight node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoHandleEventAction

Checks to see if the cursor moves onto or off of the contents of the separator, and redraws appropriately (if mode is AUTO), otherwise traverses as a normal separator.

SoGLRenderAction

Redraws either highlighted (if cursor is over the contents of the separator when mode == AUTO or always if mode == ON), otherwise traverses as a normal separator.

FILE FORMAT/DEFAULT

LocateHighlight {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

mode	AUTO

style	EMISSIVE

color	0.3 0.3 0.3

}

SEE ALSO

SoSeparator, SoSelection, SoMaterial


SoLocation2Event

NAME

SoLocation2Event - 2D location events

INHERITS FROM

SoEvent > SoLocation2Event

SYNOPSIS

#include <Inventor/events/SoLocation2Event.h>

Methods from class SoLocation2Event:

SoLocation2Event()

static SoType	getClassTypeId()

Methods from class SoEvent:

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

void	setTime(SbTime t)

SbTime	getTime() const

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

DESCRIPTION

SoLocation2Event represents 2D location events in the Open Inventor event model.

METHODS

SoLocation2Event()

Constructor.

static SoType	getClassTypeId()

Return the type id for the SoLocation2Event class.

SEE ALSO

SoEvent, SoButtonEvent, SoKeyboardEvent, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice


SoMFBitMask

NAME

SoMFBitMask - multiple-value field containing any number of masks of bit flags

INHERITS FROM

SoField > SoMField > SoMFEnum > SoMFBitMask

SYNOPSIS

#include <Inventor/fields/SoMFBitMask.h>

Methods from class SoMFBitMask:

static SoType	getClassTypeId()

virtual void	getTypeId() const

int	operator [](int i) const

const int *	getValues(int start) const

int	find(int targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const int *newValues)

void	set1Value(int index,
int newValue)

int	operator =(int newValue)

void	setValue(int newValue)

int	operator ==(const SoMFBitMask &f) const

int	operator !=(const SoMFBitMask &f) const

int *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of masks of bit flags, stored as ints. Nodes or engines that use this field class define mnemonic names for the bit flags. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.

The bit-wise "&" and "|" operators should be used when testing and setting flags in a mask.

SoMFBitMasks are written to file as one or more mnemonic enumerated type names, in this format:

( flag1 | flag2 | ... )

If only one flag is used in a mask, the parentheses are optional. These names differ among uses of this field in various node or engine classes. See the reference pages for specific nodes or engines for the names.

The field values may also be represented as integers, but this is not guaranteed to be portable.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

int	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const int *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(int targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const int *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
int newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

int	operator =(int newValue)

void	setValue(int newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFBitMask &f) const

int	operator !=(const SoMFBitMask &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

int *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFBool

NAME

SoMFBool - multiple-value field containing any number of Boolean values

INHERITS FROM

SoField > SoMField > SoMFBool

SYNOPSIS

#include <Inventor/fields/SoMFBool.h>

Methods from class SoMFBool:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SbBool	operator [](int i) const

const SbBool *	getValues(int start) const

int	find(SbBool targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbBool *newValues)

void	set1Value(int index,
SbBool newValue)

SbBool	operator =(SbBool newValue)

void	setValue(SbBool newValue)

int	operator ==(const SoMFBool &f) const

int	operator !=(const SoMFBool &f) const

SbBool *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of Boolean values.

SoMFBools are written to file as one or more Boolean values, which are written as "0" (representing a false value), "1", "TRUE", or "FALSE".

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 0, FALSE, 1, TRUE ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SbBool	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbBool *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(SbBool targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbBool *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
SbBool newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

SbBool	operator =(SbBool newValue)

void	setValue(SbBool newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFBool &f) const

int	operator !=(const SoMFBool &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbBool *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFColor

NAME

SoMFColor - multiple-value field containing any number of RGB colors stored as three floats

INHERITS FROM

SoField > SoMField > SoMFColor

SYNOPSIS

Methods from class SoMFColor:

void	setValues(int start,
int num,
const float rgb[][3])

void	setHSVValues(int start,
int num,
const float hsv[][3])

void	setValue(const SbVec3f &vec)

void	setValue(float red,
float green,
float blue)

void	setHSVValue(float hue,
float saturation,
float value)

void	setValue(const float rgb[3])

void	setHSVValue(const float hsv[3])

void	set1Value(index,
const SbVec3f &vec)

void	set1Value(index,
float r,
float g,
float b)

void	set1HSVValue(index,
float h,
float s,
float v)

void	set1Value(index,
const float rgb[3])

void	set1HSVValue(index,
const float hsv[3])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbColor &	operator [](int i) const

const SbColor *	getValues(int start) const

int	find(const SbColor & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbColor *newValues)

void	set1Value(int index,
const SbColor &newValue)

const SbColor &	operator =(const SbColor &newValue)

void	setValue(const SbColor &newValue)

int	operator ==(const SoMFColor &f) const

int	operator !=(const SoMFColor &f) const

SbColor *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of RGB colors, stored as instances of SbColor. Values may be set in either RGB (red, green, blue) or HSV (hue, saturation, value) color spaces.

SoMFColors are written to file as one or more RGB triples of floating point numbers in standard scientific notation. When more than one value is present, all of the values are enclosed in square brackets and separated by commas. For example:

[ 1.0 0.0 0.0, 0 1 0, 0 0 1 ]

represents the three colors red, green, and blue.

METHODS

void	setValues(int start,
int num,
const float rgb[][3])

void	setHSVValues(int start,
int num,
const float hsv[][3])

Sets num values starting at index start to the RGB (or HSV) values specified by the given array of floats. Each float should be in the range 0.0 to 1.0, and there must be 3*num floats in the array.

void	setValue(const SbVec3f &vec)

void	setValue(float red,
float green,
float blue)

void	setHSVValue(float hue,
float saturation,
float value)

void	setValue(const float rgb[3])

void	setHSVValue(const float hsv[3])

Sets the field to contain one and only one value, the given color (expressed as either RGB or HSV floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.

void	set1Value(index,
const SbVec3f &vec)

void	set1Value(index,
float r,
float g,
float b)

void	set1HSVValue(index,
float h,
float s,
float v)

void	set1Value(index,
const float rgb[3])

void	set1HSVValue(index,
const float hsv[3])

Sets one value in the array to the given color. The array will be expanded and filled with zeros as necessary.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbColor &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbColor *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbColor & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbColor *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
const SbColor &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

const SbColor &	operator =(const SbColor &newValue)

void	setValue(const SbColor &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFColor &f) const

int	operator !=(const SoMFColor &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbColor *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.

SEE ALSO

SbColor


SoMFEngine

NAME

SoMFEngine - multiple-value field containing any number of pointers to engines

INHERITS FROM

SoField > SoMField > SoMFEngine

SYNOPSIS

#include <Inventor/fields/SoMFEngine.h>

Methods from class SoMFEngine:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SoEngine *	operator [](int i) const

const SoEngine * *	getValues(int start) const

int	find(SoEngine * targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SoEngine * *newValues)

void	set1Value(int index,
SoEngine * newValue)

SoEngine *	operator =(SoEngine * newValue)

void	setValue(SoEngine * newValue)

int	operator ==(const SoMFEngine &f) const

int	operator !=(const SoMFEngine &f) const

SoEngine * *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This field maintains a set of pointers to SoEngine instances, correctly maintaining their reference counts.

SoMFEngines are written to file as one or more engines. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ ElapsedTime  , OneShot  duration 2.0 , USE myCalculator ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SoEngine *	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SoEngine * *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(SoEngine * targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SoEngine * *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
SoEngine * newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

SoEngine *	operator =(SoEngine * newValue)

void	setValue(SoEngine * newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFEngine &f) const

int	operator !=(const SoMFEngine &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SoEngine * *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFEnum

NAME

SoMFEnum - multiple-value field containing any number of enumerated type values

INHERITS FROM

SoField > SoMField > SoMFEnum

SYNOPSIS

Methods from class SoMFEnum:

void	setValue(const SbName &name)

void	set1Value(int index,
const SbName &name)

static SoType	getClassTypeId()

virtual void	getTypeId() const

int	operator [](int i) const

const int *	getValues(int start) const

int	find(int targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const int *newValues)

void	set1Value(int index,
int newValue)

int	operator =(int newValue)

void	setValue(int newValue)

int	operator ==(const SoMFEnum &f) const

int	operator !=(const SoMFEnum &f) const

int *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of enumerated type values, stored as ints. Nodes that use this field class define mnemonic names for values. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.

SoMFEnums are written to file as a set of mnemonic enumerated type names. These names differ among uses of this field in various node classes. See the reference pages for specific nodes for the names.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas.

METHODS

void	setValue(const SbName &name)

Sets this field to contain one and only one value, which is the mnemonic name as a string.

void	set1Value(int index,
const SbName &name)

Sets the index'th value to be the integer corresponding to the mnemonic name in the given string.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

int	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const int *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(int targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const int *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
int newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

int	operator =(int newValue)

void	setValue(int newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFEnum &f) const

int	operator !=(const SoMFEnum &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

int *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFFloat

NAME

SoMFFloat - multiple-value field containing any number of floating point values

INHERITS FROM

SoField > SoMField > SoMFFloat

SYNOPSIS

#include <Inventor/fields/SoMFFloat.h>

Methods from class SoMFFloat:

static SoType	getClassTypeId()

virtual void	getTypeId() const

float	operator [](int i) const

const float *	getValues(int start) const

int	find(float targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const float *newValues)

void	set1Value(int index,
float newValue)

float	operator =(float newValue)

void	setValue(float newValue)

int	operator ==(const SoMFFloat &f) const

int	operator !=(const SoMFFloat &f) const

float *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of floating point values.

SoMFFloats are written to file as one or more values in standard scientific notation. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 1.0, 2.3, 5, 6.2e4, -100, ]

The last comma is optional.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

float	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const float *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(float targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const float *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
float newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

float	operator =(float newValue)

void	setValue(float newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFFloat &f) const

int	operator !=(const SoMFFloat &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

float *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFInt32

NAME

SoMFInt32 - multiple-value field containing any number of int32_t integers

INHERITS FROM

SoField > SoMField > SoMFInt32

SYNOPSIS

#include <Inventor/fields/SoMFInt32.h>

Methods from class SoMFInt32:

static SoType	getClassTypeId()

virtual void	getTypeId() const

int32_t	operator [](int i) const

const int32_t *	getValues(int start) const

int	find(int32_t targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const int32_t *newValues)

void	set1Value(int index,
int32_t newValue)

int32_t	operator =(int32_t newValue)

void	setValue(int32_t newValue)

int	operator ==(const SoMFInt32 &f) const

int	operator !=(const SoMFInt32 &f) const

int32_t *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of int32_t (32-bit) integers.

SoMFInt32s are written to file as one or more integer values, in decimal, hexadecimal or octal format. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 17, -0xE20, -518820 ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

int32_t	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const int32_t *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(int32_t targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const int32_t *newValues)

Sets num values starting at index start to the values in newValues. The array will be automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
int32_t newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

int32_t	operator =(int32_t newValue)

void	setValue(int32_t newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFInt32 &f) const

int	operator !=(const SoMFInt32 &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

int32_t *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFLong

NAME

SoMFLong - synonym for SoMFInt32

INHERITS FROM

SoField > SoMField > SoMFLong

SYNOPSIS

#include <Inventor/fields/SoMFInt32.h>

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This class is obsolete, and is provided for backwards compatibility only. You should use the new SoMFInt32 class instead. If you compile your code -DIV_STRICT, #including the SoMFLong.h header file will cause a compile-time error.


SoMFMatrix

NAME

SoMFMatrix - multiple-value field containing any number of 4x4 matrices

INHERITS FROM

SoField > SoMField > SoMFMatrix

SYNOPSIS

#include <Inventor/fields/SoMFMatrix.h>

Methods from class SoMFMatrix:

void	setValue(float a11,
float a12,
float a13,
float a14,
float a21,
float a22,
float a23,
float a24,
float a31,
float a32,
float a33,
float a34,
float a41,
float a42,
float a43,
float a44)

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbMatrix &	operator [](int i) const

const SbMatrix *	getValues(int start) const

int	find(const SbMatrix & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbMatrix *newValues)

void	setValues(int start,
int num,
const SbMatrixd *newValues)

void	set1Value(int index,
const SbMatrix &newValue)

void	set1Value(int index,
const SbMatrixd &newValue)

const SbMatrix &	operator =(const SbMatrix &newValue)

void	setValue(const SbMatrix &newValue)

void	setValue(const SbMatrixd &newValue)

int	operator ==(const SoMFMatrix &f) const

int	operator !=(const SoMFMatrix &f) const

SbMatrix *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of 4x4 matrices.

SoMFMatrices are written to file as sets of 16 floating point numbers separated by whitespace. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example, two identity matrices might be written as:

[ 1 0 0 0  0 1 0 0  0 0 1 0  0 0 0 1,

  1 0 0 0  0 1 0 0  0 0 1 0  0 0 0 1 ]

METHODS

void	setValue(float a11,
float a12,
float a13,
float a14,
float a21,
float a22,
float a23,
float a24,
float a31,
float a32,
float a33,
float a34,
float a41,
float a42,
float a43,
float a44)

Makes this field contain one and only one value, which is the matrix given by the 16 values.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbMatrix &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbMatrix *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbMatrix & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbMatrix *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	setValues(int start,
int num,
const SbMatrixd *newValues)

Sets num values starting at index start to the values in newValues, an array of double precision values. The array will automatically be made larger to accommodate the new values, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified values are converted to single precision, then stored.

void	set1Value(int index,
const SbMatrix &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

void	set1Value(int index,
const SbMatrixd &newValue)

Sets the index'th value in the array to newValue, a double precision matrix. The array will be automatically expanded, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

const SbMatrix &	operator =(const SbMatrix &newValue)

void	setValue(const SbMatrix &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

void	setValue(const SbMatrixd &newValue)

Sets the first value in the array to newValue, a double precision matrix, and deletes the second and subsequent values. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoMFMatrix &f) const

int	operator !=(const SoMFMatrix &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbMatrix *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFName

NAME

SoMFName - multiple-value field containing any number of names

INHERITS FROM

SoField > SoMField > SoMFName

SYNOPSIS

#include <Inventor/fields/SoMFName.h>

Methods from class SoMFName:

void	setValues(int start,
int num,
const char *strings[])

void	setValue(const char *string)

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbName &	operator [](int i) const

const SbName *	getValues(int start) const

int	find(const SbName & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbName *newValues)

void	set1Value(int index,
const SbName &newValue)

const SbName &	operator=(const SbName &newValue)

void	setValue(const SbName &newValue)

int	operator ==(const SoMFName &f) const

int	operator !=(const SoMFName &f) const

SbName *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-valued field containing any number of names. Names are short series of characters generally used for labels or names, and are stored in a special table designed to allow fast lookup and comparison. For most purposes, an SoMFString field is probably more appropriate.

SoMFNames are written to file as one or more strings of characters. Names must begin with an underscore or alphabetic character, and must consist entirely of underscores, alphabetic characters, or numbers. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ Fred, Wilma, _Part_01, translationField ]

METHODS

void	setValues(int start,
int num,
const char *strings[])

Sets num values beginning at index start to the names contained in the given set of character strings.

void	setValue(const char *string)

Sets this field to contain one and only one value, given by string.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbName &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbName *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbName & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbName *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
const SbName &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

const SbName &	operator=(const SbName &newValue)

void	setValue(const SbName &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFName &f) const

int	operator !=(const SoMFName &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbName *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFNode

NAME

SoMFNode - multiple-value field containing any number of pointers to nodes

INHERITS FROM

SoField > SoMField > SoMFNode

SYNOPSIS

#include <Inventor/fields/SoMFNode.h>

Methods from class SoMFNode:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SoNode *	operator [](int i) const

const SoNode * *	getValues(int start) const

int	find(SoNode * targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SoNode * *newValues)

void	set1Value(int index,
SoNode * newValue)

SoNode *	operator =(SoNode * newValue)

void	setValue(SoNode * newValue)

int	operator ==(const SoMFNode &f) const

int	operator !=(const SoMFNode &f) const

SoNode * *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This field maintains a set of pointers to SoNode instances, correctly maintaining their reference counts.

SoMFNodes are written to file as one or more nodes. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ Cube {} , Sphere { radius 2.0 }, USE myTranslation ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SoNode *	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SoNode * *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(SoNode * targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SoNode * *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
SoNode * newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

SoNode *	operator =(SoNode * newValue)

void	setValue(SoNode * newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFNode &f) const

int	operator !=(const SoMFNode &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SoNode * *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFPath

NAME

SoMFPath - multiple-value field containing any number of pointers to paths

INHERITS FROM

SoField > SoMField > SoMFPath

SYNOPSIS

#include <Inventor/fields/SoMFPath.h>

Methods from class SoMFPath:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SoPath *	operator [](int i) const

const SoPath * *	getValues(int start) const

int	find(SoPath * targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SoPath * *newValues)

void	set1Value(int index,
SoPath * newValue)

SoPath *	operator =(SoPath * newValue)

void	setValue(SoPath * newValue)

int	operator ==(const SoMFPath &f) const

int	operator !=(const SoMFPath &f) const

SoPath * *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This field maintains a set of pointers to SoPath instances, correctly maintaining their reference counts.

SoMFPaths are written to file as one or more paths (see the SoPath reference page for a description of the file format for a path). When more than one value is present, all of the values are enclosed in square brackets and separated by commas.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SoPath *	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SoPath * *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(SoPath * targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SoPath * *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
SoPath * newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

SoPath *	operator =(SoPath * newValue)

void	setValue(SoPath * newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFPath &f) const

int	operator !=(const SoMFPath &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SoPath * *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFPlane

NAME

SoMFPlane - field containing several plane equations

INHERITS FROM

SoField > SoMField > SoMFPlane

SYNOPSIS

#include <Inventor/fields/SoMFPlane.h>

Methods from class SoMFPlane:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SbPlane	operator [](int i) const

const SbPlane *	getValues(int start) const

int	find(SbPlane targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbPlane *newValues)

void	set1Value(int index,
SbPlane newValue)

SbPlane	operator =(SbPlane newValue)

void	setValue(SbPlane newValue)

int	operator ==(const SoMFPlane &f) const

int	operator !=(const SoMFPlane &f) const

SbPlane *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing one or more plane equations.

SoMFPlanes are written to file as groups of four floating point values separated by whitespace. In each set of four values, the first three are the normal direction of the plane, the fourth is the distance of the plane from the origin (in the direction of the normal).

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 1 0 0 0, .707 .707 0 100, ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SbPlane	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbPlane *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(SbPlane targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbPlane *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
SbPlane newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

SbPlane	operator =(SbPlane newValue)

void	setValue(SbPlane newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFPlane &f) const

int	operator !=(const SoMFPlane &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbPlane *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFRotation

NAME

SoMFRotation - Multiple-value field containing any number of SbRotations.

INHERITS FROM

SoField > SoMField > SoMFRotation

SYNOPSIS

#include <Inventor/fields/SoMFRotation.h>

Methods from class SoMFRotation:

void	set1Value(int index,
const SbVec3f &axis,
float angle)

void	setValue(const SbVec3f &axis,
float angle)

void	set1Value(int index,
float q0,
float q1,
float q2,
float q3)

void	set1Value(int index,
const float q[4])

void	setValue(float q0,
float q1,
float q2,
float q3)

void	setValue(float q[4])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbRotation &	operator [](int i) const

const SbRotation *	getValues(int start) const

int	find(const SbRotation & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbRotation *newValues)

void	setValues(int start,
int num,
const SbRotationd *newValues)

void	set1Value(int index,
const SbRotation &newValue)

void	set1Value(int index,
const SbRotationd &newValue)

const SbRotation &	operator =(const SbRotation &newValue)

void	setValue(const SbRotation &newValue)

void	setValue(const SbRotationd &newValue)

int	operator ==(const SoMFRotation &f) const

int	operator !=(const SoMFRotation &f) const

SbRotation *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of SbRotations.

SoMFRotations are written to file as one or more sets of four floating point values. Each set of 4 values is an axis of rotation followed by the amount of right-handed rotation about that axis, in radians.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 1 0 0 0, -.707 -.707 0 1.57 ]

METHODS

void	set1Value(int index,
const SbVec3f &axis,
float angle)

Sets the index'th value to the given axis/angle.

void	setValue(const SbVec3f &axis,
float angle)

Makes this field have exactly one value, given by axis and angle.

void	set1Value(int index,
float q0,
float q1,
float q2,
float q3)

void	set1Value(int index,
const float q[4])

Sets the index'th value to the given quaternion (x, y, z, w).

void	setValue(float q0,
float q1,
float q2,
float q3)

void	setValue(float q[4])

Makes this field have exactly one value, given by the quaternion (x, y, z, w).

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbRotation &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbRotation *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbRotation & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbRotation *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	setValues(int start,
int num,
const SbRotationd *newValues)

Sets num values starting at index start to the values in newValues, an array of double precision rotations. The array will automatically be made larger to accommodate the new values, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified values are converted to single precision, then stored.

void	set1Value(int index,
const SbRotation &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

void	set1Value(int index,
const SbRotationd &newValue)

Sets the index'th value in the array to newValue, a double precision rotation. The array will be automatically expanded, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

const SbRotation &	operator =(const SbRotation &newValue)

void	setValue(const SbRotation &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

void	setValue(const SbRotationd &newValue)

Sets the first value in the array to newValue, a double precision rotation, and deletes the second and subsequent values. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoMFRotation &f) const

int	operator !=(const SoMFRotation &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbRotation *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.

SEE ALSO

SbRotation


SoMFShort

NAME

SoMFShort - multiple-value field containing any number of short integers

INHERITS FROM

SoField > SoMField > SoMFShort

SYNOPSIS

#include <Inventor/fields/SoMFShort.h>

Methods from class SoMFShort:

static SoType	getClassTypeId()

virtual void	getTypeId() const

short	operator [](int i) const

const short *	getValues(int start) const

int	find(short targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const short *newValues)

void	set1Value(int index,
short newValue)

short	operator =(short newValue)

void	setValue(short newValue)

int	operator ==(const SoMFShort &f) const

int	operator !=(const SoMFShort &f) const

short *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of short (16-bit) integers.

SoMFShorts are written to file as one or more short integer values, represented as decimal, hexadecimal (beginning with '0x') or octal (beginning with '0') values. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ -7, 0xFF, -033 ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

short	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const short *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(short targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const short *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
short newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

short	operator =(short newValue)

void	setValue(short newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFShort &f) const

int	operator !=(const SoMFShort &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

short *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFString

NAME

SoMFString - multiple-value field containing any number of strings

INHERITS FROM

SoField > SoMField > SoMFString

SYNOPSIS

#include <Inventor/fields/SoMFString.h>

Methods from class SoMFString:

setValues(int start,
int num,
const char *strings[])

setValue(const char *string)

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbString &	operator [](int i) const

const SbString *	getValues(int start) const

int	find(const SbString & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbString *newValues)

void	set1Value(int index,
const SbString &newValue)

const SbString &	operator =(const SbString &newValue)

void	setValue(const SbString &newValue)

int	operator ==(const SoMFString &f) const

int	operator !=(const SoMFString &f) const

SbString *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of strings.

SoMFStrings are written to file as one or more strings within double quotes. Any characters (including newlines) may appear within the quotes. To include a double quote character within the string, precede it with a backslash. For example:

[ cowEnizer , "Scene Boy" , "He said, \"I did not!\"" ]

METHODS

setValues(int start,
int num,
const char *strings[])

Sets num values, starting at index start, to the strings in the given character arrays.

setValue(const char *string)

Deletes all values currently in this field and sets this field to contain only the given string.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbString &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbString *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in-place.

int	find(const SbString & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue will be added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbString *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
const SbString &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

const SbString &	operator =(const SbString &newValue)

void	setValue(const SbString &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFString &f) const

int	operator !=(const SoMFString &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbString *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFTime

NAME

SoMFTime - multiple-value field containing any number of SbTime values

INHERITS FROM

SoField > SoMField > SoMFTime

SYNOPSIS

#include <Inventor/fields/SoMFTime.h>

Methods from class SoMFTime:

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbTime &	operator [](int i) const

const SbTime *	getValues(int start) const

int	find(const SbTime & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbTime *newValues)

void	set1Value(int index,
const SbTime &newValue)

const SbTime &	operator =(const SbTime &newValue)

void	setValue(const SbTime &newValue)

int	operator ==(const SoMFTime &f) const

int	operator !=(const SoMFTime &f) const

SbTime *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of SbTime values.

SoMFTimes are written to file as one or more double-precision floating point values representing the length of time in seconds. Absolute times are measured relative to 00:00:00 GMT, January 1, 1970.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 1.0, 1345600.1200055, 99.8 ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbTime &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbTime *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbTime & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbTime *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
const SbTime &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

const SbTime &	operator =(const SbTime &newValue)

void	setValue(const SbTime &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFTime &f) const

int	operator !=(const SoMFTime &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbTime *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.

SEE ALSO

SbTime


SoMFUInt32

NAME

SoMFUInt32 - multiple-value field containing any number of uint32_t integers

INHERITS FROM

SoField > SoMField > SoMFUInt32

SYNOPSIS

#include <Inventor/fields/SoMFUInt32.h>

Methods from class SoMFUInt32:

static SoType	getClassTypeId()

virtual void	getTypeId() const

uint32_t	operator[](int i) const

const uint32_t *	getValues(int start) const

int	find(uint32_t targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const uint32_t *newValues)

void	set1Value(int index,
uint32_t newValue)

uint32_t	operator =(uint32_t newValue)

void	setValue(uint32_t newValue)

int	operator ==(const SoMFUInt32 &f) const

int	operator !=(const SoMFUInt32 &f) const

uint32_t *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of uint32_t (32-bit) integers.

SoMFUInt32s are written to file as one or more uint32_t integers, in decimal, hexadecimal or octal format.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 17, 0xFFFFE0, 0755 ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

uint32_t	operator[](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const uint32_t *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(uint32_t targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const uint32_t *newValues)

Sets num values starting at index start to the values in newValues. The array will be automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
uint32_t newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

uint32_t	operator =(uint32_t newValue)

void	setValue(uint32_t newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFUInt32 &f) const

int	operator !=(const SoMFUInt32 &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

uint32_t *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFULong

NAME

SoMFULong - synonym for SoMFUInt32

INHERITS FROM

SoField > SoMField > SoMFULong

SYNOPSIS

#include <Inventor/fields/SoMFUInt32.h>

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This class is obsolete, and is provided for backwards compatibility only. You should use the new SoMFUInt32 class instead. If you compile your code -DIV_STRICT, #including the SoMFULong.h header file will cause a compile-time error.


SoMFUShort

NAME

SoMFUShort - multiple-value field containing any number of unsigned short integers

INHERITS FROM

SoField > SoMField > SoMFUShort

SYNOPSIS

#include <Inventor/fields/SoMFUShort.h>

Methods from class SoMFUShort:

static SoType	getClassTypeId()

virtual void	getTypeId() const

unsigned short	operator [](int i) const

const unsigned short *	getValues(int start) const

int	find(unsigned short targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const unsigned short *newValues)

void	set1Value(int index,
unsigned short newValue)

unsigned short	operator =(unsigned short newValue)

void	setValue(unsigned short newValue)

int	operator ==(const SoMFUShort &f) const

int	operator !=(const SoMFUShort &f) const

unsigned short *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of unsigned short integers.

SoMFUShorts are written to file as one or more unsigned short integer values, represented as decimal, hexadecimal (beginning with '0x') or octal (beginning with '0') values. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 7, 0xFF, 033 ]

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

unsigned short	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const unsigned short *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(unsigned short targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const unsigned short *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	set1Value(int index,
unsigned short newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

unsigned short	operator =(unsigned short newValue)

void	setValue(unsigned short newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

int	operator ==(const SoMFUShort &f) const

int	operator !=(const SoMFUShort &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

unsigned short *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFVec2f

NAME

SoMFVec2f - multiple-value field containing any number of two-dimensional vectors

INHERITS FROM

SoField > SoMField > SoMFVec2f

SYNOPSIS

#include <Inventor/fields/SoMFVec2f.h>

Methods from class SoMFVec2f:

void	setValues(int start,
int num,
const float xy[][2])

void	set1Value(int index,
float x,
float y)

void	set1Value(int index,
const float xy[2])

void	setValue(float x,
float y)

void	setValue(const float xy[2])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbVec2f &	operator [](int i) const

const SbVec2f *	getValues(int start) const

int	find(const SbVec2f & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbVec2f *newValues)

void	setValues(int start,
int num,
const SbVec2d *newValues)

void	set1Value(int index,
const SbVec2f &newValue)

void	set1Value(int index,
const SbVec2d &newValue)

const SbVec2f &	operator =(const SbVec2f &newValue)

void	setValue(const SbVec2f &newValue)

void	setValue(const SbVec2d &newValue)

int	operator ==(const SoMFVec2f &f) const

int	operator !=(const SoMFVec2f &f) const

SbVec2f *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of two-dimensional vectors.

SoMFVec2fs are written to file as one or more pairs of floating point values separated by whitespace. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 0 0, 1.2 3.4, 98.6 -4e1 ]

METHODS

void	setValues(int start,
int num,
const float xy[][2])

Sets num values starting at index start to the given floating point values. There must be num*2 values in the passed array.

void	set1Value(int index,
float x,
float y)

void	set1Value(int index,
const float xy[2])

Set the index'th value to the given floating point values.

void	setValue(float x,
float y)

void	setValue(const float xy[2])

Sets the field to contain the given value and only the given value (if the array had multiple values before, they are deleted).

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbVec2f &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbVec2f *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbVec2f & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbVec2f *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	setValues(int start,
int num,
const SbVec2d *newValues)

Sets num values starting at index start to the values in newValues, an array of double precision values. The array will automatically be made larger to accommodate the new values, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified values are converted to single precision, then stored.

void	set1Value(int index,
const SbVec2f &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

void	set1Value(int index,
const SbVec2d &newValue)

Sets the index'th value in the array to newValue, a double precision vectpr. The array will be automatically expanded, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

const SbVec2f &	operator =(const SbVec2f &newValue)

void	setValue(const SbVec2f &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

void	setValue(const SbVec2d &newValue)

Sets the first value in the array to newValue, a double precision vector, and deletes the second and subsequent values. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoMFVec2f &f) const

int	operator !=(const SoMFVec2f &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbVec2f *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFVec3f

NAME

SoMFVec3f - multiple-value field containing any number of three-dimensional vectors

INHERITS FROM

SoField > SoMField > SoMFVec3f

SYNOPSIS

#include <Inventor/fields/SoMFVec3f.h>

Methods from class SoMFVec3f:

void	setValues(int start,
int num,
const float xyz[][3])

void	set1Value(int index,
float x,
float y,
float z)

void	set1Value(int index,
const float xyz[3])

void	setValue(float x,
float y,
float z)

void	setValue(const float xyz[3])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbVec3f &	operator [](int i) const

const SbVec3f *	getValues(int start) const

int	find(const SbVec3f & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbVec3f *newValues)

void	setValues(int start,
int num,
const SbVec3d *newValues)

void	set1Value(int index,
const SbVec3f &newValue)

void	set1Value(int index,
const SbVec3d &newValue)

const SbVec3f &	operator =(const SbVec3f &newValue)

void	setValue(const SbVec3f &newValue)

void	setValue(const SbVec3d &newValue)

int	operator ==(const SoMFVec3f &f) const

int	operator !=(const SoMFVec3f &f) const

SbVec3f *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of three-dimensional vectors.

SoMFVec3fs are written to file as one or more triples of floating point values separated by whitespace.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 0 0 0, 1.2 3.4 5.6, 98.6 -4e1 212 ]

METHODS

void	setValues(int start,
int num,
const float xyz[][3])

Sets num values starting at index start to the given floating point values. There must be num*3 values in the passed array.

void	set1Value(int index,
float x,
float y,
float z)

void	set1Value(int index,
const float xyz[3])

Set the index'th value to the given floating point values.

void	setValue(float x,
float y,
float z)

void	setValue(const float xyz[3])

Sets the field to contain the given value and only the given value (if the array had multiple values before, they are deleted).

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbVec3f &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbVec3f *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbVec3f & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbVec3f *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	setValues(int start,
int num,
const SbVec3d *newValues)

Sets num values starting at index start to the values in newValues, an array of double precision vectors. The array will automatically be made larger to accommodate the new values, if necessary .Note that Open Inventor fields still store only single precision values, not double precision values. The specified values are converted to single precision, then stored.

void	set1Value(int index,
const SbVec3f &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

void	set1Value(int index,
const SbVec3d &newValue)

Sets the index'th value in the array to newValue, a double precision vector. The array will be automatically expanded, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

const SbVec3f &	operator =(const SbVec3f &newValue)

void	setValue(const SbVec3f &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

void	setValue(const SbVec3d &newValue)

Sets the first value in the array to newValue, a double precision vector, and deletes the second and subsequent values. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoMFVec3f &f) const

int	operator !=(const SoMFVec3f &f) const

Returns TRUE if all of the values of this field equal (do not equal) the given field. If the fields are different types, FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbVec3f *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMFVec4f

NAME

SoMFVec4f - multiple-value field containing any number of four-dimensional vectors

INHERITS FROM

SoField > SoMField > SoMFVec4f

SYNOPSIS

#include <Inventor/fields/SoMFVec4f.h>

Methods from class SoMFVec4f:

void	setValues(int start,
int num,
const float xyzw[][4])

void	set1Value(int index,
float x,
float y,
float z,
float w)

void	set1Value(int index,
const float xyzw[4])

void	setValue(float x,
float y,
float z,
float w)

void	setValue(const float xyzw[4])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbVec4f &	operator [](int i) const

const SbVec4f *	getValues(int start) const

int	find(const SbVec4f & targetValue,
SbBool addIfNotFound = FALSE)

void	setValues(int start,
int num,
const SbVec4f *newValues)

void	setValues(int start,
int num,
const SbVec4d *newValues)

void	set1Value(int index,
const SbVec4f &newValue)

void	set1Value(int index,
const SbVec4d &newValue)

const SbVec4f &	operator =(const SbVec4f &newValue)

void	setValue(const SbVec4f &newValue)

void	setValue(const SbVec4d &newValue)

int	operator ==(const SoMFVec4f &f) const

int	operator !=(const SoMFVec4f &f) const

SbVec4f *	startEditing()

void	finishEditing()

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A multiple-value field that contains any number of four-dimensional vectors.

SoMFVec4fs are written to file as one or more quadruples of floating point values separated by whitespace.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ 0 0 0 1, 1.2 3.4 5.6 1, 98.6 -4e1 212 1 ]

METHODS

void	setValues(int start,
int num,
const float xyzw[][4])

Sets num values starting at index start to the given floating point values. There must be num*4 values in the passed array.

void	set1Value(int index,
float x,
float y,
float z,
float w)

void	set1Value(int index,
const float xyzw[4])

Set the index'th value to the given floating point values.

void	setValue(float x,
float y,
float z,
float w)

void	setValue(const float xyzw[4])

Sets the field to contain the given value and only the given value (if the array had multiple values before, they are deleted).

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbVec4f &	operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage.

const SbVec4f *	getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place.

int	find(const SbVec4f & targetValue,
SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned).

void	setValues(int start,
int num,
const SbVec4f *newValues)

Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values, if necessary.

void	setValues(int start,
int num,
const SbVec4d *newValues)

Sets num values starting at index start to the values in newValues, an array of double precision vectors. The array will automatically be made larger to accommodate the new values, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified values are converted to single precision, then stored.

void	set1Value(int index,
const SbVec4f &newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary.

void	set1Value(int index,
const SbVec4d &newValue)

Sets the index'th value in the array to newValue, a double precision vector. The array will be automatically expanded, if necessary. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

const SbVec4f &	operator =(const SbVec4f &newValue)

void	setValue(const SbVec4f &newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values.

void	setValue(const SbVec4d &newValue)

Sets the first value in the array to newValue, a double precision vector, and deletes the second and subsequent values. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoMFVec4f &f) const

int	operator !=(const SoMFVec4f &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example).

SbVec4f *	startEditing()

void	finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.).

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


SoMField

NAME

SoMField - base class for all multiple-valued fields

INHERITS FROM

SoField > SoMField

SYNOPSIS

#include <Inventor/fields/SoField.h>

Methods from class SoMField:

int	getNum() const

void	setNum(int num)

virtual void	deleteValues(int start,
int num = -1)

virtual void	insertSpace(int start,
int num)

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

Each class derived from SoMField begins with an SoMF prefix and contains a dynamic array of values of a particular type. Each has a setValues() method that is passed a pointer to a const array of values of the correct type; these values are copied into the array in the field, making extra room in the array if necessary. The start and num parameters to this method indicate the starting array index to copy into and the number of values to copy.

The getValues() method for a multiple-value field returns a const pointer to the array of values in the field. (Because this pointer is const, it cannot be used to change values in this array.)

In addition, the indexing operator "[ ]" is overloaded to return the i'th value in the array; because it returns a const reference, it can be used only to get values, not to set them.

Methods are provided for getting the number of values in the field, inserting space for new values in the middle, and deleting values.

There are other methods that allow you to set only one value of several in the field and to set the field to contain one and only one value.

Two other methods can be used to make several changes to a multiple-value field without the overhead of copying values into and out of the fields. The startEditing() method returns a non-const pointer to the array of values in the field; this pointer can then be used to change (but not add or remove) any values in the array. The finishEditing() method indicates that the editing is done and notifies any sensors or engines that may be connected to the field.

SoMFields are written to file as a series of values separated by commas, all enclosed in square brackets. If the field has no values (getNum() returns zero), then only the square brackets ("[ ]") are written. The last value may optionally be followed by a comma. Each field subtype defines how the values are written; for example, a field whose values are integers might be written as:

[ 1, 2, 3, 4 ]

or:

[ 1, 2, 3, 4, ]

METHODS

int	getNum() const

Returns the number of values currently in the field.

void	setNum(int num)

Forces this field to have exactly num values, inserting or deleting values as necessary.

virtual void	deleteValues(int start,
int num = -1)

Deletes num values beginning at index start (index start through start+num-1 will be deleted, and any leftover values will be moved down to fill in the gap created). A num of -1 means delete all values from start to the last value in the field; getNum() will return start as the number of values in the field after this operation (deleteValues(0, -1) empties the field).

virtual void	insertSpace(int start,
int num)

Inserts space for num values at index start. Index start through start+num-1 will be moved up to make room. For example, to make room for 7 new values at the beginning of the field call insertSpace(0, 7).

SbBool	set1(int index,
const char *valueString)

void	get1(int index,
SbString &valueString)

These are equivalent to the set() and get() methods of SoField, but they operate on only one value. See the SoField methods for details.

static SoType	getClassTypeId()

Return the type identifier for this field class.

SEE ALSO

SoNode, SoEngine


SoMarkerSet

NAME

SoMarkerSet - extension of PointSet that draws a small bitmap (symbol) at each 3D location

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape > SoPointSet > SoMarkerSet

SYNOPSIS

#include <Inventor/nodes/SoMarkerSet.h>

enum MarkerType	{
5x5 markers
SoMarkerSet::CROSS_5_5,
SoMarkerSet::PLUS_5_5,
SoMarkerSet::MINUS_5_5,
SoMarkerSet::SLASH_5_5,
SoMarkerSet::BACKSLASH_5_5,
SoMarkerSet::BAR_5_5,
SoMarkerSet::STAR_5_5,
SoMarkerSet::Y_5_5,
SoMarkerSet::LIGHTNING_5_5,
SoMarkerSet::WELL_5_5,
5x5 markers (line representation)
SoMarkerSet::CIRCLE_LINE_5_5,
SoMarkerSet::SQUARE_LINE_5_5,
SoMarkerSet::DIAMOND_LINE_5_5,
SoMarkerSet::TRIANGLE_LINE_5_5,
SoMarkerSet::RHOMBUS_LINE_5_5,
SoMarkerSet::HOURGLASS_LINE_5_5,
SoMarkerSet::SATELLITE_LINE_5_5,
SoMarkerSet::PINE_TREE_LINE_5_5,
SoMarkerSet::CAUTION_LINE_5_5,
SoMarkerSet::SHIP_LINE_5_5,
5x5 markers (filled representation)
SoMarkerSet::CIRCLE_FILLED_5_5,
SoMarkerSet::SQUARE_FILLED_5_5,
SoMarkerSet::DIAMOND_FILLED_5_5,
SoMarkerSet::TRIANGLE_FILLED_5_5,
SoMarkerSet::RHOMBUS_FILLED_5_5,
SoMarkerSet::HOURGLASS_FILLED_5_5,
SoMarkerSet::SATELLITE_FILLED_5_5,
SoMarkerSet::PINE_TREE_FILLED_5_5,
SoMarkerSet::CAUTION_FILLED_5_5,
SoMarkerSet::SHIP_FILLED_5_5,
7x7 markers
SoMarkerSet::CROSS_7_7,
SoMarkerSet::PLUS_7_7,
SoMarkerSet::MINUS_7_7,
SoMarkerSet::SLASH_7_7,
SoMarkerSet::BACKSLASH_7_7,
SoMarkerSet::BAR_7_7,
SoMarkerSet::STAR_7_7,
SoMarkerSet::Y_7_7,
SoMarkerSet::LIGHTNING_7_7,
SoMarkerSet::WELL_7_7,
7x7 markers (line representation)
SoMarkerSet::CIRCLE_LINE_7_7,
SoMarkerSet::SQUARE_LINE_7_7,
SoMarkerSet::DIAMOND_LINE_7_7,
SoMarkerSet::TRIANGLE_LINE_7_7,
SoMarkerSet::RHOMBUS_LINE_7_7,
SoMarkerSet::HOURGLASS_LINE_7_7,
SoMarkerSet::SATELLITE_LINE_7_7,
SoMarkerSet::PINE_TREE_LINE_7_7,
SoMarkerSet::CAUTION_LINE_7_7,
SoMarkerSet::SHIP_LINE_7_7,
7x7 markers (filled representation)
SoMarkerSet::CIRCLE_FILLED_7_7,
SoMarkerSet::SQUARE_FILLED_7_7,
SoMarkerSet::DIAMOND_FILLED_7_7,
SoMarkerSet::TRIANGLE_FILLED_7_7,
SoMarkerSet::RHOMBUS_FILLED_7_7,
SoMarkerSet::HOURGLASS_FILLED_7_7,
SoMarkerSet::SATELLITE_FILLED_7_7,
SoMarkerSet::PINE_TREE_FILLED_7_7,
SoMarkerSet::CAUTION_FILLED_7_7,
SoMarkerSet::SHIP_FILLED_7_7,
9x9 markers
SoMarkerSet::CROSS_9_9,
SoMarkerSet::PLUS_9_9,
SoMarkerSet::MINUS_9_9,
SoMarkerSet::SLASH_9_9,
SoMarkerSet::BACKSLASH_9_9,
SoMarkerSet::BAR_9_9,
SoMarkerSet::STAR_9_9,
SoMarkerSet::Y_9_9,
SoMarkerSet::LIGHTNING_9_9,
SoMarkerSet::WELL_9_9,
9x9 markers (line representation)
SoMarkerSet::CIRCLE_LINE_9_9,
SoMarkerSet::SQUARE_LINE_9_9,
SoMarkerSet::DIAMOND_LINE_9_9,
SoMarkerSet::TRIANGLE_LINE_9_9,
SoMarkerSet::RHOMBUS_LINE_9_9,
SoMarkerSet::HOURGLASS_LINE_9_9,
SoMarkerSet::SATELLITE_LINE_9_9,
SoMarkerSet::PINE_TREE_LINE_9_9,
SoMarkerSet::CAUTION_LINE_9_9,
SoMarkerSet::SHIP_LINE_9_9,
9x9 markers (filled representation)
SoMarkerSet::CIRCLE_FILLED_9_9,
SoMarkerSet::SQUARE_FILLED_9_9,
SoMarkerSet::DIAMOND_FILLED_9_9,
SoMarkerSet::TRIANGLE_FILLED_9_9,
SoMarkerSet::RHOMBUS_FILLED_9_9,
SoMarkerSet::HOURGLASS_FILLED_9_9,
SoMarkerSet::SATELLITE_FILLED_9_9,
SoMarkerSet::PINE_TREE_FILLED_9_9,
SoMarkerSet::CAUTION_FILLED_9_9,
SoMarkerSet::SHIP_FILLED_9_9
}

Fields from class SoMarkerSet:

SoMFInt32	markerIndex

Fields from class SoPointSet:

SoSFInt32	numPoints

Fields from class SoNonIndexedShape:

SoSFInt32	startIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoMarkerSet:

SoMarkerSet()

static int	getNumDefinedMarkers()

static void	addMarker(int markerIndex,
const SbVec2s &size,
const unsigned char *bytes,
SbBool isLSBFirst = TRUE,
SbBool isUpToDown = TRUE)

static SbBool	getMarker(int markerIndex,
SbVec2s &size,
const unsigned char *&bytes,
SbBool &isLSBFirst)

static SbBool	removeMarker(int markerIndex)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class draws a small bitmap at each 3D location of a Point Set. You set the bitmap to be drawn at each point using the field markerIndex, which indexes into the list of defined bitmaps. You can add your own bitmaps to this list with the addMarker() function. The color of each bitmap is determined from the materials in the state just as for SoPointSet, and can be indexed.

The following markers are defined by default:

FIELDS

SoMFInt32	markerIndex

Specifies the marker index (type of marker)

METHODS

SoMarkerSet()

Constructor.

static int	getNumDefinedMarkers()

Return the number of defined markers

static void	addMarker(int markerIndex,
const SbVec2s &size,
const unsigned char *bytes,
SbBool isLSBFirst = TRUE,
SbBool isUpToDown = TRUE)

Add a new marker with index markerIndex. If the marker exists, it is replaced. size is the size of the marker in pixels.bytes is the marker bitmap. The bitmaps are arranged rows by rows from left to right and down to up (or up to down according to the parameter isUpToDown. Each byte corresponds to eight pixels.

isLSBFirst: if TRUE, bits are ordered within a byte from Least Significant to most significant; otherwise the first bit in each byte is the most significant one.
isUpToDown: if TRUE, marker bitmap is described from up to down (that is bytes[0] is the left top corner of the bitmap), otherwise from down to up (that is bytes[0] is the bottom left corner).

static SbBool	getMarker(int markerIndex,
SbVec2s &size,
const unsigned char *&bytes,
SbBool &isLSBFirst)

Retrieve the description of the marker with index markerIndex. Returns TRUE if the marker exists, FALSE otherwise.

static SbBool	removeMarker(int markerIndex)

Remove the marker with index markerIndex. Return TRUE if the marker has been removed, FALSE otherwise.

ACTION BEHAVIOR

SoGLRenderAction

Draws bitmaps based on the current coordinates.

SoGetPrimitiveCountAction

Increments the image count by 1 for each marker in the marker set.

FILE FORMAT/DEFAULT

MarkerSet {

vertexProperty	NULL

startIndex	0

numPoints	-1

markerIndex	0

}

SEE ALSO

SoCoordinate3, SoPointSet, SoVertexProperty


SoMaterial

NAME

SoMaterial - surface material definition node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoMaterial

SYNOPSIS

#include <Inventor/nodes/SoMaterial.h>

Fields from class SoMaterial:

SoMFColor	ambientColor

SoMFColor	diffuseColor

SoMFColor	specularColor

SoMFColor	emissiveColor

SoMFFloat	shininess

SoMFFloat	transparency

Methods from class SoMaterial:

SoMaterial()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines the current surface material properties for all subsequent shapes. SoMaterial sets several components of the current material during traversal.

Multiple values can be specified for the diffuseColor and transparency. Different shapes interpret materials with multiple values differently. To bind materials to shapes, use an SoMaterialBinding node.

FIELDS

SoMFColor	ambientColor

Ambient color of the surface.

SoMFColor	diffuseColor

Diffuse color(s) of the surface.

SoMFColor	specularColor

Specular color of the surface.

SoMFColor	emissiveColor

Emissive color of the surface.

SoMFFloat	shininess

Shininess coefficient of the surface. Values can range from 0.0 for no shininess (a diffuse surface) to 1.0 for maximum shininess (a highly polished surface).

SoMFFloat	transparency

Transparency value(s) of the surface. Values can range from 0.0 for opaque surfaces to 1.0 for completely transparent surfaces. If the transparency type is SoGLRenderAction::SCREEN_DOOR then only the first transparency value will be used. With other transparency types, multiple transparencies will be used, if the SoMaterial node contains as many transparencies as diffuse colors. If there are not as many transparencies as diffuse colors, only the first transparency will be used.

METHODS

SoMaterial()

Creates a material node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the ambient color, the diffuse color, the specular color, the emissive color, the shininess, and the transparency of the current material.

FILE FORMAT/DEFAULT

Material {

ambientColor	0.2 0.2 0.2

diffuseColor	0.8 0.8 0.8

specularColor	0 0 0

emissiveColor	0 0 0

shininess	0.2

transparency	0

}

SEE ALSO

SoBaseColor, SoLightModel, SoMaterialBinding, SoPackedColor


SoMaterialBinding

NAME

SoMaterialBinding - node that specifies how multiple materials are bound to shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoMaterialBinding

SYNOPSIS

#include <Inventor/nodes/SoMaterialBinding.h>

enum Binding	{
SoMaterialBinding::OVERALL
Whole object has same material
SoMaterialBinding::PER_PART
One material for each part of object
SoMaterialBinding::PER_PART_INDEXED
One material for each part, indexed
SoMaterialBinding::PER_FACE
One material for each face of object
SoMaterialBinding::PER_FACE_INDEXED
One material for each face, indexed
SoMaterialBinding::PER_VERTEX
One material for each vertex of object
SoMaterialBinding::PER_VERTEX_INDEXED
One material for each vertex, indexed
}

Fields from class SoMaterialBinding:

SoSFEnum	value

Methods from class SoMaterialBinding:

SoMaterialBinding()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies how the current materials are bound to shapes that follow in the scene graph. Each shape node may interpret bindings differently. The current material always has a base value, which is defined by the first value of all material fields. Since material fields may have multiple values, the binding determines how these values are distributed over a shape.

The bindings for faces and vertices are meaningful only for shapes that are made from faces and vertices. Similarly, the indexed bindings are only used by the shapes that allow indexing.

The bindings apply only to diffuse colors and transparency. Other materials (emissive, specular, ambient, shininess) will have the first value applied to the entire shape, regardless of the material binding or the number provided.

If the number of transparencies is less than the number of diffuse colors, only the first transparency value will be used, regardless of the material binding. If the number of diffuse colors in the state is less than the number required for the given binding, a debug warning will be printed and unpredictable colors will result.

FIELDS

SoSFEnum	value

Specifies how to bind materials to shapes.

METHODS

SoMaterialBinding()

Creates a material binding node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current material binding type.

FILE FORMAT/DEFAULT

MaterialBinding {

value	OVERALL

}

SEE ALSO

SoMaterial, SoNormalBinding, SoShape, SoTextureCoordinateBinding


SoMatrixTransform

NAME

SoMatrixTransform - node that specifies a 3D geometric transformation as a matrix

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoMatrixTransform

SYNOPSIS

#include <Inventor/nodes/SoMatrixTransform.h>

Fields from class SoMatrixTransform:

SoSFMatrix	matrix

Methods from class SoMatrixTransform:

SoMatrixTransform()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a geometric 3D transformation with a single SbMatrix. Note that some matrices (such as singular ones) may result in errors in bounding boxes, picking, and lighting.

FIELDS

SoSFMatrix	matrix

Transformation matrix.

METHODS

SoMatrixTransform()

Creates a matrix transformation node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Concatenates matrix given in the matrix field with the current transformation matrix.

SoGetMatrixAction

Returns transformation matrix specified in the matrix field.

FILE FORMAT/DEFAULT

MatrixTransform {

matrix	1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

}

SEE ALSO

SoTransform, SoMultipleCopy


SoMemoryError

NAME

SoMemoryError - memory error handling

INHERITS FROM

SoError > SoMemoryError

SYNOPSIS

#include <Inventor/errors/SoMemoryError.h>

Methods from class SoMemoryError:

static void	setHandlerCallback(SoErrorCB *cb,
void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

static SoType	getClassTypeId()

Methods from class SoError:

const SbString &	getDebugString() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

SoMemoryError is used for errors reported due to lack of memory.

METHODS

static void	setHandlerCallback(SoErrorCB *cb,
void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

Sets/returns handler callback for SoMemoryError class.

static SoType	getClassTypeId()

Returns type identifier for SoMemoryError class.

SEE ALSO

SoDebugError, SoReadError


SoMotion3Event

NAME

SoMotion3Event - 3D motion events

INHERITS FROM

SoEvent > SoMotion3Event

SYNOPSIS

#include <Inventor/events/SoMotion3Event.h>

Methods from class SoMotion3Event:

SoMotion3Event()

static SoType	getClassTypeId()

void	setTranslation(const SbVec3f &t)

const SbVec3f &	getTranslation() const

void	setRotation(const SbRotation &r)

const SbRotation &	getRotation() const

Methods from class SoEvent:

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

void	setTime(SbTime t)

SbTime	getTime() const

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

DESCRIPTION

SoMotion3Event represents 3D relative motion events in the Open Inventor event model.

METHODS

SoMotion3Event()

Constructor.

static SoType	getClassTypeId()

Return the type id for the SoMotion3Event class.

void	setTranslation(const SbVec3f &t)

const SbVec3f &	getTranslation() const

Set and get the relative change in translation since the last translation event.

void	setRotation(const SbRotation &r)

const SbRotation &	getRotation() const

Set and get the relative change in rotation since the last rotation event.

SEE ALSO

SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice


SoMouseButtonEvent

NAME

SoMouseButtonEvent - mouse button press and release events

INHERITS FROM

SoEvent > SoButtonEvent > SoMouseButtonEvent

SYNOPSIS

#include <Inventor/events/SoMouseButtonEvent.h>

#define SO_MOUSE_PRESS_EVENT(EVENT,BUTTON) \ (SoMouseButtonEvent::isButtonPressEvent(EVENT,SoMouseButtonEvent::BUTTON))

#define SO_MOUSE_RELEASE_EVENT(EVENT,BUTTON) \  (SoMouseButtonEvent::isButtonReleaseEvent(EVENT,SoMouseButtonEvent::BUTTON))

enum Button	{
SoMouseButtonEvent::ANY
Any button
SoMouseButtonEvent::BUTTON1
First mouse button
SoMouseButtonEvent::BUTTON2
Second mouse button
SoMouseButtonEvent::BUTTON3
Third mouse button
}

Methods from class SoMouseButtonEvent:

SoMouseButtonEvent()

static SoType	getClassTypeId()

void	setButton(SoMouseButtonEvent::Button b)

SoMouseButtonEvent::Button	getButton() const

static SbBool	isButtonPressEvent(const SoEvent *e,
SoMouseButtonEvent::Button whichButton)

static SbBool	isButtonReleaseEvent(const SoEvent *e,
SoMouseButtonEvent::Button whichButton)

Methods from class SoButtonEvent:

void	setState(SoButtonEvent::State s)

SoButtonEvent::State	getState() const

Methods from class SoEvent:

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

void	setTime(SbTime t)

SbTime	getTime() const

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

DESCRIPTION

SoMouseButtonEvent represents mouse button press and release events in the Open Inventor event model.

METHODS

SoMouseButtonEvent()

Constructor.

static SoType	getClassTypeId()

Return the type id for the SoMouseButtonEvent class.

void	setButton(SoMouseButtonEvent::Button b)

SoMouseButtonEvent::Button	getButton() const

Set and get which mouse button generated the event.

static SbBool	isButtonPressEvent(const SoEvent *e,
SoMouseButtonEvent::Button whichButton)

static SbBool	isButtonReleaseEvent(const SoEvent *e,
SoMouseButtonEvent::Button whichButton)

Returns whether the passed event is a mouse button press or release event of the passed button. When SoMouseButtonEvent::ANY is passed, this returns TRUE if the event represents a button press or release of any mouse button.

SEE ALSO

SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice


SoMultipleCopy

NAME

SoMultipleCopy - group node that traverses multiple times, applying matrices

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoMultipleCopy

SYNOPSIS

#include <Inventor/nodes/SoMultipleCopy.h>

Fields from class SoMultipleCopy:

SoMFMatrix	matrix

Methods from class SoMultipleCopy:

SoMultipleCopy()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node traverses its children, in order, several times, applying a different matrix each time. The matrices are stored in the multiple-value matrix field. Each matrix is concatenated to the current transformation matrix, and all of the children are traversed. This allows the user to put multiple copies of the same data in different locations easily and efficiently.

Traversing the Nth child sets the current switch value to N, for use with inherited switch values (see SoSwitch).

FIELDS

SoMFMatrix	matrix

Set of matrices to apply to children.

METHODS

SoMultipleCopy()

Creates a multiple copy node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Traverses all children for each matrix, saving and restoring state before and after each traversal.

SoSearchAction

Traverses all children once, setting the inherited switch value to SO_SWITCH_ALL first.

FILE FORMAT/DEFAULT

MultipleCopy {

matrix	1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

}

SEE ALSO

SoArray, SoSwitch


SoNode

NAME

SoNode - abstract base class for all database nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode

SYNOPSIS

#include <Inventor/nodes/SoNode.h>

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

static SoType	getClassTypeId()

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This is the abstract base class from which all scene graph node classes are derived.

METHODS

void	setOverride(SbBool state)

Turns override flag on or off.

SbBool	isOverride() const

Returns the state of the override flag.

SoNode *	copy(SbBool copyConnections = FALSE) const

Creates and returns an exact copy of the node. If the node is a group, it copies the children as well. If copyConnections is TRUE (it is FALSE by default), any connections to (but not from) fields of the node are copied, as well. Note that multiple references to a node under the node to be copied will result in multiple references to the copy of that node.

virtual SbBool	affectsState() const

Returns TRUE if a node has an effect on the state during traversal. The default method returns TRUE. Node classes (such as SoSeparator) that isolate their effects from the rest of the graph override this method to return FALSE.

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

A node's name can be set using SoBase::setName(). These methods allow nodes to be looked up by name. The first one returns the last node given the specified name. The second one returns the number of nodes with the given name, and adds to list pointers to those nodes.

static SoType	getClassTypeId()

Returns type identifier for the SoNode class.

ACTION BEHAVIOR

SoSearchAction

If the node pointer, type, or name matches the search criteria, returns a path to the node.

SoWriteAction

Writes the contents of the node to the current SoOutput.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoPath, SoAction, SoNodeKit


SoNodeKit

NAME

SoNodeKit - initializes nodekit classes

INHERITS FROM

SoNodeKit

SYNOPSIS

#include <Inventor/nodekits/SoNodeKit.h>

Methods from class SoNodeKit:

static void	init()

DESCRIPTION

This class is used to initialize all nodekit classes.

METHODS

static void	init()

Initialize all nodekit classes by registering them with the database. This function needs to be called before any other nodekit class may be constructed or accessed. Note that this is called automatically by SoInteraction::init() and SoWin::init(), so if you have made either of these calls, there is no need to call SoNodeKit::init() directly.

SEE ALSO

SoAppearanceKit, SoBaseKit, SoCameraKit, SoInteraction, SoLightKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit, SoWin


SoNodeKitDetail

NAME

SoNodeKitDetail - stores detail information about a nodekit

INHERITS FROM

SoDetail > SoNodeKitDetail

SYNOPSIS

#include <Inventor/details/SoNodeKitDetail.h>

Methods from class SoNodeKitDetail:

SoNodeKitDetail()

virtual	~SoNodeKitDetail()

SoBaseKit *	getNodeKit() const

SoNode *	getPart() const

const SbName &	getPartName() const

Methods from class SoDetail:

SoDetail *	copy() const

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a nodekit. This consists of a pointer to the nodekit, a pointer to the child part within the nodekit, and the name of the child part.

During a pick action, each nodekit along the picked path creates its own SoNodeKitDetail. Together, the full set of details gives you complete picture of the pickpath.

Since nodekits have hidden children (see the reference page for SoBaseKit), a regular SoPath ends at the topmost nodekit in the path. If you cast the pickpath from an SoPath pointer to an SoNodeKitPath pointer, you can then retrieve all nodekits along the path and examine their corresponding details.

METHODS

SoNodeKitDetail()

virtual	~SoNodeKitDetail()

Constructor and destructor.

SoBaseKit *	getNodeKit() const

Returns a pointer to the nodekit that created this detail.

SoNode *	getPart() const

Returns a pointer to the part selected within the nodekit that created this detail.

const SbName &	getPartName() const

Returns the name of the part selected within the nodekit that created this detail. (See SoRayPickAction in the ACTIONS section of the SoBaseKit reference page for more information).

SEE ALSO

SoBaseKit, SoNodeKitPath, SoDetail, SoPickedPoint


SoNodeKitListPart

NAME

SoNodeKitListPart - group node with restricted children

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoNodeKitListPart

SYNOPSIS

#include <Inventor/nodekits/SoNodeKitListPart.h>

Methods from class SoNodeKitListPart:

SoNodeKitListPart()

SoType	getContainerType() const

void	setContainerType(SoType newContainerType )

const SoTypeList &	getChildTypes() const

void	addChildType(SoType typeToAdd )

SbBool	isTypePermitted(SoType typeToCheck ) const

SbBool	isChildPermitted(const SoNode *child ) const

void	containerSet(const char *fieldDataString )

void	lockTypes()

SbBool	isTypeLocked() const

void	addChild(SoNode *child )

void	insertChild(SoNode *child,
int childIndex )

SoNode *	getChild(int index ) const

int	findChild(SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node class is very similar to SoGroup with the exception that it specifies restrictions on the type of children that it allows. It is used by nodekits to restrict child types within list parts (see the reference page for SoBaseKit).

By default, any kind of child may be added. Methods of this class allow you to restrict the type of allowable children, and to lock down the types so that this type list may no longer be altered.

Inside the SoNodeKitListPart is a container node, which in turn contains the children. The container node is a hidden child, and the type of node used may be set with setContainerType(). In this way, you can make the nodekitlist behave like a group, a separator, or any other subclass of group. The container is not accessible so that the nodekitlist may retain control over what kinds of children are added.

METHODS

SoNodeKitListPart()

Constructor.

SoType	getContainerType() const

void	setContainerType(SoType newContainerType )

Gets and sets the type of node used as the container.

const SoTypeList &	getChildTypes() const

Returns the permitted child node types. By default, any type of node is permitted, so the list contains one entry of type SoNode.

void	addChildType(SoType typeToAdd )

Permits the node type typeToAdd as a child. The first time the addChildType() method is called, the default of SoNode is overridden and only the new typeToAdd is permitted. In subsequent calls to addChildType(), the typeToAdd is added to the existing types.

SbBool	isTypePermitted(SoType typeToCheck ) const

Returns whether a node of type typeToCheck may be added as a child.

SbBool	isChildPermitted(const SoNode *child ) const

Returns whether the node child may be added to this list. This will return TRUE if the type of child is one of the permissible child types.

void	containerSet(const char *fieldDataString )

Sends a string to the set() method on the container node. This is how you can set the value of a switch node if the container node is an SoSwitch, for example.

void	lockTypes()

This function permanently locks the permitted child types and the container type permanently. Calls to setContainerType() and addChildType() will have no effect after this function is called.

SbBool	isTypeLocked() const

Returns whether the permitted child types and the container type are locked (i.e. cannot be changed). See lockTypes()

void	addChild(SoNode *child )

void	insertChild(SoNode *child,
int childIndex )

SoNode *	getChild(int index ) const

int	findChild(SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

These are the functions used to edit the children. They parallel those of SoGroup, except that they always check the child types against those which are permissible. See SoGroup for details.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

NodeKitListPart {

containerTypeName	"Group"

childTypeNames	""

containerNode	NULL

}

SEE ALSO

SoBaseKit, SoNodeKit, SoNodeKitDetail, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit


SoNodeKitPath

NAME

SoNodeKitPath - path that points to a list of hierarchical nodekits

INHERITS FROM

SoBase > SoPath > SoNodeKitPath

SYNOPSIS

#include <Inventor/SoNodeKitPath.h>

Methods from class SoNodeKitPath:

void	append(SoBaseKit *childKit)

void	append(const SoNodeKitPath *fromPath)

void	pop()

SoNode *	getTail() const

SoNode *	getNode(int i) const

SoNode *	getNodeFromTail(int i) const

int	getLength() const

void	truncate(int start)

SbBool	containsNode(const SoNodeKit *nodeKit) const

int	findFork(const SoNodeKitPath *path) const

friend int	operator ==(const SoNodeKitPath &p1,
const SoNodeKitPath &p2)

Methods from class SoPath:

void	setHead(SoNode *node)

SoNode *	getHead() const

SbBool	containsPath(const SoPath *path) const

SoPath *	copy(int startFromNodeIndex = 0,
int numNodes = 0) const

static SoPath *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoPathList &list)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoNodeKitPath is a subclass of SoPath that lets you look at nodekits below the top nodekit in the path. Since nodekits have hidden children, when you call getTail() on a regular path, it returns the top-most nodekit on the path. This occurs even though the path might contain extra internal information leading to a node far deeper in the scene graph. For example, when picking an object inside an SoSceneKit, the regular path would end at the scenekit. But a nodekit path would continue further down listing the other nodekits below it in the path.

Intermediary (private) nodes between nodekits are not included in the nodekit path.

Note that there is no constructor for an SoNodeKitPath, so you can not create one. Rather, you cast an (SoPath *) into an (SoNodeKitPath *), which returns nodekit-style values from all the same questions as SoPath.

Also, some methods of SoPath may not be called on an SoNodeKitPath. Any methods which take a regular SoNode as an argument (except for setHead()) are not accessible, and replaced by methods that take an SoBaseKit as an argument instead. Methods which allow the programmer to refer to the child index of a node beneath its parent are also inaccessible; since an SoNodeKitPath only shows nodekits and hides any private parts, successive nodekits in the path may not actually be parent and child.

METHODS

void	append(SoBaseKit *childKit)

Adds childKit to end of chain; uses first occurrence of childKit as a part within current last nodekit. If the path is empty, this is equivalent to setHead(childKit).

void	append(const SoNodeKitPath *fromPath)

Adds all nodekits in fromPath's chain to end of chain; the head node of fromPath must be the same as or a child of the current tail node.

void	pop()

Pops the last nodekit off the end of the path.

SoNode *	getTail() const

Return the last nodekit in a path chain. Note that getHead() is not redefined from SoPath, since an SoNodeKitPath need not begin with a nodekit; the restriction is placed only on successive nodes on the path.

SoNode *	getNode(int i) const

Returns a pointer to the i'th node in the nodekit path.

SoNode *	getNodeFromTail(int i) const

Returns a pointer to the i'th nodekit in the chain, counting backward from the tail nodekit. Passing 0 for i returns the tail nodekit.

int	getLength() const

Returns length of path chain (number of nodekits).

void	truncate(int start)

Truncates the path chain, removing all nodes from index start on. Calling truncate(0)  empties the path entirely.

SbBool	containsNode(const SoNodeKit *nodeKit) const

Returns TRUE if the passed nodekit is found anywhere in the path chain.

int	findFork(const SoNodeKitPath *path) const

If the two paths have different head nodes, this returns -1. Otherwise, it returns the path chain index of the last nodekit (starting at the head) that is the same for both paths.

friend int	operator ==(const SoNodeKitPath &p1,
const SoNodeKitPath &p2)

Returns TRUE if all node pointers in the two nodekit path chains are equal.

SEE ALSO

SoBaseKit, SoPath, SoRayPickAction, SoSearchAction


SoNodeList

NAME

SoNodeList - maintains a list of pointers to nodes

INHERITS FROM

SbPList > SoBaseList > SoNodeList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoNodeList:

SoNodeList()

SoNodeList(int size)

SoNodeList(const SoNodeList &l)

~SoNodeList()

void	append(SoNode *node)

SoNode *	operator [](int i) const

SoNodeList &	operator =(const SoNodeList &l)

Methods from class SoBaseList:

void	insert(SoBase *ptr,
int addBefore)

void	remove(int which)

void	truncate(int start)

void	copy(const SoBaseList &l)

void	set(int i,
SoBase *ptr)

void	addReferences(SbBool flag)

Methods from class SbPList:

int	find(const void *ptr) const

int	getLength() const

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SoBaseList holds lists of pointers to SoNodes. It updates reference counts to nodes in the list whenever adding or removing pointers.

METHODS

SoNodeList()

Constructor.

SoNodeList(int size)

Constructor that pre-allocates storage for size pointers.

SoNodeList(const SoNodeList &l)

Constructor that copies the contents of another list.

~SoNodeList()

Destructor.

void	append(SoNode *node)

Adds a pointer to the end of the list.

SoNode *	operator [](int i) const

Accesses an element of a list.

SoNodeList &	operator =(const SoNodeList &l)

Copies a list, keeping all reference counts correct.

SEE ALSO

SoNode


SoNodeSensor

NAME

SoNodeSensor - sensor class that can be attached to Open Inventor nodes

INHERITS FROM

SoSensor > SoDelayQueueSensor > SoDataSensor > SoNodeSensor

SYNOPSIS

#include <Inventor/sensors/SoNodeSensor.h>

Methods from class SoNodeSensor:

SoNodeSensor()

SoNodeSensor(SoSensorCB *func,
void *data)

~SoNodeSensor()

void	attach(SoNode *node)

void	detach()

SoNode *	getAttachedNode() const

Methods from class SoDataSensor:

void	setDeleteCallback(SoSensorCB *function,
void *data)

SoNode *	getTriggerNode() const

SoField *	getTriggerField() const

SoPath *	getTriggerPath() const

void	setTriggerPathFlag(SbBool flag)

SbBool	getTriggerPathFlag() const

Methods from class SoDelayQueueSensor:

void	setPriority(uint32_t pri)

uint32_t	getPriority()

static uint32_t	getDefaultPriority()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Node sensors detect changes to nodes, calling a callback function whenever any field of the node or, if the node is a group node, any children of the node change.

METHODS

SoNodeSensor()

SoNodeSensor(SoSensorCB *func,
void *data)

Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

~SoNodeSensor()

Destroys the sensor, freeing up any memory associated with it after unscheduling it.

void	attach(SoNode *node)

void	detach()

SoNode *	getAttachedNode() const

The attach() method makes this sensor detect changes to the given node. The detach() method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph. The getAttachedNode() method returns the node that this sensor is sensing, or NULL if it is not attached to any node.

SEE ALSO

SoFieldSensor, SoPathSensor, SoDataSensor


SoNodekitCatalog

NAME

SoNodekitCatalog - nodekit catalog class

INHERITS FROM

SoNodekitCatalog

SYNOPSIS

#include <Inventor/nodekits/SoNodekitCatalog.h>

#define SO_CATALOG_NAME_NOT_FOUND -1

#define SO_CATALOG_THIS_PART_NUM   0

Methods from class SoNodekitCatalog:

static void	initClass()

int	getNumEntries() const

int	getPartNumber(const SbName &theName) const

const SbName &	getName(int thePartNumber) const

SoType	getType(int thePartNumber) const

SoType	getType(const SbName &theName) const

SoType	getDefaultType(int thePartNumber) const

SoType	getDefaultType(const SbName &theName) const

SbBool	isNullByDefault(int thePartNumber) const

SbBool	isNullByDefault(const SbName &theName) const

SbBool	isLeaf(int thePartNumber) const

SbBool	isLeaf(const SbName &theName) const

const SbName &	getParentName(int thePartNumber) const

const SbName &	getParentName(const SbName &theName) const

int	getParentPartNumber(int thePartNumber) const

int	getParentPartNumber(const SbName &theName) const

const SbName &	getRightSiblingName(int thePartNumber) const

const SbName &	getRightSiblingName(const SbName &theName) const

int	getRightSiblingPartNumber(int thePartNumber) const

int	getRightSiblingPartNumber(const SbName &theName) const

SbBool	isList(int thePartNumber) const

SbBool	isList(const SbName &theName) const

SoType	getListContainerType(int thePartNumber) const

SoType	getListContainerType(const SbName &theName) const

const SoTypeList &	getListItemTypes(int thePartNumber) const

const SoTypeList &	getListItemTypes(const SbName &theName) const

SbBool	isPublic(int thePartNumber) const

SbBool	isPublic(const SbName &theName) const

DESCRIPTION

This class describes the parts and structure of a nodekit. Each class of nodekit has one SoNodekitCatalog (a static variable for the class). Internally, the catalog contains one entry for each "part" in the nodekit's structure. Users can query the catalog for information about each entry in the catalog. This information can be obtained either by part name (an SbName unique for the part within the catalog) or by part number (an index into an array of parts).

Note that, although the catalog for a nodekit class may contain many entries, each instance of that class is not initially created with all of these parts intact. Rather, each instance of the class has its own parts list which keeps track of which parts the user has created. The nodekit uses the catalog as a guide in creating new nodes as its descendants; the standard addChild(), removeChild() and other SoGroup methods are protected, so that users must create descendants indirectly by asking the nodekit to get and/or set the different "parts" in the catalog.

The first entry in any SoNodekitCatalog corresponds to the nodekit itself. Its partName is "this" and its partNumber is 0. All other parts in the catalog are described relative to "this."

METHODS

static void	initClass()

Initializes this object.

int	getNumEntries() const

Returns number of entries in the catalog.

int	getPartNumber(const SbName &theName) const

Given the name of a part, returns its part number in the catalog.

const SbName &	getName(int thePartNumber) const

Given the part number of a part, returns its name in the catalog.

SoType	getType(int thePartNumber) const

SoType	getType(const SbName &theName) const

SoType	getDefaultType(int thePartNumber) const

SoType	getDefaultType(const SbName &theName) const

SbBool	isNullByDefault(int thePartNumber) const

SbBool	isNullByDefault(const SbName &theName) const

SbBool	isLeaf(int thePartNumber) const

SbBool	isLeaf(const SbName &theName) const

const SbName &	getParentName(int thePartNumber) const

const SbName &	getParentName(const SbName &theName) const

int	getParentPartNumber(int thePartNumber) const

int	getParentPartNumber(const SbName &theName) const

const SbName &	getRightSiblingName(int thePartNumber) const

const SbName &	getRightSiblingName(const SbName &theName) const

int	getRightSiblingPartNumber(int thePartNumber) const

int	getRightSiblingPartNumber(const SbName &theName) const

SbBool	isList(int thePartNumber) const

SbBool	isList(const SbName &theName) const

SoType	getListContainerType(int thePartNumber) const

SoType	getListContainerType(const SbName &theName) const

const SoTypeList &	getListItemTypes(int thePartNumber) const

const SoTypeList &	getListItemTypes(const SbName &theName) const

SbBool	isPublic(int thePartNumber) const

SbBool	isPublic(const SbName &theName) const

A full set of methods for finding out all parameters in the catalog, given either the part name or the part number.

SEE ALSO

SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit


SoNonIndexedShape

NAME

SoNonIndexedShape - abstract base class for all non-indexed vertex-based shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape

SYNOPSIS

#include <Inventor/nodes/SoNonIndexedShape.h>

Fields from class SoNonIndexedShape:

SoSFInt32	startIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoNonIndexedShape:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is the abstract base class for all vertex-based shapes that are not constructed from indices, such as SoFaceSet, SoLineSet, and SoQuadMesh.

All subclasses of SoNonIndexedShape construct objects by using the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited coordinates. The startIndex field defined by this class is now obsolete, and is provided here only for compatibility with old files and programs.

The subclass decides what to do with this and any subsequent coordinates. The shape is drawn with the current lighting model and drawing style and is transformed by the current transformation matrix.

Material, normal, and texture coordinate bindings for shapes derived from this class ignore any index specifications. That is, a binding value of PER_FACE_INDEXED is treated the same way as PER_FACE, and so on.

If there aren't sufficient values in the current coordinates, material, or texture coordinates, errors will occur.

FIELDS

SoSFInt32	startIndex

Obsolete field, provided only for compatibility reasons. Index of first coordinate of shape.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoFaceSet, SoIndexedShape, SoLineSet, SoPointSet, SoQuadMesh, SoTriangleStripSet, SoVertexProperty


SoNormal

NAME

SoNormal - node that defines surface normals for shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoNormal

SYNOPSIS

#include <Inventor/nodes/SoNormal.h>

Fields from class SoNormal:

SoMFVec3f	vector

Methods from class SoNormal:

SoNormal()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of 3D surface normal vectors to be used by vertex-based shape nodes that follow it in the scene graph. This node does not produce a visible result during rendering; it simply replaces the current normals in the rendering state for subsequent nodes to use. This node contains one multiple-valued field that contains the normal vectors.

Surface normals are needed to compute lighting when the Phong lighting model is used. Most vertex-based shapes that use normals can compute default normals if none are specified, depending on the current normal binding.

FIELDS

SoMFVec3f	vector

Surface normal vectors.

METHODS

SoNormal()

Creates a surface normal node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Sets the current normals in the traversal state.

FILE FORMAT/DEFAULT

Normal {

vector	[  ]

}

SEE ALSO

SoCoordinate3, SoLightModel, SoNormalBinding, SoVertexShape


SoNormalBinding

NAME

SoNormalBinding - node that specifies how multiple surface normals are bound to shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoNormalBinding

SYNOPSIS

#include <Inventor/nodes/SoNormalBinding.h>

enum Binding	{
SoNormalBinding::OVERALL
Whole object has same normal
SoNormalBinding::PER_PART
One normal for each part of object
SoNormalBinding::PER_PART_INDEXED
One normal for each part, indexed
SoNormalBinding::PER_FACE
One normal for each face of object
SoNormalBinding::PER_FACE_INDEXED
One normal for each face, indexed
SoNormalBinding::PER_VERTEX
One normal for each vertex of object
SoNormalBinding::PER_VERTEX_INDEXED
One normal for each vertex, indexed
}

Fields from class SoNormalBinding:

SoSFEnum	value

Methods from class SoNormalBinding:

SoNormalBinding()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies how the current normals are bound to shapes that follow in the scene graph. Each shape node may interpret bindings differently.

The bindings for faces and vertices are meaningful only for shapes that are made from faces and vertices. Similarly, the indexed bindings are only used by the shapes that allow indexing. For bindings that require multiple normals, be sure to have at least as many normals defined as are necessary; otherwise, errors will occur.

FIELDS

SoSFEnum	value

Specifies how to bind normals to shapes.

METHODS

SoNormalBinding()

Creates a normal binding node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Sets the current normal binding type.

FILE FORMAT/DEFAULT

NormalBinding {

value	PER_VERTEX_INDEXED

}

SEE ALSO

SoMaterialBinding, SoNormal, SoTextureCoordinateBinding, SoVertexShape


SoNurbsCurve

NAME

SoNurbsCurve - NURBS curve shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoNurbsCurve

SYNOPSIS

#include <Inventor/nodes/SoNurbsCurve.h>

Fields from class SoNurbsCurve:

SoSFInt32	numControlPoints

SoMFFloat	knotVector

Methods from class SoNurbsCurve:

SoNurbsCurve()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class represents a NURBS curve, based on the knot vector and the control points that you specify. The knotVector field specifies a floating-point array of values; the values are the coordinates of the knot points in the curve, and you must enter them in non-decreasing order. The curve will use the first numControlPoints values in the current coordinates as control points.

If you specify n knots, you can specify up to n-8 control points. The number of knots minus the number of control points is known as the order of the curve. A NURBS curve can have an order of up to 8.

The control points of the curve are transformed by the current transformation matrix. The curve is drawn with the current lighting model and drawing style (drawing style FILLED is treated as LINES). The coordinates, normals, and texture coordinates of a NURBS curve are generated, so you cannot bind explicit normals or texture coordinates to a NURBS curve.

The approximation of the curve by line segments is affected by the current complexity value.

FIELDS

SoSFInt32	numControlPoints

Number of control points.

SoMFFloat	knotVector

The knot vector.

METHODS

SoNurbsCurve()

Creates a NURBS curve node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws the curve based on the current coordinates, material, and so on.

SoRayPickAction

Picks the curve based on the current coordinates and transformation.

SoGetBoundingBoxAction

Computes the bounding box that encloses all control points of the curve with the current transformation applied to them. Sets the center to the average of the control points.

SoCallbackAction

If any line segment callbacks are registered with the action, they will be invoked for each successive segment approximating the curve.

FILE FORMAT/DEFAULT

NurbsCurve {

numControlPoints	0

knotVector	0

}

SEE ALSO

SoIndexedNurbsCurve, SoNurbsSurface


SoNurbsProfile

NAME

SoNurbsProfile - NURBS profile curve

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoProfile > SoNurbsProfile

SYNOPSIS

#include <Inventor/nodes/SoNurbsProfile.h>

Fields from class SoNurbsProfile:

SoMFFloat	knotVector

Fields from class SoProfile:

SoMFInt32	index

SoSFEnum	linkage

Methods from class SoNurbsProfile:

SoNurbsProfile()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies a NURBS curve that is used as a profile. The curve is defined in the same way as a standard SoNurbsCurve, except that the control points are constructed from the current set of profile coordinates, using the index field.

FIELDS

SoMFFloat	knotVector

The knot vector for the NURBS curve. It must be a list of non-decreasing floating point values.

METHODS

SoNurbsProfile()

Creates a NURBS profile curve node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Adds a profile to the current traversal state.

FILE FORMAT/DEFAULT

NurbsProfile {

index	0

linkage	START_FIRST

knotVector	0

}

SEE ALSO

SoLinearProfile, SoNurbsCurve, SoProfileCoordinate2, SoProfileCoordinate3


SoNurbsProperty

NAME

SoNurbsProperty - node that defines additional properties for rendering a NURBS surface

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoNurbsProperty

SYNOPSIS

#include <Inventor/nodes/SoNurbsProperty.h>

enum DrawStyle	{
SoNurbsProperty::NORMAL
Draw the NURBS surface normally
SoNurbsProperty::BOUNDARIES_AND_TRIM_CURVES
Draw the boundaries of the surface and trim curves
SoNurbsProperty::CENTRAL_ISO_PARAM_CURVES
Draw two isoparametric curves in the middle of the surface (one for U = 0.5 and one for V=0.5)
}

Fields from class SoNurbsProperty:

SoSFBitMask	drawStyle

SoSFInt32	numSamplePoints

SoSFColor	color

SoSFUShort	isoParamCurvesPattern

Methods from SoNurbsProperty:

SoNurbsProperty()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines an additional set of properties used by SoNurbsSurface when rendering NURBS surfaces.

For a large NURBS surface, it is sometimes more effective to display two central isoparametric curves rather than facet boundaries (as in wireframe mode) because the latter may provide an overly complicated view of the surface.

This node allows you to specify the NURBS draw style; the color of the trim curves, boundaries and isoparametric curves; the line pattern of the isoparametric curves; and the number of sample points between trim curves control points.

The NURBS draw style is a bitmask specifying which combination of the following representations to use for displaying the NURBS: normal display, trim curves and boundaries, and/or central isoparametric curves.

Turning off the normal NURBS surface display, and turning on the display of trim curves, boundaries and isoparametric curves can dramatically speed up rendering of large models.

FIELDS

SoSFBitMask	drawStyle

Indicates which part of the NURBS surface to render.

Three parts can be selected independently for rendering: the NURBS surface, the trim curve and boundaries lines, and the central isoparametric curves. For instance, when drawStyle is set to (BOUNDARIES_AND_TRIM_CURVES | CENTRAL_ISO_PARAM_CURVES), the triangles (facets) are not rendered. Only the trim curves edges, surface boundaries and isoparametric curves are displayed. By default, drawStyle is set to NORMAL.

SoSFInt32	numSamplePoints

numSamplePoints is used during trim curve tessellation. It specifies the exact number of points to generate between two trim curve control points. If set to -1 (the default), the number of points generated is computed from the SoComplexity node. Setting this field to a small value (less than 3) can reduce the number of triangles generated by the tessellation and thus increase the drawing performance of trimmed NURBS surfaces.

SoSFColor	color

Contains the color used to render trim curves and isoparametric curves.

SoSFUShort	isoParamCurvesPattern

Sets a specific line pattern for isoparametric curves.

METHODS

SoNurbsProperty()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

NurbsProperty {

drawStyle	NORMAL

numSamplePoints	-1

color	1 1 1

isoParamCurvesPattern	0xFFFF

}

SEE ALSO

SoNurbsSurface


SoNurbsSurface

NAME

SoNurbsSurface - NURBS surface shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoNurbsSurface

SYNOPSIS

#include <Inventor/nodes/SoNurbsSurface.h>

Fields from class SoNurbsSurface:

SoSFInt32	numUControlPoints

SoSFInt32	numVControlPoints

SoSFInt32	numSControlPoints

SoSFInt32	numTControlPoints

SoMFFloat	uKnotVector

SoMFFloat	vKnotVector

SoMFFloat	sKnotVector

SoMFFloat	tKnotVector

Methods from class SoNurbsSurface:

SoNurbsSurface()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This shape node represents a NURBS surface based on the node's knot vectors and on control points constructed from the current coordinates. The current coordinates are used in row-major order (the V direction corresponds to the rows). The number of coordinates used is determined by the numUControlPoints and numVControlPoints fields. The uKnotVector and vKnotVector fields contain floating point arrays of non-decreasing values.

The order of the surface in the U and V directions is defined as the number of knots minus the number of control points in the particular direction. The largest order allowed for a NURBS surface is 8.

The control points of the NURBS surface are transformed by the current cumulative transformation. The surface is drawn with the current light model and drawing style. The coordinates, normals, and texture coordinates of a surface are generated, so you cannot bind explicit normals or texture coordinates to a NURBS surface. The first material in the state is applied to the entire surface.

The surface is trimmed according to the currently defined profile's curves.

When default texture coordinates are applied to a NURBS surface, the edges of the texture square are stretched to fit the surface. The axes of the texture are called S and T; S is horizontal and T is vertical. The axes of the NURBS surface are called U and V; U is horizontal and V is vertical. You can also define texture coordinates explicitly with the S,T location point, the knot vectors, and the current texture coordinates.

The approximation of the surface by polygons is affected by the current complexity value.

FIELDS

SoSFInt32	numUControlPoints

SoSFInt32	numVControlPoints

Number of control points in the U and V directions.

SoSFInt32	numSControlPoints

SoSFInt32	numTControlPoints

Number of control points in the S and T directions.

SoMFFloat	uKnotVector

SoMFFloat	vKnotVector

The knot vectors in the U and V directions.

SoMFFloat	sKnotVector

SoMFFloat	tKnotVector

The knot vectors in the S and T directions.

METHODS

SoNurbsSurface()

Creates a NURBS surface node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws the surface based on the current coordinates, material, and so on.

SoRayPickAction

Picks the surface based on the current coordinates and transformation.

SoGetBoundingBoxAction

Computes the bounding box that encloses all control points of the surface with the current transformation applied to them. Sets the center to the average of the control points.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle approximating the surface.

FILE FORMAT/DEFAULT

NurbsSurface {

numUControlPoints	0

numVControlPoints	0

numSControlPoints	0

numTControlPoints	0

uKnotVector	0

vKnotVector	0

sKnotVector	0

tKnotVector	0

}

SEE ALSO

SoIndexedNurbsSurface, SoNurbsCurve, SoNurbsProperty, SoProfile


SoOctreeOrdering

NAME

SoOctreeOrdering - group node derived from SoRenderList that maintains a transparent octree organization of the shapes below it. This speeds view frustum culling in large scenes in which the viewer moves through the scene and much of the scene is not visible at any given time.

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoRenderList > SoOctreeOrdering

SYNOPSIS

#include <Inventor/nodes/SoOctreeOrdering.h>

Fields from class SoOctreeOrdering:

SoSFBool	dropCulling

SoSFUInt32	dropScreenArea

SoSFBool	boundingBoxSubstitutes

SoSFBool	useMovingQueue

SoSFBool	adjustDecimation

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoRenderList:

void	addRenderObjectType(SoType t)

void	removeRenderObjectType(SoType t)

int	getNumRenderObjectTypes() const

SoType	getRenderObjectType(int i) const

void	addRenderObjectName(SbName n)

void	removeRenderObjectName(SbName n)

int	getNumRenderObjectNames() const

SbName	getRenderObjectName(int i) const

void	removeAllRenderObjectNames()

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoOctreeOrdering node uses the functionality from SoRenderList to create a list of paths to the shapes beneath it. It then reorganizes the list of shapes into an octree division of space. During action traversal, it traverses the octree instead of the scene graph. This results in a front to back traversal that quickly skips sections of space that would be culled by the view frustum.

The OctreeOrdering node draws a bounding box to replace cells in the octree that contain shapes but that are too small, based on an approximate screen size. If a larger shape had already been rendered that passes through this cell, the cell will be culled instead of using the bounding box so that no rendered geometry will be covered by a bounding box. This behavior can be altered by the fields listed below.

To specify the maximum depth during octree ordering, use environment variable IV_OCTREE_MAX_DEPTH. The default is 8.

FIELDS

SoSFBool	dropCulling

Enables culling of shapes that are too small on the screen.

SoSFUInt32	dropScreenArea

Sets threshold in pixels for drop culling and bounding box substitutes.

SoSFBool	boundingBoxSubstitutes

Enables use of bounding boxes for cells in the octree that contain shapes, but would appear on the screen smaller than the dropScreenArea threshold

SoSFBool	useMovingQueue

Sets how this node should handle moving render objects. If this is True, then the moving objects are kept in a separate render list, and are not sorted into the octree, meaning that they will not be drop culled. If this is FALSE, moving objects will be sorted into the octree after each motion, taking more time, but enabling drop and view frustum culling for the moving objects.

SoSFBool	adjustDecimation

If True, the octree will alter the decimation percentage for objects depending on how large they are in the view. This causes objects closer to camera to appear in more detail than objects further away.

ACTION BEHAVIOR

SoGLRenderAction, SoGetPrimitiveCountAction

Uses octree spatial traversal, rendering front to back. All other actions use standard SoSeparator traversal.

FILE FORMAT/DEFAULT

OctreeOrdering {

dropCulling	TRUE

dropScreenArea	5

boundingBoxSubstitutes	TRUE

useMovingQueue	TRUE

adjustDecimation	TRUE

}

SEE ALSO

SoGetPrimitiveCountAction, SoLevelOfSimplification, SoRenderList, SoValueOrdering


SoOffscreenRenderer

NAME

SoOffscreenRenderer - renders to an off-screen buffer for printing or generating textures

INHERITS FROM

SoOffscreenRenderer

SYNOPSIS

#include <Inventor/SoOffscreenRenderer.h>

enum Components	{
SoOffscreenRenderer::LUMINANCE
SoOffscreenRenderer::LUMINANCE_TRANSPARENCY
SoOffscreenRenderer::RGB
SoOffscreenRenderer::RGB_TRANSPARENCY
}

enum TIFFCompressionMode	{
SoOffscreenRenderer::NO_COMPRESSION,
SoOffscreenRenderer::PACKBITS_COMPRESSION
(Default)
}

Methods from class SoOffscreenRenderer:

SoOffscreenRenderer(const SbViewportRegion &viewportRegion)

SoOffscreenRenderer(SoGLRenderAction *ra)

~SoOffscreenRenderer()

static float	getScreenPixelsPerInch()

static SbVec2s	getMaximumResolution()

void	setComponents(Components components)

Components	getComponents() const

void	setViewportRegion(const SbViewportRegion &region)

const SbViewportRegion &	getViewportRegion() const

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setGLRenderAction(const SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

SbBool	render(SoNode *scene)

SbBool	render(SoPath *scene)

unsigned char *	getBuffer() const

SbBool	writeToRGB(FILE *fp) const

SbBool	writeToBMP(FILE *fp) const	[Win32 only]

SbBool	writeToPostScript(FILE *fp) const

SbBool	writeToPostScript(FILE *fp,
const SbVec2f &printSize) const

SbBool	writeToTIFF( FILE *fp,
TIFFCompressionMode TIFFcm = PACKBITS_COMPRESSION ) const

SbBool	writeToJPEG( FILE *fp,
float quality = 1.0 ) const

HDC	getDC()	[Win32 only]

DESCRIPTION

This class is used to render into an off-screen buffer to create a printable image or to generate a texture image. It uses off-screen bitmaps for rendering. Methods are provided to write the buffer to a file, as an RGB image, an encapsulated PostScript description, or in one of several other image formats.

METHODS

SoOffscreenRenderer(const SbViewportRegion &viewportRegion)

SoOffscreenRenderer(SoGLRenderAction *ra)

~SoOffscreenRenderer()

Constructors and destructor. If a render action is passed to the constructor, that action will be used in all subsequent offscreen renderings. Otherwise, an internal instance of an SoGLRenderAction will be maintained with a viewport region set to the on passed in by the constructor.

static float	getScreenPixelsPerInch()

Returns the number of pixels per inch (in the horizontal direction) of the current X device screen.

static SbVec2s	getMaximumResolution()

Get the maximum supported resolution of the viewport.

void	setComponents(Components components)

Components	getComponents() const

Sets or returns the components to be rendered.

void	setViewportRegion(const SbViewportRegion &region)

const SbViewportRegion &	getViewportRegion() const

Sets or returns the viewport region used for rendering. This will NOT be applied to the viewport region of any render action passed in.

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

Sets or returns the background color for rendering.

void	setGLRenderAction(const SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

Set and get the render action to use for rendering. This will return any render action passed in by the caller.

SbBool	render(SoNode *scene)

SbBool	render(SoPath *scene)

Renders the given scene, specified as a node or a path, into an off-screen buffer.

unsigned char *	getBuffer() const

Returns the buffer containing the rendered image. The buffer is an array of unsigned characters. Each pixel is stored sequentially by scanline, starting with the lower left corner. The data stored for each pixel is determined by the Components set before rendering. Pixels are stored in RGBA order and are packed without any padding between pixels or scanlines. The buffer is allocated by the offscreen renderer class and the space is deleted when the instance is destructed.

SbBool	writeToRGB(FILE *fp) const

Writes the buffer as a .rgb file to the given file pointer.

SbBool	writeToBMP(FILE *fp) const	[Win32 only]

Writes the buffer as a "Windows RGB Encoded".bmp file to the given file pointer.

SbBool	writeToPostScript(FILE *fp) const

SbBool	writeToPostScript(FILE *fp,
const SbVec2f &printSize) const

Writes the buffer as encapsulated PostScript. If a print size is not given, the size of the image in the buffer is adjusted so it is the same as the apparent size of the viewport region on the current device.

SbBool	writeToTIFF( FILE *fp,
TIFFCompressionMode TIFFcm = PACKBITS_COMPRESSION ) const

Writes the buffer as a TIFF file to the given file pointer.

SbBool	writeToJPEG( FILE *fp,
float quality = 1.0 ) const

Writes the buffer as a JPEG file to the given file pointer. 1.0 is the best quality with the least compression, 0.0 is the worst quality with the most compression. A typical value for quality is 0.7.

HDC	getDC()	[Win32 only]

Returns the memory "device context" containing the rendered image. This value is only valid after the "render" method has been called (at least once) on an instance of SoOffScreenRenderer. Standard Win32 API calls can be used to retrieve the actual bitmap (DIBsection) from this device context, to copy the bitmap into another device context, and so on.


SoOnOff

NAME

SoOnOff - engine that functions as an on/off switch

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoOnOff

SYNOPSIS

#include <Inventor/engines/SoOnOff.h>

Inputs from class SoOnOff:

SoSFTrigger	on

SoSFTrigger	off

SoSFTrigger	toggle

Outputs from class SoOnOff:

(SoSFBool)	isOn

(SoSFBool)	isOff

Methods from class SoOnOff:

SoOnOff()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine has three triggers as input and two Boolean values as output. The isOn output is a switch that can be turned on or off by triggering the corresponding input. You can toggle the value by triggering the toggle input. By default isOn is FALSE. The isOff output value is the inverse of isOn

INPUTS

SoSFTrigger	on

Turn the isOn switch on.

SoSFTrigger	off

Turn the isOn switch off.

SoSFTrigger	toggle

Toggle the switch value.

OUTPUTS

(SoSFBool)	isOn

Switch value.

(SoSFBool)	isOff

The inverse of isOn.

METHODS

SoOnOff()

Constructor.

FILE FORMAT/DEFAULT

OnOff {

on

off

toggle

}

SEE ALSO

SoEngineOutput


SoOneShot

NAME

SoOneShot - timer that runs for a pre-set amount of time

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoOneShot

SYNOPSIS

#include <Inventor/engines/SoOneShot.h>

enum Flags	{
SoOneShot::RETRIGGERABLE
Can start over during the cycle
SoOneShot::HOLD_FINAL
Output values stay high after cycle
}

Inputs from class SoOneShot:

SoSFTime	timeIn

SoSFTime	duration

SoSFTrigger	trigger

SoSFBitMask	flags

SoSFBool	disable

Outputs from class SoOneShot:

(SoSFTime)	timeOut

(SoSFBool)	isActive

(SoSFFloat)	ramp

Methods from class SoOneShot:

SoOneShot()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine is a timer that runs for a pre-set amount of time and then stops. By default, the timeIn input is connected to the realTime global field. It can, however, by connected to any other time source.

The timer is started when the trigger input is touched. It then runs for the specified duration, and updates the timeOut output with the time that has elapsed. During that time, the ramp output is also updated. The ramp output starts at 0.0 at the beginning of the cycle, and linearly increases until it reaches 1.0 at the end of the cycle.

You can disable the timer by setting the disable input to TRUE. The output value remains 0.0 while the timer is disabled. If the timer is disabled in the middle of a cycle the output values will be set to 0.0.

The flags input contains control flags. Using the flags you can set the timer to be retriggerable in the middle of a cycle, and set the output values to stay high after the cycle has been completed. By default, these flags are not set.

INPUTS

SoSFTime	timeIn

Running time.

SoSFTime	duration

Duration of the active cycle.

SoSFTrigger	trigger

Start the cycle. The trigger will be ignored if it is touched in the middle of a cycle and the RETRIGGERABLE flag is not set.

SoSFBitMask	flags

Control flags.

SoSFBool	disable

If TRUE, the timer is disabled.

OUTPUTS

(SoSFTime)	timeOut

Elapsed time from the start.

(SoSFBool)	isActive

Is TRUE during the active cycle.

(SoSFFloat)	ramp

Ramps linearly from 0.0 to 1.0.

METHODS

SoOneShot()

Constructor

FILE FORMAT/DEFAULT

OneShot {

duration	1

trigger

flags	()

disable	FALSE

timeIn	<current time>

}

SEE ALSO

SoElapsedTime, SoEngineOutput


SoOneShotSensor

NAME

SoOneShotSensor - sensor for one-time only callbacks

INHERITS FROM

SoSensor > SoDelayQueueSensor > SoOneShotSensor

SYNOPSIS

#include <Inventor/sensors/SoOneShotSensor.h>

Methods from class SoOneShotSensor:

SoOneShotSensor()

SoOneShotSensor(SoSensorCB *func,
void *data)

~SoOneShotSensor()

Methods from class SoDelayQueueSensor:

void	setPriority(uint32_t pri)

uint32_t	getPriority()

static uint32_t	getDefaultPriority()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

A one-shot sensor is triggered once after it is scheduled, when the delay queue is processed. Like all delay queue sensors, one-shot sensors with a non-zero priority are just added to the delay queue when scheduled; if they are scheduled again before the delay queue is processed nothing happens, and they are guaranteed to be called only once when the delay queue is processed. For example, a one-shot sensor whose callback function redraws the scene might be scheduled whenever the scene graph changes and whenever a window-system event reporting that the window changed size occurs. By using a one-shot, the scene will only be redrawn once even if a window-changed-size event occurs just after the scene graph is modified (or if several window-changed-size events occur in a row).

Calling schedule() in the callback function is a useful way of getting something to happen repeatedly as often as possible, while still handling events and timeouts.

A priority 0 one-shot sensor isn't very useful, since scheduling it is exactly the same as directly calling its callback function.

METHODS

SoOneShotSensor()

SoOneShotSensor(SoSensorCB *func,
void *data)

Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

~SoOneShotSensor()

Destroys the sensor, freeing up any memory associated with it after unscheduling it.

SEE ALSO

SoIdleSensor, SoDelayQueueSensor


SoOrthographicCamera

NAME

SoOrthographicCamera - orthographic camera node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoCamera > SoOrthographicCamera

SYNOPSIS

#include <Inventor/nodes/SoOrthographicCamera.h>

Fields from class SoOrthographicCamera:

SoSFFloat	height

Fields from class SoCamera:

SoSFEnum	viewportMapping

SoSFVec3f	position

SoSFRotation	orientation

SoSFFloat	aspectRatio

SoSFFloat	nearDistance

SoSFFloat	farDistance

SoSFFloat	focalDistance

Methods from class SoOrthographicCamera:

SoOrthographicCamera()

static SoType	getClassTypeId()

Methods from class SoCamera:

void	pointAt(const SbVec3f &targetPoint)

virtual void	scaleHeight(float scaleFactor)

virtual SbViewVolume	getViewVolume(float useAspectRatio = 0.0) const

void	viewAll(SoNode *sceneRoot,
const SbViewportRegion &vpRegion,
float slack = 1.0)

void	viewAll(SoPath *path,
const SbViewportRegion &vpRegion,
float slack = 1.0)

SbViewportRegion	getViewportBounds(const SbViewportRegion &region) const

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

An orthographic camera defines a parallel projection from a viewpoint. This camera does not diminish objects with distance, as an SoPerspectiveCamera does. The viewing volume for an orthographic camera is a rectangular parallelepiped (a box).

By default, the camera is located at (0,0,1) and looks along the negative z-axis; the position and orientation fields can be used to change these values. The height field defines the total height of the viewing volume; this and the aspectRatio field determine its width.

FIELDS

SoSFFloat	height

Height of the viewing volume.

METHODS

SoOrthographicCamera()

Creates an orthographic camera node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction

Sets the viewport and camera information in the state.

FILE FORMAT/DEFAULT

OrthographicCamera {

viewportMapping	ADJUST_CAMERA

position	0 0 1

orientation	0 0 1  0

aspectRatio	1

nearDistance	1

farDistance	10

focalDistance	5

height	2

}

SEE ALSO

SbViewVolume, SoPerspectiveCamera


SoOutput

NAME

SoOutput - used to write Open Inventor data files

INHERITS FROM

SoOutput

SYNOPSIS

#include <Inventor/SoOutput.h>

typedef void *	SoOutputReallocCB(void *ptr,
size_t newSize)

Methods from class SoOutput:

SoOutput()

~SoOutput()

void	setFilePointer(FILE *newFP)

FILE *	getFilePointer() const

SbBool	openFile(const char *fileName)

closeFile()

void	setBuffer(void *bufPointer,
size_t initSize,
SoOutputReallocCB *reallocFunc,
int32_t offset = 0)

SbBool	getBuffer(void *&bufPointer,
size_t &nBytes) const

size_t	getBufferSize() const

void	resetBuffer()

void	setBinary(SbBool flag)

SbBool	isBinary() const

void	setHeaderString(const SbString &str)

void	resetHeaderString()

static SbString	getDefaultASCIIHeader()

static SbString	getDefaultBinaryHeader()

void	setFloatPrecision(int precision)

DESCRIPTION

This class is used for writing Open Inventor data files. It supports both ASCII (default) and binary formats and provides some convenience functions for handling files. It can also write to a buffer in memory as well as to a file pointer. A user-defined header can be specified for the output file. An instance of SoOutput is contained in an SoWriteAction; this is typically the only instance needed.

METHODS

SoOutput()

~SoOutput()

Constructor and destructor. The default SoOutput writes to stdout. The destructor closes any files opened by the SoOutput.

void	setFilePointer(FILE *newFP)

Sets file pointer to write to.

FILE *	getFilePointer() const

Returns the file pointer in use, or NULL if using a buffer.

SbBool	openFile(const char *fileName)

Opens named file, sets file pointer to result. This returns FALSE on error.

closeFile()

Closes current file if opened with openFile().

void	setBuffer(void *bufPointer,
size_t initSize,
SoOutputReallocCB *reallocFunc,
int32_t offset = 0)

Sets up memory buffer to write to, initial size, reallocation function (which is called if there is not enough room in the buffer), and offset in the buffer at which to begin writing. If the reallocation function returns NULL, writing will be disabled.

SbBool	getBuffer(void *&bufPointer,
size_t &nBytes) const

Returns pointer to memory buffer being written to and the new size of the buffer. Returns FALSE if not writing into a buffer.

size_t	getBufferSize() const

The total number of bytes allocated to a memory buffer may be larger than the number of bytes written. This returns that total number.

void	resetBuffer()

Resets buffer for output again. Output starts over at beginning of buffer.

void	setBinary(SbBool flag)

Sets whether output should be ASCII (default) or binary.

SbBool	isBinary() const

Returns current state of binary flag.

void	setHeaderString(const SbString &str)

Sets the header for output files. This is useful, for example, if you have a file format that is a superset of the Open Inventor file format and you want Open Inventor to read the files. It is highly recommend that in your new header you simply append to the header of the Open Inventor file format you are extending. For example, if a new file format is based on the Open Inventor 2.1 file format, register a header similar to: "#Inventor V2.1 ascii MY FILE FORMAT EXTENSION". Then all Open Inventor 2.1 applications (and later) can read the file.

void	resetHeaderString()

Resets the header for output files to be the default header.

static SbString	getDefaultASCIIHeader()

Returns the string representing the default ASCII header.

static SbString	getDefaultBinaryHeader()

Returns the string representing the default binary header.

void	setFloatPrecision(int precision)

Sets the precision for writing floating point numbers, i.e. the number of significant digits. Floating point numbers are written using %.xg format, where 'x' is the value of the precision argument.

SEE ALSO

SoInput, SoWriteAction, SoTranSender


SoPackedColor

NAME

SoPackedColor - node that defines base colors using packed representation

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoPackedColor

SYNOPSIS

#include <Inventor/nodes/SoPackedColor.h>

Fields from class SoPackedColor:

SoMFUInt32	orderedRGBA

Methods from class SoPackedColor:

SoPackedColor()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoPackedColor is similar to SoBaseColor in that it sets the diffuse color component of the current material. However, it also changes the transparency component. The color and transparency information is packed into unsigned 32-bit integers: 0xrrggbbaa, where aa represents the alpha (0x00 = fully transparent, 0xff = opaque), and rr, gg, and bb represent the red, blue, and green components of the color, respectively. Note that the order (r,g,b,a) of these components is reversed from the ordering in releases of Open Inventor prior to 2.1.

If the transparency type is SoGLRenderAction::SCREEN_DOOR, only the first transparency value will be used. With other transparency types, multiple transparencies will be used.

SoPackedColor uses less memory than SoBaseColor or SoMaterial to store multiple color and transparency values. It can be used in cases where space is critical.

FIELDS

SoMFUInt32	orderedRGBA

Defines the packed colors.

METHODS

SoPackedColor()

Creates a packed color node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current base (diffuse) color(s) in the state.

FILE FORMAT/DEFAULT

PackedColor {

orderedRGBA	0xccccccff

}

SEE ALSO

SoBaseColor, SoMaterial


SoPath

NAME

SoPath - path that points to a list of hierarchical nodes

INHERITS FROM

SoBase > SoPath

SYNOPSIS

#include <Inventor/SoPath.h>

Methods from class SoPath:

SoPath()

SoPath(int approxLength)

SoPath(SoNode *node)

void	setHead(SoNode *node)

void	append(int childIndex)

void	append(SoNode *childNode)

void	append(const SoPath *fromPath)

void	push(int childIndex)

void	pop()

SoNode *	getHead() const

SoNode *	getTail() const

SoNode *	getNode(int i) const

int	getIndex(int i) const

SoNode *	getNodeFromTail(int i) const

int	getIndexFromTail(int i) const

int	getLength() const

void	truncate(int start)

SbBool	containsNode(const SoNode *node) const

SbBool	containsPath(const SoPath *path) const

int	findFork(const SoPath *path) const

SoPath *	copy(int startFromNodeIndex = 0,
int numNodes = 0) const

friend int	operator ==(const SoPath &p1,
const SoPath &p2)

static SoPath *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoPathList &list)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

A path represents a scene graph or subgraph. It contains a list of pointers to nodes forming a chain from some root to some descendant. Each node in the chain is a child of the previous node. Paths are used to refer to some object in a scene graph precisely and unambiguously, even if there are many instances of the object. Therefore, paths are returned by both the SoRayPickAction and SoSearchAction.

When an action is applied to a path, only the nodes in the subgraph defined by the path are traversed. These include: the nodes in the path chain, all nodes (if any) below the last node in the path, and all nodes whose effects are inherited by any of these nodes.

SoPath attempts to maintain consistency of paths even when the structure of the scene graph changes. For example, removing a child from its parent when both are in a path chain cuts the path chain at that point, leaving the top part intact. Removing the node to the left of a node in a path adjusts the index for that node. Replacing a child of a node when both the parent and the child are in the chain replaces the child in the chain with the new child, truncating the path below the new child.

Note that only public children of nodes are accessible from an SoPath. Nodes like node kits that limit access to their children may provide other ways to get more information, such as by using the SoNodeKitPath class.

METHODS

SoPath()

Constructs an empty path.

SoPath(int approxLength)

Constructs a path with a hint to length (number of nodes in chain).

SoPath(SoNode *node)

Constructs a path and sets the head node to the given node.

void	setHead(SoNode *node)

Sets head node (first node in chain). The head node must be set before the append() or push() methods may be called.

void	append(int childIndex)

Adds node to end of chain; the node is the childIndex'th child of the current tail node.

void	append(SoNode *childNode)

Adds node to end of chain; uses the first occurrence of childNode as child of current tail node. If the path is empty, this is equivalent to setHead(childNode).

void	append(const SoPath *fromPath)

Adds all nodes in fromPath's chain to end of chain; the head node of fromPath must be the same as or a child of the current tail node.

void	push(int childIndex)

void	pop()

These allow a path to be treated as a stack; they push a node at the end of the chain and pop the last node off.

SoNode *	getHead() const

SoNode *	getTail() const

These return the first and last nodes in a path chain.

SoNode *	getNode(int i) const

int	getIndex(int i) const

These return a pointer to the i'th node or the index of the i'th node (within its parent) in the chain. Calling getNode(0) is equivalent to calling getHead().

SoNode *	getNodeFromTail(int i) const

int	getIndexFromTail(int i) const

These return a pointer to the i'th node or the index of the i'th node (within its parent) in the chain, counting backward from the tail node. Passing 0 for i returns the tail node or its index.

int	getLength() const

Returns length of path chain (number of nodes).

void	truncate(int start)

Truncates the path chain, removing all nodes from index start on. Calling truncate(0)  empties the path entirely.

SbBool	containsNode(const SoNode *node) const

Returns TRUE if the node is found anywhere in the path chain.

SbBool	containsPath(const SoPath *path) const

Returns TRUE if the nodes in the chain in the passed path are contained (in consecutive order) in this path chain.

int	findFork(const SoPath *path) const

If the two paths have different head nodes, this returns -1. Otherwise, it returns the path chain index of the last node (starting at the head) that is the same for both paths.

SoPath *	copy(int startFromNodeIndex = 0,
int numNodes = 0) const

Creates and returns a new path that is a copy of some or all of this path. Copying starts at the given index (default is 0, which is the head node). A numNodes of 0 (the default) means copy all nodes from the starting index to the end. Returns NULL on error.

friend int	operator ==(const SoPath &p1,
const SoPath &p2)

Returns TRUE if all node pointers in the two path chains are identical.

static SoPath *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoPathList &list)

These methods lookup and return paths with a given name. Paths are named by calling their setName() method (defined by the SoBase class). The first form returns the last path that was given that name, either by setName() or by reading in a named path from a file. If there is no path with the given name, NULL will be returned. The second form appends all paths with the given name to the given path list and returns the number of paths that were added. If there are no paths with the given name, zero will be returned and nothing will be added to the list.

FILE FORMAT/DEFAULT

SoPath {

[head node]

[number of remaining indices]

[index]

&...

[index]

}

Note that the indices in a written path are adjusted based on the nodes that are actually written to a file. Since nodes in the graph that have no effect on the path (such as some separator nodes) are not written, the siblings of such nodes must undergo index adjustment when written. The actual nodes in the graph remain unchanged.

SEE ALSO

SoNode, SoRayPickAction, SoSearchAction, SoNodeKitPath


SoPathList

NAME

SoPathList - maintains a list of pointers to paths

INHERITS FROM

SbPList > SoBaseList > SoPathList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoPathList:

SoPathList()

SoPathList(int size)

SoPathList(const SoPathList &l)

~SoPathList()

void	append(SoPath *path)

SoPath *	operator [](int i) const

SoPathList &	operator =(const SoPathList &l)

int	findPath(const SoPath &path)

void	sort()

void	uniquify()

Methods from class SoBaseList:

void	insert(SoBase *ptr,
int addBefore)

void	remove(int which)

void	truncate(int start)

void	copy(const SoBaseList &l)

void	set(int i,
SoBase *ptr)

void	addReferences(SbBool flag)

Methods from class SbPList:

int	find(const void *ptr) const

int	getLength() const

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SoBaseList holds lists of pointers to SoPaths. It updates reference counts to paths in the list whenever adding or removing pointers.

METHODS

SoPathList()

Constructor.

SoPathList(int size)

Constructor that pre-allocates storage for size pointers.

SoPathList(const SoPathList &l)

Constructor that copies the contents of another list.

~SoPathList()

Destructor.

void	append(SoPath *path)

Adds a path to the end of the list.

SoPath *	operator [](int i) const

Accesses an element of a list.

SoPathList &	operator =(const SoPathList &l)

Copies a list, keeping all reference counts correct.

int	findPath(const SoPath &path)

Returns the index of the matching path in the list, or -1 if not found.

void	sort()

Sorts list in place based on (1) increasing address of head node, then (2) increasing indices of children.

void	uniquify()

Given a sorted list, removes any path that (1) is a duplicate, or (2) goes through a node that is the tail of another path.

SEE ALSO

SoPath


SoPathSensor

NAME

SoPathSensor - sensor class that can be attached to Open Inventor paths

INHERITS FROM

SoSensor > SoDelayQueueSensor > SoDataSensor > SoPathSensor

SYNOPSIS

#include <Inventor/sensors/SoPathSensor.h>

Methods from class SoPathSensor:

SoPathSensor()

SoPathSensor(SoSensorCB *func,
void *data)

~SoPathSensor()

void	attach(SoPath *path)

void	detach()

SoPath *	getAttachedPath() const

Methods from class SoDataSensor:

void	setDeleteCallback(SoSensorCB *function,
void *data)

SoNode *	getTriggerNode() const

SoField *	getTriggerField() const

SoPath *	getTriggerPath() const

void	setTriggerPathFlag(SbBool flag)

SbBool	getTriggerPathFlag() const

Methods from class SoDelayQueueSensor:

void	setPriority(uint32_t pri)

uint32_t	getPriority()

static uint32_t	getDefaultPriority()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Path sensors detect changes to paths, calling a callback function whenever the path or any node in the path changes. The definition of "in the path" is the same as the definition used when applying an action to the path - any node that can possibly affect the node at the end of the path chain is considered in the path. See the SoPath manual page for more information on paths.

METHODS

SoPathSensor()

SoPathSensor(SoSensorCB *func,
void *data)

Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

~SoPathSensor()

Destroys the sensor, freeing up any memory associated with it after unscheduling it.

void	attach(SoPath *path)

void	detach()

SoPath *	getAttachedPath() const

The attach() method makes this sensor detect changes to the given path. The detach() method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph. The getAttachedPath() method returns the path that this sensor is sensing, or NULL if it is not attached to any path.

SEE ALSO

SoNodeSensor, SoPathSensor, SoDataSensor


SoPathSwitch

NAME

SoPathSwitch - group node that traverses only when traversed along a given path

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoPathSwitch

SYNOPSIS

#include <Inventor/nodes/SoPathSwitch.h>

Fields from class SoPathSwitch:

SoSFPath	path

Methods from class SoPathSwitch:

SoPathSwitch()

SoPathSwitch(int nChildren)

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoPathSwitch is a group node that traverses its children only if the current traversal path matches the SoPath in the path field. This can be used, for example, to affect only one instance of a subgraph. The path field contains the path up to (but not including) the SoPathSwitch. The path need not go all the way back to the root; if it does not, then only the number of ancestors that are in the path are compared to see if the children should be traversed. A NULL path means that the children are never traversed.

FIELDS

SoSFPath	path

The path that must match the current traversal path.

METHODS

SoPathSwitch()

Creates a path switch node with default settings.

SoPathSwitch(int nChildren)

Constructor that takes approximate number of children.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction, SoHandleEventAction

Traverses the children if the paths match.

FILE FORMAT/DEFAULT

PathSwitch {

path	NULL

}

SEE ALSO

SoPath, SoSwitch


SoPattern

NAME

SoPattern - node that defines the pattern to use when rendering shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoPattern

SYNOPSIS

#include <Inventor/nodes/SoPattern.h>

enum FilterType	{
SoPattern::INCLUSIVE_FILTER
Load only the patterns that are in the list of pattern names.
SoPattern::EXCLUSIVE_FILTER
Load all patterns except those specified in the list of pattern names.
}

Fields from class SoPattern:

SoSFString	category

SoSFString	name

Methods from class SoPattern:

SoPattern()

virtual	~SoPattern()

static SbBool	loadPatterns(const char* fileName,
int numFilters = 0,
const SbString* filterNames = NULL,
FilterType filterType = INCLUSIVE_FILTER)

static void	getPatternNames(int& number,
SbString*& names,
const char* category = NULL)

static void	addPattern(const char* category,
const char* name,
const unsigned char* bytes)

static void	getPattern(const char* category,
const char* name,
unsigned char*& bytes)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies the current pattern for all subsequent shape nodes in a scene graph.

A pattern is a 32x32 bitmap that is interpreted as a mask of 0s and 1s. Where a 1 appears, the corresponding pixel in the polygon is drawn; where a 0 appears, nothing is drawn. Using patterns is like using screendoor transparency where you specify the pattern of the screen. OpenGL polygon stippling is used to render the pattern.

You can load a pattern file containing one or more patterns using the loadPatterns method. You can also define and load patterns programmatically using the addPattern method.

Here is a sample showing the pattern file format.

"GEOLOGY"
# The first string is the category name of the first pattern.
# This is a comment !
"PATTERN N1"
# The second string is the name of the pattern.
# To define the pattern, you must define a 32x32 sequence of
# '1' and '0'.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1  ...
#============================================
"PATTERN N2"
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1  ...

Note: A pattern file can contain only one category.

Note: There is a potential conflict between the use of screendoor transparency and patterned shapes. If the transparency type is screendoor, transparency is ignored for patterned shapes.

Usage Notes

Patterns can be used for distinguishing, for example, different kinds of rocks in a geologic formation.

PlotMaster is a 3D-MasterSuite module that allows you to generate resolution-independent vector hardcopy output. PlotMaster handles patterns but does not handle textures (they are ignored). If you are planning to use PlotMaster, you may want to use patterns rather than textures to distinguish different shapes in your scene graph.

FIELDS

SoSFString	category

Specifies the name of a group of patterns. If the category name is invalid or not found, the default pattern is used.

SoSFString	name

Specifies the name of a pattern within a category. If the pattern name is invalid or not found, the default pattern is used.

METHODS

SoPattern()

virtual	~SoPattern()

Constructor and destructor.

static SbBool	loadPatterns(const char* fileName,
int numFilters = 0,
const SbString* filterNames = NULL,
FilterType filterType = INCLUSIVE_FILTER)

Loads a pattern file, with optional filtering of patterns. You can specify the file name with or without a full path. If you specify the file name without the path, the file will be loaded from the directory %OIVHOME%/data/patterns. If the file name is not found, a default pattern will be used.

filterNames is an SbString array of pattern names. This will be an array of patterns to include (or exclude) depending on the FilterType. The size of this array is numFilters.

static void	getPatternNames(int& number,
SbString*& names,
const char* category = NULL)

Gets the names of loaded patterns. Category is optional. You are responsible for deleting the names array when it is no longer needed. For example, delete []names;

static void	addPattern(const char* category,
const char* name,
const unsigned char* bytes)

Adds a new pattern specified as an array of 128 bytes. A category and a name are specified for this pattern. If the category and name are already in the list of patterns, the new pattern will not be added. If either the category or the name is an empty string, no pattern is added.

static void	getPattern(const char* category,
const char* name,
unsigned char*& bytes)

Retrieves a pattern bitmap (an array of 128 bytes) specified by its category and name. the pattern data pointed to by bytes is read-only.

FILE FORMAT/DEFAULT

Pattern {

category	""

name	""

}

NOTE: When you write a pattern node out to a file, the file will not contain enough information to fully reconstruct the original scene graph. The pattern node and its current fields are written out (as expected). However, the current fields only specify a category name and a pattern name. They do not specify the actual pattern(s) (like a typical attribute node) or a filename to get the patterns from (like a texture node).

SEE ALSO

SoMaterial


SoPendulum

NAME

SoPendulum - animated oscillating rotation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotation > SoPendulum

SYNOPSIS

#include <Inventor/nodes/SoPendulum.h>

Fields from class SoPendulum:

SoSFRotation	rotation0

SoSFRotation	rotation1

SoSFFloat	speed

SoSFBool	on

Fields from class SoRotation:

SoSFRotation	rotation

Methods from class SoPendulum:

SoPendulum()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoPendulum class is derived from SoRotation, so it applies a rotation to the current transformation. Using engines connected to the realTime global field, the rotation value is animated over time between two fixed rotations, achieving the effect of a swinging pendulum. The period of the swing can be adjusted by changing the speed field. The current rotation at any time is available in the rotation field, inherited from SoRotation

FIELDS

SoSFRotation	rotation0

SoSFRotation	rotation1

These define the two fixed rotations that are interpolated to create the pendular motion.

SoSFFloat	speed

Defines the speed of the pendulum, in cycles per second.

SoSFBool	on

Allows applications to enable or disable the motion easily.

METHODS

SoPendulum()

Creates a pendulum node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Concatenates interpolated rotation value with the current transformation matrix.

SoGetMatrixAction

Returns transformation matrix specified by the interpolated rotation.

FILE FORMAT/DEFAULT

Pendulum {

rotation	0 0 1  0

rotation0	0 0 1  0

rotation1	0 0 1  0

speed	1

on	TRUE

}

SEE ALSO

SoRotor, SoShuttle


SoPerspectiveCamera

NAME

SoPerspectiveCamera - perspective camera node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoCamera > SoPerspectiveCamera

SYNOPSIS

#include <Inventor/nodes/SoPerspectiveCamera.h>

Fields from class SoPerspectiveCamera:

SoSFFloat	heightAngle

Fields from class SoCamera:

SoSFEnum	viewportMapping

SoSFVec3f	position

SoSFRotation	orientation

SoSFFloat	aspectRatio

SoSFFloat	nearDistance

SoSFFloat	farDistance

SoSFFloat	focalDistance

Methods from class SoPerspectiveCamera:

SoPerspectiveCamera()

static SoType	getClassTypeId()

Methods from class SoCamera:

void	pointAt(const SbVec3f &targetPoint)

virtual void	scaleHeight(float scaleFactor)

virtual SbViewVolume	getViewVolume(float useAspectRatio = 0.0) const

void	viewAll(SoNode *sceneRoot,
const SbViewportRegion &vpRegion,
float slack = 1.0)

void	viewAll(SoPath *path,
const SbViewportRegion &vpRegion,
float slack = 1.0)

SbViewportRegion	getViewportBounds(const SbViewportRegion &region) const

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

A perspective camera defines a perspective projection from a viewpoint. The viewing volume for a perspective camera is a truncated right pyramid.

By default, the camera is located at (0,0,1) and looks along the negative z-axis; the position and orientation fields can be used to change these values. The heightAngle field defines the total vertical angle of the viewing volume; this and the aspectRatio field determine the horizontal angle.

FIELDS

SoSFFloat	heightAngle

Vertical angle of the viewing volume.

METHODS

SoPerspectiveCamera()

Creates a perspective camera node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction

Sets the viewport and camera information in the state.

FILE FORMAT/DEFAULT

PerspectiveCamera {

viewportMapping	ADJUST_CAMERA

position	0 0 1

orientation	0 0 1  0

aspectRatio	1

nearDistance	1

farDistance	10

focalDistance	5

heightAngle	0.785398

}

SEE ALSO

SbViewVolume, SoOrthographicCamera


SoPickAction

NAME

SoPickAction - abstract base class for picking objects in a scene

INHERITS FROM

SoAction > SoPickAction

SYNOPSIS

#include <Inventor/actions/SoPickAction.h>

Methods from class SoPickAction:

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This is an abstract base class for all picking actions. Currently, the only supported subclass is the SoRayPickAction.

METHODS

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Sets/returns current viewport region to use for action. Even though the picking operation may not involve a window per se, some nodes need this information to determine their size and placement.

SEE ALSO

SoRayPickAction


SoPickStyle

NAME

SoPickStyle - picking style node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoPickStyle

SYNOPSIS

#include <Inventor/nodes/SoPickStyle.h>

enum Style	{
SoPickStyle::SHAPE
Points on the surfaces of shapes may be picked
SoPickStyle::BOUNDING_BOX
Points on the surfaces of 3D bounding boxes of shapes may be picked
SoPickStyle::UNPICKABLE
Subsequent objects are transparent to picks
}

Fields from class SoPickStyle:

SoSFEnum	style

Methods from class SoPickStyle:

SoPickStyle()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node determines how subsequent geometry nodes in the scene graph are to be picked, as indicated by the style field.

Note that this is the only way to change the pick behavior of shapes; drawing style, complexity, and other rendering-related properties have no effect on picking.

FIELDS

SoSFEnum	style

Picking style.

METHODS

SoPickStyle()

Creates a pick style node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoRayPickAction, SoCallbackAction

Sets the current pick style in the state.

FILE FORMAT/DEFAULT

PickStyle {

style	SHAPE

}

SEE ALSO

SoComplexity, SoDrawStyle, SoRayPickAction


SoPickedPoint

NAME

SoPickedPoint - represents point on surface of picked object

INHERITS FROM

SoPickedPoint

SYNOPSIS

#include <Inventor/SoPickedPoint.h>

Methods from class SoPickedPoint:

SoPickedPoint(const SoPickedPoint &pp)

~SoPickedPoint()

const SbVec3f &	getPoint() const

const SbVec3f &	getNormal() const

const SbVec4f &	getTextureCoords() const

int	getMaterialIndex() const

SoPath *	getPath() const

SbBool	isOnGeometry() const

const SoDetail *	getDetail(const SoNode *node = NULL) const

const SbMatrix	getObjectToWorld(const SoNode *node = NULL) const

const SbMatrix	getWorldToObject(const SoNode *node = NULL) const

const SbMatrix	getObjectToImage(const SoNode *node = NULL) const

const SbMatrix	getImageToObject(const SoNode *node = NULL) const

const SbVec3f	getObjectPoint(const SoNode *node = NULL) const

const SbVec3f	getObjectNormal(const SoNode *node = NULL) const

const SbVec4f	getObjectTextureCoords(const SoNode *node=NULL) const

DESCRIPTION

An SoPickedPoint represents a point on the surface of an object that was picked by applying an SoRayPickAction to a scene. It contains a path to the picked shape, the point of intersection, the surface normal and texture coordinates at that point, and other information.

Each node in the picked path may have a corresponding instance of a detail subclass. These detail instances are stored in the SoPickedPoint.

METHODS

SoPickedPoint(const SoPickedPoint &pp)

Copy constructor.

~SoPickedPoint()

Destructor.

const SbVec3f &	getPoint() const

const SbVec3f &	getNormal() const

const SbVec4f &	getTextureCoords() const

These return the intersection point and surface normal in world space, and the texture coordinates in image space.

int	getMaterialIndex() const

Returns the index into the current set of materials of the material active at the intersection point. Note that if the materials are interpolated between vertices, the index will correspond to the material at one of the vertices.

SoPath *	getPath() const

Returns the path to the object that was intersected.

SbBool	isOnGeometry() const

Returns whether the intersection is actually on the geometry of the character that was hit, as opposed to being on the bounding box. The pick style (see SoPickStyle) affects this decision.

const SoDetail *	getDetail(const SoNode *node = NULL) const

Returns the detail that corresponds to the given node in the path returned by getPath(). If the node pointer is NULL (the default), the detail corresponding to the tail of the (full) path is returned.

const SbMatrix	getObjectToWorld(const SoNode *node = NULL) const

const SbMatrix	getWorldToObject(const SoNode *node = NULL) const

These return the transformation matrices between world space and the object space corresponding to the given node in the path. If the node pointer is NULL (the default), the matrix corresponding to the tail of the (full) path is returned.

const SbMatrix	getObjectToImage(const SoNode *node = NULL) const

const SbMatrix	getImageToObject(const SoNode *node = NULL) const

These return the texture transformation matrices between image space and the object space corresponding to the given node in the path. If the node pointer is NULL (the default), the matrix corresponding to the tail of the (full) path is returned.

const SbVec3f	getObjectPoint(const SoNode *node = NULL) const

const SbVec3f	getObjectNormal(const SoNode *node = NULL) const

const SbVec4f	getObjectTextureCoords(const SoNode *node=NULL) const

These return the intersection point, surface normal, and texture coordinates in the object space corresponding to the given node in the path. If the node pointer is NULL (the default), the information corresponding to the tail of the (full) path is returned.

SEE ALSO

SoRayPickAction, SoPickStyle, SoDetail, SoPath


SoPickedPointList

NAME

SoPickedPointList - maintains a list of pointers to SoPickedPoint instances

INHERITS FROM

SbPList > SoPickedPointList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoPickedPointList:

SoPickedPointList()

SoPickedPointList(int size)

SoPickedPointList(const SoPickedPointList &l)

~SoPickedPointList()

void	append(SoPickedPoint *ptr)

void	insert(SoPickedPoint *ptr,
int addBefore)

void	truncate(int start)

SoPickedPoint *	operator [](int i) const

void	set(int i,
SoPickedPoint *pickedPoint)

Methods from class SbPList:

int	find(const void *ptr) const

void	remove(int which)

int	getLength() const

void	copy(const SbPList &pl)

SbPList &	operator =(const SbPList &pl)

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SbPList holds lists of pointers to instances of classes derived from SoPickedPoint. It is used primarily to return information from picking with the SoRayPickAction class.

METHODS

SoPickedPointList()

Constructor.

SoPickedPointList(int size)

Constructor that pre-allocates storage for size pointers.

SoPickedPointList(const SoPickedPointList &l)

Constructor that copies the contents of another list.

~SoPickedPointList()

Destructor.

void	append(SoPickedPoint *ptr)

Adds a pointer to the end of the list.

void	insert(SoPickedPoint *ptr,
int addBefore)

Inserts given pointer in list before pointer with given index.

void	truncate(int start)

Removes all pointers after one with given index, inclusive, deleting all instances removed from the list.

SoPickedPoint *	operator [](int i) const

Accesses an element of a list.

void	set(int i,
SoPickedPoint *pickedPoint)

Sets an element of a list.

SEE ALSO

SoPickedPoint, SoRayPickAction


SoPointDetail

NAME

SoPointDetail - stores detail information about vertex-based shapes made of points

INHERITS FROM

SoDetail > SoPointDetail

SYNOPSIS

#include <Inventor/details/SoPointDetail.h>

Methods from class SoPointDetail:

SoPointDetail()

virtual	~SoPointDetail()

int32_t	getCoordinateIndex() const

int32_t	getMaterialIndex() const

int32_t	getNormalIndex() const

int32_t	getTextureCoordIndex() const

Methods from class SoDetail:

SoDetail *	copy() const

static SoType	getClassTypeId()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a point in a vertex-based shape made of points. It is used for returning information about an intersection with or primitives generated by a set of points. It is also used by SoFaceDetail and SoLineDetail to return information about the vertices of faces and line segments.

METHODS

SoPointDetail()

virtual	~SoPointDetail()

Constructor and destructor.

int32_t	getCoordinateIndex() const

Returns the index of the point within the relevant coordinate node.

int32_t	getMaterialIndex() const

Returns the index of the material for the point within the relevant material node.

int32_t	getNormalIndex() const

Returns the index of the surface normal at the point within the relevant normal node. Note that if normals have been generated for a shape, the index may not be into an existing normal node.

int32_t	getTextureCoordIndex() const

Returns the index of the texture coordinates for the point within the relevant normal node. Note that if texture coordinates have been generated for a shape, the index may not be into an existing texture coordinate node.

SEE ALSO

SoDetail, SoPickedPoint, SoPrimitiveVertex, SoVertexShape, SoFaceDetail, SoLineDetail


SoPointLight

NAME

SoPointLight - node representing a point light source

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLight > SoPointLight

SYNOPSIS

#include <Inventor/nodes/SoPointLight.h>

Fields from class SoPointLight:

SoSFVec3f	location

Fields from class SoLight:

SoSFBool	on

SoSFFloat	intensity

SoSFColor	color

Methods from class SoPointLight:

SoPointLight()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a point light source at a fixed 3D location. A point source illuminates equally in all directions; that is, it is omnidirectional.

FIELDS

SoSFVec3f	location

Location of the source.

METHODS

SoPointLight()

Creates a point light source node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Activates this light (if so specified) during traversal. All shape nodes that come after this light in the scene graph are illuminated by this light. The light's location is affected by the current transformation.

FILE FORMAT/DEFAULT

PointLight {

on	TRUE

intensity	1

color	1 1 1

location	0 0 1

}

SEE ALSO

SoDirectionalLight, SoSpotLight


SoPointLightDragger

NAME

SoPointLightDragger - sun-shaped icon you can translate in 3D by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoPointLightDragger

SYNOPSIS

#include <Inventor/draggers/SoPointLightDragger.h>

Fields from class SoPointLightDragger:

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoPointLightDragger:

SoPointLightDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoPointLightDragger is a dragger that looks like a point light source, can be translated in three directions, and has a translation field that always reflects its position in local space. The point light dragger also has a special material part which can be used to make it take on the color of a light source.

Remember: This is not a light source! It just looks like one. If you want to move a light with this dragger, you can either:

[a] Use an SoPointLightManip, which is subclassed from SoLight. It creates one of these draggers and uses it as the interface to change the location of its light source (see the SoPointLightManip reference page). The manipulator also edits the material part of this dragger to match the color of light the manipulator is producing.

[b] Use a field-to-field connection to connect the location of a light source from this dragger's translation field.

This dragger contains an SoDragPointDragger, which you drag through 3-space using an integrated set of linear and planar draggers. (For detailed information on how to use SoDragPointDragger, see its reference page.) The point light dragger sets the planar translation parts of this dragPoint dragger with a new default that looks like a shining sun emanating rays of light (okay, so use your imagination).

By changing the material part you can change the color of the sun shape, because the default part contains no SoMaterial nodes. This fact enables the SoPointLightManip (not the dragger, the manipulator) to color its dragger to match the color of the light it is emanating. Recall that a point light manip is derived from SoLight and creates a point light dragger to provide an interface and geometrical presence on screen. The manipulator also has a color field; when the light color changes, it changes the material part of its dragger so that they match.

You can change the parts in any instance of this dragger using setPart().

The default part geometries are defined as resources for this SoPointLightDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/pointLightDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	translation

Position of the dragger.

METHODS

SoPointLightDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
material	Material	--	yes
translator	DragPointDragger	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	pointLightOverallMaterial

Part:	material

Appearance:	white. half strength emissive, half strength diffuse

Description:	sets material for the sun shape when stationary. Resource for the moving sun, pointLightTranslatorPlaneTranslatorActive, contains a yellow material for highlighting.

Resource:	pointLightTranslatorPlaneTranslator

Parts:	translator.yzTranslator.translator

translator.xzTranslator.translator

translator.xyTranslator.translator

Appearance:	sun shape with no material

Description:	picking these parts initiates dragging by the yz, xz, and xy planar draggers respectively.

Resource:	pointLightTranslatorPlaneTranslatorActive

Parts:	translator.yzTranslator.translatorActive

translator.xzTranslator.translatorActive

translator.xyTranslator.translatorActive

Appearance:	yellow sun shape

Description:	shown during planar dragging in the yz, xz, and xy planes respectively.

Resource:	pointLightTranslatorLineTranslator

Parts:	translator.xTranslator.translator

translator.yTranslator.translator

translator.zTranslator.translator

Appearance:	white cylinder

Description:	picking these parts initiates dragging in the x, y, and z linear draggers respectively.

Resource:	pointLightTranslatorLineTranslatorActive

Parts:	translator.xTranslator.translatorActive

translator.yTranslator.translatorActive

translator.zTranslator.translatorActive

Appearance:	yellow cylinder

Description:	shown during linear dragging in the x, y, and z directions respectively.

FILE FORMAT/DEFAULT

PointLightDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

callbackList	NULL

material	<pointLightOverallMaterial resource>

translator	DragPointDragger {

}

translator.yzTranslator.translator	<pointLightTranslatorPlaneTranslator resource>

translator.xzTranslator.translator	<pointLightTranslatorPlaneTranslator resource>

translator.xyTranslator.translator	<pointLightTranslatorPlaneTranslator resource>

translator.yzTranslator.translatorActive	<pointLightTranslatorPlaneTranslatorActive resource>

translator.xzTranslator.translatorActive	<pointLightTranslatorPlaneTranslatorActive resource>

translator.xyTranslator.translatorActive	<pointLightTranslatorPlaneTranslatorActive resource>

translator.xTranslator.translator	<pointLightTranslatorLineTranslator resource>

translator.yTranslator.translator	<pointLightTranslatorLineTranslator resource>

translator.zTranslator.translator	<pointLightTranslatorLineTranslator resource>

translator.xTranslator.translatorActive	<pointLightTranslatorLineTranslatorActive resource>

translator.yTranslator.translatorActive	<pointLightTranslatorLineTranslatorActive resource>

translator.zTranslator.translatorActive	<pointLightTranslatorLineTranslatorActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoPointLightManip

NAME

SoPointLightManip - point light node with 3D interface for editing location

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLight > SoPointLight > SoPointLightManip

SYNOPSIS

#include <Inventor/manips/SoPointLightManip.h>

Fields from class SoPointLight:

SoSFVec3f	location

Fields from class SoLight:

SoSFBool	on

SoSFFloat	intensity

SoSFColor	color

Methods from class SoPointLightManip:

SoPointLightManip()

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoPointLight *newOne ) const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoPointLightManip is the base class for all SoPointLight nodes that have a built-in 3D user interface (this is the only such class provided with the Open Inventor toolkit). Since it is derived from SoPointLight, any changes to its fields result in a change of lighting for nodes that follow it in the scene graph. In this case, the interface edits the location field. Also, the color of the manipulator's geometry will reflect the color of the light (but you can not edit the color using this manipulator).

Typically, you will want to replace a regular SoPointLight with an SoPointLightManip (as when the user selects a light to be edited), or vice versa (as when the user is done moving the light and the interface should go away). Use the replaceNode() method to insert a manipulator into a scene graph, and the replaceManip() method to remove it when done.

The SoPointLightManip utilizes an SoPointLightDragger to provide a 3D interface. However, the manipulator differs from the dragger; it lights other objects in the scene because, as an SoPointLight, it alters the state. The fields values and movement of the dragger, on the other hand, affect only the dragger itself. To find out more about how the interface works and what each part will do, see the reference page for SoPointLightDragger. The interfaces of the dragger and the manipulator are identical.

The SoPointLightManip utilizes its dragger by adding it as a hidden child. When an action is applied to the manipulator, such as rendering or handling events, the manipulator first traverses the dragger, and then the manipulator adds its lighting parameters to the state. When you click-drag-release over the manipulator, it passes these events down to the dragger, which moves as a result ("I can't help it, I'm a dragger!").

The manipulator maintains consistency between the fields of the dragger and its own fields. Let's say you use the mouse to translate the dragger. Callbacks insure that the location field of the manipulator will change by the same amount, thus changing the lighting of nodes which follow in the scene graph. Similarly, if you set the location field of the SoPointLightManip, the manipulator will place the dragger accordingly.

Because the dragger is a hidden child, you can see the dragger on screen and interact with it, but the dragger does not show up when you write the manipulator to file. Also, any SoPath will end at the manipulator. (See the Actions section of this reference page for a complete description of when the dragger is traversed).

If you want to get a pointer to the dragger you can get it from the manipulator using the getDragger() method. You will need to do this if you want to change the geometry of a manipulator, since the geometry actually belongs to the dragger.

METHODS

SoPointLightManip()

Constructor.

SoDragger *	getDragger()

Returns a pointer to the dragger being used by this manipulator. Given this pointer, you can customize the dragger just like you would any other dragger. You can change geometry using the setPart() method, or add callbacks using the methods found in the SoDragger reference page.

SbBool	replaceNode(SoPath *p )

Replaces the tail of the path with this manipulator. The tail of the path must be an SoPointLight node (or subclass thereof). If the path has a nodekit, this will try to use setPart() to insert the manipulator. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the point light node will be copied to this manipulator, and the light node will be replaced.

The manipulator will not call ref() on the node it is replacing. The old node will disappear if it has no references other than from the input path p and its parent, since this manipulator will be replacing it in both of those places. Nor will the manipulator make any changes to field connections of the old node. The calling process is thus responsible for keeping track of its own nodes and field connections.

SbBool	replaceManip(SoPath *p,
SoPointLight *newOne ) const

Replaces the tail of the path, which must be this manipulator, with the given SoPointLight node. If the path has a nodekit, this will try to use setPart() to insert the new node. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the manipulator will be copied to the point light node, and the manipulator will be replaced.

The manipulator will not call ref() or unref() on the node which is replacing it, nor will it make any changes to field connections. The calling process is thus responsible for keeping track of its own nodes and field connections.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction

First, traverses the dragger the way an SoGroup would. All draggers place themselves in space, but leave the current transformation unchanged when finished. Then the SoPointLightManip adds a point light into the state, just like its base class, SoPointLight.

SoSearchAction

Searches just like an SoPointLight. Does not search the dragger, which is a hidden child.

SoWriteAction

Writes out just like an SoPointLight. Does not write the dragger, which is a hidden child. If you really need to write valuable information about the dragger, such as customized geometry, you can retrieve the dragger with the getDragger() method and then write it out separately.

FILE FORMAT/DEFAULT

PointLightManip {

on	TRUE

intensity	1

color	1 1 1

location	0 0 1

}

SEE ALSO

SoDragger, SoPointLight, SoPointLightDragger, SoDirectionalLightManip, SoSpotLightManip


SoPointSet

NAME

SoPointSet - point set shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape > SoPointSet

SYNOPSIS

#include <Inventor/nodes/SoPointSet.h>

Fields from class SoPointSet:

SoSFInt32	numPoints

Fields from class SoNonIndexedShape:

SoSFInt32	startIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoPointSet:

SoPointSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a set of points located at the coordinates specified by the vertexProperty field (from SoVertexShape) or the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.

SoPointSet uses the coordinates in order, starting with the first one. The number of points in the set is specified by the numPoints field.

The coordinates of the point set are transformed by the current cumulative transformation. The points are drawn with the current light model and drawing style (drawing styles FILLED and LINES are treated as POINTS).

Treatment of the current material and normal binding is as follows: PER_PART, PER_FACE, and PER_VERTEX bindings bind one material or normal to each point. The default material binding is OVERALL. The default normal binding is PER_VERTEX.

FIELDS

SoSFInt32	numPoints

Number of points.

METHODS

SoPointSet()

Creates a point set node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws points based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks points based on the current coordinates and transformation. Details about the intersection are returned in an SoPointDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all points in the set with the current transformation applied to them. Sets the center to the average of the coordinates of all points.

SoCallbackAction

If any point callbacks are registered with the action, they will be invoked for each point in the set.

FILE FORMAT/DEFAULT

PointSet {

vertexProperty	NULL

startIndex	0

numPoints	-1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoPointDetail, SoVertexProperty


SoPolygonOffset

NAME

SoPolygonOffset - encapsulates the OpenGL 1.1 polygon offset feature

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoPolygonOffset

SYNOPSIS

#include <Inventor/nodes/SoPolygonOffset.h>

enum Style	{
SoPolygonOffset::FILLED,
SoPolygonOffset::LINES,
SoPolygonOffset::POINTS
}

Fields from class SoPolygonOffset:

SoSFFloat	factor

SoSFFloat	units

SoSFBitMask	styles

SoSFBool	on

Methods from class SoPolygonOffset:

SoPolygonOffset()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This class encapsulates the OpenGL 1.1 glPolygonOffset() function. This node can be used to offset polygons and/or lines that are at the exact same depth to prevent z-buffer stitching.

The styles field is a bit-wise combination of FILLED, LINES, and POINTS, and determines which primitive types should be offset. A positive offset value moves the primitives away from the camera and a negative value pulls them closer.

METHODS

SoPolygonOffset()

Constructor.

ACTION BEHAVIOR

SoGLRenderAction

Calls glPolygonOffset and enables or disables the polygon offset feature as specified.

FILE FORMAT/DEFAULT

PolygonOffset {

factor	1

units	1

styles	FILLED

on	TRUE

}


SoPrimitiveVertex

NAME

SoPrimitiveVertex - represents a vertex of a generated primitive

INHERITS FROM

SoPrimitiveVertex

SYNOPSIS

#include <Inventor/SoPrimitiveVertex.h>

Methods from class SoPrimitiveVertex:

SoPrimitiveVertex()

SoPrimitiveVertex(const SoPrimitiveVertex &pv)

~SoPrimitiveVertex()

const SbVec3f &	getPoint() const

const SbVec3f &	getNormal() const

const SbVec4f &	getTextureCoords() const

int	getMaterialIndex() const

const SoDetail *	getDetail() const

SoPrimitiveVertex &	operator =(const SoPrimitiveVertex &pv)

DESCRIPTION

An SoPrimitiveVertex represents a vertex of a primitive (triangle, line segment, or point) that is being generated by an SoCallbackAction. It contains an object-space point, normal, texture coordinates, material index, and a pointer to an instance of an SoDetail subclass. This detail may contain more information about the vertex, or may be a NULL pointer if there is no such info.

Instances of SoPrimitiveVertex are typically created on the stack by shape classes while they are generating primitives. Anyone who wants to save them as return values from SoCallbackAction should probably make copies of them.

METHODS

SoPrimitiveVertex()

SoPrimitiveVertex(const SoPrimitiveVertex &pv)

~SoPrimitiveVertex()

Constructors and destructor. Note that copying a primitive vertex copies the detail pointer, and not the detail itself.

const SbVec3f &	getPoint() const

const SbVec3f &	getNormal() const

const SbVec4f &	getTextureCoords() const

These return the surface point, normal, and texture coordinates in object space.

int	getMaterialIndex() const

Returns the index into the current set of materials of the material active at the vertex.

const SoDetail *	getDetail() const

Returns the detail giving more information about the vertex. Note that this pointer may be NULL if there is no more info.

SoPrimitiveVertex &	operator =(const SoPrimitiveVertex &pv)

Copies the given vertex. Note that just the pointer to the detail is copied, and not the detail itself.


SoProfile

NAME

SoProfile - abstract base class for all profile nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoProfile

SYNOPSIS

#include <Inventor/nodes/SoProfile.h>

enum Profile	{
SoProfile::START_FIRST
Start a new profile and remove any existing profiles from the current list
SoProfile::START_NEW
Start a new profile and add it to the current list
SoProfile::ADD_TO_CURRENT
Add to end of the last profile in the current list
}

Fields from class SoProfile:

SoMFInt32	index

SoSFEnum	linkage

Methods from class SoProfile:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is the abstract base class for all profile nodes, which define 2D curves. A profile is not itself geometry, but is used to change or delimit the geometry of something else. For an SoText3 node, the profile determines the cross-section of the side of each text character. For an SoNurbsSurface node, the profile is used to specify trim curves for the surface.

The current profile state can consist of one or more profiles, each of which can be made up of one or more instances of SoProfile subclass nodes. Each profile node specifies (in the index field) a set of indices that refer to the current set of profile coordinates, specified using either an SoProfileCoordinate2 or an SoProfileCoordinate3 node. No profile curve should intersect itself or another profile curve.

Profiles are part of the state, just like all other properties. The state contains a current list of profiles. Depending on the linkage field, a profile can clear the list and begin a new profile, begin a new profile at the end of those already in the list, or append to the last profile in the current list. Note that when appending profile B to the end of profile A, B must begin at the same 2D point at which A ends.

FIELDS

SoMFInt32	index

Indices into profile coordinates.

SoSFEnum	linkage

Specifies connectivity of profile curve with respect to profiles in current list in state.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Adds profile to current traversal state.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoLinearProfile, SoNurbsProfile, SoNurbsSurface, SoProfileCoordinate2, SoProfileCoordinate3, SoText3


SoProfileCoordinate2

NAME

SoProfileCoordinate2 - profile coordinate node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoProfileCoordinate2

SYNOPSIS

#include <Inventor/nodes/SoProfileCoordinate2.h>

Fields from class SoProfileCoordinate2:

SoMFVec2f	point

Methods from class SoProfileCoordinate2:

SoProfileCoordinate2()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of 2D coordinates to be used by subsequent SoProfile nodes. This node does not produce a visible result during rendering; it simply replaces the current profile coordinates in the traversal state for subsequent nodes to use.

FIELDS

SoMFVec2f	point

2D profile coordinate points.

METHODS

SoProfileCoordinate2()

Creates a profile coordinate node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Sets profile coordinates in current traversal state.

FILE FORMAT/DEFAULT

ProfileCoordinate2 {

point	0 0

}

SEE ALSO

SoProfile, SoProfileCoordinate3


SoProfileCoordinate3

NAME

SoProfileCoordinate3 - rational profile coordinate node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoProfileCoordinate3

SYNOPSIS

#include <Inventor/nodes/SoProfileCoordinate3.h>

Fields from class SoProfileCoordinate3:

SoMFVec3f	point

Methods from class SoProfileCoordinate3:

SoProfileCoordinate3()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of rational 3D coordinates to be used by subsequent SoProfile nodes. (These coordinates may be used for any type of profile; they may be useful in some cases for specifying control points for SoNurbsProfile nodes.) This node does not produce a visible result during rendering; it simply replaces the current profile coordinates in the traversal state for subsequent nodes to use.

FIELDS

SoMFVec3f	point

Rational 3D profile coordinate points.

METHODS

SoProfileCoordinate3()

Creates a profile coordinate node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Sets profile coordinates in current traversal state.

FILE FORMAT/DEFAULT

ProfileCoordinate3 {

point	0 0 1

}

SEE ALSO

SoProfile, SoProfileCoordinate2


SoQuadMesh

NAME

SoQuadMesh - quadrilateral mesh shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape > SoQuadMesh

SYNOPSIS

#include <Inventor/nodes/SoQuadMesh.h>

Fields from class SoQuadMesh:

SoSFInt32	verticesPerColumn

SoSFInt32	verticesPerRow

Fields from class SoNonIndexedShape:

SoSFInt32	startIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoQuadMesh:

SoQuadMesh()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This shape node constructs quadrilaterals out of vertices. The vertices may be specified in the vertexProperty field (from SoVertexShape), or by the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.

SoQuadMesh uses the coordinates, in order, starting with the first one. The number of vertices in the columns and rows of the mesh are specified by the verticesPerColumn and verticesPerRow fields. (Note that these numbers are 1 greater than the number of quadrilaterals per row and per column.)

For example, an SoQuadMesh with verticesPerColumn of 3, and verticesPerRow of 4 would use coordinates 1, 2, 3, and 4 for the first row of vertices, coordinates 5, 6, 7, and 8 for the second row, and coordinates 9, 10, 11, and 12 for the third (last) row. The result is a mesh of 3 quadrilaterals across by 2 down.

The coordinates of the mesh are transformed by the current cumulative transformation. The mesh is drawn with the current light model and drawing style.

Treatment of the current material and normal binding is as follows: The PER_PART binding specifies a material or normal for each row of the mesh. The PER_FACE binding specifies a material or normal for each quadrilateral. The _INDEXED bindings are equivalent to their non-indexed counterparts. The default material binding is OVERALL. The default normal binding is PER_VERTEX.

If any normals (or materials) are specified, Open Inventor assumes you provide the correct number of them, as indicated by the binding. You will see unexpected results if you specify fewer normals (or materials) than the shape requires. If no normals are specified, they will be generated automatically.

NOTE: A quad mesh may not render or pick correctly if any of its polygons are self-intersecting or non-planar.

FIELDS

SoSFInt32	verticesPerColumn

SoSFInt32	verticesPerRow

Number of vertices per column and row.

METHODS

SoQuadMesh()

Creates a quadrilateral mesh node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws a mesh based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks on the mesh based on the current coordinates and transformation. Details about the intersection are returned in an SoFaceDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all vertices of the mesh with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle forming the quadrilaterals of the mesh.

FILE FORMAT/DEFAULT

QuadMesh {

vertexProperty	NULL

startIndex	0

verticesPerColumn	1

verticesPerRow	1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoFaceDetail, SoFaceSet, SoTriangleStripSet, SoVertexProperty


SoRayPickAction

NAME

SoRayPickAction - intersects objects with a ray cast into scene

INHERITS FROM

SoAction > SoPickAction > SoRayPickAction

SYNOPSIS

#include <Inventor/actions/SoRayPickAction.h>

Methods from class SoRayPickAction:

SoRayPickAction(const SbViewportRegion &viewportRegion)

void	setPoint(const SbVec2s &viewportPoint)

void	setNormalizedPoint(const SbVec2f &normPoint)

void	setRadius(float radiusInPixels)

void	setRay(const SbVec3f &start,
const SbVec3f &direction,
float nearDistance = -1.0,
float farDistance = -1.0)

void	setPickAll(SbBool flag)

SbBool	isPickAll() const

const SoPickedPointList &	getPickedPointList() const

SoPickedPoint *	getPickedPoint(int index = 0) const

Methods from class SoPickAction:

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class performs picking by casting a ray into a scene and performing intersection tests with each object. The ray is extended to be a cone or cylinder, depending on the camera type, for intersection with points and lines. Each intersection is returned as an SoPickedPoint instance.

The picking ray can be specified as either a ray from the camera location through a particular viewport pixel, or as a world-space ray. In the former case, a valid camera must be encountered during traversal of the graph to determine the location of the ray in world space.

Callers can cause the action to compute all intersections along the ray (sorted closest to farthest) by setting the pickAll flag to TRUE. By default, the action computes only the closest intersection. In either case, the intersections are returned in an SoPickedPointList. Each intersection can be examined by accessing the appropriate SoPickedPoint in the list. The SoPickedPoint class provides methods to get the intersection point, normal, and other info.

METHODS

SoRayPickAction(const SbViewportRegion &viewportRegion)

Constructor takes viewport region to use for picking. Even though the picking operation may not involve a window per se, some nodes need this information to determine their size and placement.

void	setPoint(const SbVec2s &viewportPoint)

Sets the viewport-space point through which the ray passes, starting at the camera's viewpoint. Viewport coordinates range from (0,0) at the lower left to (width-1,height-1) at the upper right.

void	setNormalizedPoint(const SbVec2f &normPoint)

Sets the viewport point in normalized coordinates, which range from (0,0) at the lower left to (1,1) at the upper right.

void	setRadius(float radiusInPixels)

Set the radius (in pixels) around the point. This is used when testing the ray against lines and points. By default, the radius is 5 pixels. For perspective cameras, the ray is extended to be a cone when testing against lines and points. For orthographic cameras, the ray is extended to be a cylinder. The radius has no effect for shapes of other types.

void	setRay(const SbVec3f &start,
const SbVec3f &direction,
float nearDistance = -1.0,
float farDistance = -1.0)

Sets a world-space ray along which to pick. The ray is defined as a world space starting point and direction vector. The direction vector will be normalized automatically. The last two arguments are the parametric distances between which intersections along the ray must occur. The distances are measured as if the direction vector is unit length; e.g., if nearDistance is 2.0, the intersection must occur past (start + 2*(length of the direction vector)) units along the ray. These distances can be used to achieve near and far plane clipping. A negative distance (such as the default values) means disable clipping to that plane.

void	setPickAll(SbBool flag)

SbBool	isPickAll() const

Sets/returns whether the action will return all objects intersected or just the closest one.

const SoPickedPointList &	getPickedPointList() const

Returns list of picked points.

SoPickedPoint *	getPickedPoint(int index = 0) const

Returns the indexed picked point from the list.

SEE ALSO

SoPickedPoint, SoPickedPointList


SoReadError

NAME

SoReadError - read error handling

INHERITS FROM

SoError > SoReadError

SYNOPSIS

#include <Inventor/errors/SoReadError.h>

Methods from class SoReadError:

static void	setHandlerCallback(SoErrorCB *cb,
void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

static SoType	getClassTypeId()

Methods from class SoError:

const SbString &	getDebugString() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

SoReadError is used for errors reported while reading Open Inventor data files.

METHODS

static void	setHandlerCallback(SoErrorCB *cb,
void *data)

static SoErrorCB *	getHandlerCallback()

static void *	getHandlerData()

Sets/returns handler callback for SoReadError class.

static SoType	getClassTypeId()

Returns type identifier for SoReadError class.

SEE ALSO

SoDebugError, SoMemoryError


SoRenderList

NAME

SoRenderList - abstract group node that changes traversal from the scene graph to a list of render objects

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoRenderList

SYNOPSIS

#include <Inventor/nodes/SoRenderList.h>

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoRenderList:

void	addRenderObjectType(SoType t)

void	removeRenderObjectType(SoType t)

int	getNumRenderObjectTypes() const

SoType	getRenderObjectType(int i) const

void	addRenderObjectName(SbName n)

void	removeRenderObjectName(SbName n)

int	getNumRenderObjectNames() const

SbName	getRenderObjectName(int i) const

void	removeAllRenderObjectNames()

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This abstract node keeps track of paths to the shapes beneath it. Derived classes can traverse or reorganize this list instead of traversing in scene graph order. As the scene graph changes, the SoRenderList node will update the list of paths, calling virtual functions for the derived classes to update their data structures.

By default, the SoRenderList node keeps track of paths to instances of SoShape, SoLOD, and some manipulators. The list of types to look for can be changed with the functions addRenderObjectType() and removeRenderObjectType(). You can also mark a specific node as a Render Object by giving its name through addRenderObjectName().

Applications should not use an instance of class SoRenderList directly; instead, instances of the derived classes, such as SoValueOrdering and SoOctreeOrdering, should be used.

METHODS

void	addRenderObjectType(SoType t)

Adds a new type to the search list.

void	removeRenderObjectType(SoType t)

Removes a type from the search list.

int	getNumRenderObjectTypes() const

Returns number of types in the search list.

SoType	getRenderObjectType(int i) const

Returns the ith type of the search list.

void	addRenderObjectName(SbName n)

Adds a new name to the search list.

void	removeRenderObjectName(SbName n)

Removes a name from the search list.

int	getNumRenderObjectNames() const

Returns number of names in the search list.

SbName	getRenderObjectName(int i) const

Returns the ith name of the search list.

void	removeAllRenderObjectNames()

Clears all names from the search list.

SEE ALSO

SoGetPrimitiveCountAction, SoLevelOfSimplification, SoOctreeOrdering, SoValueOrdering


SoReorganizeAction

NAME

SoReorganizeAction - reorganizes the scene graph by grouping shapes with common properties, then groups these shapes in a single shape and runs the simplifier on it.

INHERITS FROM

SoAction > SoSimplifyAction > SoReorganizeAction

SYNOPSIS

#include <Inventor/actions/SoReorganizeAction.h>

Methods from class SoReorganizeAction:

SoReorganizeAction(SoSimplifier *_simplifier)

~SoReorganizeAction()

SoSeparator *	getSimplifiedSceneGraph() const

void 	generateNormals(SbBool g)

SbBool 	areNormalGenerated() const

void 	generateTriangleStrips(SbBool g)

SbBool 	areTriangleStripGenerated() const

SoSimplifier *	getSimplifier() const

Methods from class SoSimplifyAction

void	setSimplificationLevels(int num,
const float levels[])

const float *	getSimplificationLevels() const

int	getNumSimplificationLevels() const

void	setRanges(int num,
const float newRanges[])

const float *	getRanges() const

int	getNumRanges() const

void	setSizeFactor(float size)

float	getSizeFactor() const

void	setInlineLOD(SbBool i)

SbBool	isInlineLOD() const

void	setUrlName(const SbString name)

const SbString 	getUrlName() const

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

void	setMinTriangles(int mt)

int	getMinTriangles() const

void	setRenderCulling(SbBool r)

int	isRenderCulling() const

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class reorganize the scene graph by grouping shapes with common properties, than groups these shapes in a single shape and runs the simplifier on it. If a simplifier is not provided, it creates an indexed triangle strip set from this shape. This action is very similar to the ivfix utility program.

METHODS

SoReorganizeAction(SoSimplifier *_simplifier)

~SoReorganizeAction()

Constructor and destructor.

SoSeparator *	getSimplifiedSceneGraph() const

Returns result of reorganization as new scene graph.

void 	generateNormals(SbBool g)

SbBool 	areNormalGenerated() const

Sets/gets whether normals should be generated during reorganization.

void 	generateTriangleStrips(SbBool g)

SbBool 	areTriangleStripGenerated() const

Sets/gets whether triangle strips should be generated; if false, IndexedFaceSets are generated.

SoSimplifier *	getSimplifier() const

Returns the simplifier being used, may be NULL.

SEE ALSO

SoAction, SoIndexedTriangleStripSet


SoResetTransform

NAME

SoResetTransform - node that resets the current transformation to identity

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoResetTransform

SYNOPSIS

#include <Inventor/nodes/SoResetTransform.h>

enum ResetType	{
SoResetTransform::TRANSFORM
Reset the current transformation to identity
SoResetTransform::BBOX
Reset the bounding box to empty
}

Fields from class SoResetTransform:

SoSFBitMask	whatToReset

Methods from class SoResetTransform:

SoResetTransform()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node resets the current transformation to identity. It can be used to apply an absolute world space transformation afterwards, such as translating to a specific point from within a hierarchy. An SoResetTransform node should probably be used under an SoSeparator or SoTransformSeparator so it won't change transformations for the rest of the scene graph. An SoResetTransform node can also be used to reset the current bounding box to empty during traversal of an SoGetBoundingBoxAction, if the whatToReset field has the BBOX bit set.

FIELDS

SoSFBitMask	whatToReset

Specifies which items to reset when the node is traversed.

METHODS

SoResetTransform()

Creates a reset transformation node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

If specified, resets current transformation matrix to identity.

SoGetBoundingBoxAction

If specified, resets current transformation matrix to identity and current computed bounding box to be empty.

SoGetMatrixAction

Returns identity matrix.

FILE FORMAT/DEFAULT

ResetTransform {

whatToReset	TRANSFORM

}

SEE ALSO

SoTransform


SoRotateCylindricalDragger

NAME

SoRotateCylindricalDragger - object you rotate along a cylindrical surface by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoRotateCylindricalDragger

SYNOPSIS

#include <Inventor/draggers/SoRotateCylindricalDragger.h>

Fields from class SoRotateCylindricalDragger:

SoSFRotation	rotation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoRotateCylindricalDragger:

SoRotateCylindricalDragger()

void	setProjector(SbCylinderProjector *p)

const SbCylinderProjector *	getProjector() const

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoRotateCylindricalDragger is a simple dragger that rotates about the y axis of its local space. The feel of the rotation is as if you were spinning a cylinder about its axis of rotation. The local space is determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.

This node has a rotation field which always reflects its orientation in local space. If you set the field, the dragger will rotate accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's orientation.

This dragger contains four parts, rotator, rotatorActive, feedback, and feedbackActive.

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/rotateCylindricalDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the dragger.

METHODS

SoRotateCylindricalDragger()

Constructor.

void	setProjector(SbCylinderProjector *p)

const SbCylinderProjector *	getProjector() const

Set and get a different cylinder projector. See the SbCylinderProjector reference pages to find out how each kind affects the feel of your dragger's motion. The default uses an SbCylinderPlaneProjector.

Passing in NULL will cause this default type of projector to be used. Any projector you pass in will be deleted by this dragger when this dragger is deleted. Note that the axis and radius of the cylinder are determined by the dragger, based on the y-axis in local space and how far the initial mouse click occured from the center of rotation.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
rotator	Separator	--	yes
rotatorActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	rotateCylindricalRotator

Part:	rotator

Appearance:	white cylinder (with vertical axis) made of lines

Description:	picking this initiates rotation

Resource:	rotateCylindricalRotatorActive

Part:	rotatorActive

Appearance:	yellow version of rotator

Description:	displayed while in motion instead of the rotator

Resource:	rotateCylindricalFeedback

Part:	feedback

Appearance:	thin purple line along local y-axis

Description:	shows center of rotation when not moving

Resource:	rotateCylindricalFeedbackActive

Part:	feedbackActive

Appearance:	thin, slightly brighter purple line along local y-axis

Description:	shows center of rotation when moving

FILE FORMAT/DEFAULT

RotateCylindricalDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

callbackList	NULL

rotator	<rotateCylindricalRotator resource>

rotatorActive	<rotateCylindricalRotatorActive resource>

feedback	<rotateCylindricalFeedback resource>

feedbackActive	<rotateCylindricalFeedbackActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoRotateDiscDragger

NAME

SoRotateDiscDragger - object you can rotate like a knob by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoRotateDiscDragger

SYNOPSIS

#include <Inventor/draggers/SoRotateDiscDragger.h>

Fields from class SoRotateDiscDragger:

SoSFRotation	rotation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoRotateDiscDragger:

SoRotateDiscDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoRotateDiscDragger is a simple dragger that rotates about the z axis of its local space. The feel of the rotation is as if you were spinning a record on a turntable or rotating the volume knob of a radio. The local space is determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.

This node has a rotation field which always reflects its orientation in local space. If you set the field, the dragger will rotate accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's rotation.

This dragger contains four parts, rotator, rotatorActive, feedback, and feedbackActive.

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/rotateDiscDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the dragger.

METHODS

SoRotateDiscDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
rotator	Separator	--	yes
rotatorActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	rotateDiscRotator

Part:	rotator

Appearance:	white cylinder (with axis along z-direction) made of lines

Description:	picking this initiates rotation

Resource:	rotateDiscRotatorActive

Part:	rotatorActive

Appearance:	yellow version of rotator, with added yellow cube

Description:	displayed while in motion instead of the rotator

Resource:	rotateDiscFeedback

Part:	feedback

Appearance:	thin purple line along local z-axis

Description:	shows center of rotation when not moving

Resource:	rotateDiscFeedbackActive

Part:	feedbackActive

Appearance:	thin, slightly brighter purple line along local z-axis

Description:	shows center of rotation when moving

FILE FORMAT/DEFAULT

RotateDiscDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

callbackList	NULL

rotator	<rotateDiscRotator resource>

rotatorActive	<rotateDiscRotatorActive resource>

feedback	<rotateDiscFeedback resource>

feedbackActive	<rotateDiscFeedbackActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoRotateSphericalDragger

NAME

SoRotateSphericalDragger - object you can rotate about a spherical surface by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoRotateSphericalDragger

SYNOPSIS

#include <Inventor/draggers/SoRotateSphericalDragger.h>

Fields from class SoRotateSphericalDragger:

SoSFRotation	rotation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoRotateSphericalDragger:

SoRotateSphericalDragger()

void	setProjector(SbSphereProjector *p)

const SbSphereProjector *	getProjector() const

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoRotateSphericalDragger is a simple dragger that rotates freely in all directions. The feel of the rotation is as if you were rolling a ball. The center of rotation is the origin of the local space, determined by the dragger's location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.

This node has a rotation field which always reflects its orientation in local space. If you set the field, the dragger will rotate accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's orientation.

This dragger contains four parts, rotator, rotatorActive, feedback, and feedbackActive.

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/rotateSphericalDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the dragger.

METHODS

SoRotateSphericalDragger()

Constructor.

void	setProjector(SbSphereProjector *p)

const SbSphereProjector *	getProjector() const

Set and get a different sphere projector. See the SbSphereProjector reference pages to find out how each kind affects the feel of your dragger's motion. The default uses an SbSpherePlaneProjector.

Passing in NULL will cause the default type of projector to be used. Any projector you pass in will be deleted by this dragger when this dragger is deleted. Note that the center and radius of the sphere are determined by the dragger, based on the origin of the local space and the distance between the initial mouse click and that origin.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
rotator	Separator	--	yes
rotatorActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	rotateSphericalRotator

Part:	rotator

Appearance:	white sphere made of three intersecting circles. Each circle is in a different plane of local space

Description:	picking this initiates rotation

Resource:	rotateSphericalRotatorActive

Part:	rotatorActive

Appearance:	yellow version of rotator

Description:	displayed while in motion instead of the rotator

Resource:	rotateSphericalFeedback

Part:	feedback

Appearance:	thin purple 3-D crosshairs at origin

Description:	shows center of rotation when not moving

Resource:	rotateSphericalFeedbackActive

Part:	feedbackActive

Appearance:	thin, slightly brighter purple 3-D crosshairs at origin

Description:	shows center of rotation when moving

FILE FORMAT/DEFAULT

RotateSphericalDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

callbackList	NULL

rotator	<rotateSphericalRotator resource>

rotatorActive	<rotateSphericalRotatorActive resource>

feedback	<rotateSphericalFeedback resource>

feedbackActive	<rotateSphericalFeedbackActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoRotation

NAME

SoRotation - node representing a 3D rotation about an arbitrary axis

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotation

SYNOPSIS

#include <Inventor/nodes/SoRotation.h>

Fields from class SoRotation:

SoSFRotation	rotation

Methods from class SoRotation:

SoRotation()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a 3D rotation about an arbitrary axis through the origin. The rotation is accumulated into the current transformation, which is applied to subsequent shapes. The rotation field provides a variety of methods for specifying the rotation.

FIELDS

SoSFRotation	rotation

Rotation specification.

METHODS

SoRotation()

Creates a rotation node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates rotation transformation into the current transformation.

SoGetMatrixAction

Returns the matrix corresponding to the rotation.

FILE FORMAT/DEFAULT

Rotation {

rotation	0 0 1  0

}

SEE ALSO

SoRotationXYZ, SoTransform


SoRotationXYZ

NAME

SoRotationXYZ - node representing a 3D rotation about the x-, y-, or z-axis

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotationXYZ

SYNOPSIS

#include <Inventor/nodes/SoRotationXYZ.h>

enum Axis	{
SoRotationXYZ::X
The X-axis
SoRotationXYZ::Y
The Y-axis
SoRotationXYZ::Z
The Z-axis
}

Fields from class SoRotationXYZ:

SoSFEnum	axis

SoSFFloat	angle

Methods from class SoRotationXYZ:

SoRotationXYZ()

SbRotation	getRotation() const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a 3D rotation about one of the three principal axes. The rotation is accumulated into the current transformation, which is applied to subsequent shapes.

FIELDS

SoSFEnum	axis

Rotation axis.

SoSFFloat	angle

Rotation angle (in radians), using the right-hand rule.

METHODS

SoRotationXYZ()

Creates a rotation node with default settings.

SbRotation	getRotation() const

Returns an SbRotation equivalent to the specified rotation.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates rotation transformation into the current transformation.

SoGetMatrixAction

Returns the matrix corresponding to the rotation.

FILE FORMAT/DEFAULT

RotationXYZ {

axis	X

angle	0

}

SEE ALSO

SoRotation, SoTransform


SoRotor

NAME

SoRotor - animated rotation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotation > SoRotor

SYNOPSIS

#include <Inventor/nodes/SoRotor.h>

Fields from class SoRotor:

SoSFFloat	speed

SoSFBool	on

Fields from class SoRotation:

SoSFRotation	rotation

Methods from class SoRotor:

SoRotor()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoRotor class is derived from SoRotation, so it applies a rotation to the current transformation. Using engines connected to the realTime global field, the rotation value is animated over time, achieving a spinning effect. The period of the rotation can be adjusted by changing the speed field.

The current rotation at any time is available in the rotation field, inherited from SoRotation. This field can also be set to specify the axis of rotation. Note that unless a non-zero rotation is specified for the rotation, the node will not know which axis to use. For example, to set a rotor to spin about the y-axis, use the following:

rotor->rotation.setValue(axis, 0.1);

where axis is a vector containing (0,1,0). Any non-zero angle can be used in this code.

FIELDS

SoSFFloat	speed

Defines the speed of the rotor, in revolutions per second.

SoSFBool	on

Allows applications to enable or disable the motion easily.

METHODS

SoRotor()

Creates a rotor node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Concatenates current rotation value with the current transformation matrix.

SoGetMatrixAction

Returns transformation matrix specified by the rotation.

FILE FORMAT/DEFAULT

Rotor {

rotation	0 0 1  0

speed	1

on	TRUE

}

SEE ALSO

SoPendulum, SoShuttle


SoSFBitMask

NAME

SoSFBitMask - single-value field containing a set of bit flags

INHERITS FROM

SoField > SoSField > SoSFEnum > SoSFBitMask

SYNOPSIS

#include <Inventor/fields/SoSFBitMask.h>

Methods from class SoSFBitMask:

static SoType	getClassTypeId()

virtual void	getTypeId() const

int	getValue() const

void	setValue(int newValue)

int	operator =(int newValue)

int	operator ==(const SoSFBitMask &f) const

int	operator !=(const SoSFBitMask &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A single-value field that contains a mask of bit flags, stored as an integer. Nodes that use this field class define mnemonic names for the bit flags. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.

The bit-wise "&" and "|" operators should be used when testing and setting flags in a mask. For example, to turn on the sides of a 3D text node and turn off the back you would write:

text3->parts = text3->parts.getValue() | SoText3::SIDES;

text3->parts = text3->parts.getValue() & ~SoText3::BACK;

SoSFBitMasks are written to file as one or more mnemonic enumerated type names, in this format:

( flag1 | flag2 | ... )

If only one flag is used in a mask, the parentheses are optional. These names differ among uses of this field in various node or engine classes. See their reference pages for the names.

The field values may also be represented as integers, but this is not guaranteed to be portable.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

int	getValue() const

Returns this field's value.

void	setValue(int newValue)

int	operator =(int newValue)

Sets this field to newValue.

int	operator ==(const SoSFBitMask &f) const

int	operator !=(const SoSFBitMask &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFBitMask


SoSFBool

NAME

SoSFBool - field containing a single Boolean value

INHERITS FROM

SoField > SoSField > SoSFBool

SYNOPSIS

#include <Inventor/fields/SoSFBool.h>

Methods from class SoSFBool:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SbBool	getValue() const

SbBool	operator =(SbBool newValue)

void	setValue(SbBool newValue)

int	operator ==(const SoSFBool &f) const

int	operator !=(const SoSFBool &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a single Boolean (true or false) value.

SoSFBools may be written to file as "0" (representing FALSE), "1", "TRUE", or "FALSE".

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SbBool	getValue() const

Returns this field's value.

SbBool	operator =(SbBool newValue)

void	setValue(SbBool newValue)

Sets this field to newValue.

int	operator ==(const SoSFBool &f) const

int	operator !=(const SoSFBool &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFBool


SoSFColor

NAME

SoSFColor - field containing an RGB color

INHERITS FROM

SoField > SoSField > SoSFColor

SYNOPSIS

Methods from class SoSFColor:

void	setValue(const SbVec3f &vec)

void	setValue(float red,
float green,
float blue)

void	setValue(const float rgb[3])

void	setHSVValue(float hue,
float saturation,
float value)

void	setHSVValue(const float hsv[3])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbColor &	getValue() const

const SbColor &	operator =(const SbColor &newValue)

void	setValue(const SbColor &newValue)

int	operator ==(const SoSFColor &f) const

int	operator !=(const SoSFColor &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A single-value field containing an SbColor. Values may be set in either RGB (red, green, blue) or HSV (hue, saturation, value) color spaces.

SoSFColors are written to file as an RGB triple of floating point numbers in standard scientific notation, in the range 0.0 to 1.0.

METHODS

void	setValue(const SbVec3f &vec)

void	setValue(float red,
float green,
float blue)

void	setValue(const float rgb[3])

void	setHSVValue(float hue,
float saturation,
float value)

void	setHSVValue(const float hsv[3])

Convenience methods for setting the value.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbColor &	getValue() const

Returns this field's value.

const SbColor &	operator =(const SbColor &newValue)

void	setValue(const SbColor &newValue)

Sets this field to newValue.

int	operator ==(const SoSFColor &f) const

int	operator !=(const SoSFColor &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFColor, SbColor


SoSFEngine

NAME

SoSFEngine - field containing a pointer to an engine

INHERITS FROM

SoField > SoSField > SoSFEngine

SYNOPSIS

#include <Inventor/fields/SoSFEngine.h>

Methods from class SoSFEngine:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SoEngine *	getValue() const

SoEngine *	operator =(SoEngine * newValue)

void	setValue(SoEngine * newValue)

int	operator ==(const SoSFEngine &f) const

int	operator !=(const SoSFEngine &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This field maintains a pointer to an SoEngine instance, correctly maintaining its reference count.

SoSFEngines are written to file as the engine they are pointing to. For example:

mySoSFEngineField ElapsedTime

is an SoSFEngine field named 'mySoSFEngineField', pointing to an SoElapsedTime engine. If the engine is used elsewhere, the regular DEF/USE instancing mechanism applies:

anotherSoSFEngineField USE calculator

is an SoSFEngine field that points to a engine named 'calculator' that was DEF'ed earlier in the scene.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SoEngine *	getValue() const

Returns this field's value.

SoEngine *	operator =(SoEngine * newValue)

void	setValue(SoEngine * newValue)

Sets this field to newValue.

int	operator ==(const SoSFEngine &f) const

int	operator !=(const SoSFEngine &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFEngine, SoEngine


SoSFEnum

NAME

SoSFEnum - field containing an enumerated value

INHERITS FROM

SoField > SoSField > SoSFEnum

SYNOPSIS

Methods from class SoSFEnum:

void	setValue(const SbName &name)

static SoType	getClassTypeId()

virtual void	getTypeId() const

int	getValue() const

int	operator =(int newValue)

void	setValue(int newValue)

int	operator ==(const SoSFEnum &f) const

int	operator !=(const SoSFEnum &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A single-value field that contains an enumerated type value, stored as an integer. Nodes that use this field class define mnemonic names for the values. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.

SoSFEnums are written to file as a mnemonic enumerated type name. The name differs among uses of this field in various node or engine classes. See the reference pages for specific nodes or engines for the names (e.g. SoDrawStyle).

METHODS

void	setValue(const SbName &name)

Sets this field to contain the given mnemonic name, passed in as a name or string.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

int	getValue() const

Returns this field's value.

int	operator =(int newValue)

void	setValue(int newValue)

Sets this field to newValue.

int	operator ==(const SoSFEnum &f) const

int	operator !=(const SoSFEnum &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFEnum


SoSFFloat

NAME

SoSFFloat - field containing a floating-point value

INHERITS FROM

SoField > SoSField > SoSFFloat

SYNOPSIS

#include <Inventor/fields/SoSFFloat.h>

Methods from class SoSFFloat:

static SoType	getClassTypeId()

virtual void	getTypeId() const

float	getValue() const

float	operator =(float newValue)

void	setValue(float newValue)

int	operator ==(const SoSFFloat &f) const

int	operator !=(const SoSFFloat &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field that contains one single-precision floating point number.

SoSFFloats are written to file in standard scientific notation.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

float	getValue() const

Returns this field's value.

float	operator =(float newValue)

void	setValue(float newValue)

Sets this field to newValue.

int	operator ==(const SoSFFloat &f) const

int	operator !=(const SoSFFloat &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFFloat


SoSFImage

NAME

SoSFImage - field containing a 2D image

INHERITS FROM

SoField > SoSField > SoSFImage

SYNOPSIS

#include <Inventor/fields/SoSFImage.h>

Methods from class SoSFImage:

const unsigned char *	getValue(SbVec2s &size,
int &nc) const

void	setValue(const SbVec2s &size,
int nc,
const unsigned char *bytes)

unsigned char *	startEditing(SbVec2s &size,
int &nc)

void	finishEditing()

Methods from class SoSField:

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a two-dimensional image. Images can be grayscale (intensity), grayscale with transparency information, RGB, or RGB with transparency. Each component of the image (intensity, red, green, blue or transparency (alpha)) can have an unsigned one-byte value from 0 to 255.

Values are returned as arrays of unsigned chars. The image is stored in this array starting at the bottom left corner of the image with the intensity or red component of that pixel, followed by either the alpha, the green and blue, or the green, blue and alpha components (depending on the number of components in the image). The next value is the first component of the next pixel to the right.

SoSFImages are written to file as three integers representing the width, height and number of components in the image, followed by width*height hexadecimal values representing the pixels in the image, separated by whitespace. A one-component image will have one-byte hexadecimal values representing the intensity of the image. For example, 0xFF is full intensity, 0x00 is no intensity. A two-component image puts the intensity in the first (high) byte and the transparency in the second (low) byte. Pixels in a three-component image have the red component in the first (high) byte, followed by the green and blue components (so 0xFF0000 is red). Four-component images put the transparency byte after red/green/blue (so 0x0000FF80 is semi-transparent blue). Note: each pixel is actually read as a single unsigned number, so a 3-component pixel with value "0x0000FF" can also be written as "0xFF" or "255" (decimal).

For example,

1 2 1 0xFF 0x00

is a 1 pixel wide by 2 pixel high grayscale image, with the bottom pixel white and the top pixel black. And:

2 4 3 0xFF0000 0xFF00   0 0   0 0   0xFFFFFF 0xFFFF00

is a 2 pixel wide by 4 pixel high RGB image, with the bottom left pixel red, the bottom right pixel green, the two middle rows of pixels black, the top left pixel white, and the top right pixel yellow.

METHODS

const unsigned char *	getValue(SbVec2s &size,
int &nc) const

Returns the pixels in the image as an array of unsigned chars. The size and nc arguments are filled in with the dimensions of the image and the number of components in the image; the number of bytes in the array returned will be size[0]*size[1]*nc.

void	setValue(const SbVec2s &size,
int nc,
const unsigned char *bytes)

Sets the value of this field to be an image of the given size, with the given number of components, and with the given pixel values. size[0]*size[1]*nc bytes from the given array will be copied into internal storage maintained by the SoSFImage field.

unsigned char *	startEditing(SbVec2s &size,
int &nc)

void	finishEditing()

These methods can be used to efficiently edit the values in an image field. startEditing() returns the size of the image in the size and nc arguments; writing past the end of the array returned is a good way to cause hard-to-find core dumps.

SEE ALSO

SoField, SoSField


SoSFImage3

NAME

SoSFImage3 - field containing a 3D image

INHERITS FROM

SoField > SoSField > SoSFImage3

SYNOPSIS

#include <Inventor/fields/SoSFImage3.h>

enum CopyPolicy	{
COPY,
Open Inventor will make a copy of the data (default)
NO_COPY,
Passed buffer used, user will delete
NO_COPY_AND_DELETE,
Passed buffer used, SoSFImage3 will delete.
Use this if memory is allocated with "new".
NO_COPY_AND_FREE
Passed buffer used, SoSFImage3 will free.
Use this if memory is allocated with "malloc".
}

Methods from class SoSFImage3:

const unsigned char *	getValue(SbVec3s &size,
int &nc) const

void	setValue(const SbVec3s &size,
int nc,
const unsigned char *bytes
CopyPolicy copy=COPY)

void	setSubValue(const SbVec3s &subSize,
const SbVec3s &offset,
unsigned char *bytes,
CopyPolicy copy=COPY)

void	setSubValues(const SbVec3s *subSizes,
const SbVec3s *offsets,
int num,
unsigned char **bytes,
CopyPolicy copy=COPY)

int	operator ==(const SoSFImage3 &f) const

int	operator !=(const SoSFImage3 &f) const

unsigned char *	startEditing(SbVec3s &size,
int &nc)

void	finishEditing()

Methods from class SoSField:

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a three-dimensional image. A three-dimensional image can be thought of as a sequence of two-dimensional image "slices."

Images can be grayscale (intensity), grayscale with transparency information, RGB, or RGB with transparency. Each component of the image (intensity, red, green, blue or transparency (alpha)) can have an unsigned one-byte value from 0 to 255.

Values are returned as arrays of unsigned chars. The image is stored in this array starting at the bottom left front corner of the image with the intensity or red component of that pixel, followed by either the alpha, the green and blue, or the green, blue and alpha components (depending on the number of components in the image). The next value is the first component of the next pixel to the right.

SoSFImages are written to file as four integers representing the width, height, depth and number of components in the image, followed by width*height*depth hexadecimal values representing the pixels in the image, separated by whitespace. A one-component image will have one-byte hexadecimal values representing the intensity of the image. For example, 0xFF is full intensity, 0x00 is no intensity. A two-component image puts the intensity in the first (high) byte and the transparency in the second (low) byte. Pixels in a three-component image have the red component in the first (high) byte, followed by the green and blue components (so 0xFF0000 is red). Four-component images put the transparency byte after red/green/blue (so 0x0000FF80 is semi-transparent blue). Note: each pixel is actually read as a single unsigned number, so a 3-component pixel with value "0x0000FF" can also be written as "0xFF" or "255" (decimal).

For example,

1 2 3 1   0xFF 0x00   0x00 0xFF   0xFF 0x00

is a 1 pixel wide by 2 pixel high by 3 pixel deep grayscale image, with the bottom pixel white and the top pixel black in the first (front-most) slice. In the second slice the bottom pixel is black and the top pixel is white. And:

2 4 3 3 0xFF0000 0xFF00   0 0   0 0   0xFFFFFF 0xFFFF00 ...

is a 2 pixel wide by 4 pixel high by 3 pixel deep RGB image, with the bottom left pixel red, the bottom right pixel green, the two middle rows of pixels black, the top left pixel white, and the top right pixel yellow in the first slice. Subsequent slices are not shown.

METHODS

const unsigned char *	getValue(SbVec3s &size,
int &nc) const

Returns the pixels in the image as an array of unsigned chars. The size and nc arguments are filled in with the dimensions of the image and the number of components in the image; the number of bytes in the array returned will be size[0]*size[1]*size[2]*nc.

void	setValue(const SbVec3s &size,
int nc,
const unsigned char *bytes
CopyPolicy copy=COPY)

Sets the value of this field to be an image of the given size, with the given number of components, and with the given pixel values. size[0]*size[1]*size[2]*nc bytes from the given array will be copied into internal storage maintained by the SoSFImage3 field.

At times, SoSFImage3 may need to manipulate large amounts of memory. Therefore, it is useful to be able to specify the memory usage policy dynamically. By default, the memory policy is COPY, which is consistent with other Open Inventor fields. The most likely to be efficient is NO_COPY. See also setNeverWrite.

void	setSubValue(const SbVec3s &subSize,
const SbVec3s &offset,
unsigned char *bytes,
CopyPolicy copy=COPY)

void	setSubValues(const SbVec3s *subSizes,
const SbVec3s *offsets,
int num,
unsigned char **bytes,
CopyPolicy copy=COPY)

These methods may be used for subtexturing: instead of replacing the texture in texture memory, only parts of it are replaced. This is much faster and uses less memory. In any case these methods affect the texture in processor memory. Note that the sub-images must have the same number of components as the one contained in this object. The texture in texture memory will not actually be modified until the next render traversal.

int	operator ==(const SoSFImage3 &f) const

int	operator !=(const SoSFImage3 &f) const

Equality/inequality tests

unsigned char *	startEditing(SbVec3s &size,
int &nc)

void	finishEditing()

unsigned char *	getSubTexture(int index, SbVec3s &size, SbVec3s &offset)

SbBool	hasSubTextures(int &numSubTextures)

These methods can be used to efficiently edit the values in an image field. startEditing() returns the size of the image in the size and nc arguments; writing past the end of the array returned is a good way to cause hard-to-find core dumps.

Avoid copying the values in/out, if you are just changing the bytes and not changing the dimensions of the image. This is equivalent to getValue, but returns a pointer you can change. Using startEditing allows subtexturing, which is a more efficient way of doing texture modification.

void	setNeverWrite(SbBool neverWrite)

SbBool	isNeverWrite()

As this field may have to handle large amounts of data and its representation in an .iv file is not very efficient, it is often a good idea not to allow that data to be written out when required by a write action. By default, the "neverWrite" condition is TRUE.

SEE ALSO

SoField, SoSField


SoSFInt32

NAME

SoSFInt32 - field containing a int32_t integer

INHERITS FROM

SoField > SoSField > SoSFInt32

SYNOPSIS

#include <Inventor/fields/SoSFInt32.h>

Methods from class SoSFInt32:

static SoType	getClassTypeId()

virtual void	getTypeId() const

int32_t	getValue() const

int32_t	operator =(int32_t newValue)

void	setValue(int32_t newValue)

int	operator ==(const SoSFInt32 &f) const

int	operator !=(const SoSFInt32 &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a single long (32-bit) integer.

SoSFInt32s are written to file as an integer in decimal, hexadecimal (beginning with '0x') or octal (beginning with '0') format.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

int32_t	getValue() const

Returns this field's value.

int32_t	operator =(int32_t newValue)

void	setValue(int32_t newValue)

Sets this field to newValue.

int	operator ==(const SoSFInt32 &f) const

int	operator !=(const SoSFInt32 &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFInt32, SoSFUInt32


SoSFLong

NAME

SoSFLong - synonym for SoSFInt32

INHERITS FROM

SoField > SoSField > SoSFLong

SYNOPSIS

#include <Inventor/fields/SoSFInt32.h>

Methods from class SoSField:

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This class is obsolete, and is provided for backwards compatibility only. You should use the new SoSFInt32 class instead. If you compile your code -DIV_STRICT, #including the SoSFLong.h header file will cause a compile-time error.


SoSFMatrix

NAME

SoSFMatrix - field containing a 4x4 matrix

INHERITS FROM

SoField > SoSField > SoSFMatrix

SYNOPSIS

#include <Inventor/fields/SoSFMatrix.h>

Methods from class SoSFMatrix:

void	setValue(float a11,
float a12,
float a13,
float a14,
float a21,
float a22,
float a23,
float a24,
float a31,
float a32,
float a33,
float a34,
float a41,
float a42,
float a43,
float a44)

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbMatrix &	getValue() const

const SbMatrix &	operator =(const SbMatrix &newValue)

void	setValue(const SbMatrix &newValue)

void	setValue(const SbMatrixd &newValue)

int	operator ==(const SoSFMatrix &f) const

int	operator !=(const SoSFMatrix &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a transformation matrix (an SbMatrix).

SoSFMatrices are written to file as 16 floating point numbers separated by whitespace. For example, an identity matrix is written as:

1 0 0 0  0 1 0 0  0 0 1 0  0 0 0 1

METHODS

void	setValue(float a11,
float a12,
float a13,
float a14,
float a21,
float a22,
float a23,
float a24,
float a31,
float a32,
float a33,
float a34,
float a41,
float a42,
float a43,
float a44)

Sets this field to contain the matrix given by the 16 values. For a translation matrix, the x, y and z translations should be in the a41, a42, and a43 arguments.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbMatrix &	getValue() const

Returns this field's value.

const SbMatrix &	operator =(const SbMatrix &newValue)

void	setValue(const SbMatrix &newValue)

Sets this field to newValue.

void	setValue(const SbMatrixd &newValue)

Convenience method that allows you to specify a field value using a double precision variable. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoSFMatrix &f) const

int	operator !=(const SoSFMatrix &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFMatrix, SbMatrix


SoSFName

NAME

SoSFName - field containing a name

INHERITS FROM

SoField > SoSField > SoSFName

SYNOPSIS

#include <Inventor/fields/SoSFName.h>

Methods from class SoSFName:

void	setValue(const char *string)

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbName &	getValue() const

const SbName &	operator =(const SbName &newValue)

void	setValue(const SbName &newValue)

int	operator ==(const SoSFName &f) const

int	operator !=(const SoSFName &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a name. Names are short series of characters generally used for labels or names, and are stored in a special table designed to allow fast lookup and comparison. For most purposes, an SoSFString field is probably more appropriate.

SoSFNames are written to file as a string of characters. Names must begin with an underscore or alphabetic character, and must consist entirely of underscores, alphabetic characters, or numbers.

METHODS

void	setValue(const char *string)

Set this field to the name equivalent to the given string.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbName &	getValue() const

Returns this field's value.

const SbName &	operator =(const SbName &newValue)

void	setValue(const SbName &newValue)

Sets this field to newValue.

int	operator ==(const SoSFName &f) const

int	operator !=(const SoSFName &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFName


SoSFNode

NAME

SoSFNode - field containing a pointer to a node

INHERITS FROM

SoField > SoSField > SoSFNode

SYNOPSIS

#include <Inventor/fields/SoSFNode.h>

Methods from class SoSFNode:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SoNode *	getValue() const

SoNode *	operator =(SoNode * newValue)

void	setValue(SoNode * newValue)

int	operator ==(const SoSFNode &f) const

int	operator !=(const SoSFNode &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This field maintains a pointer to an SoNode instance, correctly maintaining its reference count.

SoSFNodes are written to file as the node they are pointing to. For example:

mySoSFNodeField Cube {}

is an SoSFNode field named 'mySoSFNodeField', pointing to an SoCube node. If the node is used elsewhere, the regular DEF/USE instancing mechanism applies:

anotherSoSFNodeField USE topSeparator

is an SoSFNode field that points to a node named 'topSeparator' that was DEF'ed earlier in the scene.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SoNode *	getValue() const

Returns this field's value.

SoNode *	operator =(SoNode * newValue)

void	setValue(SoNode * newValue)

Sets this field to newValue.

int	operator ==(const SoSFNode &f) const

int	operator !=(const SoSFNode &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFNode, SoNode


SoSFPath

NAME

SoSFPath - field containing a pointer to an SoPath

INHERITS FROM

SoField > SoSField > SoSFPath

SYNOPSIS

#include <Inventor/fields/SoSFPath.h>

Methods from class SoSFPath:

static SoType	getClassTypeId()

virtual void	getTypeId() const

SoPath *	getValue() const

SoPath *	operator =(SoPath * newValue)

void	setValue(SoPath * newValue)

int	operator ==(const SoSFPath &f) const

int	operator !=(const SoSFPath &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This field maintains a pointer to an SoPath instance, correctly maintaining its reference count.

SoSFPaths are written to file as the path they point to. See the SoPath reference page for a description of the file format for a path.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

SoPath *	getValue() const

Returns this field's value.

SoPath *	operator =(SoPath * newValue)

void	setValue(SoPath * newValue)

Sets this field to newValue.

int	operator ==(const SoSFPath &f) const

int	operator !=(const SoSFPath &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFPath, SoPath


SoSFPlane

NAME

SoSFPlane - field containing a plane equation

INHERITS FROM

SoField > SoSField > SoSFPlane

SYNOPSIS

#include <Inventor/fields/SoSFPlane.h>

Methods from class SoSFPlane:

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbPlane &	getValue() const

const SbPlane &	operator =(const SbPlane &newValue)

void	setValue(const SbPlane &newValue)

int	operator ==(const SoSFPlane &f) const

int	operator !=(const SoSFPlane &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a plane equation (an SbPlane).

SoSFPlanes are written to file as four floating point values separated by whitespace. The first three are the normal direction of the plane, the fourth is the distance of the plane from the origin (in the direction of the normal).

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbPlane &	getValue() const

Returns this field's value.

const SbPlane &	operator =(const SbPlane &newValue)

void	setValue(const SbPlane &newValue)

Sets this field to newValue.

int	operator ==(const SoSFPlane &f) const

int	operator !=(const SoSFPlane &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SbPlane, SoField, SoSField, SoMFPlane


SoSFRotation

NAME

SoSFRotation - field containing a rotation

INHERITS FROM

SoField > SoSField > SoSFRotation

SYNOPSIS

#include <Inventor/fields/SoSFRotation.h>

Methods from class SoSFRotation:

void	getValue(SbVec3f &axis,
float &angle) const

void	setValue(float q0,
float q1,
float q2,
float q3)

setValue(float q[4])

void	setValue(const SbVec3f &axis,
float angle)

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbRotation &	getValue() const

const SbRotation &	operator =(const SbRotation &newValue)

void	setValue(const SbRotation &newValue)

void	setValue(const SbRotationd &newValue)

int	operator ==(const SoSFRotation &f) const

int	operator !=(const SoSFRotation &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a single SbRotation (an arbitrary rotation).

SoSFRotations are written to file as four floating point values separated by whitespace. The 4 values represent an axis of rotation followed by the amount of right-handed rotation about that axis, in radians. For example, a 180 degree rotation about the Y axis is:

0 1 0  3.14159265

METHODS

void	getValue(SbVec3f &axis,
float &angle) const

Gets the value of the field as an axis/angle.

void	setValue(float q0,
float q1,
float q2,
float q3)

setValue(float q[4])

Set the field to the given quaternion (x, y, z, w).

void	setValue(const SbVec3f &axis,
float angle)

Set the field to the rotation given by axis/angle.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbRotation &	getValue() const

Returns this field's value.

const SbRotation &	operator =(const SbRotation &newValue)

void	setValue(const SbRotation &newValue)

Sets this field to newValue.

void	setValue(const SbRotationd &newValue)

Convenience method that allows you to specify a field value using a double precision variable. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoSFRotation &f) const

int	operator !=(const SoSFRotation &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SbRotation, SoField, SoSField, SoMFRotation


SoSFShort

NAME

SoSFShort - field containing a short integer

INHERITS FROM

SoField > SoSField > SoSFShort

SYNOPSIS

#include <Inventor/fields/SoSFShort.h>

Methods from class SoSFShort:

static SoType	getClassTypeId()

virtual void	getTypeId() const

short	getValue() const

short	operator =(short newValue)

void	setValue(short newValue)

int	operator ==(const SoSFShort &f) const

int	operator !=(const SoSFShort &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing a short (16-bit) integer.

SoSFShorts are written to file as a single short integer value, represented as decimal, hexadecimal (beginning with '0x') or octal (beginning with '0') value.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

short	getValue() const

Returns this field's value.

short	operator =(short newValue)

void	setValue(short newValue)

Sets this field to newValue.

int	operator ==(const SoSFShort &f) const

int	operator !=(const SoSFShort &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFShort, SoSFUShort, SoSFInt32


SoSFString

NAME

SoSFString - field containing a string

INHERITS FROM

SoField > SoSField > SoSFString

SYNOPSIS

#include <Inventor/fields/SoSFString.h>

Methods from class SoSFString:

setValue(const char *string)

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbString &	getValue() const

const SbString &	operator =(const SbString &newValue)

void	setValue(const SbString &newValue)

int	operator ==(const SoSFString &f) const

int	operator !=(const SoSFString &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A field containing an ASCII string (sequence of characters). Open Inventor does not support non-ASCII strings.

SoSFStrings are written to file as a sequence of ASCII characters in double quotes (optional if the string doesn't contain any whitespace). Any characters (including newlines) may appear within the quotes. To include a double quote character within the string, precede it with a backslash. For example:

Testing

"One, Two, Three"

"He said, \"Immel did it!\""

are all valid strings.

METHODS

setValue(const char *string)

Convenience method to set the field's value given a character array.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbString &	getValue() const

Returns this field's value.

const SbString &	operator =(const SbString &newValue)

void	setValue(const SbString &newValue)

Sets this field to newValue.

int	operator ==(const SoSFString &f) const

int	operator !=(const SoSFString &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SbString, SoField, SoSField, SoMFString


SoSFTime

NAME

SoSFTime - field containing an SbTime

INHERITS FROM

SoField > SoSField > SoSFTime

SYNOPSIS

#include <Inventor/fields/SoSFTime.h>

Methods from class SoSFTime:

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbTime &	getValue() const

const SbTime &	operator =(const SbTime &newValue)

void	setValue(const SbTime &newValue)

int	operator ==(const SoSFTime &f) const

int	operator !=(const SoSFTime &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A single-valued field that contains a time value.

SoSFTimes are written to file as a double-precision floating point value representing the length of time in seconds. Absolute times are measured relative to 00:00:00 GMT, January 1, 1970.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbTime &	getValue() const

Returns this field's value.

const SbTime &	operator =(const SbTime &newValue)

void	setValue(const SbTime &newValue)

Sets this field to newValue.

int	operator ==(const SoSFTime &f) const

int	operator !=(const SoSFTime &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SbTime, SoField, SoSField, SoMFTime


SoSFTrigger

NAME

SoSFTrigger - field used to trigger engines or connection networks

INHERITS FROM

SoField > SoSField > SoSFTrigger

SYNOPSIS

#include <Inventor/fields/SoSFTrigger.h>

Methods from class SoSFTrigger:

void	setValue()

void	getValue()

int	operator ==(const SoSFTrigger &t) const

int	operator !=(const SoSFTrigger &t) const

Methods from class SoSField:

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This class can be used to start or to synchronize a network of field connections. It is the "null" field - a field with no values. It is typically used as the "start button" for engines that change over time.

Triggers can be connected from any other type of field, and will notify any engines or nodes they are part of (or any other triggers they are connected to) whenever the value of the field is set (even if it is set to its current value) or the field is touch()'ed.

Since they have no value, SoSFTriggers are not written to file. A node or engine containing an SoSFTrigger field will write only the field's name.

METHODS

void	setValue()

Starts the notification process; this is equivalent to calling touch().

void	getValue()

Forces any connected engines or fields to evaluate themselves.

int	operator ==(const SoSFTrigger &t) const

int	operator !=(const SoSFTrigger &t) const

All trigger fields are equal; these methods always return TRUE and FALSE, respectively.

SEE ALSO

SoSFBool, SoMFBool


SoSFUInt32

NAME

SoSFUInt32 - field containing an unsigned int32_t integer

INHERITS FROM

SoField > SoSField > SoSFUInt32

SYNOPSIS

#include <Inventor/fields/SoSFUInt32.h>

Methods from class SoSFUInt32:

static SoType	getClassTypeId()

virtual void	getTypeId() const

int32_t uint32_t	getValue() const

int32_t uint32_t	operator =(int32_t uint32_t newValue)

void	setValue(int32_t uint32_t newValue)

int	operator ==(const SoSFUInt32 &f) const

int	operator !=(const SoSFUInt32 &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A single-value field containing an unsigned 32-bit integer, representing a number from 0 to 4,294,967,295.

SoSFUInt32s are written to file as a single uint32_t (32-bit) integer in decimal, hexadecimal or octal format.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

int32_t uint32_t	getValue() const

Returns this field's value.

int32_t uint32_t	operator =(int32_t uint32_t newValue)

void	setValue(int32_t uint32_t newValue)

Sets this field to newValue.

int	operator ==(const SoSFUInt32 &f) const

int	operator !=(const SoSFUInt32 &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFUInt32


SoSFULong

NAME

SoSFULong - synonym for SoSFUInt32

INHERITS FROM

SoField > SoSField > SoSFULong

SYNOPSIS

#include <Inventor/fields/SoSFUInt32.h>

Methods from class SoSField:

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This class is obsolete, and is provided for backwards compatibility only. You should use the new SoSFUInt32 class instead. If you compile your code -DIV_STRICT, #including the SoSFULong.h header file will cause a compile-time error.


SoSFUShort

NAME

SoSFUShort - field containing an unsigned short integer

INHERITS FROM

SoField > SoSField > SoSFUShort

SYNOPSIS

#include <Inventor/fields/SoSFUShort.h>

Methods from class SoSFUShort:

static SoType	getClassTypeId()

virtual void	getTypeId() const

short unsigned short	getValue() const

short unsigned short	operator =(short unsigned short newValue)

void	setValue(short unsigned short newValue)

int	operator ==(const SoSFUShort &f) const

int	operator !=(const SoSFUShort &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

A single-value field containing a short (16-bit) integer.

SoSFUShorts are written to file in decimal, hexadecimal (beginning with '0x') or octal (beginning with '0') values.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

short unsigned short	getValue() const

Returns this field's value.

short unsigned short	operator =(short unsigned short newValue)

void	setValue(short unsigned short newValue)

Sets this field to newValue.

int	operator ==(const SoSFUShort &f) const

int	operator !=(const SoSFUShort &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFUShort


SoSFVec2f

NAME

SoSFVec2f - field containing a two-dimensional vector

INHERITS FROM

SoField > SoSField > SoSFVec2f

SYNOPSIS

#include <Inventor/fields/SoSFVec2f.h>

Methods from class SoSFVec2f:

void	setValue(float x,
float y)

void	setValue(const float xy[2])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbVec2f &	getValue() const

const SbVec2f &	operator =(const SbVec2f &newValue)

void	setValue(const SbVec2f &newValue)

void	setValue(const SbVec2d &newValue)

int	operator ==(const SoSFVec2f &f) const

int	operator !=(const SoSFVec2f &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

Field containing a two-dimensional vector.

SoSFVec2fs are written to file as a pair of floating point values separated by whitespace.

METHODS

void	setValue(float x,
float y)

void	setValue(const float xy[2])

Sets the field to the given value.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbVec2f &	getValue() const

Returns this field's value.

const SbVec2f &	operator =(const SbVec2f &newValue)

void	setValue(const SbVec2f &newValue)

Sets this field to newValue.

void	setValue(const SbVec2d &vec2d)

Convenience method that allows you to specify a field value using a double precision variable. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoSFVec2f &f) const

int	operator !=(const SoSFVec2f &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFVec2f


SoSFVec3f

NAME

SoSFVec3f - field containing a three-dimensional vector

INHERITS FROM

SoField > SoSField > SoSFVec3f

SYNOPSIS

#include <Inventor/fields/SoSFVec3f.h>

Methods from class SoSFVec3f:

void	setValue(float x,
float y,
float z)

void	setValue(const float xyz[3])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbVec3f &	getValue() const

const SbVec3f &	operator =(const SbVec3f &newValue)

void	setValue(const SbVec3f &newValue)

void	setValue(const SbVec3d &newValue)

int	operator ==(const SoSFVec3f &f) const

int	operator !=(const SoSFVec3f &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

Field containing a three-dimensional vector.

SoSFVec3fs are written to file as three floating point values separated by whitespace.

METHODS

void	setValue(float x,
float y,
float z)

void	setValue(const float xyz[3])

Sets the field to the given value.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbVec3f &	getValue() const

Returns this field's value.

const SbVec3f &	operator =(const SbVec3f &newValue)

void	setValue(const SbVec3f &newValue)

Sets this field to newValue.

void	setValue(const SbVec3d &vec3d)

Convenience method that allows you to specify a field value using a double precision variable. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoSFVec3f &f) const

int	operator !=(const SoSFVec3f &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFVec3f


SoSFVec4f

NAME

SoSFVec4f - field containing a homogeneous three-dimensional vector

INHERITS FROM

SoField > SoSField > SoSFVec4f

SYNOPSIS

#include <Inventor/fields/SoSFVec4f.h>

Methods from class SoSFVec4f:

void	setValue(float x,
float y,
float z,
float w)

void	setValue(const float xyzw[4])

static SoType	getClassTypeId()

virtual void	getTypeId() const

const SbVec4f &	getValue() const

const SbVec4f &	operator =(const SbVec4f &newValue)

void	setValue(const SbVec4f &newValue)

void	setValue(const SbVec4d &newValue)

int	operator ==(const SoSFVec4f &f) const

int	operator !=(const SoSFVec4f &f) const

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

Field containing a homogeneous three-dimensional vector.

SoSFVec4fs are written to file as four floating point values separated by whitespace.

METHODS

void	setValue(float x,
float y,
float z,
float w)

void	setValue(const float xyzw[4])

Sets the field to the given value.

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

const SbVec4f &	getValue() const

Returns this field's value.

const SbVec4f &	operator =(const SbVec4f &newValue)

void	setValue(const SbVec4f &newValue)

Sets this field to newValue.

void	setValue(const SbVec4d &vec4d)

Convenience method that allows you to specify a field value using a double precision variable. Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

int	operator ==(const SoSFVec4f &f) const

int	operator !=(const SoSFVec4f &f) const

Returns TRUE if f is of the same type and has the same value as this field.

SEE ALSO

SoField, SoSField, SoMFVec4f


SoSField

NAME

SoSField - abstract base class for all single-value fields

INHERITS FROM

SoField > SoSField

SYNOPSIS

#include <Inventor/fields/SoField.h>

Methods from class SoSField:

static SoType	getClassTypeId()

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SoType	getTypeId() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

int	operator ==(const SoField &f) const

int	operator !=(const SoField &f) const

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

Each class derived from SoSField begins with an SoSF prefix and contains one value of a particular type. Each has setValue() and getValue() methods that are used to change or access this value. In addition, some field classes have extra convenience routines that allow values to be set or retrieved in other related formats (see below).

In addition to setValue(), all single-value fields overload the "=" assignment operator to set the field value from the correct datatype or from another field instance of the same type.

The value of a single-value field is written to file in a format dependent on the field type; see the subclass reference pages for details.

A field that is ignored has a tilde (~) either in place of the value (if the actual value is the default) or after it (otherwise).

METHODS

static SoType	getClassTypeId()

Return the type identifier for this field class.

SEE ALSO

SoField, SoMField


SoScale

NAME

SoScale - node representing a 3D geometric scaling

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoScale

SYNOPSIS

#include <Inventor/nodes/SoScale.h>

Fields from class SoScale:

SoSFVec3f	scaleFactor

Methods from class SoScale:

SoScale()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a 3D scaling about the origin. If the components of the scaling vector are not all the same, this produces a non-uniform scale.

FIELDS

SoSFVec3f	scaleFactor

The scaling factors in the x, y, and z dimensions. Non-positive values may cause undesirable results.

METHODS

SoScale()

Creates a scale node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates scaling transformation into the current transformation.

SoGetMatrixAction

Returns the matrix corresponding to the scaling.

FILE FORMAT/DEFAULT

Scale {

scaleFactor	1 1 1

}

SEE ALSO

SoTransform, SoUnits


SoScale1Dragger

NAME

SoScale1Dragger - object you can scale in one dimension by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoScale1Dragger

SYNOPSIS

#include <Inventor/draggers/SoScale1Dragger.h>

Fields from class SoScale1Dragger:

SoSFVec3f	scaleFactor

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoScale1Dragger:

SoScale1Dragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoScale1Dragger is a simple dragger that scales in one dimension when dragged with the mouse. It moves along the x axis of its local space, as determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.

This node has a scaleFactor field which always reflects its size in local space. If you set the field, the dragger will change accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.

This dragger contains four parts, scaler, scalerActive, feedback, and feedbackActive.

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/scale1Dragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	scaleFactor

Scale factor affecting the dragger.

METHODS

SoScale1Dragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
scaler	Separator	--	yes
scalerActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	scale1Scaler

Part:	scaler

Appearance:	white line, small cubes ends

Description:	picking this initiates scaling

Resource:	scale1ScalerActive

Part:	scalerActive

Appearance:	yellow version of scaler, adds wireframe yellow cube

Description:	displayed during scaling instead of the scaler

Resource:	scale1Feedback

Part:	feedback

Appearance:	thin purple 3-D crosshair

Description:	shows center of scale when still

Resource:	scale1FeedbackActive

Part:	feedbackActive

Appearance:	thin, slightly brighter purple 3-D crosshair

Description:	shows center of scale while in motion

FILE FORMAT/DEFAULT

Scale1Dragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

scaleFactor	1 1 1

callbackList	NULL

scaler	<scale1Scaler resource>

scalerActive	<scale1ScalerActive resource>

feedback	<scale1Feedback resource>

feedbackActive	<scale1FeedbackActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoScale2Dragger

NAME

SoScale2Dragger - object you can scale in two dimensions by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoScale2Dragger

SYNOPSIS

#include <Inventor/draggers/SoScale2Dragger.h>

Fields from class SoScale2Dragger:

SoSFVec3f	scaleFactor

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoScale2Dragger:

SoScale2Dragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoScale2Dragger is a simple dragger that scales freely and independently in two dimensions when dragged with the mouse. It moves within the x-y plane of its local space, as determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the plane of motion.

This node has a scaleFactor field which always reflects its size in local space. If you set the field, the dragger will change accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.

This dragger contains four parts, scaler, scalerActive, feedback, and feedbackActive.

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/scale2Dragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	scaleFactor

Scale factor affecting the dragger.

METHODS

SoScale2Dragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
scaler	Separator	--	yes
scalerActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	scale2Scaler

Part:	scaler

Appearance:	white photo-corners at corners of 2-by-2 square in plane of motion

Description:	picking this initiates the scaling

Resource:	scale2ScalerActive

Part:	scalerActive

Appearance:	yellow version of scaler, but with an extra yellow box

Description:	displayed instead of scaler while in motion

Resource:	scale2Feedback

Part:	feedback

Appearance:	thin purple 3-D crosshair

Description:	shows center of scale when still

Resource:	scale2FeedbackActive

Part:	feedbackActive

Appearance:	thin, slightly brighter purple 3-D crosshair

Description:	shows center of scale while in motion

FILE FORMAT/DEFAULT

Scale2Dragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

scaleFactor	1 1 1

callbackList	NULL

scaler	<scale2Scaler resource>

scalerActive	<scale2ScalerActive resource>

feedback	<scale2Feedback resource>

feedbackActive	<scale2FeedbackActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoScale2UniformDragger

NAME

SoScale2UniformDragger - object you can scale uniformly in two dimensions by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoScale2UniformDragger

SYNOPSIS

#include <Inventor/draggers/SoScale2UniformDragger.h>

Fields from class SoScale2UniformDragger:

SoSFVec3f	scaleFactor

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoScale2UniformDragger:

SoScale2UniformDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoScale2UniformDragger is a simple dragger that scales uniformly in the x and y dimensions when dragged within the x-y plane with the mouse. The local space is determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the plane of motion.

This node has a scaleFactor field which always reflects its size in local space. If you set the field, the dragger will change accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.

This dragger contains four parts, scaler, scalerActive, feedback, and feedbackActive.

Each of these is set by default from a resource described in the Dragger Resource section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/scale2UniformDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	scaleFactor

Scale factor affecting the dragger.

METHODS

SoScale2UniformDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
scaler	Separator	--	yes
scalerActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	scale2UniformScaler

Part:	scaler

Appearance:	white outline of square with photo-corner shapes at vertices. Lies within plane of motion

Description:	picking this initiates the scaling

Resource:	scale2UniformScalerActive

Part:	scalerActive

Appearance:	yellow version of scaler, but with an extra yellow surrounding box

Description:	displayed instead of scaler while in motion

Resource:	scale2UniformFeedback

Part:	feedback

Appearance:	thin purple 3-D crosshair

Description:	shows center of scale when still

Resource:	scale2UniformFeedbackActive

Part:	feedbackActive

Appearance:	thin, slightly brighter purple 3-D crosshair

Description:	shows center of scale while in motion

FILE FORMAT/DEFAULT

Scale2UniformDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

scaleFactor	1 1 1

callbackList	NULL

scaler	<scale2UniformScaler resource>

scalerActive	<scale2UniformScalerActive resource>

feedback	<scale2UniformFeedback resource>

feedbackActive	<scale2UniformFeedbackActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoScaleUniformDragger

NAME

SoScaleUniformDragger - object you can scale uniformly in 3D by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoScaleUniformDragger

SYNOPSIS

#include <Inventor/draggers/SoScaleUniformDragger.h>

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,SoNode *newPart)

SbBool	set(char *partName,char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART	(kit, partName, partClass)

SO_CHECK_PART	(kit, partName, partClass)

DESCRIPTION

SoScaleUniformDragger is a simple dragger that scales uniformly in all 3 dimensions when dragged with the mouse. The local space is determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the plane of motion.This node has a scaleFactor field which always reflects its size in local space. If you set the field, the dragger will change accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.This dragger contains four parts, scaler, scalerActive, feedback, and feedbackActive.Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart(). You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/scaleUniformDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

CATALOG

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
scaler	Separator	--	yes
scalerActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	scaleUniformScaler

Part:	scaler

Appearance:	8 small white cubes at the corners of a larger 2x2x2 cube.

Description:	picking this initiates the scaling

Resource:	scaleUniformScalerActive

Part:	scalerActive

Appearance:	yellow version of scaler, but with extra yellow box connecting corners

Description:	displayed instead of scaler while in motion

Resource:	scaleUniformFeedback

Part:	feedback

Appearance:	thin purple 3-D crosshair

Description:	shows center of scale when still

Resource:	scaleUniformFeedbackActive

Part:	feedbackActive

Appearance:	thin, slightly brighter purple 3-D crosshair

Description:	shows center of scale while in motion

FILE FORMAT/DEFAULT

ScaleUniformDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

scaleFactor	1 1 1

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoSceneKit

NAME

SoSceneKit - scene nodekit class

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoSceneKit

SYNOPSIS

#include <Inventor/nodekits/SoSceneKit.h>

Parts from class SoSceneKit:

(SoNodeKitListPart)	cameraList

(SoNodeKitListPart)	lightList

(SoNodeKitListPart)	childList

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoSceneKit:

SoSceneKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

int	getCameraNumber()

void	setCameraNumber(int camNum)

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

This nodekit is used to organize camera, (SoCameraKit), light, (SoLightKit), and object, (SoShapeKit, SoSeparatorKit, and SoWrapperKit) nodekits into a scene. A scene is composed of a list of cameras, a list of lights, and a list of children. There are three parts created by this nodekit: cameraList, lightList, and childList.

The cameraList part is a list part of SoCameraKit nodes. The list itself is an SoNodeKitListPart, and since only one camera can be active at a time, the container of the list part is an SoSwitch node. Use setCameraNumber(), and the scene kit will set the switch to make that camera active.

The lightList part is a list of SoLightKit nodes. The lightList is used to illuminate the objects contained in the childList part.

The childList part contains a set of SoSeparatorKit nodes. You can add any kind of SoSeparatorKit to this list, including SoShapeKit and SoWrapperKit. Since each SoSeparatorKit in turn contains a childList, this part is used to describe a hierarchical scene. (See the reference page for SoSeparatorKit). All members of childList are lit by the lights in lightList and rendered by the active camera in cameraList.

PARTS

(SoNodeKitListPart)	cameraList

This part is an SoNodeKitListPart It has a container that is an SoSwitch node. The list may contain only SoCameraKit nodekits. The active child of the SoSwitch is the active camera. This part is NULL by default, but is automatically created whenever you add a camera, as with setPart("cameraList[0]", myNewCamera) .

(SoNodeKitListPart)	lightList

This part is an SoNodeKitListPart that uses an defines an SoGroup as its container The list may contain only SoLightKit nodekits. Add SoLightKits to this list and they will light the members of the childList of this SoSceneKit. This part is NULL by default, but is automatically created when you add a light.

(SoNodeKitListPart)	childList

This part is an SoNodeKitListPart that uses an SoGroup for its container. The list may contain only SoSeparatorKit nodekits or nodekits derived from SoSeparatorKit (e.g., SoShapeKit and SoWrapperKit). These children represent the objects in the scene. This part is NULL by default, but is automatically created whenever you add a child to the childList. Also, when asked to build a member of the childList, the scenekit will build an SoShapeKit by default. So if the childList part is NULL, and you call: getPart("childList[0]", TRUE) . the scene kit will create the childList and add an SoShapeKit as the new element in the list.

METHODS

SoSceneKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for the class SoSceneKit.

int	getCameraNumber()

void	setCameraNumber(int camNum)

Gets and sets current camera index. This index refers to which child is active in the cameraList part (SoSwitch node).

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
cameraList	NodeKitListPart	--	yes
lightList	NodeKitListPart	--	yes
childList	NodeKitListPart	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

SceneKit {

callbackList	NULL

cameraList	NodeKitListPart {

containerTypeName "Switch"     childTypeNames "CameraKit"     containerNode     Switch {

whichChild 0 	CameraKit {

camera 	    PerspectiveCamera {

}

}

}

}

lightList	NULL

childList	NULL

}

SEE ALSO

SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSeparatorKit, SoShapeKit, SoWrapperKit


SoSceneManager

NAME

SoSceneManager - manages scene graph rendering and event handling

INHERITS FROM

SoSceneManager

SYNOPSIS

#include <Inventor/SoSceneManager.h>

typedef void	SoSceneManagerRenderCB(void *userData,
SoSceneManager *mgr)

Methods from class SoSceneManager:

SoSceneManager()

virtual	~SoSceneManager()

virtual void	render(SbBool clearWindow = TRUE,
SbBool clearZbuffer = TRUE)

virtual SbBool	processEvent(const SoEvent *event)

void	reinitialize()

void	scheduleRedraw()

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph() const

void	setWindowSize(const SbVec2s &newSize)

const SbVec2s &	getWindowSize() const

void	setSize(const SbVec2s &newSize)

const SbVec2s &	getSize() const

void	setOrigin(const SbVec2s &newOrigin)

const SbVec2s &	getOrigin() const

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setRGBMode(SbBool onOrOff)

SbBool	isRGBMode() const

virtual void	activate()

virtual void	deactivate()

void	setRenderCallback(SoSceneManagerRenderCB *f,
void *userData = NULL)

SbBool	isAutoRedraw() const

void	setRedrawPriority(uint32_t priority)

uint32_t	getRedrawPriority() const

static uint32_t	getDefaultRedrawPriority()

static void	enableRealTimeUpdate(SbBool flag)

static SbBool	isRealTimeUpdateEnabled()

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

DESCRIPTION

SoSceneManager provides Open Inventor rendering and event handling inside a window provided by the caller. The scene manager is able to render in only a portion of a window if desired. The SoWinRenderArea class employs an SoSceneManager, and handles most all the details for setting up a window, converting Windows messages to Open Inventor events, automatically redrawing the scene when necessary, and so on. It is simplest to use a render area when rendering in an entire window. The SoSceneManager class is available for programmers not working with the Inventor Xt Component and Utility Library.

METHODS

SoSceneManager()

virtual	~SoSceneManager()

Constructor and destructor.

virtual void	render(SbBool clearWindow = TRUE,
SbBool clearZbuffer = TRUE)

Apply an SoGLRenderAction to the scene graph managed here. The caller is responsible for setting up a window to render into. If clearWindow is TRUE, this clears the graphics window before rendering. If clearZbuffer is TRUE, the z buffer will be cleared before rendering.

virtual SbBool	processEvent(const SoEvent *event)

Process the passed event by applying an SoHandleEventAction to the scene graph managed here. Returns TRUE if the event was handled by a node.

void	reinitialize()

Reinitialize graphics. This should be called, for instance, when there is a new window.

void	scheduleRedraw()

Schedule a redraw for some time in the near future. If there is no render callback set, or this is not active, no redraw will be scheduled.

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph() const

Set and get the scene graph which is managed here. This is the Open Inventor scene which will be traversed for rendering and event processing.

void	setWindowSize(const SbVec2s &newSize)

const SbVec2s &	getWindowSize() const

Set and get the size of the window in which the scene manager should render. This size must be set before render() and processEvent() are called.

void	setSize(const SbVec2s &newSize)

const SbVec2s &	getSize() const

void	setOrigin(const SbVec2s &newOrigin)

const SbVec2s &	getOrigin() const

Set and get the size and origin of the viewport within the window. Default is to render the entire window region. The origin (0,0) is the lower left corner of the window.

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

Set and get the window background color when in RGB mode. This is the color the scene manager viewport is cleared to when render() is called with clearWindow set to TRUE. Default is black (0,0,0).

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

Set and get the window background color when in color index mode. This is the color the scene manager viewport is cleared to when render() is called with clearWindow set to TRUE. Default is black (index 0).

void	setRGBMode(SbBool onOrOff)

SbBool	isRGBMode() const

Set and get the color mode (TRUE - RGB mode, FALSE - color map mode). Default is RGB mode. Only a subset of Open Inventor nodes will render correctly in color map mode. Basically, when in color index mode, lighting should be turned off (the model field of SoLightModel should be set to BASE_COLOR), and the SoColorIndex node should be used to specify colors.

virtual void	activate()

virtual void	deactivate()

Activate and deactivate the scene manager. The scene manager will only employ sensors for automatic redraw while it is active. Typically, the scene manager should be activated whenever its window is visible on the screen, and deactivated when its window is closed or iconified.

void	setRenderCallback(SoSceneManagerRenderCB *f,
void *userData = NULL)

The render callback provides a mechanism for automatically redrawing the scene in response to changes in the scene graph. The scene manager employs a sensor to monitor scene graph changes. When the sensor is triggered, the render callback registered here is invoked. The callback should set up its graphics window, then call the scene manager render() method. If the callback is set to NULL (the default), auto-redraw is turned off.

SbBool	isAutoRedraw() const

Returns TRUE if there is currently a render callback registered.

void	setRedrawPriority(uint32_t priority)

uint32_t	getRedrawPriority() const

static uint32_t	getDefaultRedrawPriority()

Set and get the priority of the redraw sensor. Sensors are processed based on priority, with priority values of 0 processed immediately. The default priority for the scene manager redraw sensor is 10000.

static void	enableRealTimeUpdate(SbBool flag)

static SbBool	isRealTimeUpdateEnabled()

Enable/Disable the realTime global field update which normally happen right after a redraw.

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

Set/get the antialiasing for rendering. There are two kinds of antialiasing available: smoothing and multipass antialiasing. If smoothing is set to TRUE, smoothing is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. The value of numPasses controls multipass antialiasing. Each time a render action is applied, Open Inventor renders the scene numPasses times from slightly different camera positions, averaging the results. numPasses can be from one to 255, inclusive. Setting numPasses to one disables multipass antialiasing. You can use either, both, or neither of these antialiasing techniques. By default, both smoothing and multipass antialiasing are disabled.

SEE ALSO

SoWinRenderArea, SoGLRenderAction, SoHandleEventAction


SoSearchAction

NAME

SoSearchAction - searches for nodes in a scene graph

INHERITS FROM

SoAction > SoSearchAction

SYNOPSIS

#include <Inventor/actions/SoSearchAction.h>

enum LookFor	{
SoSearchAction::NODE
Search for a particular node (by pointer)
SoSearchAction::TYPE
Search for a particular type of node
SoSearchAction::NAME
Search for a node with a particular name
}

enum Interest	{
SoSearchAction::FIRST
Return only the first path found
SoSearchAction::LAST
Return only the last path found
SoSearchAction::ALL
Return all paths found
}

Methods from class SoSearchAction:

SoSearchAction()

void	setNode(SoNode *n)

SoNode *	getNode() const

void	setType(SoType t,
SbBool derivedIsOk = TRUE)

SoType	getType(SbBool &derivedIsOk) const

void	setName(const SbName &n)

const SbName &	getName() const

void	setFind(int what)

int	getFind()

void	setInterest(Interest interest)

Interest	getInterest() const

void	setSearchingAll(SbBool flag)

SbBool	isSearchingAll() const

SoPath *	getPath() const

SoPathList &	getPaths()

void	reset()

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class is used to search scene graphs for specific nodes, nodes of a specific type, nodes with a specific name, or any combination of these. It can search for just the first or last node satisfying the criteria or for all such nodes. The actions return paths to each node found.

Note that by default nodekits do not search their children when a search action is applied. The reference page for SoBaseKit discusses the methods SoBaseKit::isSearchingChildren() and SoBaseKit::setSearchingChildren(), which allow you to query and control this behavior.

METHODS

SoSearchAction()

Constructor.

void	setNode(SoNode *n)

SoNode *	getNode() const

Sets/returns the node to search for.

void	setType(SoType t,
SbBool derivedIsOk = TRUE)

SoType	getType(SbBool &derivedIsOk) const

Sets/returns the node type to search for. If derivedIsOk is TRUE, a node that is of a type that is derived from t will pass this search criterion.

void	setName(const SbName &n)

const SbName &	getName() const

Sets/returns the name of the node to search for.

void	setFind(int what)

int	getFind()

Sets/returns what to look for; what is a bitmask of LookFor enum values. Default is no flags at all. Note that setting a node, type, and/or name to search for activates the relevant flag, so you may never need to call this method directly.

void	setInterest(Interest interest)

Interest	getInterest() const

Sets/returns which paths to return. Default is FIRST.

void	setSearchingAll(SbBool flag)

SbBool	isSearchingAll() const

Sets/returns whether searching uses regular traversal or whether it traverses every single node. For example, if this flag is FALSE, an SoSwitch node will traverse only the child or children it would normally traverse for an action. If the flag is TRUE, the switch would always traverse all of its children. The default is FALSE.

SoPath *	getPath() const

Returns resulting path, or NULL if no path was found. This should be used if the interest is FIRST or LAST.

SoPathList &	getPaths()

Returns resulting path list. This should be used if the interest is ALL.

void	reset()

Resets options back to default values; clears list of returned paths. This can be used to apply the action again with a different set of search criteria.

SEE ALSO

SoPath, SoBaseKit


SoSelectOne

NAME

SoSelectOne - selects one value from a multiple-value field.

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoSelectOne

SYNOPSIS

#include <Inventor/engines/SoSelectOne.h>

Inputs from class SoSelectOne:

SoSFInt32	index

<inputType>	input

Outputs from class SoSelectOne:

(<outputType>)	output

Methods from class SoSelectOne:

SoSelectOne(SoType inputType)

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine selects a single value from a multiple-value field, based on the input field index. The type of the input field can be any subclass of SoMField, and the type of the output is the corresponding subclass of SoSField. For example, if the input type is SoMFVec3f, the output type will be SoSFVec3f. The type is specified when an instance of the class is created. For example, SoSelectOne(SoMFFloat::getClassTypeId()) creates an engine that selects one floating-point value.

Note that unlike most other engine fields, the input field and output are pointers. Note also that by default input does not contain any values, and no value is output from the engine.

INPUTS

SoSFInt32	index

Index of the value to select from the multiple-value field.

<inputType>	input

The multiple-value field from which the value will be selected.

OUTPUTS

(<outputType>)	output

The single value selected.

METHODS

SoSelectOne(SoType inputType)

Constructor. The argument specifies the type of the multiple-value input field.

FILE FORMAT/DEFAULT

SelectOne {

type	<inputType>

input	[]

index	0

}

SEE ALSO

SoEngineOutput, SoConcatenate, SoGate


SoSelection

NAME

SoSelection - manages a list of selected objects

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoSelection

SYNOPSIS

#include <Inventor/nodes/SoSelection.h>

typedef void	SoSelectionPathCB(void *userData,
SoPath *path)

typedef void	SoSelectionClassCB(void *userData,
SoSelection *sel)

typedef SoPath *	SoSelectionPickCB(void *userData,
const SoPickedPoint *pick)

enum Policy	{
SoSelection::SINGLE
Left mouse pick on object clears selection, then selects object. Left mouse pick on nothing clears selection. Only one object may be selected at a time.
SoSelection::TOGGLE
Left mouse pick on object toggles its selection status. Left mouse pick on nothing does nothing. Multiple objects may be selected.
SoSelection::SHIFT
When shift key is down, selection policy is TOGGLE. When shift key is up, selection policy is SINGLE. Multiple objects may be selected.
}

Fields from class SoSelection:

SoSFEnum	policy

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoSelection:

SoSelection()

SoSelection(int nChildren)

static SoType	getClassTypeId()

void	select(const SoPath *path)

void	select(SoNode *node)

void	deselect(const SoPath *path)

void	deselect(int which)

void	deselect(SoNode *node)

void	toggle(const SoPath *path)

void	toggle(SoNode *node)

SbBool	isSelected(const SoPath *path) const

SbBool	isSelected(SoNode *node) const

void	deselectAll()

int	getNumSelected() const

const SoPathList *	getList() const

SoPath *	getPath(int index) const

SoPath *	operator [](int i) const

void	addSelectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	removeSelectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	addDeselectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	removeDeselectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	addStartCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	removeStartCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	addFinishCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	removeFinishCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	setPickFilterCallback(SoSelectionPickCB *f,
void *userData = NULL,
SbBool callOnlyIfSelectable = TRUE)

void	setPickMatching(SbBool pickTwice)

SbBool	getPickMatching() const

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoSelection defines a node which can be inserted into a scene graph and will generate and manage a selection list from picks on any node in the subgraph below it. Nodes are selected based on a current selection policy. Callback functions report back to the application when a path has been selected or deselected. The selection list can also be managed programmatically.

When handling events, SoSelection makes sure that the mouse release event was over the same object as the mouse press event before changing the list of selected objects. This allows users to mouse down on an object, change their mind and move the cursor off the object, then release the mouse button without altering the selection.

The selection can be highlighted automatically through the SoWinRenderArea, or the application can provide custom highlights. Please see the chapter "Creating a Selection Highlight Style" in the Inventor Toolmaker.

FIELDS

SoSFEnum	policy

Selection policy that is followed in response to user interaction. This can be set to SoSelection::SINGLE, SoSelection::TOGGLE, or SoSelection::SHIFT.

METHODS

SoSelection()

Creates a selection node with the default settings.

SoSelection(int nChildren)

Constructor that specifies the approximate number of children.

static SoType	getClassTypeId()

Return the type id for the SoSelection class.

void	select(const SoPath *path)

Select the passed path by adding it to the selection list. The selection node must lie in the path. The path is copied and truncated such that the selection node is the head of the path. If the selection node does not lie in the path, the selection list remains unchanged. This method ignores the current selection policy.

void	select(SoNode *node)

Select the passed node by creating a path to it, and adding the path to the selection list by calling select(path). If there is more than one instance of node beneath the selection node, the created path will be the first instance found.

void	deselect(const SoPath *path)

Deselect the passed path by removing it from the selection list.

void	deselect(int which)

Deselect a path by removing it from the selection list. The argument which specifies which path in the list to be removed.

void	deselect(SoNode *node)

Deselect the passed node by creating a path to it, and removing the node from the selection list by calling deselect(path). If there is more than one instance of node beneath the selection node, the created path will be the first instance found.

void	toggle(const SoPath *path)

Toggle the selection status of the passed path - if the path is in the selection list, it is removed; if not in the list, it is added.

void	toggle(SoNode *node)

Toggle the selection status of the passed node by creating a path to it, then calling toggle(path). If there is more than one instance of node beneath the selection node, the created path will be the first instance found.

SbBool	isSelected(const SoPath *path) const

Returns TRUE if the passed path is selected, that is, if it is in the selection list.

SbBool	isSelected(SoNode *node) const

Returns TRUE if the passed node is selected by creating a path to it, then calling isSelected(). If there is more than one instance of node beneath the selection node, the created path will be the first instance found.

void	deselectAll()

Deselect all paths in the selection list, that is, clear the list.

int	getNumSelected() const

Return the number of paths in the selection list.

const SoPathList *	getList() const

Return the list of selected paths.

SoPath *	getPath(int index) const

SoPath *	operator [](int i) const

Return the ith path in the selection list.

void	addSelectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	removeSelectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

The selection callbacks are invoked every time an object is selected, whether it be from user interaction or from method call. The callbacks are invoked after the object has been added to the selection list.

void	addDeselectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

void	removeDeselectionCallback(SoSelectionPathCB *f,
void *userData = NULL)

The deselection callbacks are invoked every time an object is deselected, whether it be from user interaction or from method call. This is invoked after the object has been removed from the selection list.

void	addStartCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	removeStartCallback(SoSelectionClassCB *f,
void *userData = NULL)

The start callbacks are invoked when the user has initiated an interactive change to the selection list (by picking objects). This will be followed by invocations of the select and/or deselect callbacks, finally followed by each finish callback. A start callback can be used, for instance, to save the current selection for later restoration (e.g. undo/redo). The start callbacks are not called when the selection list is changed programmatically.

void	addFinishCallback(SoSelectionClassCB *f,
void *userData = NULL)

void	removeFinishCallback(SoSelectionClassCB *f,
void *userData = NULL)

The finish callbacks are invoked when the user has finished interactively changing the selection list (by picking objects). This was preceded by an invocation of each start callback, and invocations of the select and/or deselect callbacks. The finish callbacks are not called when the selection list is changed programmatically.

void	setPickFilterCallback(SoSelectionPickCB *f,
void *userData = NULL,
SbBool callOnlyIfSelectable = TRUE)

The pick filter callback is invoked when a pick has occurred and the selection node is about to change the selection list. The callback function returns the path that the selection node should use when selecting and deselecting. If no pick callback is registered (the default), the selection node will use the path returned by SoPickedPoint::getPath() on the picked point associated with the event being processed. The returned path should not be ref'd - selection will ref() and unref() it. (See SoPath::unrefNoDelete().)

Note that a picked object may or may not be a child of the selection node. A selection node will only select paths that pass through it. Possible return values from the callback:

[a] NULL - selection behaves as if nothing was picked (i.e. for SINGLE and SHIFT policies, this clears the selection list). Handle event action traversal halts.

[b] Path - this path will be selected/deselected according to the selection policy (it must lie under the selection node). Handle event action traversal halts.

[c] Path containing only the selection node - apply the selection policy as if nothing was picked. Handle event action traversal continues.

[d] Path not passing through the selection node - selection ignores this pick event and no change is made to the selection list. Handle event action traversal continues.

A simple way to tell selection to ignore the pick is to return an SoPath with no nodes in it. (i.e. return new SoPath;) Selection will always ref the path returned by the callback, make a copy of the path, then unref the path.

The callOnlyIfSelectable argument, when set to TRUE, means the pick callback function will only be invoked on picks which pass through the selection node. When FALSE, all picks will be passed to the callback whether they pass through the selection or not.

void	setPickMatching(SbBool pickTwice)

SbBool	getPickMatching() const

SoSelection will pick once on mouse down and once on mouse up, and make sure the picks match before changing the selection list. This allows the user to pick down on an object, change their mind and drag off the object, release the mouse button and not affect the selection. Pass TRUE to enable this behavior. Pass FALSE to disable this, meaning whatever is picked on a mouse release is added to/removed from the selection list. Default is pick-matching on.

FILE FORMAT/DEFAULT

Selection {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

policy	SHIFT

}

SEE ALSO

SoEventCallback, SoWinRenderArea, SoBoxHighlightRenderAction, SoLineHighlightRenderAction


SoSensor

NAME

SoSensor - abstract base class for Open Inventor sensors

INHERITS FROM

SoSensor

SYNOPSIS

#include <Inventor/sensors/SoSensor.h>

typedef void	SoSensorCB(void *data,
SoSensor *sensor)

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Sensors detect changes either to time or to Open Inventor objects in a scene graph, and call a user-defined callback function. Sensors are scheduled when the thing they are attached to changes, and sometime after they are scheduled they are triggered, calling the user's callback function.

METHODS

void	setFunction(SoSensorCB *callbackFunction)

Sets the callback function that is called when the sensor is triggered. The function must take two arguments - user-supplied callback data (of type void *) and a pointer to the sensor that is triggering the function (of type SoSensor *).

SoSensorCB *	getFunction() const

Returns the callback function that will be called when the sensor is triggered.

void	setData(void *callbackData)

Sets the callback data passed to the callback function.

void *	getData() const

Returns the user-supplied pointer that will be passed to the callback function.

SEE ALSO

SoAlarmSensor, SoDataSensor, SoFieldSensor, SoIdleSensor, SoNodeSensor, SoPathSensor


SoSeparator

NAME

SoSeparator - group node that saves and restores traversal state

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator

SYNOPSIS

#include <Inventor/nodes/SoSeparator.h>

enum CacheEnabled	{
SoSeparator::OFF
Never build a cache
SoSeparator::ON
Always try to build a cache
SoSeparator::AUTO
Decide whether to cache based on some heuristic
}

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoSeparator:

SoSeparator()

SoSeparator(int nChildren)

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node performs a push (save) of the traversal state before traversing its children and a pop (restore) after traversing them. This isolates the separator's children from the rest of the scene graph. A separator can include lights, cameras, coordinates, normals, bindings, and all other properties. Separators are relatively inexpensive, so they can be used freely within scenes.

The SoSeparator node provides caching of state during rendering and bounding box computation. This feature can be enabled by setting the renderCaching and boundingBoxCaching fields. By default, these are set to AUTO, which means that Open Inventor decides whether to build a cache based on internal heuristics.

Separators can also perform culling during rendering and picking. Culling skips over traversal of the separator's children if they are not going to be rendered or picked, based on the comparison of the separator's bounding box with the current view volume. Culling is controlled by the renderCulling and pickCulling fields. These are also set to AUTO by default; however, render culling can be expensive (and can interfere with render caching), so the AUTO heuristics leave it disabled unless specified otherwise.

FIELDS

SoSFEnum	renderCaching

Whether to cache during rendering traversal.

SoSFEnum	boundingBoxCaching

Whether to cache during bounding box traversal.

SoSFEnum	renderCulling

Whether to cull during rendering traversal.

SoSFEnum	pickCulling

Whether to cull during picking traversal.

METHODS

SoSeparator()

Creates a separator node with default settings.

SoSeparator(int nChildren)

Constructor that takes approximate number of children.

static void	setNumRenderCaches(int howMany)

By default, each separator node maintains 2 render caches. (This is to allow two different representations, such as filled and wireframe, to both be cached.) The setNumRenderCaches() method sets the number of render caches each separator will have. Each render cache uses memory, so increasing this number may increase the memory requirements of the application. This method affects only separators that are created after it is called, not separators that were created before. Setting the number of caches to 0 turns off render caching globally from then on.

This value can also be specified via environment variable IV_SEPARATOR_MAX_CACHES.

static int	getNumRenderCaches()

Returns the current number of render caches.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction, SoSearchAction

Saves the current traversal state, traverses all children, and restores the previous traversal state.

FILE FORMAT/DEFAULT

Separator {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

}

SEE ALSO

SoSelection, SoTransformSeparator


SoSeparatorKit

NAME

SoSeparatorKit - separator nodekit class

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoSeparatorKit

SYNOPSIS

#include <Inventor/nodekits/SoSeparatorKit.h>

enum CacheEnabled	{
SoSeparatorKit::OFF
Never build or use a cache
SoSeparatorKit::ON
Always try to build a cache
SoSeparatorKit::AUTO
Automatic caching
}

Fields from class SoSeparatorKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoSeparatorKit:

(SoPickStyle)	pickStyle

(SoAppearanceKit)	appearance

(SoUnits)	units

(SoTransform)	transform

(SoTexture2Transform)	texture2Transform

(SoNodeKitListPart)	childList

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoSeparatorKit:

SoSeparatorKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

A nodekit that is used for creating nodekit hierarchies. SoSeparatorKit contains a transform part, a childList part, and a few others in its catalog. The transform part (an SoTransform node) affects all of the children in the childList. Each of these children must be an SoSeparatorKit or from a class that is derived from SoSeparatorKit (e.g., SoShapeKit and SoWrapperKit). Since all members of the childList are in turn SoSeparatorKits, and each contains a transform, these nested lists allow you to create a hierarchy of motion, in which each transform affects an entire subgraph of nodekits.

The other parts added to the catalog for the SoSeparatorKit are pickStyle, appearance, units and texture2Transform. Furthermore, since SoSeparator is derived from SoBaseKit, it inherits the callbackList part. This is a list of SoCallback and/or SoEventCallback nodes which enable the SoSeparatorKit to perform special callbacks whenever an action is applied to it.

By creating the pickStyle part, a user can alter the pick style for the entire nodekit hierarchy. The appearance part is an SoAppearanceKit nodekit. Note that all parts contained in the SoAppearanceKit catalog can be accessed as if they were part of the SoSeparatorKit. For example:

myMtl = mySepKit->getPart("material",TRUE)

and

mySepKit->setPart("material",myMtl)

See SoBaseKit for further explanation.

FIELDS

SoSFEnum	renderCaching

Set render caching mode. Default is AUTO.

SoSFEnum	boundingBoxCaching

Set bounding box caching mode. Default is ON. Setting this value to AUTO is equivalent to ON - automatic culling is not implemented.

SoSFEnum	renderCulling

Set render culling mode. Default is OFF. Setting this value to AUTO is equivalent to ON - automatic culling is not implemented.

SoSFEnum	pickCulling

Set pick culling mode. Default is AUTO.

PARTS

(SoPickStyle)	pickStyle

An SoPickStyle property node that can be used to set the picking style of its children. This part is NULL by default, but is created automatically if necessary.

(SoAppearanceKit)	appearance

An SoAppearanceKit nodekit which can be used to set the appearance properties of its children. This part is NULL by default, but is created automatically if necessary.

(SoUnits)	units

An SoUnits node which can be used to set the types of units, (e.g., feet), of its children. This part is NULL by default, but is created automatically if necessary.

(SoTransform)	transform

An SoTransform node which can be used to set the overall position, orientation, and scale of its children. This part is NULL by default, but is created automatically if necessary.

(SoTexture2Transform)	texture2Transform

An SoTexture2Transform node which can be used to apply a transformation to any textures used by its children. This part is NULL by default, but is created automatically if necessary.

(SoNodeKitListPart)	childList

This part contains the children nodekits of this SoSeparatorKit. This part is a list part and can have multiple children. This part is NULL by default, but is created automatically when the first child is added to the childList. Also, when asked to build a member of the childList, the separatorKit will build an SoShapeKit by default. So if the childList part is NULL, and you call: getPart("childList[0]", TRUE), the separator kit will create the childList and add an SoShapeKit as the new element in the list.

METHODS

SoSeparatorKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for the class SoSeparatorKit.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
pickStyle	PickStyle	--	yes
appearance	AppearanceKit	--	yes
units	Units	--	yes
transform	Transform	--	yes
texture2Transform	Texture2Transform	--	yes
childList	NodeKitListPart	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

SeparatorKit {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

callbackList	NULL

pickStyle	NULL

appearance	NULL

units	NULL

transform	NULL

texture2Transform	NULL

childList	NULL

}

SEE ALSO

SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoShapeKit, SoWrapperKit


SoShape

NAME

SoShape - abstract base class for all shape nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape

SYNOPSIS

#include <Inventor/nodes/SoShape.h>

Methods from class SoShape:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is the abstract base class for all shape (geometry) nodes. All classes derived from SoShape draw geometry during render traversal.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoCone, SoCube, SoCylinder, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoNurbsCurve, SoNurbsSurface, SoShapeHints, SoShapeKit, SoSphere, SoText2, SoText3, SoVertexShape


SoShapeHints

NAME

SoShapeHints - node that provides hints about shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShapeHints

SYNOPSIS

#include <Inventor/nodes/SoShapeHints.h>

enum VertexOrdering	{
SoShapeHints::UNKNOWN_ORDERING
Ordering of vertices is unknown
SoShapeHints::CLOCKWISE
Face vertices are ordered clockwise (from the outside)
SoShapeHints::COUNTERCLOCKWISE
Face vertices are ordered counterclockwise (from the outside)
}

enum ShapeType	{
SoShapeHints::UNKNOWN_SHAPE_TYPE
Nothing is known about the shape
SoShapeHints::SOLID
The shape encloses a volume
}

enum FaceType	{
SoShapeHints::UNKNOWN_FACE_TYPE
Nothing is known about faces
SoShapeHints::CONVEX
All faces are convex
}

Fields from class SoShapeHints:

SoSFEnum	vertexOrdering

SoSFEnum	shapeType

SoSFEnum	faceType

SoSFFloat	creaseAngle

Methods from class SoShapeHints:

SoShapeHints()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

By default, Open Inventor assumes very little about the shapes it renders. You can use the SoShapeHints node to indicate that vertex-based shapes (those derived from SoVertexShape) are solid, contain ordered vertices, or contain convex faces. For fastest rendering, specify SOLID, COUNTERCLOCKWISE, CONVEX shapes.

These hints allow Open Inventor to optimize certain rendering features. Optimizations that may be performed include enabling back-face culling and disabling two-sided lighting. For example, if an object is solid and has ordered vertices, Open Inventor turns on backface culling and turns off two-sided lighting. If the object is not solid but has ordered vertices, it turns off backface culling and turns on two-sided lighting. In all other cases, both backface culling and two-sided lighting are off.

The SoShapeHints node also affects how default normals are generated. When a node derived from SoVertexShape has to generate default normals, it uses the creaseAngle field to determine which edges should be smooth-shaded and which ones should have a sharp crease. The crease angle is the angle between surface normals on adjacent polygons. For example, a crease angle of .5 radians means that an edge between two adjacent polygonal faces will be smooth shaded if the normals to the two faces form an angle that is less than .5 radians (about 30 degrees). Otherwise, it will be faceted. Normal generation is fastest when the creaseAngle is 0 (the default), producing one normal per facet. A creaseAngle of pi produces one averaged normal per vertex.

FIELDS

SoSFEnum	vertexOrdering

Indicates how the vertices of faces are ordered. CLOCKWISE ordering means that the vertices of each face form a clockwise loop around the face, when viewed from the outside (the side toward which the normal points).

SoSFEnum	shapeType

Indicates whether the shape is known to enclose a volume (SOLID) or not. If the inside (the side away from the surface normal) of any part of the shape is visible, the shape is not solid.

SoSFEnum	faceType

Indicates whether each face is convex. Because the penalty for non-convex faces is very steep (faces must be triangulated expensively), the default assumes all faces are convex. Therefore, shapes with concave faces may not be displayed correctly unless this hint is set to UNKNOWN_FACE_TYPE.

SoSFFloat	creaseAngle

Indicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when default normals are computed and used.

METHODS

SoShapeHints()

Creates a shape hints node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction, SoGetBoundingBoxAction

Sets the state to contain the hints; sets up optimizations based on the hints.

FILE FORMAT/DEFAULT

ShapeHints {

vertexOrdering	UNKNOWN_ORDERING

shapeType	UNKNOWN_SHAPE_TYPE

faceType	CONVEX

creaseAngle	0

}

SEE ALSO

SoVertexShape


SoShapeKit

NAME

SoShapeKit - shape nodekit class

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoSeparatorKit > SoShapeKit

SYNOPSIS

#include <Inventor/nodekits/SoShapeKit.h>

Fields from class SoSeparatorKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoShapeKit:

(SoSeparator)	shapeSeparator

(SoMaterialBinding)	materialBinding

(SoNormalBinding)	normalBinding

(SoTextureCoordinateBinding)	textureCoordinateBinding

(SoShapeHints)	shapeHints

(SoCoordinate3)	coordinate3

(SoCoordinate4)	coordinate4

(SoNormal)	normal

(SoTextureCoordinate2)	textureCoordinate2

(SoTextureCoordinateFunction)	textureCoordinateFunction

(SoProfileCoordinate2)	profileCoordinate2

(SoProfileCoordinate3)	profileCoordinate3

(SoNodeKitListPart)	profileList

(SoTransform)	localTransform

(SoShape)	shape

Parts from class SoSeparatorKit:

(SoPickStyle)	pickStyle

(SoAppearanceKit)	appearance

(SoUnits)	units

(SoTransform)	transform

(SoTexture2Transform)	texture2Transform

(SoNodeKitListPart)	childList

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoShapeKit:

SoShapeKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

A nodekit that is used for creating a shape (i.e. geometry). SoShapeKit is derived from SoSeparatorKit and SoBaseKit, and thus inherits all the parts defined by these classes.

Furthermore, SoShapeKit adds numerous parts that can be used to define a variety of shape objects, a localTransform part, and of course a shape part.

All of the property nodes requires to define any of the Open Inventor shapes are included as parts in this class. Not all of these parts (nodes) are needed for any one type of shape. For example, if you set the shape part to be an SoSphere node, then it is not necessary to create a profileCoordinate3 part since it will be ignored in drawing the sphere. (And the unneeded parts will not be created, so there is no performance penalty for using this class of node.

This class contains two private parts. They are both SoSeparator nodes. One of them sits just below the nodekit itself, and serves to contain all properties within this nodekit from affecting nodes that come after this nodekit. The second separator sits above the shape part, and serves to cache the shape even when the transform, localTransform, or appearance parts are changing.

PARTS

(SoSeparator)	shapeSeparator

This is a private part. The parent node of the actual shape part. It is an SoSeparator and is NULL by default, but is created automatically if necessary.

(SoMaterialBinding)	materialBinding

An SoMaterialBinding node that can be used to set the material binding for the shape. This part is NULL by default, but is created automatically if necessary.

(SoNormalBinding)	normalBinding

An SoNormalBinding node that can be used to set the normal binding for the shape. This part is NULL by default, but is created automatically if necessary.

(SoTextureCoordinateBinding)	textureCoordinateBinding

An SoTextureCoordinateBinding node that can be used to set the texture coordinate binding for the shape. This part is NULL by default, but is created automatically if necessary.

(SoShapeHints)	shapeHints

An SoShapeHints node that can be used to set the shape hints for the shape. This part is NULL by default, but is created automatically if necessary.

(SoCoordinate3)	coordinate3

An SoCoordinate3 node that can be used to set the 3D coordinates for a vertex-based shape. This part is NULL by default, but is created automatically if necessary.

(SoCoordinate4)	coordinate4

An SoCoordinate4 node that can be used to set the 4D coordinates for a NURBS shapes. This part is NULL by default, but is created automatically if necessary.

(SoNormal)	normal

An SoNormal node that can be used to set the normal vectors for a vertex-based shape. This part is NULL by default, but is created automatically if necessary.

(SoTextureCoordinate2)	textureCoordinate2

An SoTextureCoordinate2 node that can be used to set the texture coordinates for a vertex-based shape. This part is NULL by default, but is created automatically if necessary.

(SoTextureCoordinateFunction)	textureCoordinateFunction

An SoTextureCoordinateFunction node that can be used to set the a procedural texture coordinates function for a vertex-based shape. This part is NULL by default, but is created automatically if necessary.

(SoProfileCoordinate2)	profileCoordinate2

An SoProfileCoordinate2 node that can be used to set the 2D profile coordinates for a shape that uses them, (e.g., SoText3). This part is NULL by default, but is created automatically if necessary.

(SoProfileCoordinate3)	profileCoordinate3

An SoProfileCoordinate3 node that can be used to set the 3D profile coordinates for a shape that uses them, (e.g., SoNurbsCurve). This part is NULL by default, but is created automatically if necessary.

(SoNodeKitListPart)	profileList

An SoProfileList node that can be used to set the profile curve for a shape that uses them, (e.g., SoNurbsCurve). This part is NULL by default, but is created automatically if necessary.

(SoTransform)	localTransform

An SoTransform node that can be used to set a local transformation on the shape. This part is NULL by default, but is created automatically if necessary.

(SoShape)	shape

This is the part which specifies the actual shape node. This can be any node derived from SoShape By default, an SoCube is created. It is important to set all of the appropriate parts within this nodekit to suit the type of SoShape that is used. For example, if the shape part is set to an SoFaceSet, then the coordinate3 shape and probably the normal shape would be set as well. See the reference page of the shape used for details on which other nodes are necessary.

METHODS

SoShapeKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for the class SoShapeKit.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
pickStyle	PickStyle	--	yes
appearance	AppearanceKit	--	yes
units	Units	--	yes
transform	Transform	--	yes
texture2Transform	Texture2Transform	--	yes
childList	NodeKitListPart	--	yes
materialBinding	MaterialBinding	--	yes
normalBinding	NormalBinding	--	yes
textureCoordinate- Binding	TextureCoordinateBinding	--	yes
shapeHints	ShapeHints	--	yes
coordinate3	Coordinate3	--	yes
coordinate4	Coordinate4	--	yes
normal	Normal	--	yes
textureCoordinate2	TextureCoordinate2	--	yes
textureCoordinate- Function	TextureCoordinateFunction	Texture Coordinate Default	yes
profileCoordinate2	ProfileCoordinate2	--	yes
profileCoordinate3	ProfileCoordinate3	--	yes
profileList	NodeKitListPart	--	yes
localTransform	Transform	--	yes
shape	Shape	Cube	no
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

ShapeKit {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

callbackList	NULL

pickStyle	NULL

appearance	NULL

units	NULL

transform	NULL

texture2Transform	NULL

childList	NULL

materialBinding	NULL

normalBinding	NULL

textureCoordinateBinding	NULL

shapeHints	NULL

coordinate3	NULL

coordinate4	NULL

normal	NULL

textureCoordinate2	NULL

textureCoordinateFunction	NULL

profileCoordinate2	NULL

profileCoordinate3	NULL

profileList	NULL

localTransform	NULL

shape	Cube {

}

}

SEE ALSO

SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoWrapperKit, SoCone, SoCube, SoCylinder, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoNurbsCurve, SoNurbsSurface, SoShapeHints, SoSphere, SoText2, SoText3, SoVertexShape


SoShapeSimplifyAction

NAME

SoShapeSimplifyAction - simplify action that replaces shapes within a scene graph with versions that contain fewer triangles

INHERITS FROM

SoAction > SoSimplifyAction > SoShapeSimplifyAction

SYNOPSIS

#include <Inventor/actions/SoShapeSimplifyAction.h>

Methods from class SoShapeSimplifyAction:

SoShapeSimplifyAction(SoSimplifier *_simplifier)

~SoShapeSimplifyAction()

Methods from class SoSimplifyAction:

void	setSimplificationLevels(int num, const float levels[])

const float *	getSimplificationLevels() const

int	getNumSimplificationLevels() const

void	setRanges(int num, const float newRanges[])

const float *	getRanges() const

int	getNumRanges() const

void	setSizeFactor(float size)

float	getSizeFactor() const

void	setInlineLOD(SbBool i)

SbBool	isInlineLOD() const

void	setUrlName(const SbString name)

const SbString 	getUrlName() const

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

void	setMinTriangles(int mt)

int	getMinTriangles() const

void	setRenderCulling(SbBool r)

int	isRenderCulling() const

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class traverses a scene graph and replaces every complex shape with a simplified version.

METHODS

SoShapeSimplifyAction(SoSimplifier *_simplifier)

~SoShapeSimplifyAction()

Constructor and destructor. The algorithm used for simplifying is defined by the SoSimplifier class that is passed in the constructor.

SEE ALSO

SoAction, SoLevelOfSimplification, SoSimplifyAction, SoGlobalSimplifyAction


SoShuttle

NAME

SoShuttle - animated oscillating translation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTranslation > SoShuttle

SYNOPSIS

#include <Inventor/nodes/SoShuttle.h>

Fields from class SoShuttle:

SoSFVec3f	translation0

SoSFVec3f	translation1

SoSFFloat	speed

SoSFBool	on

Fields from class SoTranslation:

SoSFVec3f	translation

Methods from class SoShuttle:

SoShuttle()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoShuttle class is derived from SoTranslation, so it applies a translation to the current transformation. Using engines connected to the realTime global field, the translation value is animated over time between two fixed translations, achieving a shuttling effect. The period of the motion can be adjusted by changing the speed field. The current translation at any time is available in the translation field, inherited from SoTranslation

FIELDS

SoSFVec3f	translation0

SoSFVec3f	translation1

These define the two fixed translations that are interpolated to create the shuttling motion.

SoSFFloat	speed

Defines the speed of the shuttle, in cycles per second.

SoSFBool	on

Allows applications to enable or disable the motion easily.

METHODS

SoShuttle()

Creates a shuttle node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Concatenates interpolated translation value with the current transformation matrix.

SoGetMatrixAction

Returns transformation matrix specified by the interpolated translation.

FILE FORMAT/DEFAULT

Shuttle {

translation	0 0 0

translation0	0 0 0

translation1	0 0 0

speed	1

on	TRUE

}

SEE ALSO

SoPendulum, SoRotor


SoSimplifier

NAME

SoSimplifier - abstract base class for objects that encapsulate simplification algorithms

INHERITS FROM

SoSimplifier

SYNOPSIS

#include <Inventor/simplifier/SoSimplifier.h>

Methods from class SoSimplifier:

SoSimplifier()

~SoSimplifier()

virtual void 	beginShape(ShapeType)

virtual void 	endShape()

virtual void 	setVertex(const SbVec3f&)

void 	setNormal(const SbVec3f&)

void 	setData(int numData, const float*)

void 	setColor(const unsigned long&)

virtual SoNode* 	simplify(float ) = 0

virtual void 	clear()

virtual int 	getNumTriangles()

virtual void 	setVerbosity(SbBool v)

SbBool 	getVerbosity() const

DESCRIPTION

This class abstract base class for objects that encapsulates simplification algorithms. This object receives a set of triangles and returns a new list representing a simplified version of the original geometry.

METHODS

SoSimplifier()

~SoSimplifier()

Constructor and destructor.

virtual void 	beginShape(ShapeType)

Starts a new shape, ShapeType defines which triangle organization to use. ShapeType can be one of TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN.

virtual void 	endShape()

Ends a shape started by beginShape().

virtual void 	setVertex(const SbVec3f&)

Specifies a new vertex location.

void 	setNormal(const SbVec3f&)

void 	setData(int numData, const float*)

void 	setColor(const unsigned long&)

Methods to set optional vertex data. These must be called before setVertex()

virtual SoNode* 	simplify(float )

Performs the simplification on the shapes and returns a simplified node. On this class, this function is pure virtual; derived classes must implement this function.

virtual void 	clear()

Removes all shapes and reset.

virtual int 	getNumTriangles()

Returns the number of triangles actually stored in the object. If called after simplify(), returns the remaining triangles.

virtual void 	setVerbosity(SbBool v)

SbBool 	getVerbosity() const

Sets/gets whether to print messages while simplifying.

SEE ALSO

SoDecimator, SoSimplifyAction, SoShapeSimplifyAction, SoGlobalSimplifyAction


SoSimplifyAction

NAME

SoSimplifyAction - abstract base class for simplifying scene graphs

INHERITS FROM

SoAction > SoSimplifyAction

SYNOPSIS

#include <Inventor/actions/SoSimplifyAction.h>

Methods from class SoSimplifyAction:

SoSimplifyAction()

~SoSimplifyAction()

void	setSimplificationLevels(int num,
const float levels[])

const float *	getSimplificationLevels() const

int	getNumSimplificationLevels() const

void	setRanges(int num,
const float newRanges[])

const float *	getRanges() const

int	getNumRanges() const

void	setSizeFactor(float size)

float	getSizeFactor() const

void	setInlineLOD(SbBool i)

SbBool	isInlineLOD() const

void	setUrlName(const SbString name)

const SbString 	getUrlName() const

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

void	setMinTriangles(int mt)

int	getMinTriangles() const

void	setRenderCulling(SbBool r)

int	isRenderCulling() const

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class is the base class of the simplify actions that produce versions of a scene graph with fewer triangles. The simplify actions can generate either several simplified levels of the original geometry, grouped by a LevelOfSimplification node, or just one reduced level of detail. If a single level is computed, the action creates a single IndexedTriangleFaceSet.

Each simplified sub-levels can be stored in regular separators or in WWWInline nodes. In this case, the urlName defines the full url to use for each WWWInline. For instance if urlName = "dir\file", the action will generate "dir\file_1.wrl","dir\file_2.wrl", and so on.When a simplify action generates Level of Simplification nodes, the range field of each Level of Simplification node can be given globally in the range field of the simplify action. If the simplify action range field is not set, the simplify action computes it automatically for each LevelOfSimplification node. In this case, the sizeFactor field can be used to customize the range computation.

A minimum number of triangles can be set to stop the simplification when the object becomes too small. Specifying 0.0 for the last level inserts an empty node in the scene graph. This allows you to avoid rendering an object that is too small or too far from the viewer.

METHODS

SoSimplifyAction()

~SoSimplifyAction()

Constructor and destructor. The algorithm used for simplifying is defined by the SoSimplifier class that is passed in the constructor.

void	setSimplificationLevels(int num, const float levels[])

const float *	getSimplificationLevels() const

int	getNumSimplificationLevels() const

Sets/gets number of levels of detail to produce and what percentage to produce at each level. An example array would be [1.0, 0.3, 0.1], which would generate a LevelOfSimplification node with the original geometry and then two simplified children, one with 30% of the triangles and the other with 10% of the triangles in the original.

void	setRanges(int num, const float newRanges[])

const float *	getRanges() const

int	getNumRanges() const

Sets/gets the ranges that will be used in the LevelOfSimplification node to decide which level of detail to display. This is optional; if not given, the size factor will be used to generate range values.

void	setSizeFactor(float size)

float	getSizeFactor() const

Sets/gets a scale factor to use to decide what values of ranges to use in the LevelOfSimplification node.

void	setInlineLOD(SbBool i)

SbBool	isInlineLOD() const

If true, each simplified child is written into a separate file using SoWWWInline nodes.

void	setUrlName(const SbString name)

const SbString 	getUrlName() const

Sets the name used when creating Inline files for each simplified child.

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

If true, the simplify action prints out messages at each stage of the simplification.

void	setMinTriangles(int mt)

int	getMinTriangles() const

Sets/gets the minimum number of triangles for a simplified child; if a given percentage would create a simplified version that went below this minimum, no simplified chld is produced for this level.

void	setRenderCulling(SbBool r)

int	isRenderCulling() const

If true, the "renderCulling" field will be set to ON for the Separators that hold each simplified level.

SEE ALSO

SoAction, SoLevelOfSimplification, SoGlobalSimplifyAction, SoShapeSimplifyAction


SoSpaceballButtonEvent

NAME

SoSpaceballButtonEvent - spaceball button press and release events

INHERITS FROM

SoEvent > SoButtonEvent > SoSpaceballButtonEvent

SYNOPSIS

#include <Inventor/events/SoSpaceballButtonEvent.h>

#define SO_SPACEBALL_PRESS_EVENT(EVENT,BUTTON)    (SoSpaceballButtonEvent::isButtonPressEvent(EVENT, SoSpaceballButtonEvent::BUTTON))

#define SO_SPACEBALL_RELEASE_EVENT(EVENT,BUTTON)    (SoSpaceballButtonEvent::isButtonReleaseEvent(EVENT, SoSpaceballButtonEvent::BUTTON))

enum Button	{
SoSpaceballButtonEvent::ANY
SoSpaceballButtonEvent::BUTTON1
Spaceball button 1
SoSpaceballButtonEvent::BUTTON2
Spaceball button 2
SoSpaceballButtonEvent::BUTTON3
Spaceball button 3
SoSpaceballButtonEvent::BUTTON4
Spaceball button 4
SoSpaceballButtonEvent::BUTTON5
Spaceball button 5
SoSpaceballButtonEvent::BUTTON6
Spaceball button 6
SoSpaceballButtonEvent::BUTTON7
Spaceball button 7
SoSpaceballButtonEvent::BUTTON8
Spaceball button 8
SoSpaceballButtonEvent::PICK
Spaceball pick button
}

Methods from class SoSpaceballButtonEvent:

SoSpaceballButtonEvent()

static SoType	getClassTypeId()

void	setButton(SoSpaceballButtonEvent::Button b)

SoSpaceballButtonEvent::Button	getButton() const

static SbBool	isButtonPressEvent(const SoEvent *e,
SoSpaceballButtonEvent::Button whichButton)

static SbBool	isButtonReleaseEvent(const SoEvent *e,
SoSpaceballButtonEvent::Button whichButton)

Methods from class SoButtonEvent:

void	setState(SoButtonEvent::State s)

SoButtonEvent::State	getState() const

Methods from class SoEvent:

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

void	setTime(SbTime t)

SbTime	getTime() const

void	setPosition(const SbVec2s &p)

const SbVec2s &	getPosition() const

const SbVec2s &	getPosition(const SbViewportRegion &vpRgn) const

const SbVec2f &	getNormalizedPosition(const SbViewportRegion &vpRgn) const

void	setShiftDown(SbBool isDown)

void	setCtrlDown(SbBool isDown)

void	setAltDown(SbBool isDown)

SbBool	wasShiftDown() const

SbBool	wasCtrlDown() const

SbBool	wasAltDown() const

DESCRIPTION

SoSpaceballButtonEvent represents spaceball button press and release events in the Open Inventor event model.

METHODS

SoSpaceballButtonEvent()

Constructor.

static SoType	getClassTypeId()

Return the type id for the SoSpaceballButtonEvent class.

void	setButton(SoSpaceballButtonEvent::Button b)

SoSpaceballButtonEvent::Button	getButton() const

Set and get which spaceball button generated the event.

static SbBool	isButtonPressEvent(const SoEvent *e,
SoSpaceballButtonEvent::Button whichButton)

static SbBool	isButtonReleaseEvent(const SoEvent *e,
SoSpaceballButtonEvent::Button whichButton)

Returns whether the passed event is a spaceball button press or release event of the passed button. When SoSpaceballButtonEvent::ANY is passed, this returns TRUE if the event represents a button press or release of any spaceball button.

SEE ALSO

SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice


SoSphere

NAME

SoSphere - sphere shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoSphere

SYNOPSIS

#include <Inventor/nodes/SoSphere.h>

Fields from class SoSphere:

SoSFFloat	radius

Methods from class SoSphere:

SoSphere()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node represents a sphere. By default, the sphere is centered at the origin and has a radius of 1. The sphere is transformed by the current cumulative transformation and is drawn with the current lighting model, drawing style, material, and geometric complexity.

A sphere does not have faces or parts. Therefore, the sphere ignores material and normal bindings, using the first material for the entire sphere and using its own normals. When a texture is applied to a sphere, the texture covers the entire surface, wrapping counterclockwise from the back of the sphere. The texture has a seam at the back on the yz-plane.

FIELDS

SoSFFloat	radius

Radius of sphere. This must be greater than 0.

METHODS

SoSphere()

Creates a sphere node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws sphere based on the current coordinates, materials, drawing style, and so on.

SoRayPickAction

Intersects the ray with the sphere. No details are created for intersections.

SoGetBoundingBoxAction

Computes the bounding box that encloses the sphere.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle that approximates the sphere.

FILE FORMAT/DEFAULT

Sphere {

radius	1

}

SEE ALSO

SoCone, SoCube, SoCylinder


SoSpotLight

NAME

SoSpotLight - node representing a spotlight source

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLight > SoSpotLight

SYNOPSIS

#include <Inventor/nodes/SoSpotLight.h>

Fields from class SoSpotLight:

SoSFVec3f	location

SoSFVec3f	direction

SoSFFloat	dropOffRate

SoSFFloat	cutOffAngle

Fields from class SoLight:

SoSFBool	on

SoSFFloat	intensity

SoSFColor	color

Methods from class SoSpotLight:

SoSpotLight()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a spotlight style light source. A spotlight is placed at a fixed location in 3-space and illuminates in a cone along a particular direction. The intensity of the illumination drops off exponentially as a ray of light diverges from this direction toward the edges of the cone. The rate of drop-off and the angle of the cone are controlled by the dropOffRate and cutOffAngle fields.

FIELDS

SoSFVec3f	location

Location of the source.

SoSFVec3f	direction

Principal direction of illumination (center axis of cone).

SoSFFloat	dropOffRate

Rate of intensity drop-off per change in angle from primary direction: 0 = constant intensity, 1 = very sharp drop-off

SoSFFloat	cutOffAngle

Angle (in radians) outside of which intensity is zero, measured from the center axis of the cone to an edge.

METHODS

SoSpotLight()

Creates a spotlight source node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Activates this light (if so specified) during traversal. All shape nodes that come after this light in the scene graph are illuminated by this light. The light's location is affected by the current transformation.

FILE FORMAT/DEFAULT

SpotLight {

on	TRUE

intensity	1

color	1 1 1

location	0 0 1

direction	0 0 -1

dropOffRate	0

cutOffAngle	0.785398

}

SEE ALSO

SoDirectionalLight, SoPointLight


SoSpotLightDragger

NAME

SoSpotLightDragger - spotlight shaped dragger that allows you to change position, direction, and width of the beam

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoSpotLightDragger

SYNOPSIS

#include <Inventor/draggers/SoSpotLightDragger.h>

Fields from class SoSpotLightDragger:

SoSFRotation	rotation

SoSFVec3f	translation

SoSFFloat	angle

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoSpotLightDragger:

SoSpotLightDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoSpotLightDragger is a composite dragger. It is shaped like a beam of light emanating from a sun-like ball. An arrow runs along the axis of the beam and extends past the end of the beam.

When you click and drag the beam, it opens and closes with an umbrella-like motion. The angle between the center and edge of the beam is stored in the angle field of this dragger; setting the angle field causes the beam to widen or narrow in response. The spotlight dragger does not use a standard dragger class to execute this motion. More details are given later in this section.

Dragging the arrow rotates it arount the sun, and the beam moves with it. The arrow is an SoRotateSphericalDragger that controls the rotation field. See the reference page for SoDirectionalLightDragger, which works the same way, for details.

The sun-shape can be dragged to translate all three pieces together through 3-space. Its movement controls the translation field and works exactly as described in the reference pages for SoDirectionalLightDragger and SoPointLightDragger (which goes into more detail).

Remember: This is not a light source! It just looks like one. If you want to move a light with this dragger, you can do the following:

[a] Use an SoSpotLightManip, which is subclassed from SoLight. It creates an SoSpotLightDragger and uses it as the interface to change the location, direction, and cutOffAngle of its light source (see the SoSpotLightManip reference page). The manip also edits the material part of this dragger to match the color of light the manip is producing.

[b] Connect the angle field of this dragger to the cutOffAngle field of an SoSpotLight with a field-to-field connection.

See the SoPointLightDragger and SoDirectionalLightDragger reference pages for other ways to control light parameters with the rotation and translation fields.

This class creates its own projector and handles mouse events to do its own dragging of the beam angle. When the mouse picks a point on the beam, that point is dragged in a circle just like in an SoRotateDiscDragger, but the plane of the disc is re-defined every time a drag is initiated. Imagine placing the metal tip of a compass at the apex of the cone and the pencil tip at the picked point. If you swing an arc through the central axis of the cone, you will be drawing the arc used to drag the beam open and closed.

The beam is opened and closed not by rotating, but by scaling. The dragger scales the beam-cone so that the height and radius change to move the picked point along the circle. Then the angle field is calculated from the height and radius.

You can change the geometry of parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoSpotLightDragger class. They are detailed below in the DRAGGER RESOURCE section. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/spotLightDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the rotating part (an arrow by default).

SoSFVec3f	translation

Position of the dragger.

SoSFFloat	angle

Angle between center and edge of beam.

METHODS

SoSpotLightDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
material	Material	--	yes
translator	DragPointDragger	--	yes
rotator	RotateSphericalDragger	--	yes
beamPlacement	Translation	--	yes
beamScale	Scale	--	yes
beam	Separator	--	yes
beamActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	spotLightBeam

Part:	beam

Appearance:	wireframe cone with no SoMaterial node

Description:	picking this initiates dragging of the beam angle. The beam inherits colors from the material part, just like the stationary version of the sun shape.

Resource:	spotLightBeamActive

Part:	beamActive

Appearance:	yellow wireframe cone

Description:	displayed during dragging of the beam angle.

Resource:	spotLightBeamPlacement

Part:	beamPlacement

Appearance:	translation of (0,0,-1)

Description:	This translation node moves the beam parts relative to the rest of the dragger. In this case, moving by (0,0,-1) slides the cone outward along rotator part toward its arrowhead. The distance chosen places the apex of the cone on the surface of the sun shape.

Resource:	spotLightRotatorRotator

Part:	rotator.rotator

Appearance:	white arrow that goes through the sun

Description:	picking this begins rotation of the arrow about the sun-shape

Resource:	spotLightRotatorRotatorActive

Part:	rotator.rotatorActive

Appearance:	yellow arrow that goes through the sun

Description:	displayed while the arrow is being rotated

Resource:	spotLightRotatorFeedback

Part:	rotator.feedback

Appearance:	empty Separator

Description:	this disables display of the axes that a rotateSpherical dragger uses by default

Resource:	spotLightRotatorFeedbackActive

Part:	rotator.feedbackActive

Appearance:	empty Separator

Description:	this disables display of the axes that a rotateSpherical dragger uses by default

Resource:	spotLightOverallMaterial

Part:	material

Appearance:	white. half strength emissive, half strength diffuse

Description:	sets material for the sun shape when stationary. Resource for the moving sun, spotLightTranslatorPlaneTranslatorActive, contains a yellow material for highlighting.

Resource:	spotLightTranslatorPlaneTranslator

Parts:	translator.yzTranslator.translator

translator.xzTranslator.translator

translator.xyTranslator.translator

Appearance:	sun shape with no material

Description:	picking these parts initiates dragging by the yz, xz, and xy planar draggers respectively.

Resource:	spotLightTranslatorPlaneTranslatorActive

Parts:	translator.yzTranslator.translatorActive

translator.xzTranslator.translatorActive

translator.xyTranslator.translatorActive

Appearance:	yellow sun shape

Description:	shown during planar dragging in the yz, xz, and xy planes respectively.

Resource:	spotLightTranslatorLineTranslator

Parts:	translator.xTranslator.translator

translator.yTranslator.translator

translator.zTranslator.translator

Appearance:	white cylinder

Description:	picking these parts initiates dragging in the x, y, and z linear draggers respectively.

Resource:	spotLightTranslatorLineTranslatorActive

Parts:	translator.xTranslator.translatorActive

translator.yTranslator.translatorActive

translator.zTranslator.translatorActive

Appearance:	yellow cylinder

Description:	shown during linear dragging in the x, y, and z directions respectively.

FILE FORMAT/DEFAULT

SpotLightDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

translation	0 0 0

angle	1

callbackList	NULL

material	<spotLightOverallMaterial resource>

translator	DragPointDragger {

}

rotator	RotateSphericalDragger {

}

beamPlacement	<spotLightBeamPlacement resource>

beamScale	Scale {

scaleFactor 0.841471 0.841471 0.540302 }

beam	<spotLightBeam resource>

beamActive	<spotLightBeamActive resource>

rotator.rotator	<spotLightRotatorRotator resource>

rotator.rotatorActive	<spotLightRotatorRotatorActive resource>

rotator.feedback	<spotLightRotatorFeedback resource>

rotator.feedbackActive	<spotLightRotatorFeedbackActive resource>

translator.yzTranslator.translator	<spotLightTranslatorPlaneTranslator resource>

translator.xzTranslator.translator	<spotLightTranslatorPlaneTranslator resource>

translator.xyTranslator.translator	<spotLightTranslatorPlaneTranslator resource>

translator.yzTranslator.translatorActive	<spotLightTranslatorPlaneTranslatorActive resource>

translator.xzTranslator.translatorActive	<spotLightTranslatorPlaneTranslatorActive resource>

translator.xyTranslator.translatorActive	<spotLightTranslatorPlaneTranslatorActive resource>

translator.xTranslator.translator	<spotLightTranslatorLineTranslator resource>

translator.yTranslator.translator	<spotLightTranslatorLineTranslator resource>

translator.zTranslator.translator	<spotLightTranslatorLineTranslator resource>

translator.xTranslator.translatorActive	<spotLightTranslatorLineTranslatorActive resource>

translator.yTranslator.translatorActive	<spotLightTranslatorLineTranslatorActive resource>

translator.zTranslator.translatorActive	<spotLightTranslatorLineTranslatorActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoSpotLightManip

NAME

SoSpotLightManip - spotlight node with 3D interface for editing location, direction, and beam width

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoLight > SoSpotLight > SoSpotLightManip

SYNOPSIS

#include <Inventor/manips/SoSpotLightManip.h>

Fields from class SoSpotLight:

SoSFVec3f	location

SoSFVec3f	direction

SoSFFloat	dropOffRate

SoSFFloat	cutOffAngle

Fields from class SoLight:

SoSFBool	on

SoSFFloat	intensity

SoSFColor	color

Methods from class SoSpotLightManip:

SoSpotLightManip()

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoSpotLight *newOne ) const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoSpotLightManip is the base class for all SoSpotLight nodes that have a built-in 3D user interface (this is the only such class provided with the Open Inventor toolkit). Since it is derived from SoSpotLight, any changes to its fields result in a change of lighting for nodes that follow it in the scene graph. In this case, the interface edits the location, direction, and cutOffAngle fields. Also, the color of the manipulator's geometry will reflect the color of the light (but you can not edit the color using this manipulator).

Typically, you will want to replace a regular SoSpotLight with an SoSpotLightManip (as when the user selects a light to be edited), or vice versa (as when the user is done moving the light and the interface should go away). Use the replaceNode() method  to insert a manipulator into a scene graph, and the replaceManip() method to remove it when done.

The SoSpotLightManip utilizes an SoSpotLightDragger to provide a 3D interface. However, the manipulator differs from the dragger; it lights other objects in the scene because, as an SoSpotLight, it alters the state. The fields values and movement of the dragger, on the other hand, affect only the dragger itself. To find out more about how the interface works and what each part will do, see the reference page for SoSpotLightDragger. The interfaces of the dragger and the manipulator are identical.

The SoSpotLightManip utilizes its dragger by adding it as a hidden child. When an action is applied to the manipulator, such as rendering or handling events, the manipulator first traverses the dragger, and then the manipulator adds its lighting parameters to the state. When you click-drag-release over the manipulator, it passes these events down to the dragger, which moves as a result ("I can't help it, I'm a dragger!").

The manipulator maintains consistency between the fields of the dragger and its own fields. Let's say you use the mouse to widen the cone of the dragger. Callbacks insure that the cutOffAngle field of the manipulator will change by the same amount, thus changing the lighting of nodes which follow in the scene graph. Similarly, if you set the cutOffAngle field of the SoSpotLightManip, the manipulator will widen the beam of the dragger accordingly.

Because the dragger is a hidden child, you can see the dragger on screen and interact with it, but the dragger does not show up when you write the manipulator to file. Also, any SoPath will end at the manipulator. (See the Actions section of this reference page for a complete description of when the dragger is traversed).

If you want to get a pointer to the dragger you can get it from the manipulator using the getDragger() method. You will need to do this if you want to change the geometry of a manipulator, since the geometry actually belongs to the dragger.

METHODS

SoSpotLightManip()

Constructor.

SoDragger *	getDragger()

Returns a pointer to the dragger being used by this manipulator. Given this pointer, you can customize the dragger just like you would any other dragger. You can change geometry using the setPart() method, or add callbacks using the methods found in the SoDragger reference page.

SbBool	replaceNode(SoPath *p )

Replaces the tail of the path with this manipulator. The tail of the path must be an SoSpotLight node (or subclass thereof). If the path has a nodekit, this will try to use setPart() to insert the manipulator. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the spotlight node will be copied to this manipulator, and the light node will be replaced.

The manipulator will not call ref() on the node it is replacing. The old node will disappear if it has no references other than from the input path p and its parent, since this manipulator will be replacing it in both of those places. Nor will the manipulator make any changes to field connections of the old node. The calling process is thus responsible for keeping track of its own nodes and field connections.

SbBool	replaceManip(SoPath *p,
SoSpotLight *newOne ) const

Replaces the tail of the path, which must be this manipulator, with the given SoSpotLight node. If the path has a nodekit, this will try to use setPart() to insert the new node. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the manipulator will be copied to the spotlight node, and the manipulator will be replaced.

The manipulator will not call ref() or unref() on the node which is replacing it, nor will it make any changes to field connections. The calling process is thus responsible for keeping track of its own nodes and field connections.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction

First, traverses the dragger the way an SoGroup would. All draggers place themselves in space, but leave the current transformation unchanged when finished. Then the SoSpotLightManip adds a spotlight to the state, just like its base class, SoSpotLight.

SoSearchAction

Searches just like an SoSpotLight. Does not search the dragger, which is a hidden child.

SoWriteAction

Writes out just like an SoSpotLight. Does not write the dragger, which is a hidden child. If you really need to write valuable information about the dragger, such as customized geometry, you can retrieve the dragger with the getDragger() method and then write it out separately.

FILE FORMAT/DEFAULT

SpotLightManip {

on	TRUE

intensity	1

color	1 1 1

location	0 0 1

direction	0 0 -1

dropOffRate	0

cutOffAngle	0.785398

}

SEE ALSO

SoDragger, SoSpotLight, SoSpotLightDragger, SoDirectionalLightManip, SoPointLightManip


SoSurroundScale

NAME

SoSurroundScale - transformation node that adjusts the current matrix so a default cube will surround other objects

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoSurroundScale

SYNOPSIS

#include <Inventor/nodes/SoSurroundScale.h>

Fields from class SoSurroundScale:

SoSFInt32	numNodesUpToContainer

SoSFInt32	numNodesUpToReset

Methods from class SoSurroundScale:

SoSurroundScale()

void	invalidate()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

When traversed by an action, this node appends a transformation to the current transformation matrix so that a default size cube will surround the objects specified by its fields. Transform manipulators, such as SoHandleBoxManip, use these nodes to make themselves surround other objects.

This node only recalculates after the invalidate() method has been called. Otherwise it uses a saved scale and translation.

When calculating what to surround, the SoSurroundScale looks at the current path in the action and at its own field values. Then SoSurroundScale applies an SoGetBoundingBoxAction to the node that is numNodesUpToContainer nodes above it on the path. SoSurroundScale also tells the action to reset the bounding box upon traversal of the node located numNodesUpToReset nodes above it in the path. The SoSurroundScale then appends a translation and scale to the current transformation so that a default size SoCube will translate and scale to fit this bounding box.

For example, when an SoHandleBoxManip wants to surround the objects it is going to move, the scene graph will look something like this:

                 RootNode

       -------------------------

       |                        |

     handleBoxManip        movingStuff

       |

     handleBoxDragger

       |

     separator

      -----------------------------------

      |            |                     |

    motionMatrix  surroundScale      cubeGeom

The SoHandleBoxDragger wants to transform the cubeGeom so that it surrounds the movingStuff. So it sets the surroundScale fields to:

     numNodesUpToContainer = 4;

     numNodesUpToReset = 3;

The SoBoundingBoxAction will then be applied to RootNode, with a reset after traversing the SoHandleBoxManip. So the SoSurroundScale will surround the objects below separator, and to the right of handleBoxManip, producing the desired effect.

FIELDS

SoSFInt32	numNodesUpToContainer

When traversed by an action, if surroundScale needs to calculate a new box, surroundScale looks at the current path in the action. It travels up this path a distance of numNodesUpToContainer and applies an SoGetBoundingBoxAction to the node that it finds there.

SoSFInt32	numNodesUpToReset

Before applying the SoGetBoundingBoxAction (see the numNodesUpToContainer field above) the surroundScale node travels up the path a distance of numNodesUpToReset and tells the action to reset the bounding box upon traversal of that node.

METHODS

SoSurroundScale()

Creates a surround scale node with default settings.

void	invalidate()

If you call this, then next time an action is applied the node will re-calculate its cached translation and scale values.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates scaling and translation transformations into the current transformation.

SoGetMatrixAction

Returns the matrix corresponding to the scaling and translation.

FILE FORMAT/DEFAULT

SurroundScale {

numNodesUpToContainer	0

numNodesUpToReset	0

}

SEE ALSO

SoTransformation, SoTransformManip, SoCenterballDragger, SoCenterballManip, SoHandleBoxDragger, SoHandleBoxManip, SoJackDragger, SoJackManip, SoTabBoxDragger, SoTabBoxManip, SoTrackballDragger, SoTrackballManip, SoTransformBoxDragger, SoTransformBoxManip


SoSwitch

NAME

SoSwitch - group node that traverse one chosen child

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSwitch

SYNOPSIS

#include <Inventor/nodes/SoSwitch.h>

Fields from class SoSwitch:

SoSFInt32	whichChild

Methods from class SoSwitch:

SoSwitch()

SoSwitch(int nChildren)

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node usually traverses only one or none of its children. It implements an operation similar to the switch statement in C. One can use this node to switch on and off the effects of some properties or to switch between different properties.

The whichChild field specifies the index of the child to traverse, where the first child has index 0.

A value of SO_SWITCH_NONE (-1, the default) means do not traverse any children. A value of SO_SWITCH_INHERIT (-2) allows the index to be inherited from a previously-encountered SoSwitch node or from certain other nodes (such as SoArray or SoMultipleCopy) that set the switch value. A value of SO_SWITCH_ALL (-3) traverses all children, making the switch behave exactly like a regular SoGroup.

FIELDS

SoSFInt32	whichChild

Index of the child to traverse, or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL.

METHODS

SoSwitch()

Creates a switch node with default settings.

SoSwitch(int nChildren)

Constructor that takes approximate number of children.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction

Traverses the chosen child or children.

SoSearchAction

If the action's Searching-All flag is set, always traverses all children. Otherwise, traverses just the chosen child or children.

FILE FORMAT/DEFAULT

Switch {

whichChild	-1

}

SEE ALSO

SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch


SoTabBoxDragger

NAME

SoTabBoxDragger - cubic object you can translate and scale by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTabBoxDragger

SYNOPSIS

#include <Inventor/draggers/SoTabBoxDragger.h>

Fields from class SoTabBoxDragger:

SoSFVec3f	scaleFactor

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoTabBoxDragger:

SoTabBoxDragger()

void	adjustScaleTabSize()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoTabBoxDragger is a composite dragger shaped like a box. Inside it are six SoTabPlaneDraggers which the dragger positions and orients to form a cube. The operations available in an SoTabPlaneDragger (translation, 1D scaling and 2D scaling) are available on each face of the cube. Since they each move in their local space, the dragger may be easily translated or scaled in any direction.

As a composite dragger, this class makes sure that when one plane is dragged, the entire box moves together.

As each sub-dragger is moved, the SoTabBoxDragger updates its scaleFactor and translation fields. As with all draggers, if you change a field the dragger will move to match the new settings.

Remember: This is not an SoTransform!. If you want to move other objects with this dragger, you can either:

[a] Use an SoTabBoxManip, which is subclassed from SoTransform. It creates one of these draggers and uses it as the interface to change its fields. (see the SoTabBoxManip reference page).

[b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation node.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoTabBoxDragger class. They are detailed below in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/tabBoxDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	scaleFactor

Scale of the dragger.

SoSFVec3f	translation

Position of the dragger.

METHODS

SoTabBoxDragger()

Constructor.

void	adjustScaleTabSize()

Cause the scale tab sizes to be re-adjusted on all 6 SoTabPlaneDraggers so that they remain a near constant screen space size. This happens automatically upon dragger finish. Call this to adjust the scale tab sizes at other times, for instance after the camera has changed in a viewer finish callback.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
surroundScale	SurroundScale	--	yes
tabPlane1	TabPlaneDragger	--	yes
tabPlane2	TabPlaneDragger	--	yes
tabPlane3	TabPlaneDragger	--	yes
tabPlane4	TabPlaneDragger	--	yes
tabPlane5	TabPlaneDragger	--	yes
tabPlane6	TabPlaneDragger	--	yes
boxGeom	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	tabBoxTranslator

Parts:	tabPlane1.translator

tabPlane2.translator

tabPlane3.translator

tabPlane4.translator

tabPlane5.translator

tabPlane6.translator

Appearance:	Outline of a Square. The region within is pickable

Description:	Begins translation within the plane. The tabBox places and orients each tabPlane so that these squares form a box.

Resource:	tabBoxScaleTabMaterial

Parts:	tabPlane1.scaleTabMaterial

tabPlane2.scaleTabMaterial

tabPlane3.scaleTabMaterial

tabPlane4.scaleTabMaterial

tabPlane5.scaleTabMaterial

tabPlane6.scaleTabMaterial

Appearance:	Green - half diffuse, half emissive.

Description:	Used as material for scaling tabs.

Resource:	tabBoxScaleTabHints

Parts:	tabPlane1.scaleTabHints

tabPlane2.scaleTabHints

tabPlane3.scaleTabHints

tabPlane4.scaleTabHints

tabPlane5.scaleTabHints

tabPlane6.scaleTabHints

Appearance:	shapeHints node:COUNTERCLOCKWISE/SOLID/CONVEX

Description:	Property for the tab nodes.

Resource:	tabBoxBoxGeom

Part:	boxGeom

Appearance:	Unpickable gray outline of a box.

Description:	Just feedback.

FILE FORMAT/DEFAULT

TabBoxDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

scaleFactor	1 1 1

callbackList	NULL

surroundScale	NULL

tabPlane1	TabPlaneDragger {

}

tabPlane2	TabPlaneDragger {

}

tabPlane3	TabPlaneDragger {

}

tabPlane4	TabPlaneDragger {

}

tabPlane5	TabPlaneDragger {

}

tabPlane6	TabPlaneDragger {

}

boxGeom	<tabBoxBoxGeom resource>

tabPlane1.translator	<tabBoxTranslator resource>

tabPlane2.translator	<tabBoxTranslator resource>

tabPlane3.translator	<tabBoxTranslator resource>

tabPlane4.translator	<tabBoxTranslator resource>

tabPlane5.translator	<tabBoxTranslator resource>

tabPlane6.translator	<tabBoxTranslator resource>

tabPlane1.scaleTabMaterial	<tabBoxScaleTabMaterial resource>

tabPlane2.scaleTabMaterial	<tabBoxScaleTabMaterial resource>

tabPlane3.scaleTabMaterial	<tabBoxScaleTabMaterial resource>

tabPlane4.scaleTabMaterial	<tabBoxScaleTabMaterial resource>

tabPlane5.scaleTabMaterial	<tabBoxScaleTabMaterial resource>

tabPlane6.scaleTabMaterial	<tabBoxScaleTabMaterial resource>

tabPlane1.scaleTabHints	<tabBoxScaleTabHints resource>

tabPlane2.scaleTabHints	<tabBoxScaleTabHints resource>

tabPlane3.scaleTabHints	<tabBoxScaleTabHints resource>

tabPlane4.scaleTabHints	<tabBoxScaleTabHints resource>

tabPlane5.scaleTabHints	<tabBoxScaleTabHints resource>

tabPlane6.scaleTabHints	<tabBoxScaleTabHints resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoTabBoxManip

NAME

SoTabBoxManip - transform node with 3D Interface for editing scale and translation

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip > SoTabBoxManip

SYNOPSIS

#include <Inventor/manips/SoTabBoxManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoTabBoxManip:

SoTabBoxManip()

static SoType	getClassTypeId()

Methods from class SoTransformManip:

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoTabBoxManip is derived from SoTransform (by way of SoTransformManip). When its fields change, nodes following it in the scene graph scale, and/or translate.

As a subclass of SoTransformManip, this manip also has a 3D interface to edit some of its fields. In this case, the interface edits the scaleFactor and translation fields.

A manipulator differs from a dragger. When you move a dragger, no other nodes are affected. When you move an SoTransformManip, other nodes move along with it. (See the reference page for SoTransformManip.)

The interface for an SoTabBoxManip is exactly the same as that of the SoTabBoxDragger. To find out more about the interface, see the reference page for SoTabBoxDragger. To find out how the manipulator uses a dragger to provide its interface, see the reference page for SoTransformManip.

On screen, this manip will surround the objects influenced by its motion. This is because it turns on the surroundScale part of the dragger (See the reference page for SoSurroundScale)

METHODS

SoTabBoxManip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

TabBoxManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoCenterballManip, SoHandleBoxManip, SoJackManip, SoTabBoxDragger, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoTransform, SoTransformManip


SoTabPlaneDragger

NAME

SoTabPlaneDragger - object you can translate or scale within a plane by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTabPlaneDragger

SYNOPSIS

#include <Inventor/draggers/SoTabPlaneDragger.h>

Fields from class SoTabPlaneDragger:

SoSFVec3f	scaleFactor

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoTabPlaneDragger:

SoTabPlaneDragger()

void	adjustScaleTabSize()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoTabPlaneDragger is a dragger which allows the user to interactively translate and scale in a plane. It looks like a square white outline with smaller green squares (or tabs) set in the corners and along the center of each edge. Dragging a corner tab scales the dragger in 2D by scaling about the opposite corner. Dragging an edge tab performs 1D scaling about the opposite edge. The rest of the dragger is invisible but pickable; selecting it initiates translation within the plane.

The dragger tries to keep the small tabs a constant size in screen space. Every time a drag begins or ends, the size is recalculated based on the viewing and modeling matrix.

When dragging the translator part, press the <Shift> key and you can constrain motion to either the local x axis or the y axis. The direction is determined by your initial mouse gesture after pressing the key. Releasing the key removes the constraint.

When the translator part drags, the dragger updates its translation field. The various scaling parts cause changes to both the scaleFactor and translation field, since scaling about a point other than the center adds translation to the center of the dragger. If you set the field, the dragger will move accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.

You can not change the shape used to draw the tabs. This part is kept privately and may not be changed; the coordinates for the tabs are edited during adjustScaleTabSize().

The SoTabPlaneDragger class does contain three other parts you can change: tabPlaneTranslator, tabPlaneScaleTabMaterial and tabPlaneScaleTabHints.

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/tabPlaneDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	scaleFactor

Scale factor affecting the dragger.

SoSFVec3f	translation

Position of the dragger.

METHODS

SoTabPlaneDragger()

Constructor.

void	adjustScaleTabSize()

Cause the scale tab sizes to be re-adjusted so that they remain a near constant screen space size. This happens automatically upon dragger finish. Call this to adjust the scale tab sizes at other times, for instance after the camera has changed in a viewer finish callback.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
translator	Separator	--	yes
scaleTabMaterial	Material	--	yes
scaleTabHints	ShapeHints	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	tabPlaneTranslator

Part:	translator

Appearance:	Outline of a Square. The region within it is pickable

Description:	Begins translation within the plane

Resource:	tabPlaneScaleTabMaterial

Part:	scaleTabMaterial

Appearance:	Green - half diffuse, half emissive.

Description:	Used as material for scaling tabs.

Resource:	tabPlaneScaleTabHints

Part:	scaleTabHints

Appearance:	shapeHints node:COUNTERCLOCKWISE/SOLID/CONVEX

Description:	Property for the tab nodes.

FILE FORMAT/DEFAULT

TabPlaneDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

scaleFactor	1 1 1

callbackList	NULL

translator	<tabPlaneTranslator resource>

scaleTabMaterial	<tabPlaneScaleTabMaterial resource>

scaleTabHints	<tabPlaneScaleTabHints resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoText2

NAME

SoText2 - screen-aligned 2D text shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoText2

SYNOPSIS

#include <Inventor/nodes/SoText2.h>

enum Justification	{
SoText2::LEFT
Left edges of all strings are aligned
SoText2::RIGHT
Right edges of all strings are aligned
SoText2::CENTER
Centers of all strings are aligned
}

Fields from class SoText2:

SoMFString	string

SoSFFloat	spacing

SoSFEnum	justification

Methods from class SoText2:

SoText2()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines one or more strings of 2D text. The text is always aligned horizontally with the screen and does not change size with distance in a perspective projection. The text origin is at (0,0,0) after applying the current transformation. Rotations and scales have no effect on the orientation or size of 2D text, just the location.

SoText2 uses the current font to determine the typeface and size. The text is always drawn with the diffuse color of the current material; it is not lit, regardless of the lighting model. Furthermore, 2D text can not be textured, and it ignores the current drawing style and complexity.

Because 2D text is screen-aligned, it has some unusual characteristics. For example, the 3D bounding box surrounding a 2D text string depends on the current camera and the current viewport size, since changing the field of view or the mapping onto the window changes the relative size of the text with respect to the rest of the scene. This has implications for caching as well, since a render cache in an SoSeparator that contains an SoText2 node depends on the current camera.

FIELDS

SoMFString	string

The text string(s) to display. Each string will appear on its own line.

SoSFFloat	spacing

Defines the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height. A value of 1 indicates single spacing, a value of 2 indicates double spacing, and so on.

SoSFEnum	justification

Indicates placement and alignment of strings. With LEFT justification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned. RIGHT justification is similar. CENTER justification places the center of the first string at the (transformed) origin, with the centers of all remaining strings aligned under it.

METHODS

SoText2()

Creates a 2D text node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws text based on the current font, at a location based on the current transformation.

SoRayPickAction

Performs a pick on the text. Text will be picked if the picking ray intersects the bounding box of the strings. The string index and character position are available from the SoTextDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses the text.

FILE FORMAT/DEFAULT

Text2 {

string	""

spacing	1

justification	LEFT

}

SEE ALSO

SoFont, SoText3, SoTextDetail


SoText3

NAME

SoText3 - 3D text shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoText3

SYNOPSIS

#include <Inventor/nodes/SoText3.h>

enum Justification	{
SoText3::LEFT
Left edges of all strings are aligned
SoText3::RIGHT
Right edges of all strings are aligned
SoText3::CENTER
Centers of all strings are aligned
}

enum Part	{
SoText3::FRONT
Front faces of characters
SoText3::SIDES
Extruded sides of characters
SoText3::BACK
Back faces of characters
SoText3::ALL
All parts
}

Fields from class SoText3:

SoMFString	string

SoSFFloat	spacing

SoSFBitMask	parts

SoSFEnum	justification

Methods from class SoText3:

SoText3()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines one or more strings of 3D text. In contrast with SoText2, 3D text can be rotated, scaled, lighted, and textured, just like all other 3D shapes. Each character in a 3D text string is created by extruding an outlined version of the character (in the current typeface) along the current profile, as defined by nodes derived from SoProfile. The default text profile, if none is specified, is a straight line segment one unit long.

The text origin is at (0,0,0) after applying the current transformation. The scale of the text is affected by the size field of the current SoFont as well as the current transformation.

SoText3 uses the current set of materials when rendering. If the material binding is OVERALL, then the whole text is drawn with the first material. If it is PER_PART or PER_PART_INDEXED, the front part of the text is drawn with the first material, the sides with the second, and the back with the third.

Textures are applied to 3D text as follows. On the front and back faces of the text, the texture origin is at the base point of the first string; the base point is at the lower left for justification LEFT, at the lower right for RIGHT, and at the lower center for CENTER. The texture is scaled equally in both S and T dimensions, with the font height representing 1 unit. S increases to the right on the front faces and to the left on the back faces. On the sides, the texture is scaled the same as on the front and back. S is equal to 0 at the rear edge of the side faces. The T origin can occur anywhere along each character, depending on how that character's outline is defined.

Stroke Fonts: If a stroke font is used (see SoFont), the text is rendered with lines rather than faces. Line attributes apply instead of polygon attributes. Text is not extruded.

FIELDS

SoMFString	string

The text string(s) to display. Each string will appear on its own line.

SoSFFloat	spacing

Defines the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height. A value of 1 indicates single spacing, a value of 2 indicates double spacing, and so on.

SoSFBitMask	parts

Which parts of text are visible. Note that, for speed, the default for this field is FRONT only.

SoSFEnum	justification

Indicates placement and alignment of strings. With LEFT justification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned. RIGHT justification is similar. CENTER justification places the center of the first string at the (transformed) origin, with the centers of all remaining strings aligned under it.

METHODS

SoText3()

Creates a 3D text node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws text based on the current font, profiles, transformation, drawing style, material, texture, complexity, and so on.

SoRayPickAction

Performs a pick on the text. The string index and character position are available from the SoTextDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses the text.

SoCallbackAction

For non-stroke fonts, if any triangle callbacks are registered with the action, they will be invoked for each successive triangle used to approximate the text geometry.

For stroke fonts, if any line segment callbacks are registered with the action, they will be invoked for each successive line segment used to approximate the text geometry.

FILE FORMAT/DEFAULT

Text3 {

string	""

spacing	1

justification	LEFT

parts	FRONT

}

SEE ALSO

SoFont, SoProfile, SoText2, SoTextDetail


SoTextDetail

NAME

SoTextDetail - stores detail information about a text node

INHERITS FROM

SoDetail > SoTextDetail

SYNOPSIS

#include <Inventor/details/SoTextDetail.h>

Methods from class SoTextDetail:

SoTextDetail()

virtual	~SoTextDetail()

int32_t	getStringIndex() const

int32_t	getCharacterIndex() const

SoText3::Part	getPart() const

SbBox3f	getBoundingBox() const

SbXfBox3f	getXfBoundingBox() const

static SoType	getClassTypeId()

Methods from class SoDetail:

SoDetail *	copy() const

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains detail information about a point on a text shape (SoText2 or SoText3). It contains the part of the text, string, and character that were hit or generated.

METHODS

SoTextDetail()

virtual	~SoTextDetail()

Constructor and destructor.

int32_t	getStringIndex() const

Returns the index of the relevant string within a multiple-value string field of a text node.

int32_t	getCharacterIndex() const

Returns the index of the relevant character within the string. For example, if the character of detail was the "u" within "Splurmph", the character index would be 3.

SoText3::Part	getPart() const

For SoText3, this returns which part was picked or generated.

SbBox3f	getBoundingBox() const

SbXfBox3f	getXfBoundingBox() const

When the detail is returned from picking, these return the object-space bounding box of the character that was intersected. Otherwise, they return an empty box. The second method returns an SbXfBox3f instead of a SbBox3f. These methods are implemented only for 3D text.

static SoType	getClassTypeId()

Returns type identifier for this class.

SEE ALSO

SoText2, SoText3, SoDetail, SoPickedPoint, SoPrimitiveVertex


SoTexture2

NAME

SoTexture2 - texture mapping node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTexture2

SYNOPSIS

#include <Inventor/nodes/SoTexture2.h>

enum Model	{
SoTexture2::MODULATE
The texture color is multiplied by the surface color
SoTexture2::DECAL
The texture color replaces the surface color
SoTexture2::BLEND
Blends between the surface color and a specified blend color
}

enum Wrap	{
SoTexture2::REPEAT
Repeats texture outside 0-1 texture coordinate range
SoTexture2::CLAMP
Clamps texture coordinates to lie within 0-1 range
}

Fields from class SoTexture2:

SoSFString	filename

SoSFImage	image

SoSFEnum	wrapS

SoSFEnum	wrapT

SoSFEnum	model

SoSFColor	blendColor

Methods from class SoTexture2:

SoTexture2()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This property node defines a texture map and parameters for that map. This map is used to apply texture to subsequent shapes as they are rendered.

The texture can be read from the file specified by the filename field. Once the texture has been read, the image field contains the texture data. However, this field is marked so the image is not written out when the texture node is written to a file. To turn off texturing, set the filename field to an empty string ("").

Textures can also be specified in memory by setting the image field to contain the texture data. Doing so resets the filename to the empty string.

If the texture image's width or height is not a power of 2, or the image's width or height is greater than the maximum supported by OpenGL, then the image will be automatically scaled up or down to the next power of 2 or the maximum texture size. For maximum speed, point-sampling is used to do the scale; if you want more accurate resampling, pre-filter images to a power of 2 smaller than the maximum texture size (use the OpenGL glGetIntegerv(GL_MAX_TEXTURE_SIZE...) call to determine maximum texture for a specific OpenGL implementation).

The quality of the texturing is affected by the textureQuality field of the SoComplexity node. The textureQuality field affects what kind of filtering is done to the texture when it must be minified or magnified. The mapping of a particular texture quality value to a particular OpenGL filtering technique is implementation dependent, and varies based on the texturing performance. If mipmap filtering is required, mipmaps are automatically created using the simple box filter.

FIELDS

SoSFString	filename

Names file from which to read texture image. The following file formats are supported: SGI RGB, GIF, JPEG, PNG, and (Windows only) BMP. If the filename is not an absolute path name, the list of directories maintained by SoInput is searched. If the texture is not found in any of those directories, then the file is searched for relative to the directory from which the SoTexture2 node was read. For example, if an SoTexture2 node with a filename of "../tofu.rgb" is read from /usr/people/bob/models/food.iv, then /usr/people/bob/tofu.rgb will be read (assuming tofu.rgb isn't found in the directories maintained by SoInput).

SoSFImage	image

Contains an in-memory representation of the texture map. It is either the contents of the file read from filename, an image read directly from an Open Inventor file, or an image set programmatically using the methods provided by SoSFImage.

SoSFEnum	wrapS

SoSFEnum	wrapT

Indicates what to do when texture coordinates in the S (horizontal) or T (vertical) direction lie outside the range 0-1.

SoSFEnum	model

Specifies how to map texture onto surface.

SoSFColor	blendColor

Color used for BLEND model.

METHODS

SoTexture2()

Creates a texture node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets current texture in state.

FILE FORMAT/DEFAULT

Texture2 {

filename	""

image	0 0 0

wrapS	REPEAT

wrapT	REPEAT

model	MODULATE

blendColor	0 0 0

}

SEE ALSO

SoComplexity, SoMaterial, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction


SoTexture2Transform

NAME

SoTexture2Transform - 2D texture transformation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTexture2Transform

SYNOPSIS

#include <Inventor/nodes/SoTexture2Transform.h>

Fields from class SoTexture2Transform:

SoSFVec2f	translation

SoSFFloat	rotation

SoSFVec2f	scaleFactor

SoSFVec2f	center

Methods from class SoTexture2Transform:

SoTexture2Transform()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a 2D transformation applied to texture coordinates. This affects the way textures are applied to the surfaces of subsequent shapes. The transformation consists of (in order) a non-uniform scale about an arbitrary center point, a rotation about that same point, and a translation. (Note: while the transformations can be thought of as being applied in that order, the GL matrices are actually premultiplied in the opposite order. Therefore, the operations are listed in the reverse order throughout this reference page.) This allows a user to change the size and position of the textures on objects.

FIELDS

SoSFVec2f	translation

Translation in S and T.

SoSFFloat	rotation

Counter-clockwise rotation of the coordinate space, in radians. This results in a clockwise rotation of the texture on the object.

SoSFVec2f	scaleFactor

Scaling factors in S and T.

SoSFVec2f	center

Center point used for scaling and rotation.

METHODS

SoTexture2Transform()

Creates a texture transformation node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Concatenates transformation with the current texture transformation.

FILE FORMAT/DEFAULT

Texture2Transform {

translation	0 0

rotation	0

scaleFactor	1 1

center	0 0

}

SEE ALSO

SoTexture2, SoTextureCoordinate2, SoTextureCoordinateFunction


SoTexture3

NAME

SoTexture3 - 3D texture mapping node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTexture3

SYNOPSIS

#include <Inventor/nodes/SoTexture3.h>

enum Model	{
SoTexture3::MODULATE
The texture color is multiplied by the surface color
SoTexture3::DECAL
The texture color replaces the surface color
SoTexture3::BLEND
Blends between the surface color and a specified blend color
}

enum Wrap	{
SoTexture3::REPEAT
Repeats texture outside 0-1 texture coordinate range
SoTexture3::CLAMP
Clamps texture coordinates to lie within 0-1 range
}

Fields from class SoTexture3:

SoMFString	filenames

SoSFImage3	image

SoSFEnum	wrapR

SoSFEnum	wrapS

SoSFEnum	wrapT

SoSFEnum	model

SoSFColor	blendColor

Methods from class SoTexture3:

SoTexture3()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This property node defines a 3D texture map and parameters for that map. This map is used to apply a 3D texture to subsequent shapes as they are rendered.

The texture can be read from the file(s) specified by the filenames field. Once the texture has been read, the image field contains the texture data. However, this field is marked so the image is not written out when the texture node is written to a file. To turn off texturing, set the first value of the filenames field to an empty string ("").

Textures can also be specified in memory by setting the image field to contain the texture data. Doing so resets the filenames field to the empty string.

Simply put, a 3D texture is a set of well-arranged 2D textures. Typically, 3D textures represent a set of image-slices of a given volume of data, and are used for mapping onto pieces of geometry. Note that this is different from direct volume rendering in that 3D textures need to be mapped onto a piece of geometry.

OpenGL requires all images in a 3D texture to have the same dimensions, and each dimension needs to be a power of 2. Also, images must have the same number of components (grayscale, grayscale with transparency, RGB, or RGB with transparency).

•	Images that do not have the same number of components as the first image are recomputed to have the same number of components. At best, there is no loss of quality. At worst, the recomputed images may lose colors and/or transparency.

•	If the 2D texture image's width or height is not a power of 2, or the image's width or height is greater than the maximum supported by OpenGL, then the image will be automatically scaled up or down to the next power of 2 or the maximum texture size. For maximum speed, point-sampling is used to do the scale; if you want more accurate resampling, pre-filter images to a power of 2 smaller than the maximum texture size (use the OpenGL glGetIntegerv(GL_MAX_TEXTURE_SIZE...) call to determine maximum texture for a specific OpenGL implementation).

•	Images that have a different size from the first image are rescaled to match the size of the first image (which itself may have been scaled to satisfy the size requirements of OpenGL as described in the preceding paragraph).

•	If the number of images is not a power of 2 (the depth of the 3D texture), an error is issued and the nearest power of 2 is chosen. If it is lower, some images are discarded, if it is higher, new images are created and filled with zeros.

The quality of the texturing is affected by the textureQuality field of the SoComplexity node. The textureQuality field affects what kind of filtering is done to the texture when it must be minified or magnified. The mapping of a particular texture quality value to a particular OpenGL filtering technique is implementation dependent, and varies based on the texturing performance. If mipmap filtering is required, mipmaps are automatically created using the simple box filter.

FIELDS

SoMFString	filenames

Names of file(s) from which to read texture image. The following file formats are supported: SGI RGB, GIF, JPEG, PNG, and (Windows only) BMP. If the filename is not an absolute path name, the list of directories maintained by SoInput is searched. If the texture is not found in any of those directories, then the file is searched for relative to the directory from which the SoTexture3 node was read. For example, if an SoTexture3 node with a filename of "../tofu.rgb" is read from /usr/people/bob/models/food.iv, then /usr/people/bob/tofu.rgb will be read (assuming tofu.rgb isn't found in the directories maintained by SoInput).

All images must have the same dimensions and number of components. Depth (number of slices) is determined by the number of file names.

SoSFImage3	image

Contains an in-memory representation of the texture map. It is either the contents of the file(s) read from filenames, an image read directly from an Open Inventor file, or an image set programmatically using the methods provided by SoSFImage3.

SoSFEnum	wrapR

SoSFEnum	wrapS

SoSFEnum	wrapT

Indicates what to do when texture coordinates in the R (depth), S (horizontal), or T (vertical) direction lie outside the range 0-1.

SoSFEnum	model

Specifies how to map texture onto surface.

SoSFColor	blendColor

Color used for BLEND model.

METHODS

SoTexture3()

Creates a texture node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets current texture in state.

FILE FORMAT/DEFAULT

Texture3 {

filename	""

image	0 0 0 0

wrapR	REPEAT

wrapS	REPEAT

wrapT	REPEAT

model	MODULATE

blendColor	0 0 0

}

SEE ALSO

SoComplexity, SoMaterial, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateFunction


SoTexture3Transform

NAME

SoTexture3Transform - 3D texture transformation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTexture3Transform

SYNOPSIS

#include <Inventor/nodes/SoTexture3Transform.h>

Fields from class SoTexture3Transform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFVec3f	center

Methods from class SoTexture3Transform:

SoTexture3Transform()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a 3D transformation applied to texture coordinates. This affects the way textures are applied to the surfaces of subsequent shapes. The transformation consists of (in order) a non-uniform scale about an arbitrary center point, a rotation about that same point, and a translation. (Note: while the transformations can be thought of as being applied in that order, the GL matrices are actually premultiplied in the opposite order. Therefore, the operations are listed in the reverse order throughout this reference page.) This allows a user to change the size and position of the textures on objects.

FIELDS

SoSFVec3f	translation

Translation in S, T, and R.

SoSFFloat	rotation

Counter-clockwise rotation of the coordinate space, in radians. This results in a clockwise rotation of the texture on the object.

SoSFVec3f	scaleFactor

Scaling factors in S, T, and R.

SoSFVec3f	center

Center point used for scaling and rotation.

METHODS

SoTexture3Transform()

Creates a texture transformation node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Concatenates transformation with the current texture transformation.

FILE FORMAT/DEFAULT

Texture3Transform {

translation	0 0 0

rotation	0

scaleFactor	1 1 1

center	0 0 0

}

SEE ALSO

SoTexture3, SoTextureCoordinate3, SoTextureCoordinateFunction


SoTextureCoordinate2

NAME

SoTextureCoordinate2 - 2D texture coordinate node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTextureCoordinate2

SYNOPSIS

#include <Inventor/nodes/SoTextureCoordinate2.h>

Fields from class SoTextureCoordinate2:

SoMFVec2f	point

Methods from class SoTextureCoordinate2:

SoTextureCoordinate2()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of 2D coordinates to be used to map textures to subsequent vertex-based shapes (those derived from SoVertexShape). It replaces the current texture coordinates in the rendering state for the shapes to use.

The current texture coordinate binding (see SoTextureCoordinateBinding) determines how texture coordinates are mapped to vertices of shapes. An alternative to using explicit texture coordinates is to generate them using a function; see SoTextureCoordinateFunction.

Texture coordinates range from 0 to 1 across the texture. The horizontal coordinate, called S, is specified first, followed by the vertical coordinate, T.

FIELDS

SoMFVec2f	point

Texture coordinate points.

METHODS

SoTextureCoordinate2()

Creates a texture coordinate node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current texture coordinates in the state.

FILE FORMAT/DEFAULT

TextureCoordinate2 {

point	[  ]

}

SEE ALSO

SoTexture2, SoTextureCoordinateBinding, SoTextureCoordinateFunction, SoVertexShape


SoTextureCoordinate3

NAME

SoTextureCoordinate3 - 3D texture coordinate node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTextureCoordinate3

SYNOPSIS

#include <Inventor/nodes/SoTextureCoordinate3.h>

Fields from class SoTextureCoordinate3:

SoMFVec3f	point

Methods from class SoTextureCoordinate3:

SoTextureCoordinate3()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of 3D coordinates to be used to map textures to subsequent vertex-based shapes (those derived from SoVertexShape). It replaces the current texture coordinates in the rendering state for the shapes to use.

The current texture coordinate binding (see SoTextureCoordinateBinding) determines how texture coordinates are mapped to vertices of shapes. An alternative to using explicit texture coordinates is to generate them using a function; see SoTextureCoordinateFunction.

Texture coordinates range from 0 to 1 across the texture. The horizontal coordinate, called S, is specified first, then the vertical coordinate, T, and finally the depth coordinate, R.

FIELDS

SoMFVec3f	point

Texture coordinate points.

METHODS

SoTextureCoordinate3()

Creates a texture coordinate node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current texture coordinates in the state.

FILE FORMAT/DEFAULT

TextureCoordinate3 {

point	[  ]

}

SEE ALSO

SoTexture3, SoTextureCoordinateBinding, SoTextureCoordinateFunction, SoVertexShape


SoTextureCoordinateBinding

NAME

SoTextureCoordinateBinding - node that specifies how texture coordinates are bound to shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTextureCoordinateBinding

SYNOPSIS

#include <Inventor/nodes/SoTextureCoordinateBinding.h>

enum Binding	{
SoTextureCoordinateBinding::PER_VERTEX
Current texture coordinates are applied sequentially to vertices of shape
SoTextureCoordinateBinding::PER_VERTEX_INDEXED
Current texture coordinates are indexed per vertex
}

Fields from class SoTextureCoordinateBinding:

SoSFEnum	value

Methods from class SoTextureCoordinateBinding:

SoTextureCoordinateBinding()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies how the current texture coordinates are bound to vertex-based shapes that follow in the scene graph. The DEFAULT binding causes each shape to define its own default coordinates. These default coordinates typically cause a texture to be mapped across the whole surface of a shape.

FIELDS

SoSFEnum	value

Specifies how to bind texture coordinates to shapes.

METHODS

SoTextureCoordinateBinding()

Creates a texture coordinate binding node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Sets the current texture coordinate binding type.

FILE FORMAT/DEFAULT

TextureCoordinateBinding {

value	PER_VERTEX_INDEXED

}

SEE ALSO

SoMaterialBinding, SoNormalBinding, SoTexture2, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateFunction, SoVertexShape


SoTextureCoordinateDefault

NAME

SoTextureCoordinateDefault - node that removes texture coordinates from state

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTextureCoordinateFunction > SoTextureCoordinateDefault

SYNOPSIS

#include <Inventor/nodes/SoTextureCoordinateDefault.h>

Methods from class SoTextureCoordinateDefault:

SoTextureCoordinateDefault()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node changes the current traversal state to indicate that there are no currently defined texture coordinates or texture coordinate function. This forces subsequent shapes to use their own default texture coordinates. The net result is that this node turns off any previous texture coordinate specification.

METHODS

SoTextureCoordinateDefault()

Creates a node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Removes any texture coordinates or function.

FILE FORMAT/DEFAULT

TextureCoordinateDefault {

}

SEE ALSO

SoTexture2, SoTexture2Transform, SoTextureCoordinateEnvironment, SoTextureCoordinatePlane


SoTextureCoordinateEnvironment

NAME

SoTextureCoordinateEnvironment - node that specifies texture coordinates by projection from a environment

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTextureCoordinateFunction > SoTextureCoordinateEnvironment

SYNOPSIS

#include <Inventor/nodes/SoTextureCoordinateEnvironment.h>

Methods from class SoTextureCoordinateEnvironment:

SoTextureCoordinateEnvironment()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node creates texture coordinates by projecting points on an object's surface to the interior of a surrounding sphere, along the reflection across the surface normal of the vector from the camera point to the surface. If the current texture image represents a spherical reflection map of the current surrounding environment, subsequent shapes will appear to reflect that environment.

METHODS

SoTextureCoordinateEnvironment()

Creates a texture function node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Sets the current texture function in the state.

FILE FORMAT/DEFAULT

TextureCoordinateEnvironment {

}

SEE ALSO

SoTexture2, SoTexture2Transform, SoTextureCoordinateDefault, SoTextureCoordinatePlane


SoTextureCoordinateFunction

NAME

SoTextureCoordinateFunction - abstract base class for texture coordinate function nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTextureCoordinateFunction

SYNOPSIS

#include <Inventor/nodes/SoTextureCoordinateFunction.h>

Methods from class SoTextureCoordinateFunction:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This is an abstract base class for texture coordinate functions. The subclasses of this node enable texture coordinates to be created by mapping object-space points on the surfaces of shapes into texture space, according to some function.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

TextureCoordinateFunction {

}

SEE ALSO

SoTexture2, SoTexture2Transform SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinatePlane


SoTextureCoordinatePlane

NAME

SoTextureCoordinatePlane - node that specifies texture coordinates by projection from a plane

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTextureCoordinateFunction > SoTextureCoordinatePlane

SYNOPSIS

#include <Inventor/nodes/SoTextureCoordinatePlane.h>

Fields from class SoTextureCoordinatePlane:

SoSFVec3f	directionS

SoSFVec3f	directionT

Methods from class SoTextureCoordinatePlane:

SoTextureCoordinatePlane()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node creates texture coordinates for points on an object's surface by projecting them onto a plane. The directionS and directionT fields define the plane. The S coordinate is computed as the distance from the object-space origin along the vector specified in the directionS field. The T coordinate is computed similarly, using the directionT field.

The length of the direction vector is also taken into account. For example, assume directionS is (0.5, 0, 0) and directionT is (0, 1, 0). The square defined by the (x, y, z) vertices:

(-1, -1, 0) (1, -1, 0) (1, 1, 0) (-1, 1, 0)

will be assigned the (s, t) texture coordinates:

(-2, -1) (2, -1) (2, 1) (-2, 1)

FIELDS

SoSFVec3f	directionS

SoSFVec3f	directionT

Directions of projection for S and T coordinates.

METHODS

SoTextureCoordinatePlane()

Creates a texture function node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Sets the current texture function in the state.

FILE FORMAT/DEFAULT

TextureCoordinatePlane {

directionS	1 0 0

directionT	0 1 0

}

SEE ALSO

SoTexture2, SoTexture2Transform, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment


SoTimeCounter

NAME

SoTimeCounter - timed integer counter

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoTimeCounter

SYNOPSIS

#include <Inventor/engines/SoTimeCounter.h>

Inputs from class SoTimeCounter:

SoSFTime	timeIn

SoSFShort	min

SoSFShort	max

SoSFShort	step

SoSFBool	on

SoSFFloat	frequency

SoMFFloat	duty

SoSFShort	reset

SoSFTrigger	syncIn

Outputs from class SoTimeCounter:

(SoSFShort)	output

(SoSFTrigger)	syncOut

Methods from class SoTimeCounter:

SoTimeCounter()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine is a counter that outputs numbers, starting at a minimum value, increasing by a step value, and ending with a number that does not exceed the maximum value. When the maximum number is reached, it starts counting from the beginning again.

The difference between this engine and the SoCounter engine, is that this engine also has a timeIn input, which allows the counting cycles to be timed. This engine counts automatically over time; it does not need to be triggered to go to the next step. By default, the timeIn input is connected to the realTime global field. It can, however, be connected to any time source.

The frequency input field controls how many min-to-max cycles are performed per second. For example, a frequency value of 0.5 means that it will take 2 seconds to complete a single min-to-max cycle.

The steps in the count cycle do not necessarily all have the same duration. Using the duty input field, you can arbitrarily split the time period of the count cycle between the steps. For example, if there are 5 steps in the cycle, a duty input of (1., 2., 2., 2., 1.) will make the second, third, and fourth steps take twice as long as the first and last steps.

At any time the counter can be reset to a specific value. If you set the reset input field to a value, the engine will continue counting from there. Note that the counter will always output numbers based on the min, max and step values, and setting the reset value does not affect the those input fields. If the reset value is not a legal counter value, the counter will still behave as though it is:

•	If reset is greater than max, the counter is set to max.

•	If reset is less than min, the counter is set to min.

•	If reset is between step values, the counter is set to the lower step.

Each time a counting cycle is started, the syncOut output is triggered. This output can be used to synchronize some other event with the counting cycle. Other events can also synchronize the counter by triggering the syncIn input.

You can pause the engine, by setting the on input to FALSE, and it will stop updating the output field. When you turn off the pause, by setting on to TRUE, it will start counting again from where it left off.

INPUTS

SoSFTime	timeIn

Running time.

SoSFShort	min

Minimum value for the counter.

SoSFShort	max

Maximum value for the counter.

SoSFShort	step

Counter step value.

SoSFBool	on

Counter pauses if this is set to FALSE.

SoSFFloat	frequency

Number of min-to-max cycles per second.

SoMFFloat	duty

Duty cycle values.

SoSFShort	reset

Reset the counter to the specified value.

SoSFTrigger	syncIn

Restart at the beginning of the cycle.

OUTPUTS

(SoSFShort)	output

Counts min-to-max, in step increments.

(SoSFTrigger)	syncOut

Triggers at cycle start.

METHODS

SoTimeCounter()

Constructor

FILE FORMAT/DEFAULT

TimeCounter {

min	0

max	1

step	1

on	TRUE

frequency	1

duty	1

timeIn	<current time>

syncIn

reset	0

}

SEE ALSO

SoCounter, SoElapsedTime, SoEngineOutput


SoTimerQueueSensor

NAME

SoTimerQueueSensor - abstract base class for sensors dependent on time

INHERITS FROM

SoSensor > SoTimerQueueSensor

SYNOPSIS

#include <Inventor/sensors/SoTimerQueueSensor.h>

Methods from class SoTimerQueueSensor:

const SbTime &	getTriggerTime()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Timer queue sensors are sensors that trigger themselves at specific times. The timer queue is normally processed as part of a program's main loop when the program is not busy doing something else. Note that processing the timer queue is not asynchronous - the program must re-enter its main loop for timers to be triggered. When the timer queue is processed, all timers scheduled to go off at or before the current time are triggered once, in order from earliest to latest.

METHODS

const SbTime &	getTriggerTime()

Returns the time at which this sensor is scheduled to be triggered. If the sensor is not scheduled the results are undefined.

virtual void	schedule()

Adds this sensor to the timer queue. Subclasses provide methods for setting when the sensor will be triggered.

virtual void	unschedule()

If this sensor is scheduled, removes it from the timer queue so that it will not be triggered.

virtual SbBool	isScheduled()

Returns TRUE if this sensor has been scheduled and is waiting in the timer queue to be triggered.

SEE ALSO

SoTimerSensor, SoAlarmSensor, SoIdleSensor, SoOneShotSensor, SoDataSensor


SoTimerSensor

NAME

SoTimerSensor - sensor that triggers callback repeatedly at regular intervals

INHERITS FROM

SoSensor > SoTimerQueueSensor > SoTimerSensor

SYNOPSIS

#include <Inventor/sensors/SoTimerSensor.h>

Methods from class SoTimerSensor:

SoTimerSensor()

SoTimerSensor(SoSensorCB *func,
void *data)

~SoTimerSensor()

void	setBaseTime(const SbTime &base)

const SbTime &	getBaseTime() const

void	setInterval(const SbTime &interval)

const SbTime &	getInterval() const

Methods from class SoTimerQueueSensor:

const SbTime &	getTriggerTime()

virtual void	schedule()

virtual void	unschedule()

virtual SbBool	isScheduled()

Methods from class SoSensor:

void	setFunction(SoSensorCB *callbackFunction)

SoSensorCB *	getFunction() const

void	setData(void *callbackData)

void *	getData() const

DESCRIPTION

Timer sensors trigger their callback function at regular intervals. For example, a timer might be set up to call its callback function every second on the second by setting the base time to SbTime(0.0) and the interval to SbTime(1.0). Timers are guaranteed to be triggered only once when the timer queue is processed, so if the application only processes the timer queue once every 5 seconds (because it is busy doing something else) the once-a-second sensor's callback will be called only once every 5 seconds.

Note also that SoTimers always schedule themselves to be triggered the next even multiple of the interval time after the base time; so, for example, if the once-a-second sensor is triggered at time 2.9 (because the application way busy doing something at time 2.0 and didn't get around to processing the sensor queue for a while) it will reschedule itself to go off at time 3.0, not at time 3.9. If the base time was never set, the sensor would be scheduled for time 3.9.

METHODS

SoTimerSensor()

SoTimerSensor(SoSensorCB *func,
void *data)

Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

~SoTimerSensor()

Destroys the sensor, freeing up any memory associated with it after unscheduling it.

void	setBaseTime(const SbTime &base)

const SbTime &	getBaseTime() const

void	setInterval(const SbTime &interval)

const SbTime &	getInterval() const

Sets/gets the base time and the interval. The default base time is the time when the sensor is scheduled or rescheduled, and the default interval is 1/30th of a second.

SEE ALSO

SoOneShotSensor, SoAlarmSensor, SoTimerQueueSensor, SbTime


SoToHTMLAction

NAME

SoToHTMLAction - generates an HTML image map and an image from a scene graph

INHERITS FROM

SoAction > SoToHTMLAction

SYNOPSIS

#include <Inventor/actions/SoToHTMLAction.h>

enum ShapeType	{
SoToHTMLAction::NONE,
SoToHTMLAction::RECTANGLE,
SoToHTMLAction::CIRCLE,
SoToHTMLAction::POLYGON
(Default)
}

enum Components	{
SoToHTMLAction::LUMINANCE,
SoToHTMLAction::LUMINANCE_TRANSPARENCY,
SoToHTMLAction::RGB,
(Default)
SoToHTMLAction::RGB_TRANSPARENCY
}

enum ImageFormat	{
SoToHTMLAction::BMP_FORMAT
(Win32 only)
SoToHTMLAction::JPEG_FORMAT
}

Methods from class SoToHTMLAction:

SoToHTMLAction()

virtual	~ SoToHTMLAction()

SbBool	openHTMLFile(const char *filename)

void	closeHTMLFile()

void	setHTMLFilePointer(FILE *newFP)

FILE*	getHTMLFilePointer() const

void	setImageURLName(const char *name)

const char *	getImageURLName() const

void	setImageFilePointer(FILE *newFP)

FILE*	getImageFilePointer() const

void	setRegionShapeType(ShapeType type)

ShapeType	getRegionShapeType() const

void	setImageBackgroundColor(const SbColor &c)

const SbColor&	getImageBackgroundColor() const

void	setImageComponents(Components components)

Components	getImageComponents() const

void	setImageFormat(ImageFormat format)

ImageFormat	getImageFormat() const

void	setImageQuality(float quality)

float	getImageQuality() const

void	setViewportRegion(const SbViewportRegion &region)

const SbViewportRegion&
getViewportRegion() const

void	setMapHighlight(SbBool onOff)

SbBool	isMapHighlight()

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action generates an image file and an HTML file containing the image (<IMAGE>) and image map (<MAP>) tags. Each region of the image map will have a URL associated with it.

With HTML, image maps allow to specify regions of an image and assign a specific action to each region (a link can be associated to each map). When the region is activated by the user, the action is executed.

Each region of the image is determined by a subgraph which is under an SoWWWAnchor or SoVRMLAnchor group node.

The HTML file generated contains, in the following order:

1 - An image map tag that defines the regions (maps) corresponding to each subgraph that is under an SoWWWAnchor or SoVRMLAnchor group node.

For each region, the associated link is the URL defined either by the SoWWWAnchor or SoVRMLAnchor node.

2 - An image tag that references the image generated by SoToHTMLAction.

METHODS

SoToHTMLAction()

virtual	~ SoToHTMLAction()

Constructor and destructor.

SbBool	openHTMLFile(const char *filename)

void	closeHTMLFile()

void	setHTMLFilePointer(FILE *newFP)

FILE*	getHTMLFilePointer() const

Specify the HTML output. By default, output goes to stdout.

void	setImageURLName(const char *name)

const char *	getImageURLName() const

Sets/queries the URL name of image in the the HTML file, ("image.jpg" by default). This is the first way to specify the image file name.

void	setImageFilePointer(FILE *newFP)

FILE*	getImageFilePointer() const

Sets/queries the file pointer to generate the image file. If newFP is NULL then the filename is the basename of the image URL name.

This is the second way to define the image file name.

void	setRegionShapeType(ShapeType type)

ShapeType	getRegionShapeType() const

Sets/returns the region shape type. POLYGON by default.

void	setImageBackgroundColor(const SbColor &c)

const SbColor&	getImageBackgroundColor() const

Sets/returns the image background color. SbColor(0,0,0) by default.

void	setImageComponents(Components components)

Components	getImageComponents() const

Sets/returns the components of image. RGB by default.

void	setImageFormat(ImageFormat format)

ImageFormat	getImageFormat() const

Sets/returns the image format. JPEG_FORMAT by default.

void	setImageQuality(float quality)

float	getImageQuality() const

Sets/returns the image quality. Used for JPEG image. Quality is a value from 0. to 1., with 0 being the worst quality (maximum compression) and 1 being the best quality (minimum compression). The default is 1.

void	setViewportRegion(const SbViewportRegion &region)

const SbViewportRegion&
getViewportRegion() const

Specifies viewport region for the image. Allows the user to specify the image size.

void	setMapHighlight(SbBool onOff)

SbBool	isMapHighlight()

Sets/returns anchor highlighting. TRUE by default.

SEE ALSO

SoAction


SoToVRML2Action

NAME

SoToVRML2Action - converts an Open Inventor scene graph into a VRML 2.0-style scene graph

INHERITS FROM

SoAction > SoToVRMLAction > SoToVRML2Action

SYNOPSIS

#include <Inventor/actions/SoToVRML2Action.h>

Methods from class SoToVRML2Action:

SoToVRML2Action()

~SoToVRML2Action()

SoVRMLGroup *	getVRML2SceneGraph() const

void	reuseAppearanceNodes(SbBool appearance)

SbBool 	doReuseAppearanceNodes() const

void	reusePropertyNodes(SbBool property)

SbBool 	doReusePropertyNodes() const

void	reuseGeometryNodes(SbBool geometry)

SbBool 	doReuseGeometryNodes() const

Methods from class SoToVRMLAction:

SoNode *	getVRMLSceneGraph() const

void	expandSoFile(SbBool e)

SbBool	areSoFileExpanded()

const void	setUrlName(const SbString name)

const	SbString getUrlName() const

void	writeTexCoords(SbBool w)

SbBool	areTexCoordWritten() const

void	expandTexture2Node(SbBool e)

SbBool	areTexture2NodeExpanded() const

void	keepUnknownNodes(SbBool k)

SbBool	areUnknownNodeKept() const

void	convertInlineNodes(SbBool inlineNode)

SbBool	doConvertInlineNodes() const

void	conditionalConversion(SbBool conditional)

SbBool	doConditionalConversion() const

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action takes an Open Inventor scene graph and builds a new VRML 2.0-style scene graph. This scene graph can then be stored as a VRML file. The effect of this action is similar to the effect of the ivtovrml tool.

There is not always an exact match between Open Inventor items and VRML 2.0 items. Some Open Inventor items, for example, 2D text (SoText2) do not exist in VRML 2.0 and will not be converted. Other items may be converted, but with subtle differences in behavior.

Texture Modeling: 3- and 4-component textures work differently in Open Inventor and VRML 2.0. In Open Inventor, by default, the texture color is multiplied by the material surface color ("modulate" mode). In VRML 2.0, a texture's RGB colors and transparency replace the material's current diffuse color and transparency (like "decal" mode). For example, if an object is red with a colored texture, in Open Inventor, the red would affect the appearance of the object. Once converted to VRML 2.0, the object would display the colors of the texture, without any influence of the red.

Texture Coordinates: Open Inventor and VRML 2.0 handle texture coordinates differently. If your scene graph uses texture coordinates for precise application of a texture to a shape, the visual results may be different after conversion to VRML 2.0.

METHODS

SoToVRML2Action()

~SoToVRML2Action()

Constructor and destructor.

SoVRMLGroup *	getVRML2SceneGraph() const

Returns result as VRML 2.0 scene graph

void	reuseAppearanceNodes(SbBool appearance)

SbBool 	doReuseAppearanceNodes() const

Sets/gets whether shared materials should be organized into shared appearance nodes in the new scene graph.

void	reusePropertyNodes(SbBool property)

SbBool 	doReusePropertyNodes() const

Sets/gets whether shared properties should be organized into shared nodes in the new scene graph.

void	reuseGeometryNodes(SbBool geometry)

SbBool 	doReuseGeometryNodes() const

Sets/gets whether shared geometry nodes should be shared in the new scene graph.

SEE ALSO

SoAction, SoToVRMLAction


SoToVRMLAction

NAME

SoToVRMLAction - converts an Open Inventor scene graph into a VRML 1.0-style scene graph

INHERITS FROM

SoAction > SoToVRMLAction

SYNOPSIS

#include <Inventor/actions/SoToVRMLAction.h>

Methods from class SoToVRMLAction:

SoToVRMLAction()

~SoToVRMLAction()

SoNode *	getVRMLSceneGraph() const

void	expandSoFile(SbBool e)

SbBool	areSoFileExpanded()

const void	setUrlName(const SbString name)

const SbString	getUrlName() const

void	writeTexCoords(SbBool w)

SbBool	areTexCoordWritten() const

void	expandTexture2Node(SbBool e)

SbBool	areTexture2NodeExpanded() const

void	keepUnknownNodes(SbBool k)

SbBool	areUnknownNodeKept() const

void	convertInlineNodes(SbBool inlineNode)

SbBool	doConvertInlineNodes() const

void	conditionalConversion(SbBool conditional)

SbBool	doConditionalConversion() const

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action takes an Open Inventor scene graph and builds a new VRML 1.0 style scene graph. This scene graph can then be stored as a VRML file. The effect of this action is similar to the ivtovrml tool.

METHODS

SoToVRMLAction()

~SoToVRMLAction()

Constructor and destructor.

SoNode *	getVRMLSceneGraph() const

Returns result as VRML style scene graph.

void	expandSoFile(SbBool e)

SbBool	areSoFileExpanded()

Sets/gets whether to read the contents of SoFile nodes into the new scene graph.

const void	setUrlName(const SbString name)

const	SbString getUrlName() const

Sets the directory in which to write VRMLInline files.

void	writeTexCoords(SbBool w)

SbBool	areTexCoordWritten() const

Sets/gets whether to put texture coordinates into the new scene graph.

void	expandTexture2Node(SbBool e)

SbBool	areTexture2NodeExpanded() const

Sets/gets whether to bring the contents of texture files into the new scene graph , or to leave them as references to files.

void	keepUnknownNodes(SbBool k)

SbBool	areUnknownNodeKept() const

Sets/gets whether to preserve nodes of unknown type.

void	convertInlineNodes(SbBool inlineNode)

SbBool	doConvertInlineNodes() const

Sets/gets whether inline nodes are converted to VRML. If TRUE, Inline nodes are converted. Default = TRUE.

void	conditionalConversion(SbBool conditional)

SbBool	doConditionalConversion() const

Sets/gets whether inline nodes are conditionally converted to VRML. If TRUE, the header of the Inline node is checked, and if already VRML, no conversion is done. Default = FALSE.

void	setVerbosity(SbBool v)

SbBool	isVerbose() const

If true, the action generates messages while processing the scene graph.

SEE ALSO

SoAction, SoToVRMl2Action


SoTrackballDragger

NAME

SoTrackballDragger - striped ball you can rotate or scale uniformly by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTrackballDragger

SYNOPSIS

#include <Inventor/draggers/SoTrackballDragger.h>

Fields from class SoTrackballDragger:

SoSFVec3f	scaleFactor

SoSFRotation	rotation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoTrackballDragger:

SoTrackballDragger()

SbBool	isAnimationEnabled()

void	setAnimationEnabled(SbBool newVal)

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoTrackballDragger is a ball wrapped in three circular stripes. The stripes are oriented like wheels that spin around the x, y, and z axes. Drag the stripes to rotate the trackball around those axes. You do not have to hit the lines; pick anywhere within the stripe's outline. To rotate the trackball freely in 3 dimensions, click the area between the stripes and then drag. An invisible but pickable sphere initiates this dragging. If the mouse is still moving when you release it, the trackball will continue to spin.

Press the <Control> key to scale the trackball uniformly instead of rotating.

Press the <Shift> key and the user axis appears; this is a draggable axis with an extra stripe around it. Moving the mouse along the surface of the sphere drags the 'pole' of the axis. Release the <Shift> key and the user axis remains; drag the new stripe for constrained rotation around the user axis. To make the user axis disappear, press <Shift> and drag the pole to where two of other stripes intersect. This aligns the user axis with a primary axis, at which point the user axis disappears.

As you drag the trackball, it updates its rotation field, or its scaleFactor field if the <Control> key is down. As with all draggers, if you change the fields the dragger moves in response.

Remember: This is not an SoTransform!. If you want to move other objects with this dragger, you can either:

[a] Use an SoTrackballManip, which is subclassed from SoTransform. The manipulator creates one of these draggers and uses it as the interface to edit the manipulator's fields. (see the SoTrackballManip reference page).

[b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation node.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoTrackballDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/trackballDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	scaleFactor

Scale of the dragger.

SoSFRotation	rotation

Orientation of the dragger.

METHODS

SoTrackballDragger()

Constructor.

SbBool	isAnimationEnabled()

void	setAnimationEnabled(SbBool newVal)

If the mouse is moving while you release it, the trackball will continue to spin afterwards. These two methods will query and set whether this feature is turned on or off. By default, the animation feature is turned on.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
surroundScale	SurroundScale	--	yes
antiSquish	AntiSquish	--	no
rotator	Separator	--	yes
rotatorActive	Separator	--	yes
XRotator	Separator	--	yes
XRotatorActive	Separator	--	yes
YRotator	Separator	--	yes
YRotatorActive	Separator	--	yes
ZRotator	Separator	--	yes
ZRotatorActive	Separator	--	yes
userAxis	Separator	--	yes
userAxisActive	Separator	--	yes
userRotator	Separator	--	yes
userRotatorActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	trackballRotator

Part:	rotator

Appearance:	Invisible but pickable sphere

Description:	Initiates unconstrained 3D rotation. Slightly smaller radius than the stripes, so you must pick between the stripes to use it.

Resource:	trackballRotatorActive

Part:	rotatorActive

Appearance:	Invisible sphere

Description:	Displayed during unconstrained 3D rotation.

Resource:	trackballXRotator

Part:	XRotator

Appearance:	White outline of a stripe aligned with the X axis.

Description:	Pick this to initiate constrained rotation about the X axis.

Resource:	trackballXRotatorActive

Part:	XRotatorActive

Appearance:	Yellow version of the regular XRotator

Description:	Displayed during constrained rotation about the X axis.

Resource:	trackballYRotator

Part:	YRotator

Appearance:	White outline of a stripe aligned with the Y axis.

Description:	Pick this to initiate constrained rotation about the Y axis.

Resource:	trackballYRotatorActive

Part:	YRotatorActive

Appearance:	Yellow version of the regular YRotator

Description:	Displayed during constrained rotation about the Y axis.

Resource:	trackballZRotator

Part:	ZRotator

Appearance:	White outline of a stripe aligned with the Z axis.

Description:	Pick this to initiate constrained rotation about the Z axis.

Resource:	trackballZRotatorActive

Part:	ZRotatorActive

Appearance:	Yellow version of the regular ZRotator

Description:	Displayed during constrained rotation about the Z axis.

Resource:	trackballUserAxis

Part:	userAxis

Appearance:	Thin purple line

Description:	Displays the user axis. Dragging the userRotator rotates about this line.

Resource:	trackballUserAxisActive

Part:	userAxisActive

Appearance:	Thin purple line

Description:	Displays the user axis. Dragging the userRotator rotates about this line.

Resource:	trackballUserRotator

Part:	userRotator

Appearance:	Transparent green stripe circling the user axis.

Description:	Pick to initiate constrained rotation about the user axis.

Resource:	trackballUserRotatorActive

Part:	userRotatorActive

Appearance:	Brighter green version of the regular userRotator

Description:	Displayed during constrained rotation about the user axis.

FILE FORMAT/DEFAULT

TrackballDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

scaleFactor	1 1 1

callbackList	NULL

surroundScale	NULL

antiSquish	AntiSquish {

sizing LONGEST_DIAGONAL }

rotator	<trackballRotator resource>

rotatorActive	<trackballRotatorActive resource>

XRotator	<trackballXRotator resource>

XRotatorActive	<trackballXRotatorActive resource>

YRotator	<trackballYRotator resource>

YRotatorActive	<trackballYRotatorActive resource>

ZRotator	<trackballZRotator resource>

ZRotatorActive	<trackballZRotatorActive resource>

userAxis	<trackballUserAxis resource>

userAxisActive	<trackballUserAxisActive resource>

userRotator	<trackballUserRotator resource>

userRotatorActive	<trackballUserRotatorActive resource>

}

NOTE

Unlike most multi-function draggers, SoTrackballDragger is not a compound dragger made up of other draggers that perform its smaller tasks. This is not because it was inappropriate, but because the trackball was written before implementation of the methods that take care of synchronizing multiple child draggers. The younger SoCenterballDragger is similar in form to the trackball, but the centerball is a compound dragger.

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoTrackballManip

NAME

SoTrackballManip - transform node with 3D interface for changing rotation and scaling

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip > SoTrackballManip

SYNOPSIS

#include <Inventor/manips/SoTrackballManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoTrackballManip:

SoTrackballManip()

static SoType	getClassTypeId()

Methods from class SoTransformManip:

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoTrackballManip is derived from SoTransform (by way of SoTransformManip). When its fields change, nodes following it in the scene graph rotate, scale, and/or translate.

As a subclass of SoTransformManip, this manipulator also has a 3D interface to edit some of its fields. In this case, the interface edits the rotation and scaleFactor fields.

A manipulator differs from a dragger. When you move a dragger, no other nodes are affected. When you move an SoTransformManip, other nodes move along with it. (See the reference page for SoTransformManip).

The interface for an SoTrackballManip is exactly the same as that of the SoTrackballDragger. To find out more about the interface, see the reference page for SoTrackballDragger. To find out how the manipulator uses a dragger to provide its interface, see the reference page for SoTransformManip.

On screen, this manipulator will surround the objects influenced by its motion. This is because it turns on the surroundScale part of the dragger (See the reference page for SoSurroundScale)

METHODS

SoTrackballManip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

TrackballManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoCenterballManip, SoHandleBoxManip, SoJackManip, SoTabBoxManip, SoTrackballDragger, SoTransformBoxManip, SoTransformerManip, SoTransform, SoTransformManip


SoTranReceiver

NAME

SoTranReceiver - interprets database changes for transcription

INHERITS FROM

SoTranReceiver

SYNOPSIS

#include <Inventor/misc/SoTranscribe.h>

Methods from class SoTranReceiver:

SoTranReceiver(SoGroup *rootNode)

~SoTranReceiver()

SbBool	interpret(SoInput *in)

DESCRIPTION

This class is used for transcribing Open Inventor data. Transcription is the process of packaging changes to a database and sending them over a "wire" to another database.

The SoTranReceiver class is used on the receiving side of transcription. It interprets changes to a Open Inventor database packaged up by an SoTranSender.

METHODS

SoTranReceiver(SoGroup *rootNode)

The constructor takes a pointer to an SoGroup instance that is the root node of the scene graph on the receiving end. All changes to the database are made relative to this root.

~SoTranReceiver()

Destructor.

SbBool	interpret(SoInput *in)

Interprets the transcription commands found in the given input stream. Returns FALSE on any error. Note: some errors (such as invalid node references) are recoverable, while others (such as syntax errors) are not.

SEE ALSO

SoInput, SoTranSender


SoTranSender

NAME

SoTranSender - sends database changes for transcription

INHERITS FROM

SoTranSender

SYNOPSIS

#include <Inventor/misc/SoTranscribe.h>

Methods from class SoTranSender:

SoTranSender(SoOutput *output)

~SoTranSender()

SoOutput *	getOutput() const

void	insert(SoNode *node)

void	insert(SoNode *node,
SoNode *parent,
int n)

void	remove(SoNode *parent,
int n)

void	replace(SoNode *parent,
int n,
SoNode *newNode)

void	modify(SoNode *node)

void	prepareToSend()

DESCRIPTION

This class is used for transcribing Open Inventor data. Transcription is the process of packaging changes to a database and sending them over a "wire" to another database.

The SoTranSender class is used on the sending side of transcription. It packages up changes to an Open Inventor database into a file or memory area defined by an SoOutput instance. It supports a limited set of changes to a database; each change is stored as a command in the transcription area. The SoTranReceiver class can be used at the other end to interpret the transcribed commands.

METHODS

SoTranSender(SoOutput *output)

The constructor takes a pointer to an SoOutput instance that determines what the transcription area is (file or memory).

~SoTranSender()

Destructor.

SoOutput *	getOutput() const

Returns pointer to current SoOutput instance.

void	insert(SoNode *node)

Adds an INSERT command to the transcription area. The given node will be added as the last child of the root node on the receiving end.

void	insert(SoNode *node,
SoNode *parent,
int n)

Adds an INSERT command to the transcription area. The given node will be added as the nth child of the given parent node on the receiving end. A NULL parent node causes the node to be added to the receiving end's root node.

void	remove(SoNode *parent,
int n)

Adds a REMOVE command to the transcription area. The nth child of the given (non-NULL) parent node on the receiving end will be removed.

void	replace(SoNode *parent,
int n,
SoNode *newNode)

Adds a REPLACE command to the transcription area. The nth child of the given (non-NULL) parent node on the receiving end will be replaced with newNode.

void	modify(SoNode *node)

Adds a MODIFY command to the transcription area. Updates the field data for the given node to the new contents. Note that this changes only field data; children of groups are not affected, nor is any non-field instance data.

void	prepareToSend()

Prepares an SoTranSender instance for transcription, making sure the transcription area is complete and all packaged to go. This must be called before the transcription can be performed.

SEE ALSO

SoOutput, SoTranReceiver


SoTransform

NAME

SoTransform - general 3D geometric transformation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform

SYNOPSIS

#include <Inventor/nodes/SoTransform.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoTransform:

SoTransform()

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a geometric 3D transformation consisting of (in order) a (possibly) non-uniform scale about an arbitrary point, a rotation about an arbitrary point and axis, and a translation. (While the transformations can be thought of as being applied in that order, matrices are actually premultiplied in the opposite order. Therefore, the operations are listed in the reverse order throughout this reference page.)

FIELDS

SoSFVec3f	translation

Translation vector.

SoSFRotation	rotation

Rotation specification.

SoSFVec3f	scaleFactor

Scale factors.

SoSFRotation	scaleOrientation

Rotational orientation for scale.

SoSFVec3f	center

Origin for scale and rotation.

METHODS

SoTransform()

Creates a transformation node with default settings.

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

Sets the node to translate the origin to the fromPoint and rotate the negative z-axis (0,0,-1) to lie on the vector from fromPoint to toPoint. This always tries to keep the "up" direction the positive y-axis, unless that is impossible. All current field values in the node are replaced.

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

These return composite matrices that transform from object space to each of the spaces after the scale, rotation, or translation.

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

These are convenience functions that combine the effects of a matrix transformation into the current transformation stored in this node. The first method premultiplies the transformation and the second postmultiplies it.

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

These are convenience functions that combine the effects of another transformation node into the current transformation stored in this node. The first method premultiplies the transformation and the second postmultiplies it.

void	setMatrix(const SbMatrix &mat)

Sets the fields in the node to implement the transformation represented by the given matrix. Note that invalid matrices (such as singular ones) have undefined results.

void	recenter(const SbVec3f &newCenter)

Changes the center of the transformation to the given point without affecting the overall effect of the transformation.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates transformation into the current transformation.

SoGetMatrixAction

Returns the matrix corresponding to the total transformation.

FILE FORMAT/DEFAULT

Transform {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoMatrixTransform, SoResetTransform, SoRotation, SoRotationXYZ, SoScale, SoTransformManip, SoTransformSeparator, SoTranslation


SoTransformBoxDragger

NAME

SoTransformBoxDragger - box-like object you scale, rotate, and translate by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTransformBoxDragger

SYNOPSIS

#include <Inventor/draggers/SoTransformBoxDragger.h>

Fields from class SoTransformBoxDragger:

SoSFRotation	rotation

SoSFVec3f	translation

SoSFVec3f	scaleFactor

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoTransformBoxDragger:

SoTransformBoxDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoTransformBoxDragger is a composite dragger shaped like a box with small cubes at the corners. Click and drag any of these cubes to scale the box uniformly. Drag any edge of the box to rotate the whole dragger about its center, along an axis parallel to that edge. Pick any face of the box for 2D translation in the plane of that face.

Although the box looks just about like a wireframe cube, it is composed of many different simple draggers arranged in a composite assembly. When one part is dragged, the transformBox makes sure they all move together. Each of the parts of the box is a different dragger with the default geometry changed. The faces of the box are SoTranslate2Draggers, the edges are SoRotateCylindricalDraggers, and the cubes are an SoScaleUniformDragger. Drag them and the dragger will update its translation, rotation and scaleFactor fields to reflect the changes. As with all draggers, if you change the fields the dragger will move to match the new settings.

Remember: This is not an SoTransform!. If you want to move other objects with this dragger, you can either:

[a] Use an SoTransformBoxManip, which is subclassed from SoTransform. It creates one of these draggers and uses it as the interface to change its fields. (see the SoTransformBoxManip reference page).

[b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation node.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoTransformBoxDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/transformBoxDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the dragger.

SoSFVec3f	translation

Position of the dragger.

SoSFVec3f	scaleFactor

Scale of the dragger.

METHODS

SoTransformBoxDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
surroundScale	SurroundScale	--	yes
antiSquish	AntiSquish	--	no
scaler	ScaleUniformDragger	--	yes
rotator1	RotateCylindricalDragger	--	yes
rotator2	RotateCylindricalDragger	--	yes
rotator3	RotateCylindricalDragger	--	yes
translator1	Translate2Dragger	--	yes
translator2	Translate2Dragger	--	yes
translator3	Translate2Dragger	--	yes
translator4	Translate2Dragger	--	yes
translator5	Translate2Dragger	--	yes
translator6	Translate2Dragger	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	transformBoxScalerScaler

Part:	scaler.scaler

Appearance:	Eight small white cubes at the corners of the box

Description:	Picking this initiates uniform 3D scaling of the dragger.

Resource:	transformBoxScalerScalerActive

Part:	scaler.scalerActive

Appearance:	Yellow version of the regular scaler part

Description:	Displayed while the dragger is being scaled.

Resource:	transformBoxScalerFeedback

Part:	scaler.feedback

Appearance:	Empty separator

Description:	Removes any feedback geometry created in the constructor of the SoScaleUniformDragger.

Resource:	transformBoxScalerFeedbackActive

Part:	scaler.feedbackActive

Appearance:	Empty separator

Description:	Removes any feedbackActive geometry created in the constructor of the SoScaleUniformDragger.

Resource:	transformBoxRotatorRotator

Parts:	rotator1.rotator

rotator2.rotator

rotator3.rotator

Appearance:	Four white lines along the edges of the box

Description:	Picking this begins rotational dragging. In each of the three rotateCylindrical draggers, the lines of the rotator part are oriented parallel to the axis of rotation.

Resource:	transformBoxRotatorRotatorActive

Parts:	rotator1.rotatorActive

rotator2.rotatorActive

rotator3.rotatorActive

Appearance:	Four yellow lines along the edges of the box

Description:	Displayed while the dragger is being rotated

Resource:	transformBoxRotatorFeedback

Parts:	rotator1.feedback

rotator2.feedback

rotator3.feedback

Appearance:	Empty separator

Description:	Removes any feedback geometry created in the constructor of the SoRotateCylindricalDragger.

Resource:	transformBoxRotatorFeedbackActive

Parts:	rotator1.feedbackActive

rotator2.feedbackActive

rotator3.feedbackActive

Appearance:	Thin purple line through center of box

Description:	Displayed to show axis of rotation during rotational dragging.

Resource:	transformBoxTranslatorTranslator

Parts:	translator1.translator

translator2.translator

translator3.translator

translator4.translator

translator5.translator

translator6.translator

Appearance:	Invisible but pickable square surface

Description:	Picking these begins 2-D translational dragging within the plane of one of the sides of the box. The invisible squares of the six translate2Draggers are arranged to form the sides of the box.The squares are easy to discern, although rendered as invisible; they are bounded by the lines of the rotational dragger parts.

Resource:	transformBoxTranslatorTranslatorActive

Parts:	translator1.translatorActive

translator2.translatorActive

translator3.translatorActive

translator4.translatorActive

translator5.translatorActive

translator6.translatorActive

Appearance:	Invisible square surface

Description:	Shown during 2-D translational dragging.

Resource:	transformBoxTranslatorXAxisFeedback

Parts:	translator1.xAxisFeedback

translator2.xAxisFeedback

translator3.xAxisFeedback

translator4.xAxisFeedback

translator5.xAxisFeedback

translator6.xAxisFeedback

Appearance:	Short thin purple line

Description:	Only shown if dragger is moving and the axis is a permissable direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the X direction.

Resource:	transformBoxTranslatorYAxisFeedback

Parts:	translator1.yAxisFeedback

translator2.yAxisFeedback

translator3.yAxisFeedback

translator4.yAxisFeedback

translator5.yAxisFeedback

translator6.yAxisFeedback

Appearance:	Short thin purple line

Description:	Only shown if dragger is moving and the axis is a permissable direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the Y direction.

FILE FORMAT/DEFAULT

TransformBoxDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

rotation	0 0 1  0

translation	0 0 0

scaleFactor	1 1 1

callbackList	NULL

surroundScale	NULL

antiSquish	AntiSquish {

sizing BIGGEST_DIMENSION }

scaler	ScaleUniformDragger {

}

rotator1	RotateCylindricalDragger {

}

rotator2	RotateCylindricalDragger {

}

rotator3	RotateCylindricalDragger {

}

translator1	Translate2Dragger {

}

translator2	Translate2Dragger {

}

translator3	Translate2Dragger {

}

translator4	Translate2Dragger {

}

translator5	Translate2Dragger {

}

translator6	Translate2Dragger {

}

scaler.scaler	<transformBoxScalerScaler resource>

scaler.scalerActive	<transformBoxScalerScalerActive resource>

scaler.feedback	<transformBoxScalerFeedback resource>

scaler.feedbackActive	<transformBoxScalerFeedbackActive resource>

rotator1.rotator	<transformBoxRotatorRotator resource>

rotator2.rotator	<transformBoxRotatorRotator resource>

rotator3.rotator	<transformBoxRotatorRotator resource>

rotator1.rotatorActive	<transformBoxRotatorRotatorActive resource>

rotator2.rotatorActive	<transformBoxRotatorRotatorActive resource>

rotator3.rotatorActive	<transformBoxRotatorRotatorActive resource>

rotator1.feedback	<transformBoxRotatorFeedback resource>

rotator2.feedback	<transformBoxRotatorFeedback resource>

rotator3.feedback	<transformBoxRotatorFeedback resource>

rotator1.feedbackActive	<transformBoxRotatorFeedbackActive resource>

rotator2.feedbackActive	<transformBoxRotatorFeedbackActive resource>

rotator3.feedbackActive	<transformBoxRotatorFeedbackActive resource>

translator1.translator	<transformBoxTranslatorTranslator resource>

translator2.translator	<transformBoxTranslatorTranslator resource>

translator3.translator	<transformBoxTranslatorTranslator resource>

translator4.translator	<transformBoxTranslatorTranslator resource>

translator5.translator	<transformBoxTranslatorTranslator resource>

translator6.translator	<transformBoxTranslatorTranslator resource>

translator1.translatorActive	<transformBoxTranslatorTranslatorActive resource>

translator2.translatorActive	<transformBoxTranslatorTranslatorActive resource>

translator3.translatorActive	<transformBoxTranslatorTranslatorActive resource>

translator4.translatorActive	<transformBoxTranslatorTranslatorActive resource>

translator5.translatorActive	<transformBoxTranslatorTranslatorActive resource>

translator6.translatorActive	<transformBoxTranslatorTranslatorActive resource>

translator1.xAxisFeedback	<transformBoxTranslatorXAxisFeedback resource>

translator2.xAxisFeedback	<transformBoxTranslatorXAxisFeedback resource>

translator3.xAxisFeedback	<transformBoxTranslatorXAxisFeedback resource>

translator4.xAxisFeedback	<transformBoxTranslatorXAxisFeedback resource>

translator5.xAxisFeedback	<transformBoxTranslatorXAxisFeedback resource>

translator6.xAxisFeedback	<transformBoxTranslatorXAxisFeedback resource>

translator1.yAxisFeedback	<transformBoxTranslatorYAxisFeedback resource>

translator2.yAxisFeedback	<transformBoxTranslatorYAxisFeedback resource>

translator3.yAxisFeedback	<transformBoxTranslatorYAxisFeedback resource>

translator4.yAxisFeedback	<transformBoxTranslatorYAxisFeedback resource>

translator5.yAxisFeedback	<transformBoxTranslatorYAxisFeedback resource>

translator6.yAxisFeedback	<transformBoxTranslatorYAxisFeedback resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoTransformBoxManip

NAME

SoTransformBoxManip - transform node with 3D interface for changing scaling, rotation, and translation

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip > SoTransformBoxManip

SYNOPSIS

#include <Inventor/manips/SoTransformBoxManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoTransformBoxManip:

SoTransformBoxManip()

static SoType	getClassTypeId()

Methods from class SoTransformManip:

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoTransformBoxManip is derived from SoTransform (by way of SoTransformManip). When its fields change, nodes following it in the scene graph rotate, scale, and/or translate.

As a subclass of SoTransformManip, this manipulator also has a 3D interface to edit some of its fields. In this case, the interface edits the scaleFactor, rotation and translation fields.

A manipulator differs from a dragger. When you move a dragger, no other nodes are affected. When you move an SoTransformManip, other nodes move along with it. (See the reference page for SoTransformManip).

The interface for an SoTransformBoxManip is exactly the same as that of the SoTransformBoxDragger. To find out more about the interface, see the reference page for SoTransformBoxDragger. To find out how the manipulator uses a dragger to provide its interface, see the reference page for SoTransformManip.

On screen, this manipulator will surround the objects influenced by its motion. This is because it turns on the surroundScale part of the dragger (See the reference page for SoSurroundScale)

METHODS

SoTransformBoxManip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

TransformBoxManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoCenterballManip, SoHandleBoxManip, SoJackManip, SoTabBoxManip, SoTrackballManip, SoTransform, SoTransformBoxDragger, SoTransformerManip, SoTransformManip


SoTransformManip

NAME

SoTransformManip - base class for all transform nodes with built-in 3D user interfaces

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip

SYNOPSIS

#include <Inventor/manips/SoTransformManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoTransformManip:

SoTransformManip()

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

static SoType	getClassTypeId()

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoTransformManip is the base class for all SoTransform nodes that have a built-in 3D user interface. Since it is derived from SoTransform, any changes to its fields result in the rotation, scaling, and/or translation of nodes that follow it in the scene graph.

Typically, you will want to replace a regular SoTransform with an SoTransformManip (as when the user selects an object to be moved), or vice versa (as when the object is deselected, and the motion interface should go away). Use the replaceNode() method to insert a manipulator into a scene graph, and the replaceManip() method to remove it when done.

Every subclass of SoTransformManip utilizes a dragger of some sort to provide a 3D interface. (This class does not have dragger; but all the subclasses do.) However a manipulator differs from a dragger; it influences other objects in the scene because, as an SoTransform, it alters the state. The fields values and movement of a dragger, on the other hand, affect only the dragger itself.

Each SoTransformManip subclass utilizes its dragger by adding it as a hidden child. When an action is applied to the manipulator, such as rendering or handling events, the manipulator first traverses the dragger, and then the manipulator adds its transformation matrix to the state. When you click-drag-release over the manipulator, it passes these events down to the dragger, which moves as a result ("I can't help it, I'm a dragger!").

The manipulator maintains consistency between the fields of the dragger and its own fields. Let's say you use the mouse to rotate the dragger. Callbacks insure that the rotation field of the manipulator will change by the same amount, resulting in the rotation of nodes which follow in the scene graph. Similarly, if you set any of the SoTransformManip fields the manipulator will move the dragger accordingly. You can use this feature to impose constraints on a manipulator: If the user moves the manipulator so that a field value becomes too large, you can set the field back to your desired maximum, and the whole thing will move back to where you specified.

Since each SoTransformManip uses a dragger to provide its interface, you will generally be told to look at the dragger's reference page for details of how it moves and what the different parts are for. The interface for the dragger and the manipulator will always be exactly the same. Usually, an SoTransformManip will surround the objects that it influences (i.e., those that move along with it). This is because the manipulator turns on the surroundScale part of its dragger; so the dragger geometry expands to envelope the other objects (see the reference page for SoSurroundScale).

Because the dragger is a hidden child, you can see the dragger on screen and interact with it, but the dragger does not show up when you write the manipulator to file. Also, any SoPath will end at the manipulator. (See the Actions section of this reference page for a complete description of when the dragger is traversed).

If you want to get a pointer to the dragger you can get it from the manipulator using the getDragger() method. You will need to do this if you want to change the geometry of a manipulator, since the geometry actually belongs to the dragger.

METHODS

SoTransformManip()

Constructor.

SoDragger *	getDragger()

Returns a pointer to the dragger being used by this manipulator. Given this pointer, you can customize the dragger just like you would any other dragger. You can change geometry using the setPart() method, or add callbacks using the methods found in the SoDragger reference page.

SbBool	replaceNode(SoPath *p )

Replaces the tail of the path with this manipulator. The tail of the path must be an SoTransform node (or subclass thereof). If the path has a nodekit, this will try to use setPart() to insert the manipulator. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the transform node will be copied to this manipulator, and the transform will be replaced.

The manipulator will not call ref() on the node it is replacing. The old node will disappear if it has no references other than from the input path p and its parent, since this manipulator will be replacing it in both of those places. Nor will the manipulator make any changes to field connections of the old node. The calling process is thus responsible for keeping track of its own nodes and field connections.

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Replaces the tail of the path, which must be this manipulator, with the given SoTransform node. If the path has a nodekit, this will try to use setPart() to insert the new node. Otherwise, the manipulator requires that the next to last node in the path chain be a group.

The field values from the manipulator will be copied to the transform node, and the manipulator will be replaced.

The manipulator will not call ref() or unref() on the node which is replacing it, nor will it make any changes to field connections. The calling process is thus responsible for keeping track of its own nodes and field connections.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction

First, traverses the dragger the way an SoGroup would. All draggers place themselves in space, but leave the current transformation unchanged when finished. Then the SoTransformManip accumulates a transformation into the current transformation just like its base class, SoTransform.

SoSearchAction

Searches just like an SoTransform. Does not search the dragger, which is a hidden child.

SoWriteAction

Writes out just like an SoTransform. Does not write the dragger, which is a hidden child. If you really need to write valuable information about the dragger, such as customized geometry, you can retrieve the dragger with the getDragger() method and then write it out separately.

FILE FORMAT/DEFAULT

TransformManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoDragger, SoTransform, SoCenterballManip, SoHandleBoxManip, SoJackManip, SoSurroundScale, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip


SoTransformSeparator

NAME

SoTransformSeparator - group node that saves and restores transformation state

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoTransformSeparator

SYNOPSIS

#include <Inventor/nodes/SoTransformSeparator.h>

Methods from class SoTransformSeparator:

SoTransformSeparator()

SoTransformSeparator(int nChildren)

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This group node is similar to the SoSeparator node in that it saves state before traversing its children and restores it afterwards. However, it saves only the current transformation; all other state is left as is. This node can be useful for positioning a camera, since the transformations to the camera will not affect the rest of the scene, even through the camera will view the scene. Similarly, this node can be used to isolate transformations to light sources or other objects.

METHODS

SoTransformSeparator()

Creates a transform separator node with default settings.

SoTransformSeparator(int nChildren)

Constructor that takes approximate number of children.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoRayPickAction

Saves the current transformation state, traverses all children, and restores the previous transformation state.

FILE FORMAT/DEFAULT

TransformSeparator {

}

SEE ALSO

SoResetTransform, SoTransformation


SoTransformVec3f

NAME

SoTransformVec3f - transforms a 3D vector by a 4x4 matrix

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoTransformVec3f

SYNOPSIS

#include <Inventor/engines/SoTransformVec3f.h>

Inputs from class SoTransformVec3f:

SoMFVec3f	vector

SoMFMatrix	matrix

Outputs from class SoTransformVec3f:

(SoMFVec3f)	point

(SoMFVec3f)	direction

(SoMFVec3f)	normalDirection

Methods from class SoTransformVec3f:

SoTransformVec3f()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes as input a three dimensional floating-point vector and a transformation matrix. The vector is assumed to be a row vector.

The engine multiplies the vector by the matrix and returns the result in the output point. The output direction contains the result when the matrix multiplication assumes the vector is a direction, and therefore ignores the translation part of the matrix. The output normalDirection contains the normalized direction

INPUTS

SoMFVec3f	vector

Input row vector.

SoMFMatrix	matrix

Input transformation matrix.

OUTPUTS

(SoMFVec3f)	point

Vector transformed by matrix.

(SoMFVec3f)	direction

Vector transformed by matrix, ignoring translation.

(SoMFVec3f)	normalDirection

Normalized direction.

METHODS

SoTransformVec3f()

Constructor

FILE FORMAT/DEFAULT

TransformVec3f {

vector	0 0 0

matrix	1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

}

SEE ALSO

SoEngineOutput


SoTransformation

NAME

SoTransformation - abstract base class for all geometric transformation nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation

SYNOPSIS

#include <Inventor/nodes/SoTransformation.h>

Methods from class SoTransformation:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This is the abstract base class for all nodes that perform geometric transformations. It exists only to make it easy for applications to test whether a particular node is a transformation node (that is, is derived from this class).

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoAntiSquish, SoMatrixTransform, SoResetTransform, SoRotation, SoRotationXYZ, SoScale, SoSurroundScale, SoTransform, SoTransformManip, SoTransformSeparator, SoTranslation SoUnits


SoTransformerDragger

NAME

SoTransformerDragger - box-like object you scale, rotate, and translate by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTransformerDragger

SYNOPSIS

#include <Inventor/draggers/SoTransformerDragger.h>

Fields from class SoTransformerDragger:

SoSFRotation	rotation

SoSFVec3f	translation

SoSFVec3f	scaleFactor

SoSFFloat	minDiscRotDot

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoTransformerDragger:

SoTransformerDragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

void	setColinearThreshold(int newVal )

int	getColinearThreshold()

void	setLocateHighlighting(SbBool onOff )

SbBool	isLocateHighlighting()

void	unsquishKnobs()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoTransformerDragger is a dragger shaped like a box. It has small cubes at the corners and small balls sticking out of the middle of each face. Click and drag any face of the box for 2D translation in the plane of that face. Drag any corner-cube to scale the box uniformly. Pick any of the mid-face balls to rotate the whole dragger about its center.

The SoTransformerDragger uses locate highlighting, so you can tell which part you are about to select before pressing the mouse button. By default, the locate highlight color is gold.

Click-drag any face to translate the dragger within the plane of that face. The face you selected will highlight in yellow. While you drag, yellow feedback arrows display the two directions of motion. Press the <Shift> key and the arrows turn orange; you may now pick between these two directions to constrain the motion. The direction you move the cursor in will determine which direction is chosen. Press the <Control> key and the dragger will translate perpendicular to that plane. The translation field is modified as the face is dragged.

Click a corner to scale the dragger. The corner you selected will turn yellow and radial lines will indicate that you may move toward and away from the center of the box. Drag radially and you will perform uniform scale. Press the <Control> key to scale about the opposite corner instead of the center of the box.

To stretch the dragger non-uniformly, press <Shift> when you drag the corner cube. Now you will see three orange arrows indicating that your gesture will determine which direction to choose. Move the cursor and the selected arrow will turn yellow while the others disappear. Now the dragger will stretch only in the direction you selected. Pressing <Control> at the same time as <Shift> allows you to stretch the dragger while keeping the opposite side pinned in place. When you drag a corner, this modifies the scaleFactor and possibly the translation field of the dragger.

Click one of the spherical knobs to rotate the dragger. When you first click, you'll see two orange lines and two purple circles. The purple circles indicate the two ways you can rotate. The orange lines are, once again, the two choices for your mouse gesture. Each line begins you moving around one of the two circles. Once you move the cursor far enough, the selected line turns yellow and you begin rotating the dragger about the selected circle. The other circle and line will disappear.

To perform unconstrained ("free") rotation, just press <Shift> while you drag the spherical knob. There will be no choices; instead all three purple circles will be displayed, forming a ball that you can roll around. Regardless of how you rotate, dragging the spherical knobs will modify the rotatation field of the dragger. Depending on how it is centered and what transforms precede it in the scene graph, rotation is likely to affect the translation and scaleFactor fields as well.

Pressing the <Control> key will change the center of rotation in both the constrained and unconstrained (<Shift>) case. By default, rotation occurs about the center of the bounding box. With <Control> depressed, rotation occurs about the middle of the opposite side of the bounding box. The purple feedback will change to illustrate this; the feedback circles increase in size and purple crosshairs sprout at the new rotational center.

Ordinarily, the knobs of the dragger are unsquished upon readin from file and when the mouse button is released at the end of a drag. If you want this to happen more often, then you should call the method unsquishKnobs.

As with all draggers, if you change the fields the dragger will move to match the new settings.

Remember: This is not an SoTransform!. If you want to move other objects with this dragger, you can either:

[a] Use an SoTransformerManip, which is subclassed from SoTransform. It creates one of these draggers and uses it as the interface to change its fields. (see the SoTransformerManip reference page).

[b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation node.

You can change the parts in any instance of this dragger using setPart(). The default part geometries are defined as resources for this SoTransformerDragger class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/transformerDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFRotation	rotation

Orientation of the dragger.

SoSFVec3f	translation

Position of the dragger.

SoSFVec3f	scaleFactor

Scale of the dragger.

SoSFFloat	minDiscRotDot

Specifies the minimum dot product between eyeDir and rotPlane normal before switching from record-player-type rotation to rolling-pin-type rotation. This transition is made so that rotations don't get screwy when the circle is edge-on. Lies in range [0-1]. Best to leave this alone.

METHODS

SoTransformerDragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

void	setColinearThreshold(int newVal )

int	getColinearThreshold()

When picking a direction for constraining based on gesture, this parameter determines how many pixels must separate two axes before they are regarded as distinct. If they are deemed "the same" then the shorter of the two will be discarded.

void	setLocateHighlighting(SbBool onOff )

SbBool	isLocateHighlighting()

Controls whether or not locate highlighting is used. Default is TRUE.

void	unsquishKnobs()

Tells the dragger to unsquish its rotation and scale knobs during the next traversal. Ordinarily, the knobs are only unsquished upon readin from file and when the mouse button is released at the end of a drag. If you want this to happen more often, then you should call this method.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
surroundScale	SurroundScale	--	yes
translator1	Separator	--	yes
translator1Active	Separator	--	yes
translator2	Separator	--	yes
translator2Active	Separator	--	yes
translator3	Separator	--	yes
translator3Active	Separator	--	yes
translator4	Separator	--	yes
translator4Active	Separator	--	yes
translator5	Separator	--	yes
translator5Active	Separator	--	yes
translator6	Separator	--	yes
translator6Active	Separator	--	yes
rotator1	Separator	--	yes
rotator1Active	Separator	--	yes
rotator2	Separator	--	yes
rotator2Active	Separator	--	yes
rotator3	Separator	--	yes
rotator3Active	Separator	--	yes
rotator4	Separator	--	yes
rotator4Active	Separator	--	yes
rotator5	Separator	--	yes
rotator5Active	Separator	--	yes
rotator6	Separator	--	yes
rotator6Active	Separator	--	yes
scale1	Separator	--	yes
scale1Active	Separator	--	yes
scale2	Separator	--	yes
scale2Active	Separator	--	yes
scale3	Separator	--	yes
scale3Active	Separator	--	yes
scale4	Separator	--	yes
scale4Active	Separator	--	yes
scale5	Separator	--	yes
scale5Active	Separator	--	yes
scale6	Separator	--	yes
scale6Active	Separator	--	yes
scale7	Separator	--	yes
scale7Active	Separator	--	yes
scale8	Separator	--	yes
scale8Active	Separator	--	yes
xAxisFeedbackActive	Separator	--	yes
xAxisFeedbackSelect	Separator	--	yes
xCrosshairFeedback	Separator	--	yes
yAxisFeedbackActive	Separator	--	yes
yAxisFeedbackSelect	Separator	--	yes
yCrosshairFeedback	Separator	--	yes
zAxisFeedbackActive	Separator	--	yes
zAxisFeedbackSelect	Separator	--	yes
zCrosshairFeedback	Separator	--	yes
translateBoxFeedback	Separator	--	yes
scaleBoxFeedback	Separator	--	yes
posXWallFeedback	Separator	--	yes
posXRoundWallFeedback	Separator	--	yes
posYWallFeedback	Separator	--	yes
posYRoundWallFeedback	Separator	--	yes
posZWallFeedback	Separator	--	yes
posZRoundWallFeedback	Separator	--	yes
negXWallFeedback	Separator	--	yes
negXRoundWallFeedback	Separator	--	yes
negYWallFeedback	Separator	--	yes
negYRoundWallFeedback	Separator	--	yes
negZWallFeedback	Separator	--	yes
negZRoundWallFeedback	Separator	--	yes
radialFeedback	Separator	--	yes
xCircleFeedback	Separator	--	yes
yCircleFeedback	Separator	--	yes
zCircleFeedback	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	transformerLocateMaterial

Part:	none

Appearance:	Gold diffuse and emissive color

Description:	Locate highlight color used for all parts.

Resource:	transformerOverallStyle

Part:	overallStyle

Appearance:	White Low-Complexity lines

Description:	If nothing else specified, this is style of the part.

Resource:	transformerTranslator1

Part:	translator1

Appearance:	White Line-Style Square

Description:	Top face of transformer. Picking this initiates translation in x-z plane.

Resource:	transformerTranslator2

Part:	translator2

Appearance:	White Line-Style Square

Description:	Bottom face of transformer. Picking this initiates translation in x-z plane.

Resource:	transformerTranslator3

Part:	translator3

Appearance:	White Line-Style Square

Description:	Left face of transformer. Picking this initiates translation in y-z plane.

Resource:	transformerTranslator4

Part:	translator4

Appearance:	White Line-Style Square

Description:	Right face of transformer. Picking this initiates translation in y-z plane.

Resource:	transformerTranslator5

Part:	translator5

Appearance:	White Line-Style Square

Description:	Front face of transformer. Picking this initiates translation in x-y plane.

Resource:	transformerTranslator6

Part:	translator6

Appearance:	White Line-Style Square

Description:	Back face of transformer. Picking this initiates translation in x-y plane.

Resource:	transformerTranslator1Active

Part:	translator1Active

Appearance:	Yellow version of transformerTranslator1

Description:	Replaces transformerTranslator1 during dragging.

Resource:	transformerTranslator2Active

Part:	translator2Active

Appearance:	Yellow version of transformerTranslator2

Description:	Replaces transformerTranslator2 during dragging.

Resource:	transformerTranslator3Active

Part:	translator3Active

Appearance:	Yellow version of transformerTranslator3

Description:	Replaces transformerTranslator3 during dragging.

Resource:	transformerTranslator4Active

Part:	translator4Active

Appearance:	Yellow version of transformerTranslator4

Description:	Replaces transformerTranslator4 during dragging.

Resource:	transformerTranslator5Active

Part:	translator5Active

Appearance:	Yellow version of transformerTranslator5

Description:	Replaces transformerTranslator5 during dragging.

Resource:	transformerTranslator6Active

Part:	translator6Active

Appearance:	Yellow version of transformerTranslator6

Description:	Replaces transformerTranslator6 during dragging.

Resource:	transformerRotator1

Part:	rotator1

Appearance:	Green Sphere at end of a stick

Description:	Top knob of transformer. Picking this initiates rotation.

Resource:	transformerRotator2

Part:	rotator2

Appearance:	Green Sphere at end of a stick

Description:	Bottom knob of transformer. Picking this initiates rotation.

Resource:	transformerRotator3

Part:	rotator3

Appearance:	Green Sphere at end of a stick

Description:	Left knob of transformer. Picking this initiates rotation.

Resource:	transformerRotator4

Part:	rotator4

Appearance:	Green Sphere at end of a stick

Description:	Right knob of transformer. Picking this initiates rotation.

Resource:	transformerRotator5

Part:	rotator5

Appearance:	Green Sphere at end of a stick

Description:	Front knob of transformer. Picking this initiates rotation.

Resource:	transformerRotator6

Part:	rotator6

Appearance:	Green Sphere at end of a stick

Description:	Back knob of transformer. Picking this initiates rotation.

Resource:	transformerRotator1Active

Part:	rotator1Active

Appearance:	Yellow version of transformerRotator1

Description:	Replaces transformerRotator1 during dragging.

Resource:	transformerRotator2Active

Part:	rotator2Active

Appearance:	Yellow version of transformerRotator2

Description:	Replaces transformerRotator2 during dragging.

Resource:	transformerRotator3Active

Part:	rotator3Active

Appearance:	Yellow version of transformerRotator3

Description:	Replaces transformerRotator3 during dragging.

Resource:	transformerRotator4Active

Part:	rotator4Active

Appearance:	Yellow version of transformerRotator4

Description:	Replaces transformerRotator4 during dragging.

Resource:	transformerRotator5Active

Part:	rotator5Active

Appearance:	Yellow version of transformerRotator5

Description:	Replaces transformerRotator5 during dragging.

Resource:	transformerRotator6Active

Part:	rotator6Active

Appearance:	Yellow version of transformerRotator6

Description:	Replaces transformerRotator6 during dragging.

Resource:	transformerScale1

Part:	scale1

Appearance:	Small white cube in (+x+y+z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale2

Part:	scale2

Appearance:	Small white cube in (+x+y-z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale3

Part:	scale3

Appearance:	Small white cube in (+x-y+z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale4

Part:	scale4

Appearance:	Small white cube in (+x-y-z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale5

Part:	scale5

Appearance:	Small white cube in (-x+y+z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale6

Part:	scale6

Appearance:	Small white cube in (-x+y-z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale7

Part:	scale7

Appearance:	Small white cube in (-x-y+z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale8

Part:	scale8

Appearance:	Small white cube in (-x-y-z) corner of transformer

Description:	Picking this initiates scaling.

Resource:	transformerScale1Active

Part:	scale1Active

Appearance:	Yellow version of transformerScale1Active

Description:	Replaces transformerScale1Active during dragging.

Resource:	transformerScale2Active

Part:	scale2Active

Appearance:	Yellow version of transformerScale2Active

Description:	Replaces transformerScale2Active during dragging.

Resource:	transformerScale3Active

Part:	scale3Active

Appearance:	Yellow version of transformerScale3Active

Description:	Replaces transformerScale3Active during dragging.

Resource:	transformerScale4Active

Part:	scale4Active

Appearance:	Yellow version of transformerScale4Active

Description:	Replaces transformerScale4Active during dragging.

Resource:	transformerScale5Active

Part:	scale5Active

Appearance:	Yellow version of transformerScale5Active

Description:	Replaces transformerScale5Active during dragging.

Resource:	transformerScale6Active

Part:	scale6Active

Appearance:	Yellow version of transformerScale6Active

Description:	Replaces transformerScale6Active during dragging.

Resource:	transformerScale7Active

Part:	scale7Active

Appearance:	Yellow version of transformerScale7Active

Description:	Replaces transformerScale7Active during dragging.

Resource:	transformerScale8Active

Part:	scale8Active

Appearance:	Yellow version of transformerScale8Active

Description:	Replaces transformerScale8Active during dragging.

Resource:	transformerXAxisFeedbackActive

Part:	xAxisFeedbackActive

Appearance:	Yellow arrow along X axis

Description:	Displayed when translating if X direction is permitted.

Resource:	transformerXAxisFeedbackSelect

Part:	xAxisFeedbackSelect

Appearance:	Orange arrow along X axis

Description:	Displayed when awaiting gesture to pick between X axis and another direction(s).

Resource:	transformerYAxisFeedbackActive

Part:	yAxisFeedbackActive

Appearance:	Yellow arrow along Y axis

Description:	Displayed when translating if Y direction is permitted.

Resource:	transformerYAxisFeedbackSelect

Part:	yAxisFeedbackSelect

Appearance:	Orange arrow along Y axis

Description:	Displayed when awaiting gesture to pick between Y axis and another direction(s).

Resource:	transformerZAxisFeedbackActive

Part:	zAxisFeedbackActive

Appearance:	Yellow arrow along Z axis

Description:	Displayed when translating if Z direction is permitted.

Resource:	transformerZAxisFeedbackSelect

Part:	zAxisFeedbackSelect

Appearance:	Orange arrow along Z axis

Description:	Displayed when awaiting gesture to pick between Z axis and another direction(s).

Resource:	transformerXCrosshairFeedback

Part:	xCrosshairFeedback

Appearance:	Yellow crossHair in y-z plane

Description:	Displayed when translating perpendicular to y-z plane.

Resource:	transformerYCrosshairFeedback

Part:	yCrosshairFeedback

Appearance:	Yellow crossHair in x-z plane

Description:	Displayed when translating perpendicular to x-z plane.

Resource:	transformerZCrosshairFeedback

Part:	zCrosshairFeedback

Appearance:	Yellow crossHair in x-y plane

Description:	Displayed when translating perpendicular to x-y plane.

Resource:	transformerXCircleFeedback

Part:	xCircleFeedback

Appearance:	Purple Unit Circle about X axis

Description:	Displayed when rotating about X axis

Resource:	transformerYCircleFeedback

Part:	yCircleFeedback

Appearance:	Purple Unit Circle about Y axis

Description:	Displayed when rotating about Y axis

Resource:	transformerZCircleFeedback

Part:	zCircleFeedback

Appearance:	Purple Unit Circle about Z axis

Description:	Displayed when rotating about Z axis

Resource:	transformerRadialFeedback

Part:	radialFeedback

Appearance:	Purple Rays emanating from center through corners

Description:	Displayed when scaling uniformly about center.

Resource:	transformerTranslateBoxFeedback

Part:	translateBoxFeedback

Appearance:	Purple Box with one bright yellow side

Description:	Displayed when translating. Automatically oriented so yellow side matches selected face.

Resource:	transformerPosXWallFeedback

Part:	posXWallFeedback

Appearance:	Purple Plane along Right side of transformer

Description:	Displayed when <Control> scaling and keeping right side fixed.

Resource:	transformerPosYWallFeedback

Part:	posYWallFeedback

Appearance:	Purple Plane along Top side of transformer

Description:	Displayed when <Control> scaling and keeping top side fixed.

Resource:	transformerPosZWallFeedback

Part:	posZWallFeedback

Appearance:	Purple Plane along Front side of transformer

Description:	Displayed when <Control> scaling and keeping front side fixed.

Resource:	transformerNegXWallFeedback

Part:	negXWallFeedback

Appearance:	Purple Plane along Left side of transformer

Description:	Displayed when <Control> scaling and keeping left side fixed.

Resource:	transformerNegYWallFeedback

Part:	negYWallFeedback

Appearance:	Purple Plane along Bottom side of transformer

Description:	Displayed when <Control> scaling and keeping bottom side fixed.

Resource:	transformerNegZWallFeedback

Part:	negZWallFeedback

Appearance:	Purple Plane along Back side of transformer

Description:	Displayed when <Control> scaling and keeping back side fixed.

FILE FORMAT/DEFAULT

TransformerDragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

scaleFactor	1 1 1

rotation	0 0 1  0

minDiscRotDot	0.025

callbackList	NULL

surroundScale	NULL

translator1	<transformerTranslator1 resource>

translator1Active	<transformerTranslator1Active resource>

translator2	<transformerTranslator2 resource>

translator2Active	<transformerTranslator2Active resource>

translator3	<transformerTranslator3 resource>

translator3Active	<transformerTranslator3Active resource>

translator4	<transformerTranslator4 resource>

translator4Active	<transformerTranslator4Active resource>

translator5	<transformerTranslator5 resource>

translator5Active	<transformerTranslator5Active resource>

translator6	<transformerTranslator6 resource>

translator6Active	<transformerTranslator6Active resource>

rotator1	<transformerRotator1 resource>

rotator1Active	<transformerRotator1Active resource>

rotator2	<transformerRotator2 resource>

rotator2Active	<transformerRotator2Active resource>

rotator3	<transformerRotator3 resource>

rotator3Active	<transformerRotator3Active resource>

rotator4	<transformerRotator4 resource>

rotator4Active	<transformerRotator4Active resource>

rotator5	<transformerRotator5 resource>

rotator5Active	<transformerRotator5Active resource>

rotator6	<transformerRotator6 resource>

rotator6Active	<transformerRotator6Active resource>

scale1	<transformerScale1 resource>

scale1Active	<transformerScale1Active resource>

scale2	<transformerScale2 resource>

scale2Active	<transformerScale2Active resource>

scale3	<transformerScale3 resource>

scale3Active	<transformerScale3Active resource>

scale4	<transformerScale4 resource>

scale4Active	<transformerScale4Active resource>

scale5	<transformerScale5 resource>

scale5Active	<transformerScale5Active resource>

scale6	<transformerScale6 resource>

scale6Active	<transformerScale6Active resource>

scale7	<transformerScale7 resource>

scale7Active	<transformerScale7Active resource>

scale8	<transformerScale8 resource>

scale8Active	<transformerScale8Active resource>

xAxisFeedbackActive	<transformerXAxisFeedbackActive resource>

xAxisFeedbackSelect	<transformerXAxisFeedbackSelect resource>

xCrosshairFeedback	<transformerXCrosshairFeedback resource>

yAxisFeedbackActive	<transformerYAxisFeedbackActive resource>

yAxisFeedbackSelect	<transformerYAxisFeedbackSelect resource>

yCrosshairFeedback	<transformerYCrosshairFeedback resource>

zAxisFeedbackActive	<transformerZAxisFeedbackActive resource>

zAxisFeedbackSelect	<transformerZAxisFeedbackSelect resource>

zCrosshairFeedback	<transformerZCrosshairFeedback resource>

translateBoxFeedback	<transformerTranslateBoxFeedback resource>

scaleBoxFeedback	<transformerScaleBoxFeedback resource>

posXWallFeedback	<transformerPosXWallFeedback resource>

posXRoundWallFeedback	<transformerPosXRoundWallFeedback resource>

posYWallFeedback	<transformerPosYWallFeedback resource>

posYRoundWallFeedback	<transformerPosYRoundWallFeedback resource>

posZWallFeedback	<transformerPosZWallFeedback resource>

posZRoundWallFeedback	<transformerPosZRoundWallFeedback resource>

negXWallFeedback	<transformerNegXWallFeedback resource>

negXRoundWallFeedback	<transformerNegXRoundWallFeedback resource>

negYWallFeedback	<transformerNegYWallFeedback resource>

negYRoundWallFeedback	<transformerNegYRoundWallFeedback resource>

negZWallFeedback	<transformerNegZWallFeedback resource>

negZRoundWallFeedback	<transformerNegZRoundWallFeedback resource>

radialFeedback	<transformerRadialFeedback resource>

xCircleFeedback	<transformerXCircleFeedback resource>

yCircleFeedback	<transformerYCircleFeedback resource>

zCircleFeedback	<transformerZCircleFeedback resource>

none	<transformerLocateMaterial resource>

}

SEE ALSO

SoDragger, SoInteractionKit, SoLocateHighlight, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTranslate1Dragger, SoTranslate2Dragger


SoTransformerManip

NAME

SoTransformerManip - transform node with 3D interface for changing scaling, rotation, and translation

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip > SoTransformerManip

SYNOPSIS

#include <Inventor/manips/SoTransformerManip.h>

Fields from class SoTransform:

SoSFVec3f	translation

SoSFRotation	rotation

SoSFVec3f	scaleFactor

SoSFRotation	scaleOrientation

SoSFVec3f	center

Methods from class SoTransformerManip:

SoTransformerManip()

static SoType	getClassTypeId()

void	setLocateHighlighting(SbBool onOff )

SbBool	isLocateHighlighting()

void	unsquishKnobs()

Methods from class SoTransformManip:

SoDragger *	getDragger()

SbBool	replaceNode(SoPath *p )

SbBool	replaceManip(SoPath *p,
SoTransform *newOne ) const

Methods from class SoTransform:

void	pointAt(const SbVec3f &fromPoint,
const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat,
SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoTransformation *nodeOnRight)

void	combineRight(SoTransformation *nodeOnLeft)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This is a new manipulator with some improvements over the older Inventor manips. It has the following features: [1] full interface for rotate, translate, and scale, [2] better feedback, [3] locate highlighting.

SoTransformerManip is derived from SoTransform (by way of SoTransformManip). When its fields change, nodes following it in the scene graph rotate, scale, and/or translate.

As a subclass of SoTransformManip, this manipulator also has a 3D interface to edit some of its fields. In this case, the interface edits the scaleFactor, rotation and translation fields.

A manipulator differs from a dragger. When you move a dragger, no other nodes are affected. When you move an SoTransformManip, other nodes move along with it. (See the reference page for SoTransformManip).

The interface for an SoTransformerManip is exactly the same as that of the SoTransformerDragger. To find out more about the interface, see the reference page for SoTransformerDragger. To find out how the manipulator uses a dragger to provide its interface, see the reference page for SoTransformManip.

On screen, this manipulator will surround the objects influenced by its motion. This is because it turns on the surroundScale part of the dragger (See the reference page for SoSurroundScale)

METHODS

SoTransformerManip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

void	setLocateHighlighting(SbBool onOff )

SbBool	isLocateHighlighting()

Controls whether or not the dragger inside this manip will perform locate highlighting is used. Default is TRUE.

void	unsquishKnobs()

Tells the dragger inside this manip to unsquish its rotation and scale knobs during the next traversal. Ordinarily, the knobs are only unsquished upon readin from file and when the mouse button is released at the end of a drag. If you want this to happen more often, then you should call this method.

FILE FORMAT/DEFAULT

TransformerManip {

translation	0 0 0

rotation	0 0 1  0

scaleFactor	1 1 1

scaleOrientation	0 0 1  0

center	0 0 0

}

SEE ALSO

SoTransformerDragger, SoTransform, SoCenterballManip, SoHandleBoxManip, SoJackManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformManip


SoTranslate1Dragger

NAME

SoTranslate1Dragger - object you can translate along a line by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTranslate1Dragger

SYNOPSIS

#include <Inventor/draggers/SoTranslate1Dragger.h>

Fields from class SoTranslate1Dragger:

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoTranslate1Dragger:

SoTranslate1Dragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoTranslate1Dragger is a simple dragger that translates in one dimension when dragged with the mouse. It moves along the x axis of its local space, determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.

This node has a translation field which always reflects its position in local space. If you set the field, the dragger will move accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.

This dragger contains four parts, translator, translatorActive, feedback, and feedbackActive.

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/translate1Dragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	translation

Position of the dragger.

METHODS

SoTranslate1Dragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
translator	Separator	--	yes
translatorActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	translate1Translator

Part:	translator

Appearance:	white arrow

Description:	picking this initiates translation

Resource:	translate1TranslatorActive

Part:	translatorActive

Appearance:	yellow arrow

Description:	displayed during translation instead of the translator

Resource:	translate1Feedback

Part:	feedback

Appearance:	empty Separator by default

Description:	feedback displayed when not in motion

Resource:	translate1FeedbackActive

Part:	feedbackActive

Appearance:	empty Separator by default

Description:	feedback displayed while moving

FILE FORMAT/DEFAULT

Translate1Dragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

callbackList	NULL

translator	<translate1Translator resource>

translatorActive	<translate1TranslatorActive resource>

feedback	<translate1Feedback resource>

feedbackActive	<translate1FeedbackActive resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate2Dragger


SoTranslate2Dragger

NAME

SoTranslate2Dragger - object you can translate within a plane by dragging with the mouse

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTranslate2Dragger

SYNOPSIS

#include <Inventor/draggers/SoTranslate2Dragger.h>

Fields from class SoTranslate2Dragger:

SoSFVec3f	translation

Fields from class SoDragger:

SoSFBool	isActive

Fields from class SoInteractionKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoTranslate2Dragger:

SoTranslate2Dragger()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoDragger:

void	addStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeStartCallback(SoDraggerCB *f,
void *userData = NULL)

void	addMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeMotionCallback(SoDraggerCB *f,
void *userData = NULL)

void	addFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoDraggerCB *f,
void *userData = NULL)

void	addValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

void	removeValueChangedCallback(SoDraggerCB *f,
void *userData = NULL)

SbBool	enableValueChangedCallbacks()

void	setMinGesture(int pixels)

int	getMinGesture() const

static void	setMinScale(float newMinScale)

static float	getMinScale()

Methods from class SoInteractionKit:

virtual SbBool	setPartAsPath(const SbName &partName,
SoPath *surrogatePath )

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoTranslate2Dragger is a simple dragger that translates in two dimensions when dragged with the mouse. It moves within the x-y plane of its local space, determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.

Pressing the <Shift> key allows you to constrain motion to either the x axis or the y axis. The direction is determined by your initial mouse gesture after pressing the key. Releasing the key removes the constraint.

This node has a translation field which always reflects its position in local space. If you set the field, the dragger will move accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.

This dragger contains six parts, translator, translatorActive, feedback, feedbackActive, xAxisFeedback, and yAxisFeedback. The last two parts are only displayed during motion, and only when their direction of motion is enabled. (Pressing the <Shift> key and then dragging disables one of the two directions.)

Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().

You can make your program use different default resources for the parts by copying the file %OIVHOME%/data/draggerDefaults/translate2Dragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS

SoSFVec3f	translation

Position of the dragger.

METHODS

SoTranslate2Dragger()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for this class

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
translator	Separator	--	yes
translatorActive	Separator	--	yes
feedback	Separator	--	yes
feedbackActive	Separator	--	yes
xAxisFeedback	Separator	--	yes
yAxisFeedback	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

DRAGGER RESOURCES

Resource:	translate2Translator

Part:	translator

Appearance:	pair of white crossing arrows

Description:	picking this initiates translation

Resource:	translate2TranslatorActive

Part:	translatorActive

Appearance:	pair of yellow crossing arrows

Description:	displayed during translation instead of the translator

Resource:	translate2Feedback

Part:	feedback

Appearance:	empty Separator by default

Description:	feedback displayed when not moving

Resource:	translate2FeedbackActive

Part:	feedbackActive

Appearance:	empty Separator by default

Description:	feedback displayed when moving

Resource:	translate2XAxisFeedback

Part:	xAxisFeedback

Appearance:	thin purple line

Description:	Only shown if dragger is moving and the axis is a permissable direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the x direction.

Resource:	translate2YAxisFeedback

Part:	yAxisFeedback

Appearance:	thin purple line

Description:	Only shown if dragger is moving and the axis is a permissable direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the y direction.

FILE FORMAT/DEFAULT

Translate2Dragger {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

isActive	FALSE

translation	0 0 0

callbackList	NULL

translator	<translate2Translator resource>

translatorActive	<translate2TranslatorActive resource>

feedback	<translate2Feedback resource>

feedbackActive	<translate2FeedbackActive resource>

xAxisFeedback	<translate2XAxisFeedback resource>

yAxisFeedback	<translate2YAxisFeedback resource>

}

SEE ALSO

SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger


SoTranslation

NAME

SoTranslation - node representing a 3D translation

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTranslation

SYNOPSIS

#include <Inventor/nodes/SoTranslation.h>

Fields from class SoTranslation:

SoSFVec3f	translation

Methods from class SoTranslation:

SoTranslation()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a translation by a 3D vector.

FIELDS

SoSFVec3f	translation

Translation vector.

METHODS

SoTranslation()

Creates a translation node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates translation into the current transformation.

SoGetMatrixAction

Returns the matrix corresponding to the translation.

FILE FORMAT/DEFAULT

Translation {

translation	0 0 0

}

SEE ALSO

SoTransform


SoTriangleStripSet

NAME

SoTriangleStripSet - triangle strip set shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape > SoTriangleStripSet

SYNOPSIS

#include <Inventor/nodes/SoTriangleStripSet.h>

Fields from class SoTriangleStripSet:

SoMFInt32	numVertices

Fields from class SoNonIndexedShape:

SoSFInt32	startIndex

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoTriangleStripSet:

SoTriangleStripSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This shape node constructs triangle strips out of vertices. The vertices may be specified in the vertexProperty field (from SoVertexShape), or by the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.

SoTriangleStripSet is one of the fastest ways of drawing polygonal objects in Open Inventor. It uses the current coordinates, in order, starting with the first one. The values in the numVertices field indicate the number of vertices to use for each triangle strip in the set. The number of values in this field determines the number of strips.

For example, if numVertices has the values [3,5], coordinates 1, 2, and 3 would be used for the first triangle strip and coordinates 4, 5, 6, 7, and 8 would be used for the second strip. This would result in 1 triangle in the first strip and 3 in the second.

The coordinates of the strips are transformed by the current cumulative transformation. The strips are drawn with the current light model and drawing style.

Treatment of the current material and normal binding is as follows: The PER_PART binding specifies a material or normal for each strip of the set. The PER_FACE binding specifies a material or normal for each triangle. The _INDEXED bindings are equivalent to their non-indexed counterparts. The default normal binding is PER_VERTEX. The default material binding is OVERALL.

If any normals (or materials) are specified, Open Inventor assumes you provide the correct number of them, as indicated by the binding. You will see unexpected results if you specify fewer normals (or materials) than the shape requires. If no normals are specified, they will be generated automatically.

FIELDS

SoMFInt32	numVertices

Number of vertices in each triangle strip. The number of strips is equal to the number of values in this field.

METHODS

SoTriangleStripSet()

Creates a triangle strip set node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction

Draws a strip set based on the current coordinates, normals, materials, drawing style, and so on.

SoRayPickAction

Picks on the strip set based on the current coordinates and transformation. Details about the intersection are returned in an SoFaceDetail.

SoGetBoundingBoxAction

Computes the bounding box that encloses all vertices of the strip set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.

SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle forming the strips of the set.

FILE FORMAT/DEFAULT

TriangleStripSet {

vertexProperty	NULL

startIndex	0

numVertices	-1

}

SEE ALSO

SoCoordinate3, SoDrawStyle, SoFaceDetail, SoFaceSet, SoIndexedTriangleStripSet, SoQuadMesh, SoVertexProperty


SoTriggerAny

NAME

SoTriggerAny - provides fan-in for triggers

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoTriggerAny

SYNOPSIS

#include <Inventor/engines/SoSoTriggerAny.h>

Inputs from class SoTriggerAny:

SoSFTrigger	input0

SoSFTrigger	input1

SoSFTrigger	input2

SoSFTrigger	input3

SoSFTrigger	input4

SoSFTrigger	input5

SoSFTrigger	input6

SoSFTrigger	input7

SoSFTrigger	input8

SoSFTrigger	input9

Outputs from class SoTriggerAny:

(SoSFTrigger)	output

Methods from class SoTriggerAny:

SoTriggerAny()

Methods from class SoEngine:

static SoType	getClassTypeId()

virtual int	getOutputs(SoEngineOutputList &list) const

SoEngineOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoEngineOutput *output,
SbName &outputName) const

SoEngine *	copy() const

static SoEngine *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoEngineList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This engine takes up to 10 input triggers, and produces one trigger output. The output is triggered whenever one of the inputs is touched.

INPUTS

SoSFTrigger	input0

SoSFTrigger	input1

SoSFTrigger	input2

SoSFTrigger	input3

SoSFTrigger	input4

SoSFTrigger	input5

SoSFTrigger	input6

SoSFTrigger	input7

SoSFTrigger	input8

SoSFTrigger	input9

OUTPUTS

(SoSFTrigger)	output

Triggered when any of the inputs is touched.

METHODS

SoTriggerAny()

Constructor

FILE FORMAT/DEFAULT

TriggerAny {

input0

input1

input2

input3

input4

input5

input6

input7

input8

input9

}

SEE ALSO

SoEngineOutput, SoSFTrigger


SoType

NAME

SoType - stores runtime type information

INHERITS FROM

SoType

SYNOPSIS

#include <Inventor/SoType.h>

Methods from class SoType:

static SoType	fromName(SbName name)

SbName	getName() const

SoType	getParent() const

static SoType	badType()

SbBool	isBad() const

SbBool	isDerivedFrom(SoType t) const

static int	getAllDerivedFrom(SoType type,
SoTypeList &list)

SbBool	canCreateInstance() const

void *	createInstance() const

int	operator ==(const SoType t) const

int	operator !=(const SoType t) const

int	operator <(const SoType t) const

DESCRIPTION

The SoType class keeps track of runtime type information in Open Inventor. Each type is associated with a given name, so lookup is possible in either direction.

Many Open Inventor classes request a unique SoType when they are initialized. This type can then be used to find out the actual class of an instance when only its base class is known, or to obtain an instance of a particular class given its type or name.

Note that the names associated with types of Open Inventor classes do not contain the "So" prefix.

METHODS

static SoType	fromName(SbName name)

Returns the type associated with the given name.

SbName	getName() const

Returns the name associated with a type.

SoType	getParent() const

Returns the type of the parent class.

static SoType	badType()

Returns an always-illegal type. Useful for returning errors.

SbBool	isBad() const

Returns TRUE if the type is a bad type.

SbBool	isDerivedFrom(SoType t) const

Returns TRUE if the type is derived from type t.

static int	getAllDerivedFrom(SoType type,
SoTypeList &list)

Adds all types derived from the given type to the given type list. Returns the number of types added.

SbBool	canCreateInstance() const

Some types are able to create instances; for example, most nodes and engines (those which are not abstract classes) can be created this way. This method returns TRUE if the type supports such creation.

void *	createInstance() const

Creates and returns a pointer to an instance of the type. Returns NULL if an instance could not be created for some reason. The pointer is returned as a generic pointer, but can be cast to the appropriate type. For example:

SoCube *c = (SoCube *) SoCube::getClassTypeId().createInstance();

is a convoluted way of creating a new instance of an SoCube.

int	operator ==(const SoType t) const

int	operator !=(const SoType t) const

Returns TRUE if this type is the same as or not the same as the given type.

int	operator <(const SoType t) const

Less-than comparison operator that can be used to sort types. This is pretty useless otherwise.

SEE ALSO

SoAction, SoBase, SoDetail, SoError, SoEvent, SoField


SoTypeList

NAME

SoTypeList - maintains a list of SoTypes

INHERITS FROM

SbPList > SoTypeList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoTypeList:

SoTypeList()

SoTypeList(int size)

SoTypeList(const SoTypeList &l)

~SoTypeList()

void	append(SoType type)

void	insert(SoType *type,
int addBefore)

void	set(int i,
SoType *type)

int	find(SoType typeId) const

SoType	operator [](int i) const

Methods from class SbPList:

void	remove(int which)

int	getLength() const

void	truncate(int start)

void	copy(const SbPList &pl)

SbPList &	operator =(const SbPList &pl)

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SbPList holds lists of SoType type identifiers.

METHODS

SoTypeList()

Constructor.

SoTypeList(int size)

Constructor that pre-allocates storage for size types.

SoTypeList(const SoTypeList &l)

Constructor that copies the contents of another list.

~SoTypeList()

Destructor.

void	append(SoType type)

Adds a type to the end of the list.

void	insert(SoType *type,
int addBefore)

Inserts given type in list before type with given index.

void	set(int i,
SoType *type)

Sets an element of a list.

int	find(SoType typeId) const

Returns index of given type in list, or -1 if not found.

SoType	operator [](int i) const

Accesses an element of a list.

SEE ALSO

SoType


SoUnits

NAME

SoUnits - node that scales to convert units of length

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoUnits

SYNOPSIS

#include <Inventor/nodes/SoUnits.h>

enum Units	{
SoUnits::METERS
SoUnits::CENTIMETERS
SoUnits::MILLIMETERS
SoUnits::MICROMETERS
SoUnits::MICRONS
SoUnits::NANOMETERS
SoUnits::ANGSTROMS
SoUnits::KILOMETERS
SoUnits::FEET
SoUnits::INCHES
SoUnits::POINTS
SoUnits::YARDS
SoUnits::MILES
SoUnits::NAUTICAL_MILES
}

Fields from class SoUnits:

SoSFEnum	units

Methods from class SoUnits:

SoUnits()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a uniform 3D scale about the origin relative to the previously defined units. The default units for all data are meters. Adding a units node with the value INCHES will have the same effect as adding an SoScale node with the scaleFactor of (.0254, .0254, .0254). Any subsequent SoUnits node will take the previous units into account. When building a composite object out of a bunch of pieces, it would be a good practice to add an SoUnits node at the beginning of each of the pieces, under an SoSeparator node, to make sure all the pieces fit together with the same scale.

FIELDS

SoSFEnum	units

Defines the current unit.

METHODS

SoUnits()

Creates a unit conversion node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates the scale that is the ratio of the size from the previous unit to the current unit into the current transformation.

SoGetMatrixAction

Returns the matrix corresponding to the units scaling.

FILE FORMAT/DEFAULT

Units {

units	METERS

}

SEE ALSO

SoScale, SoTransform


SoVRMLAnchor

NAME

SoVRMLAnchor - group node with URL hyperlink

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoVRMLParent > SoVRMLGroup > SoVRMLAnchor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLAnchor.h>

Fields from class SoVRMLAnchor:

SoSFString	description

SoMFString	parameter

SoMFString	url

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Fields from class SoVRMLParent:

SoMFNode	children

Methods from class SoVRMLAnchor:

SoVRMLAnchor()

void	setFullURLName(const SbString &name)

const SbString &	getFullURLName()

static void	setFetchURLCallBack(SoVRMLAnchorCB *f,
void *userData)

static SoType	getClassTypeId()

Methods from class SoVRMLParent:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a separator group which has a URL (Universal Resource Locator) hyperlink. When clicked on, this node invokes an application callback to fetch the URL. The application may fetch the data itself, or call a World Wide Web browser like the HTML-based Netscape Navigator or the VRML-based WebSpace Navigator to load the URL.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLAnchor grouping node causes a URL to be fetched over the network when the viewer activates (e.g. clicks) some geometry contained within the SoVRMLAnchor's children. If the URL pointed to is a legal VRML world, then that world replaces the world which the SoVRMLAnchor is a part of. If non-VRML data type is fetched, it is up to the browser to determine how to handle that data; typically, it will be passed to an appropriate general viewer.

Exactly how a user activates a child of the SoVRMLAnchor depends on the pointing device and is determined by the VRML browser. Typically, clicking with the pointing device will result in the new scene replacing the current scene. An SoVRMLAnchor with an empty ("") url does nothing when its children are chosen. See "Concepts - Sensors and Pointing Device Sensors" for a description of how multiple SoVRMLAnchors and pointing device sensors are resolved on activation.

See the "Concepts - Grouping and Children Nodes" section for a description of children, addChildren, and removeChildren fields and eventIns.

The description field in the SoVRMLAnchor allows for a prompt to be displayed as an alternative to the URL in the url field. Ideally, browsers will allow the user to choose the description, the URL, or both to be displayed for a candidate SoVRMLAnchor.

The parameter exposed field may be used to supply any additional information to be interpreted by the VRML or HTML browser. Each string should consist of "keyword=value" pairs. For example, some browsers allow the specification of a 'target' for a link, to display a link in another part of the HTML document; the parameter field is then:

SoVRMLAnchor {
  parameter [ "target=name_of_frame" ]
  ...
}

An SoVRMLAnchor may be used to bind the initial Viewpoint in a world by specifying a URL ending with "#ViewpointName", where "ViewpointName" is the name of a viewpoint defined in the file. For example:

SoVRMLAnchor {
  url "http://www.school.edu/vrml/someScene.wrl#OverView"
  children  Shape { geometry Box {} }
}

specifies an anchor that loads the file "someScene.wrl", and binds the initial user view to the SoVRMLViewpoint named "OverView" (when the Box is activated). If the named Viewpoint is not found in the file, then ignore it and load the file with the default Viewpoint. If no world is specified, then this means that the Viewpoint specified should be bound (set_bind TRUE). For example:

SoVRMLAnchor {
  url "#Doorway"
  children Shape { geometry Sphere {} }
}

binds viewer to the viewpoint defined by the "Doorway" viewpoint in the current world when the sphere is activated. In this case, if the Viewpoint is not found, then do nothing on activation.

See "Concepts - URLS and URNs" for more details on the url field.

The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLAnchor's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts - Bounding Boxes" for a description of bboxCenter and bboxSize fields.

FIELDS

Fields from SoVRMLAnchor

SoSFString	description

A description of the URL which may make more sense to users than the URL itself (e.g. "The Open Inventor Home Page").

SoMFString	parameter

Used to supply any additional information to be interpreted by the application. Each string consists of "keyword=value" pairs.

SoMFString	url

URL which the application will be called back to fetch when this node is activated by a left mouse click (e.g. "http://www.sgi.com/Technology/Inventor").

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLAnchor's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified.

METHODS

SoVRMLAnchor()

Creates a VRMLAnchor node with default settings.

void	setFullURLName(const SbString &name)

const SbString &	getFullURLName()

If the url field contains a relative URL (e.g. "foo.wrl" instead of "http://bogus.com/foo.wrl"), the anchor cannot resolve the URL reference. This method allows the application to tell the anchor what its full URL should be. getFullURLName returns the full URL set here, or if not set, returns the contents of the url field.

static void	setFetchURLCallBack(SoVRMLAnchorCB *f,
void *userData)

Application callbacks invoked when the mouse is clicked on an anchor (activate) so that the app can fetch the URL or call Netscape/Mosaic to fetch the URL.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFNode	addChildren

SoMFNode	removeChildren

SoMFNode	set_children

SoSFString	set_description

SoMFString	set_parameter

SoMFString	set_url

eventOut

SoMFNode	children_changed

SoSFString	description_changed

SoMFString	parameter_changed

SoMFString	url_changed

ACTION BEHAVIOR

SoHandleEventAction

FILE FORMAT/DEFAULTS

VRMLAnchor {

children	[]

description	""

parameter	[]

url	[]

bboxCenter	0 0 0

bboxSize	-1 -1 -1

}


SoVRMLAppearance

NAME

SoVRMLAppearance - specifies a material node and texture node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLAppearance

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLAppearance.h>

Fields from class SoVRMLAppearance:

SoSFNode	material

SoSFNode	texture

SoSFNode	textureTransform

Methods from class SoVRMLAppearance:

SoVRMLAppearance()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLAppearance node specifies the visual properties of geometry by defining the material and texture nodes. The value for each of the fields in this node can be NULL. However, if the field is non-NULL, it must contain one node of the appropriate type.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLAppearance node specifies the visual properties of geometry by defining the material and texture nodes. The value for each of the fields in this node can be NULL. However, if the field is non-NULL, it must contain one node of the appropriate type.

FIELDS

SoSFNode	material

The material field, if specified, must contain an SoVRMLMaterial node. If the material field is NULL or unspecified, lighting is off (all lights are ignored during rendering of the object that references this SoVRMLAppearance node) and the unlit object color is (0, 0, 0). See SoVRMLLight for details of the VRML lighting model.

SoSFNode	texture

The texture field, if specified, must contain one of the various types of texture nodes (SoVRMLImageTexture, SoVRMLMovieTexture, or SoVRMLPixelTexture). If the texture node is NULL or unspecified, the object that references this SoVRMLAppearance is not textured.

SoSFNode	textureTransform

The textureTransform field, if specified, must contain an SoVRMLTextureTransform node. If the texture field is NULL or unspecified, or if the textureTransform is NULL or unspecified, the textureTransform field has no effect.

METHODS

SoVRMLAppearance()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_material

SoSFNode	set_texture

SoSFNode	set_textureTransform

eventOut

SoSFNode	material_changed

SoSFNode	texture_changed

SoSFNode	textureTransform_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLAppearance {

material	NULL

texture	NULL

textureTransform	NULL

}


SoVRMLAudioClip
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLAudioClip - audio data node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLAudioClip

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLAudioClip.h>

Fields from class SoVRMLAudioClip:

SoSFString	description

SoSFBool	loop

SoSFFloat	pitch

SoSFTime	startTime

SoSFTime	stopTime

SoMFString	url

Methods from class SoVRMLAudioClip:

SoVRMLAudioClip()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

An SoVRMLAudioClip node specifies audio data that can be referenced by other nodes that require an audio source.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

An SoVRMLAudioClip node specifies audio data that can be referenced by other nodes that require an audio source.

The description field is a textual description of the audio source. A browser is not required to display the description field but may choose to do so in addition to or in place of playing the sound.

The url field specifies the URL from which the sound is loaded. Browsers shall support at least the wavefile format in uncompressed PCM format. It is recommended that browsers also support the MIDI file type 1 sound format. MIDI files are presumed to use the General MIDI patch set. See the section on URLs and URNs in "Concepts - URLs and URNs" for details on the url field. Results are not defined when the URL references unsupported data types.

The loop, startTime, and stopTime exposedFields and the isActive eventOut, and their effects on the SoVRMLAudioClip node, are discussed in detail in the "Concepts - Time Dependent Nodes" section. The "cycle" of an SoVRMLAudioClip is the length of time in seconds for one playing of the audio at the specified pitch.

The pitch field specifies a multiplier for the rate at which sampled sound is played. Only positive values are valid for pitch (a value of zero or less will produce undefined results). Changing the pitch field affects both the pitch and playback speed of a sound. A set_pitch event to an active SoVRMLAudioClip is ignored (and no pitch_changed eventOut is generated). If pitch is set to 2.0, the sound should be played one octave higher than normal and played twice as fast. For a sampled sound, the pitch field alters the sampling rate at which the sound is played. The proper implementation of the pitch control for MIDI (or other note sequence sound clip) is to multiply the tempo of the playback by the pitch value and adjust the MIDI Coarse Tune and Fine Tune controls to achieve the proper pitch change. The pitch field must be > 0.0.

A duration_changed event is sent whenever there is a new value for the "normal" duration of the clip. Typically this will only occur when the current url in use changes and the sound data has been loaded, indicating that the clip is playing a different sound source. The duration is the length of time in seconds for one cycle of the audio for a pitch set to 1.0. Changing the pitch field will not trigger a duration_changed event. A duration value of -1 implies the sound data has not yet loaded or the value is unavailable for some reason.

The isActive eventOut can be used by other nodes to determine if the clip is currently active. If an SoVRMLAudioClip is active, then it should be playing the sound corresponding to the sound time (i.e., in the sound's local time system with sample 0 at time 0):

      fmod (now - startTime, duration / pitch).

FIELDS

SoSFString	description

Textual description of the audio source.

SoSFBool	loop

Controls whether the sound continues when it reaches the end of a sound cycle as defined in the audio file. If loop is FALSE at the end of a cycle, execution is terminated. If TRUE, the sound continues into the next cycle.

SoSFFloat	pitch

Multiplier for the rate at which sampled sound is played.

SoSFTime	startTime

The starting time for the sound.

SoSFTime	stopTime

The stopping time for the sound. An SoVRMLAudioClip node with loop TRUE at the end of every cycle continues forever if startTime>=stopTime or until stopTime if stopTime>startTime.

SoMFString	url

Specifies the URL from which the sound is loaded.

METHODS

SoVRMLAudioClip()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFString	set_description

SoSFBool	set_loop

SoSFFloat	set_pitch

SoSFTime	set_startTime

SoSFTime	set_stopTime

SoMFString	set_url

eventOut

SoSFTime	duration_changed

SoSFBool	isActive

SoSFString	description_changed

SoSFBool	loop_changed

SoSFFloat	pitch_changed

SoSFTime	startTime_changed

SoSFTime	stopTime_changed

SoMFString	url_changed

FILE FORMAT/DEFAULTS

VRMLAudioClip {

description	""

loop	FALSE

pitch	1.0

startTime	0

stopTime	0

url	[]

}


SoVRMLBackground
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLBackground - color backdrop node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLBackground

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLBackground.h>

Fields from class SoVRMLBackground:

SoMFFloat	groundAngle

SoMFColor	groundColor

SoMFString	backUrl

SoMFString	bottomUrl

SoMFString	frontUrl

SoMFString	leftUrl

SoMFString	rightUrl

SoMFString	topUrl

SoMFFloat	skyAngle

SoMFColor	skyColor

Methods from class SoVRMLBackground:

SoVRMLBackground()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLBackground node is used to specify a color backdrop that simulates ground and sky, as well as a background texture, or panorama, that is placed behind all geometry in the scene and in front of the ground and sky. SoVRMLBackground nodes are specified in the local coordinate system and are affected by the accumulated rotation of their parents.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLBackground node is used to specify a color backdrop that simulates ground and sky, as well as a background texture, or panorama, that is placed behind all geometry in the scene and in front of the ground and sky. SoVRMLBackground nodes are specified in the local coordinate system and are affected by the accumulated rotation of their parents (see below).

SoVRMLBackground nodes are bindable nodes (see "Concepts - Bindable Children Nodes"). There exists an SoVRMLBackground stack, in which the top-most SoVRMLBackground on the stack is the currently active SoVRMLBackground and thus applied to the view. To move an SoVRMLBackground to the top of the stack, a TRUE value is sent to the set_bind eventIn. Once active, the SoVRMLBackground is then bound to the browsers view. A FALSE value of set_bind, removes the SoVRMLBackground from the stack and unbinds it from the browser viewer. See "Concepts - Bindable Children Nodes" for more details on the the bind stack.

The ground and sky backdrop is conceptually a partial sphere (i.e. ground) enclosed inside of a full sphere (i.e. sky) in the local coordinate system, with the viewer placed at the center of the spheres. Both spheres have infinite radius (epsilon apart), and each is painted with concentric circles of interpolated color perpendicular to the local Y axis of the sphere. The SoVRMLBackground node is subject to the accumulated rotations of its parent transformations - scaling and translation transformations are ignored. The sky sphere is always slightly farther away from the viewer than the ground sphere - the ground appears in front of the sky in cases where they overlap.

The skyColor field specifies the color of the sky at the various angles on the sky sphere. The first value of the skyColor field specifies the color of the sky at 0.0 degrees, the north pole (i.e. straight up from the viewer). The skyAngle field specifies the angles from the north pole in which concentric circles of color appear - the north pole of the sphere is implicitly defined to be 0.0 degrees, the natural horizon at pi/2 radians, and the south pole is pi radians. skyAngle is restricted to increasing values in the range 0.0 to pi. There must be one more skyColor value than there are skyAngle values - the first color value is the color at the north pole, which is not specified in the skyAngle field. If the last skyAngle is less than pi, then the color band between the last skyAngle and the south pole is clamped to the last skyColor. The sky color is linearly interpolated between the specified skyColor values.

The groundColor field specifies the color of the ground at the various angles on the ground sphere. The first value of the groundColor field specifies the color of the ground at 0.0 degrees, the south pole (i.e. straight down). The groundAngle field specifies the angles from the south pole that the concentric circles of color appear - the south pole of the sphere is implicitly defined at 0.0 degrees. groundAngle is restricted to increasing values in the range 0.0 to pi. There must be one more groundColor values than there are groundAngle values - the first color value is for the south pole which is not specified in the groundAngle field. If the last groundAngle is less than pi (it usually is), then the region between the last groundAngle and the north pole is invisible. The ground color is linearly interpolated between the specified groundColor values.

The backUrl, bottomUrl, frontUrl, leftUrl, rightUrl, and topUrl fields specify a set of images that define a background panorama, between the ground/sky backdrop and the world's geometry. The panorama consists of six images, each of which is mapped onto the faces of an infinitely large cube centered in the local coordinate system. The images are applied individually to each face of the cube; the entire image goes on each face. On the front, back, right, and left faces of the cube, when viewed from the inside with the Y-axis up, the texture is mapped onto each face with the same orientation as the if image was displayed normally in 2D. On the top face of the cube, when viewed from the inside looking up along the +Y axis with the +Z axis as the view up direction, the texture is mapped onto the face with the same orientation as the if image was displayed normally in 2D. On the bottom face of the box, when viewed from the inside down the -Y axis with the -Z axis as the view up direction, the texture is mapped onto the face with the same orientation as the if image was displayed normally in 2D.

Alpha values in the panorama images (i.e. two or four component images) specify that the panorama is semi-transparent or transparent in regions, allowing the groundColor and skyColor to be visible. One component images are displayed in grayscale; two component images are displayed in grayscale with alpha transparency; three component images are displayed in full RGB color; four component images are displayed in full RGB color with alpha transparency. Often, the bottomUrl and topUrl images will not be specified, to allow sky and ground to show. The other four images may depict surrounding mountains or other distant scenery. Browsers are required to support the JPEG and PNG image file formats, and in addition, may support any other image formats. Support for the GIF format (including transparent backgrounds) is recommended. See the section "Concepts - URLS and URNs" for details on the url fields.

Panorama images may be one component (grayscale), two component (grayscale plus alpha), three component (full RGB color), or four-component (full RGB color plus alpha).

Ground colors, sky colors, and panoramic images do not translate with respect to the viewer, though they do rotate with respect to the viewer. That is, the viewer can never get any closer to the background, but can turn to examine all sides of the panorama cube, and can look up and down to see the concentric rings of ground and sky (if visible).

SoVRMLBackground is not affected by SoVRMLFog. Therefore, if an SoVRMLBackground is active (i.e bound) while an SoVRMLFog is active, then the SoVRMLBackground will be displayed with no fogging effects. It is the author's responsibility to set the SoVRMLBackground values to match the SoVRMLFog (e.g. ground colors fade to fog color with distance and panorama images tinted with fog color).

The first SoVRMLBackground node found during reading of the world is automatically bound (receives set_bind TRUE) and is used as the initial background when the world is loaded.

FIELDS

SoMFFloat	groundAngle

Specifies the angles from the south pole in which the concentric circles of color appear. The south pole is 0.0 degrees. groundAngle ranges from 0.0 to pi.

SoMFColor	groundColor

Specifies the color of the ground at the various angle on the ground sphere. The first value of groundColor specifies the color of the ground at 0.0 degrees. There must be one more goundColor value than there are groundAngle values. The first color is for 0.0 which is not specified in the groundAngle field.

SoMFString	backUrl

SoMFString	bottomUrl

SoMFString	frontUrl

SoMFString	leftUrl

SoMFString	rightUrl

SoMFString	topUrl

Specify a set of images that define a background panorama between the ground/sky backdrop and the world's geometry. The panorama consists of six images, each of which is mapped onto the faces of an infinitely large cube centered in the local coordinate system.

SoMFFloat	skyAngle

Specifies the angles from the north pole in which concentric circles of color appear. The north pole is 0.0 degrees, the natural horizon pi/2 radians, and the south pole is pi radians.

SoMFColor	skyColor

Specifies the color of the sky at the various angles on the sky sphere. The first value specifies the color of the sky at 0.0 degrees, the north pole. There must be one more skyColor value than there are skyAngle values. The first color value is the color at the north pole, which is not specified in the skyAngle field.

METHODS

SoVRMLBackground()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_bind

SoMFFloat	set_groundAngle

SoMFColor	set_groundColor

SoMFString	set_backUrl

SoMFString	set_bottomUrl

SoMFString	set_frontUrl

SoMFString	set_leftUrl

SoMFString	set_rightUrl

SoMFString	set_topUrl

SoMFFloat	set_skyAngle

SoMFColor	set_skyColor

eventOut

SoSFBool	isBound

SoMFFloat	groundAngle_changed

SoMFColor	groundColor_changed

SoMFString	backUrl_changed

SoMFString	bottomUrl_changed

SoMFString	frontUrl_changed

SoMFString	leftUrl_changed

SoMFString	rightUrl_changed

SoMFString	topUrl_changed

SoMFFloat	skyAngle_changed

SoMFColor	skyColor_changed

FILE FORMAT/DEFAULTS

VRMLBackground {

groundAngle	[]

groundColor	[]

backUrl	[]

bottomUrl	[]

frontUrl	[]

leftUrl	[]

rightUrl	[]

topUrl	[]

skyAngle	[]

skyColor	[ 0 0 0 ]

}


SoVRMLBillboard

NAME

SoVRMLBillboard - grouping node that modifies its coordinate system so that its local Z-axis always points at the viewer

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoVRMLParent > SoVRMLBillboard

SYNOPSIS

#include <Inventor/VRMLNodes/SoVRMLBillboard.h>

Fields from class SoVRMLBillboard:

SoSFVec3f	axisOfRotation

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Methods from class SoVRMLBillboard:

SoVRMLBillboard()

static SoType	getClassTypeId()

Fields from class SoVRMLParent:

SoMFNode	children

Methods from class SoVRMLParent:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLBillboard node is a grouping node which modifies its coordinate system so that the billboard node's local Z-axis turns to point at the viewer. The SoVRMLBillboard node has children which may be other grouping or leaf nodes.

Note: This node is partially implemented. It functions correctly as a grouping node, but does not currently implement the automatic rotation feature.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLBillboard node is a grouping node which modifies its coordinate system so that the billboard node's local Z-axis turns to point at the viewer. The SoVRMLBillboard node has children which may be other grouping or leaf nodes.

The axisOfRotation field specifies which axis to use to perform the rotation. This axis is defined in the local coordinates of the SoVRMLBillboard node. The default (0,1,0) is useful for objects such as images of trees and lamps positioned on a ground plane. But when an object is oriented at an angle, for example, on the incline of a mountain, then the axisOfRotation may also need to be oriented at a similar angle.

A special case of billboarding is screen-alignment -- the object rotates to always stay aligned with the viewer even when the viewer elevates, pitches and rolls. This special case is distinguished by setting the axisOfRotation to (0, 0, 0).

To rotate the SoVRMLBillboard to face the viewer, determine the line between the SoVRMLBillboard's origin and the viewer's position; call this the billboard-to-viewer line. The axisOfRotation and the billboard-to-viewer line define a plane. The local z-axis of the SoVRMLBillboard is then rotated into that plane, pivoting around the axisOfRotation.

If the axisOfRotation and the billboard-to-viewer line are coincident (the same line), then the plane cannot be established, and the rotation results of the SoVRMLBillboard are undefined. For example, if the axisOfRotation is set to (0,1,0) (Y-axis) and the viewer flies over the SoVRMLBillboard and peers directly down the Y-axis the results are undefined.

Multiple instances of SoVRMLBillboards (DEF/USE) operate as expected - each instance rotates in its unique coordinate system to face the viewer.

See the "Concepts - Grouping and Children Nodes" section for a description the children, addChildren, and removeChildren fields and eventIns.

The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLBillboard's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts - Bounding Boxes" for a description of bboxCenter and bboxSize fields.

FIELDS

SoSFVec3f	axisOfRotation

Specifies which axis to use to perform the rotation.

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Specify a bounding box that encloses the children.

METHODS

SoVRMLBillboard()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFNode	addChildren

SoMFNode	removeChildren

SoSFVec3f	set_axisOfRotation

SoMFNode	set_children

eventOut

SoSFVec3f	axisOfRotation_changed

SoMFNode	children_changed

FILE FORMAT/DEFAULTS

VRMLBillboard {

axisOfRotation	0 1 0

children	[]

bboxCenter	0 0 0

bboxSize	-1 -1 -1

}


SoVRMLBox

NAME

SoVRMLBox - box shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLBox

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLBox.h>

Fields from class SoVRMLBox:

SoSFVec3f	size

Methods from class SoVRMLBox:

SoVRMLBox()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLBox node specifies a rectangular parallelepiped box in the local coordinate system centered at (0,0,0) in the local coordinate system and aligned with the coordinate axes. By default, the box measures 2 units in each dimension, from -1 to +1. The SoVRMLBox's size field specifies the extents of the box along the X, Y, and Z axes respectively and must be greater than 0.0.

Textures are applied individually to each face of the box; the entire untransformed texture goes on each face. On the front, back, right, and left faces of the box, when viewed from the outside with the Y-axis up, the texture is mapped onto each face with the same orientation as the if image was displayed in normally 2D. On the top face of the box, when viewed from the outside along the +Y axis looking down with the -Z axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box, when viewed from the outside along the -Y axis looking up with the +Z axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. SoVRMLTextureTransform affects the texture coordinates of the SoVRMLBox.

The SoVRMLBox geometry is considered to be solid and thus requires outside faces only. When viewed from the inside the results are undefined.

FIELDS

SoSFVec3f	size

METHODS

SoVRMLBox()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLBox {

size	2 2 2

}


SoVRMLCollision
(ACTION PARTIALLY IMPLEMENTED)

NAME

SoVRMLCollision - grouping node that controls collision detection

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoVRMLParent > SoVRMLGroup > SoVRMLCollision

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLCollision.h>

Fields from class SoVRMLCollision:

SoSFBool	collide

SoSFNode	proxy

Fields from class SoVRMLParent:

SoMFNode	children

Fields from class SoVRMLGroup:

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Methods from class SoVRMLCollision:

SoVRMLCollision()

static SoType	getClassTypeId()

Methods from class SoVRMLParent:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

Note: This node is partially implemented. It functions correctly as a grouping node, but does not currently implement the collision detection feature.

IV_SEPARATOR_MAX_CACHES specifies the maximum number of render caches. To disable caching entirely, set it to 0. (This can reduce memory requirements at the cost of degraded performance.) See SoSeparator for additional information on caching in general, and SoVRMLGroup for information on the CacheEnabled enum values.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

By default, all objects in the scene are collidable. Browser shall detect geometric collisions between the user's avatar (see SoVRMLNavigationInfo) and the scene's geometry, and prevent the avatar from 'entering' the geometry. The SoVRMLCollision node is a grouping node that may turn off collision detection for its descendants, specify alternative objects to use for collision detection, and send events signalling that a collision has occurred between the user's avatar and the SoVRMLCollision group's geometry or alternate. If there are no SoVRMLCollision nodes specified in a scene, browsers shall detect collision with all objects during navigation.

See the "Concepts - Grouping and Children Nodes" section for a description the children, addChildren, and removeChildren fields and eventIns.

The SoVRMLCollision node's collide field enables and disables collision detection. If collide is set to FALSE, the children and all descendants of the SoVRMLCollision node will not be checked for collision, even though they are drawn. This includes any descendant SoVRMLCollision nodes that have collide set to TRUE - (i.e. setting collide to FALSE turns it off for every node below it).

SoVRMLCollision nodes with the collide field set to TRUE detect the nearest collision with their descendant geometry (or proxies). Note that not all geometry is collidable - see each geometry node's sections for details. When the nearest collision is detected, the collided SoVRMLCollision node sends the time of the collision through its collideTime eventOut. This behavior is recursive - if an SoVRMLCollision node contains a child, descendant, or proxy (see below) that is an SoVRMLCollision node, and both SoVRMLCollisions detect that a collision has occurred, then both send a collideTime event out at the same time, and so on.

The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLCollision's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts - Bounding Boxes" for a description of the bboxCenter and bboxSize fields.

The collision proxy, defined in the proxy field, is a legal child node, (see "Concepts - Grouping and Children Nodes"), that is used as a substitute for the SoVRMLCollision's children during collision detection. The proxy is used strictly for collision detection - it is not drawn.

If the value of the collide field is FALSE, then collision detection is not performed with the children or proxy descendant nodes. If the root node of a scene is an SoVRMLCollision node with the collide field set to FALSE, then collision detection is disabled for the entire scene, regardless of whether descendant SoVRMLCollision nodes have set collide TRUE.

If the value of the collide field is TRUE and the proxy field is non-NULL, then the proxy field defines the scene which collision detection is performed. If the proxy value is NULL, the children of the collision node are collided against.

If proxy is specified, then any descendant children of the SoVRMLCollision node are ignored during collision detection. If children is empty, collide is TRUE and proxy is specified, then collision detection is done against the proxy but nothing is displayed (i.e. invisible collision objects).

The collideTime eventOut generates an event specifying the time when the user's avatar (see SoVRMLNavigationInfo) intersects the collidable children or proxy of the SoVRMLCollision node. An ideal implementation computes the exact time of intersection. Implementations may approximate the ideal by sampling the positions of collidable objects and the user. Refer to the SoVRMLNavigationInfo node for parameters that control the user's size.

Browsers are responsible for defining the navigation behavior when collisions occur. For example, when the user comes sufficiently close to an object to trigger a collision, the browser may have the user bounce off the object, come to a stop, or glide along the surface.

FIELDS

SoSFBool	collide

Enables (TRUE) or disables (FALSE) collision detection.

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Specifies a bounding box that includes the children.

SoSFNode	proxy

Child node that is used as a substitute for the SoVRMLCollision's children during collision detection.

METHODS

SoVRMLCollision()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFNode	addChildren

SoMFNode	removeChildren

SoMFNode	set_children

SoSFBool	set_collide

eventOut

SoSFTime	collideTime (Note: This event not implemented)

SoMFNode	children_changed

SoSFBool	collide_changed

FILE FORMAT/DEFAULTS

VRMLCollision {

children	[]

collide	TRUE

bboxCenter	0 0 0

bboxSize	-1 -1 -1

proxy	NULL

}


SoVRMLColor

NAME

SoVRMLColor - specifies RGB colors to be used in the fields of another node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLColor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLColor.h>

Fields from class SoVRMLColor:

SoMFColor	color

Methods from class SoVRMLColor:

SoVRMLColor()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of RGB colors to be used in the fields of another node.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node defines a set of RGB colors to be used in the fields of another node.

SoVRMLColor nodes are only used to specify multiple colors for a single piece of geometry, such as a different color for each face or vertex of an SoVRMLIndexedFaceSet. A SoVRMLMaterial node is used to specify the overall material parameters of a lighted geometry. If both an SoVRMLMaterial and an SoVRMLColor node are specified for a geometry, the colors should ideally replace the diffuse component of the material.

Textures take precedence over colors; specifying both an SoVRMLTexture and an SoVRMLColor node for a geometry will result in the SoVRMLColor node being ignored. See "Concepts - Lighting Model" for details on lighting equations.

FIELDS

SoMFColor	color

RGB color values.

METHODS

SoVRMLColor()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFColor	set_color

eventOut

SoMFColor	color_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLColor {

color	[]

}


SoVRMLColorInterpolator

NAME

SoVRMLColorInterpolator - interpolates among a set of color values

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator > SoVRMLColorInterpolator

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLColorInterpolator.h>

Fields from class SoVRMLColorInterpolator:

SoMFFloat	key

SoMFColor	keyValue

Methods from class SoVRMLColorInterpolator:

SoVRMLColorInterpolator()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node interpolates among a set of MFColor key values, to produce an SFColor (RGB) value_changed event. The number of colors in the keyValue field must be equal to the number of keyframes in the key field. The keyValue field and value_changed events are defined in RGB color space. A linear interpolation, using the value of set_fraction as input, is performed in HSV space.

Refer to "Concepts - Interpolators" for a more detailed discussion of interpolators.

FIELDS

SoMFFloat	key

SoMFColor	keyValue

METHODS

SoVRMLColorInterpolator()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_fraction

SoMFFloat	set_key

SoMFColor	set_keyValue

eventOut

SoSFColor	value_changed

SoMFFloat	key_changed

SoMFColor	keyValue_changed

FILE FORMAT/DEFAULTS

VRMLColorInterpolator {

key	[]

keyValue	[]

}


SoVRMLCone

NAME

SoVRMLCone - cone shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLCone

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLCone.h>

Fields from class SoVRMLCone:

SoSFFloat	bottomRadius

SoSFFloat	height

SoSFBool	side

SoSFBool	bottom

Methods from class SoVRMLCone:

SoVRMLCone()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLCone node specifies a cone which is centered in the local coordinate system and whose central axis is aligned with the local Y-axis. The bottonRadius field specifies the radius of the cone's base, and the height field specifies the height of the cone from the center of the base to the apex. By default, the cone has a radius of 1.0 at the bottom and a height of 2.0, with its apex at y=1 and its bottom at y=-1. Both bottomRadius and height must be greater than 0.0.

The side field specifies whether sides of the cone are created, and the bottom field specifies whether the bottom cap of the cone is created. A value of TRUE specifies that this part of the cone exists, while a value of FALSE specifies that this part does not exist (not rendered). Parts with field values of FALSE are not collided with during collision detection.

When a texture is applied to the sides of the cone, the texture wraps counterclockwise (from above) starting at the back of the cone. The texture has a vertical seam at the back in the YZ plane, from the apex (0, height/2, 0) to the point (0, 0, -r). For the bottom cap, a circle is cut out of the unit texture square centered at (0, -height/2, 0) with dimensions (2 * bottomRadius) by (2 * bottomRadius). The bottom cap texture appears right side up when the top of the cone is rotated towards the -Z axis. SoVRMLTextureTransform affects the texture coordinates of the SoVRMLCone.

The SoVRMLCone geometry is considered to be solid and thus requires outside faces only. When viewed from the inside the results are undefined.

FIELDS

SoSFFloat	bottomRadius

SoSFFloat	height

Specify the cone's height and the radius of the base circle; values must be greater than 0.0.

SoSFBool	side

Specifies whether the sides of the cone are created.

SoSFBool	bottom

Specifies whether the bottom cap of the cone is created.

METHODS

SoVRMLCone()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLCone {

bottomRadius	1

height	2

side	TRUE

bottom	TRUE

}


SoVRMLCoordinate

NAME

SoVRMLCoordinate - coordinate node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLCoordinate

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLCoordinate.h>

Fields from class SoVRMLCoordinate:

SoMFVec3f	point

Methods from class SoVRMLCoordinate:

SoVRMLCoordinate()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node defines a set of 3D coordinates to be used in the coord field of vertex-based geometry nodes (such as SoVRMLIndexedFaceSet, SoVRMLIndexedLineSet, and SoVRMLPointSet).

FIELDS

SoMFVec3f	point

Coordinate points.

METHODS

SoVRMLCoordinate()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFVec3f	set_point

eventOut

SoMFVec3f	point_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLCoordinate {

point	[]

}


SoVRMLCoordinateInterpolator

NAME

SoVRMLCoordinateInterpolator - interpolates among a set of coordinate values

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator > SoVRMLCoordinateInterpolator

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLCoordinateInterpolator.h>

Fields from class SoVRMLCoordinateInterpolator:

SoMFFloat	key

SoMFVec3f	keyValue

Methods from class SoVRMLCoordinateInterpolator:

SoVRMLCoordinateInterpolator()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node linearly interpolates among a set of MFVec3f values. This would be appropriate for interpolating SoVRMLCoordinate positions for a geometric morph.

The number of coordinates in the keyValue field must be an integer multiple of the number of keyframes in the key field; that integer multiple defines how many coordinates will be contained in the value_changed events.

Refer to "Concepts - Interpolators" for a more detailed discussion of interpolators.

FIELDS

SoMFFloat	key

SoMFVec3f	keyValue

METHODS

SoVRMLCoordinateInterpolator()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_fraction

SoMFFloat	set_key

SoMFVec3f	set_keyValue

eventOut

SoMFVec3f	value_changed

SoMFFloat	key_changed

SoMFVec3f	keyValue_changed

FILE FORMAT/DEFAULTS

VRMLCoordinateInterpolator {

key	[]

keyValue	[]

}


SoVRMLCylinder

NAME

SoVRMLCylinder - cylinder shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLCylinder

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLCylinder.h>

Fields from class SoVRMLCylinder:

SoSFBool	bottom

SoSFFloat	height

SoSFFloat	radius

SoSFBool	side

SoSFBool	top

Methods from class SoVRMLCylinder:

SoVRMLCylinder()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLCylinder node specifies a capped cylinder centered at (0,0,0) in the local coordinate system and with a central axis oriented along the local Y-axis. By default, the cylinder is sized at -1 to +1 in all three dimensions. The radius field specifies the cylinder's radius and the height field specifies the cylinder's height along the central axis. Both radius and height must be greater than 0.0.

The cylinder has three parts: the side, the top (Y = +height) and the bottom (Y = -height). Each part has an associated SFBool field that indicates whether the part exists (TRUE) or does not exist (FALSE). If the parts do not exist, they are not considered during collision detection.

When a texture is applied to a cylinder, it is applied differently to the sides, top, and bottom. On the sides, the texture wraps counterclockwise (from above) starting at the back of the cylinder. The texture has a vertical seam at the back, intersecting the YZ plane. For the top and bottom caps, a circle is cut out of the unit texture square centered at (0, +/- height, 0) with dimensions 2*radius by 2*radius. The top texture appears right side up when the top of the cylinder is tilted toward the +Z axis, and the bottom texture appears right side up when the top of the cylinder is tilted toward the -Z axis. SoVRMLTextureTransform affects the texture coordinates of the SoVRMLCylinder.

The SoVRMLCylinder geometry is considered to be solid and thus requires outside faces only. When viewed from the inside the results are undefined.

FIELDS

SoSFFloat	height

SoSFFloat	radius

Specifies the cylinder's height and radius; values must be greater than 0.0.

SoSFBool	side

Specifies whether the sides are created.

SoSFBool	top

Specifies whether the top cap is created.

SoSFBool	bottom

Specifies whether the bottom cap is created.

METHODS

SoVRMLCylinder()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLCylinder {

bottom	TRUE

height	2

radius	1

side	TRUE

top	TRUE

}


SoVRMLCylinderSensor
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLCylinderSensor - maps pointing device motion onto a cylinder

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLCylinderSensor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLCylinderSensor.h>

Fields from class SoVRMLCylinderSensor:

SoSFBool	autoOffset

SoSFFloat	diskAngle

SoSFBool	enabled

SoSFFloat	maxAngle

SoSFFloat	minAngle

SoSFFloat	offset

Methods from class SoVRMLCylinderSensor:

SoVRMLCylinderSensor()

static void	enableEvents(SbBool OnOffFlag)

static SbBool	isEventsEnabled()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLCylinderSensor maps pointing device (e.g. mouse or wand) motion into a rotation on an invisible cylinder that is aligned with the Y axis of its local space.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLCylinderSensor maps pointing device (e.g. mouse or wand) motion into a rotation on an invisible cylinder that is aligned with the Y axis of its local space.

The enabled exposed field enables and disables the SoVRMLCylinderSensor - if TRUE, the sensor reacts appropriately to user events, if FALSE, the sensor does not track user input or send output events. If enabled receives a FALSE event and isActive is TRUE, the sensor becomes disabled and deactivated, and outputs an isActive FALSE event. If enabled receives a TRUE event the sensor is enabled and ready for user activation.

The SoVRMLCylinderSensor generates events if the pointing device is activated while over any descendant geometry nodes of its parent group and then moved while activated. Typically, the pointing device is a 2D device such as a mouse. The pointing device is considered to be moving within a plane at a fixed distance from the viewer and perpendicular to the line of sight; this establishes a set of 3D coordinates for the pointer. If a 3D pointer is in use, then the sensor generates events only when the pointer is within the user's field of view. In either case, the pointing device is considered to "pass over" geometry when that geometry is intersected by a line extending from the viewer and passing through the pointer's 3D coordinates. If multiple sensors' geometries intersect this line (hereafter called the bearing), only the nearest will be eligible to generate events.

Upon activation of the pointing device (e.g. mouse button down) over the sensor's geometry, an isActive TRUE event is sent. The angle between the bearing vector and the local Y axis of the SoVRMLCylinderSensor determines whether the sides of the invisible cylinder or the caps (disks) are used for manipulation. If the angle is less than the diskAngle, then the geometry is treated as an infinitely large disk and dragging motion is mapped into a rotation around the local Y axis of the sensor's coordinate system. The feel of the rotation is as if you were rotating a dial or crank. Using the right-hand rule, the X axis of the sensor's local coordinate system, (defined by parents), represents the zero rotation value around the sensor's local Y axis. For each subsequent position of the bearing, a rotation_changed event is output which corresponds to the angle between the local X axis and the vector defined by the intersection point and the nearest point on the local Y axis, plus the offset value. trackPoint_changed events reflect the unclamped drag position on the surface of this disk. When the pointing device is deactivated and autoOffset is TRUE, offset is set to the last rotation angle and an offset_changed event is generated. See "Concepts - Drag Sensors" for more details on autoOffset and offset_changed.

If the angle between the bearing vector and the local Y axis of the SoVRMLCylinderSensor is greater than or equal to diskAngle, then the sensor behaves like a cylinder or rolling pin. The shortest distance between the point of intersection (between the bearing and the sensor's geometry) and the Y axis of the parent group's local coordinate system determines the radius of an invisible cylinder used to map pointing device motion, and mark the zero rotation value. For each subsequent position of the bearing, a rotation_changed event is output which corresponds to a relative rotation from the original intersection, plus the offset value. trackPoint_changed events reflect the unclamped drag position on the surface of this cylinder. When the pointing device is deactivated and autoOffset is TRUE, offset is set to the last rotation angle and an offset_changed event is generated. See "Concepts - Drag Sensors" for more details.

When the sensor generates an isActive TRUE event, it grabs all further motion events from the pointing device until it releases and generates an isActive FALSE event (other pointing device sensors cannot generate events during this time). Motion of the pointing device while isActive is TRUE is referred to as a "drag". If a 2D pointing device is in use, isActive events will typically reflect the state of the primary button associated with the device (i.e. isActive is TRUE when the primary button is pressed, and FALSE when not released). If a 3D pointing device (e.g. wand) is in use, isActive events will typically reflect whether the pointer is within or in contact with the sensor's geometry.

While the pointing device is activated, trackPoint_changed and rotation_changed events are output and are interpreted from pointing device motion based on the sensor's local coordinate system at the time of activation. trackPoint_changed events represent the unclamped intersection points on the surface of the invisible cylinder or disk. If the initial angle results in cylinder rotation (as opposed to disk behavior) and if the pointing device is dragged off the cylinder while activated, browsers may interpret this in several ways (e.g. clamp all values to the cylinder, continue to rotate as the point is dragged away from the cylinder, etc.). Each movement of the pointing device, while isActive is TRUE, generates trackPoint_changed and rotation_changed events.

minAngle and maxAngle may be set to clamp rotation_changed events to a range of values (measured in radians about the local Z and Y axis as appropriate). If minAngle is greater than maxAngle, rotation_changed events are not clamped.

See "Concepts - Pointing Device Sensors and Drag Sensors" for more details.

FIELDS

SoSFBool	autoOffset

Specifies whether to set offset to the last rotation angle (TRUE).

SoSFFloat	diskAngle

Used to determine the mapping of the dragging motion.

SoSFBool	enabled

Enables (TRUE) or disables (FALSE) the sensor.

SoSFFloat	maxAngle

SoSFFloat	minAngle

Used to clamp rotation_changed events to a range of values.

SoSFFloat	offset

Amount to add to the rotation event value.

METHODS

SoVRMLCylinderSensor()

Constructor.

static void	enableEvents(SbBool OnOffFlag)

Enables/disables eventIn and eventOut events for all SoVRMLCylinderSensor objects. If you have created several objects of this class, you can disable/enable these events for all of them with a single call to this method.

static SbBool	isEventsEnabled()

Queries if eventIn and eventOut events are enabled for all objects of this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_autoOffset

SoSFFloat	set_diskAngle

SoSFBool	set_enabled

SoSFFloat	set_maxAngle

SoSFFloat	set_minAngle

SoSFFloat	set_offset

eventOut

SoSFBool	isActive

SoSFRotation	rotation_changed

SoSFVec3f	trackPoint_changed

SoSFBool	autoOffset_changed

SoSFFloat	diskAngle_changed

SoSFBool	enabled_changed

SoSFFloat	maxAngle_changed

SoSFFloat	minAngle_changed

SoSFFloat	offset_changed

FILE FORMAT/DEFAULTS

VRMLCylinderSensor {

autoOffset	TRUE

diskAngle	0.262

enabled	TRUE

maxAngle	-1

minAngle	0

offset	0

}


SoVRMLDirectionalLight

NAME

SoVRMLDirectionalLight - node representing a directional light source

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLLight > SoVRMLDirectionalLight

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLDirectionalLight.h>

Fields from class SoVRMLDirectionalLight:

SoSFVec3f	direction

Methods from class SoVRMLDirectionalLight:

SoVRMLDirectionalLight()

static SoType	getClassTypeId()

Fields from class SoVRMLLight:

SoSFFloat	ambientIntensity

SoSFColor	color

SoSFFloat	intensity

SoSFBool	on

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLDirectionalLight node defines a directional light source that illuminates along rays parallel to a given 3-dimensional vector.

The direction field specifies the direction vector within the local coordinate system that the light illuminates in. Light is emitted along parallel rays from an infinite distance away. A directional light source illuminates only the objects in its enclosing parent group. The light may illuminate everything within this coordinate system, including all children and descendants of its parent group. The accumulated transformations of the parent nodes affect the light.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLDirectionalLight node defines a directional light source that illuminates along rays parallel to a given 3-dimensional vector. See "Concepts - Lights" for a definition of the ambientIntensity, color, intensity, and on fields.

The direction field specifies the direction vector within the local coordinate system that the light illuminates in. Light is emitted along parallel rays from an infinite distance away. A directional light source illuminates only the objects in its enclosing parent group. The light may illuminate everything within this coordinate system, including all children and descendants of its parent group. The accumulated transformations of the parent nodes affect the light.

See "Concepts - Lighting Model" for a precise description of VRML's lighting equations.

FIELDS

SoSFVec3f	direction

Illumination direction vector.

METHODS

SoVRMLDirectionalLight()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_ambientIntensity

SoSFColor	set_color

SoSFVec3f	set_direction

SoSFFloat	set_intensity

SoSFBool	set_on

eventOut

SoSFFloat	ambientIntensity_changed

SoSFColor	color_changed

SoSFVec3f	direction_changed

SoSFFloat	intensity_changed

SoSFBool	on_changed

ACTION BEHAVIOR

SoGLRenderAction

FILE FORMAT/DEFAULTS

VRMLDirectionalLight {

ambientIntensity	0

color	1 1 1

direction	0 0 -1

intensity	1

on	TRUE

}


SoVRMLEXTERNPROTODef

NAME

SoVRMLEXTERNPROTODef - contains the internal definition of an externprototype

INHERITS FROM

SoBase > SoVRMLEXTERNPROTODef

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLEXTERNPROTODef.h>

Methods from class SoVRMLEXTERNPROTODef:

static SoType	getClassTypeId()

virtual int	getFields(SoVRMLPROTOFieldList &resultList) const

static int	getEXTERNPROTOList(SoBaseList &list)

SbString	getEXTERNPROTOName()

virtual SoType	getTypeId() const

Methods from class SoBase:

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains all the information required to set up an instance of a VRML 2.0 externprototype. It is derived from SoBase and is created when an externprototype is read from a file or buffer.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

int	getFields(SoVRMLEXTERNPROTOFieldList &resultList) const

Appends pointers to all of this object's fields to resultList and returns the number of fields appended. Each item in the list is a pointer to an SoVRMLEXTERNPROTOField.

static int	getEXTERNPROTOList(SoBaseList &list)

Appends pointers to all of the SoVRMLEXTERNPROTO nodes that have been defined to list, and returns the number of SoVRMLEXTERNPROTO node pointers appended.

SbString	getEXTERNPROTOName()

Returns the name of the EXTERNPROTO defined by this SoVRMLEXTERNPROTODef.


SoVRMLEXTERNPROTOField

NAME

SoVRMLEXTERNPROTOField - contains the internal definition for one of an externprototype's fields, exposedFields, eventIns or eventOuts

INHERITS FROM

SoBase > SoVRMLEXTERNPROTOField

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLEXTERNPROTOField.h>

enum Kind	{
SoVRMLEXTERNPROTOField::PROTO_FIELD
Regular field
SoVRMLEXTERNPROTOField::PROTO_EXPOSEDFIELD
Field with implied set_ and _changed eventIn and eventOut
SoVRMLEXTERNPROTOField::PROTO_EVENTIN
eventIn
SoVRMLEXTERNPROTOField::PROTO_EVENTOUT
eventOut
}

Methods from class SoVRMLEXTERNPROTOField:

static SoType	getClassTypeId()

Kind	getFieldKind()

SoType	getFieldType()

SbString	getFieldName()

Methods from class SoBase:

Not applicable.

DESCRIPTION

The interface to an externprototype is through the public fields, exposedFields, eventIns and eventOuts of an externprototype declaration. This class defines one of these interfaces. The list of SoVRMLEXTERNPROTOField definitions is created when the externprototype is read from a file or buffer and cannot be created programmatically.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

Kind	getFieldKind()

Returns the kind of field this is.

SoType	getFieldType()

Returns the type of field this is.

SbString	getFieldName()

Returns the name of the field.


SoVRMLEXTERNPROTOFieldList

NAME

SoVRMLEXTERNPROTOFieldList - maintains a list of pointers to the field definitions of an externprototype

INHERITS FROM

SbPList > SoVRMLEXTERNPROTOFieldList

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLEXTERNPROTOFieldList.h>

Methods from class SoVRMLEXTERNPROTOFieldList:

SoVRMLEXTERNPROTOFieldList()

SoVRMLEXTERNPROTOFieldList(int size)

SoVRMLEXTERNPROTOFieldList(const SoFieldList &l)

~SoVRMLEXTERNPROTOFieldList()

SoVRMLEXTERNPROTOFieldList*	operator [](int i) const

DESCRIPTION

This subclass of SbPList holds lists of pointers to instances of class SoVRMLEXTERNPROTOField.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

SoVRMLEXTERNPROTOFieldList()

Constructor.

SoVRMLEXTERNPROTOFieldList(int size)

Constructor that pre-allocates storage for size pointers.

SoVRMLEXTERNPROTOFieldList(const SoFieldList &l)

Constructor that copies the contents of another list.

~SoVRMLEXTERNPROTOFieldList()

Destructor.

SoVRMLEXTERNPROTOFieldList*	operator [](int i) const

Accesses an element of a list.


SoVRMLEXTERNPROTOInstance

NAME

SoVRMLEXTERNPROTOInstance - instance of an externprototype

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLEXTERNPROTOInstance

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLEXTERNPROTOInstance.h>

SoVRMLEXTERNPROTOInstance(SoVRMLPROTODef* protoDef)

static SoType	getClassTypeId()

void	setupInstance()

SoType	getPROTOType()

Methods from class SoNode:

Not applicable.

Methods from class SoFieldContainer:

Not applicable.

Methods from class SoBase:

Not applicable.

DESCRIPTION

An externprototype definition read from a file or a buffer does not define an actual node instance. This class is used to create the instance of a previously defined externprototype.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

SoVRMLEXTERNPROTOInstance(SoVRMLEXTERNPROTODef* externprotoDef)

Creates an instance of the externprototype defined by the definition externprotoDef.

static SoType	getClassTypeId()

Returns type identifier for this class.

void	setupInstance()

Finishes setting up an instance of an externprototype. The steps required to create an instance of an externprototype are:

1. Read in the externprototype. You can read it in from a file or a buffer using the readAllVRML method of SoDB.

2. Find the externprototype definition from the externprototype's name using the static method findEXTERNPROTO in SoBase.

SoVRMLEXTERNPROTODef *goldProtoDef = (SoVRMLEXTERNPROTODef *) SoBase::findEXTERNPROTO(SbName("newGold"));

3. Create an instance of the prototype.

SoVRMLEXTERNPROTOInstance *goldInst = new SoVRMLEXTERNPROTOInstance(goldProtoDef);

This will partially set up the instance and create the fields.

4. Set the values of the fields.

((SoSFColor *) (goldInst->getField("diffColor")))->setValue(0.8, 0.6, 0.0));

5. Finish the setup of the instance.

goldInst->setupInstance();

The order of the calls is important. If the value of the field is to be changed from the default, it must be changed before setupInstance is called.

SoType	getEXTERNPROTOType()

Returns the type of the externprototype being instanced. A type of an externprototype determines where it can be instanced. The first node found in the PROTO defined in the externproto definition defines the type of the externprototype.


SoVRMLElevationGrid

NAME

SoVRMLElevationGrid - specifies a uniform rectangular grid of varying height in the XZ plane

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLGridShape > SoVRMLElevationGrid

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLElevationGrid.h>

Fields from class SoVRMLElevationGrid:

SoSFBool	ccw

SoSFFloat	creaseAngle

SoSFBool	solid

Fields from class SoVRMLGridShape:

SoSFNode	color

SoSFBool	colorPerVertex

SoMFFloat	height

SoSFNode	normal

SoSFBool	normalPerVertex

SoSFNode	texCoord

SoSFInt32	xDimension

SoSFFloat	xSpacing

SoSFInt32	zDimension

SoSFFloat	zSpacing

Methods from class SoVRMLElevationGrid:

SoVRMLElevationGrid()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLElevationGrid node specifies a uniform rectangular grid of varying height in the XZ plane of the local coordinate system. The geometry is described by a scalar array of height values that specify the height of a rectangular surface above each point of the grid.

The xDimension and zDimension fields indicate the number of divisions of the grid height array in the X and Z directions. Both xDimension and zDimension must be > 1. The vertex locations for the rectangles are defined by the height field and the xSpacing and zSpacing fields:

•	The height field is an xDimension by zDimension array of scalar values representing the height above the grid for each vertex the height values are stored in row major order.

•	The xSpacing and zSpacing fields indicates the distance between vertices in the X and Z directions respectively, and must be >= 0.

Thus, the vertex corresponding to the point, P[i, j], on the grid is placed at:

        P[i,j].x = xSpacing * i
        P[i,j].y = height[ i + j * zDimension]
        P[i,j].z = zSpacing * j

where 0<i<xDimension and 0<j<zDimension.

The set_height eventIn allows the height MFFloat field to be changed to allow animated SoVRMLElevationGrids.

The default texture coordinates range from [0,0] at the first vertex to [1,1] at the last vertex. The S texture coordinate will be aligned with X, and the T texture coordinate with Z.

The colorPerVertex field determines whether colors (if specified in the color field) should be applied to each vertex or each quadrilateral of the SoVRMLElevationGrid. If colorPerVertex is FALSE and the color field is not NULL, then the color field must contain a Color node containing at least (xDimension-1)*(zDimension-1) colors. If colorPerVertex is TRUE and the color field is not NULL, then the color field must contain a Color node containing at least xDimension*zDimension colors.

See the "Concepts - Geometry" for a description of the ccw, solid, and creaseAngle fields.

By default, the rectangles are defined with a counterclockwise ordering, so the Y component of the normal is positive. Setting the ccw field to FALSE reverses the normal direction. Backface culling is enabled when the ccw field and the solid field are both TRUE (the default).

NOTE: An elevation grid may not render or pick correctly if any of its polygons are self-intersecting or non-planar.

FIELDS

SoSFBool	ccw

Indicates how the vertices of faces are ordered.

SoSFFloat	creaseAngle

Indicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edges when default normals are computed and used.

SoSFBool	solid

Indicates whether the shape encloses a volume.

METHODS

SoVRMLElevationGrid()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFFloat	set_height

SoSFNode	set_color

SoSFNode	set_normal

SoSFNode	set_texCoord

eventOut

SoSFNode	color_changed

SoSFNode	normal_changed

SoSFNode	texCoord_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLElevationGrid {

color	NULL

normal	NULL

texCoord	NULL

height	[]

ccw	TRUE

colorPerVertex	TRUE

creaseAngle	0

normalPerVertex	TRUE

solid	TRUE

xDimension	0

xSpacing	0.0

zDimension	0

zSpacing	0.0

}


SoVRMLExtrusion

NAME

SoVRMLExtrusion - specifies geometric shapes based on a 2D cross section along a 3D spine

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLExtrusion

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLExtrusion.h>

Fields from class SoVRMLExtrusion:

SoSFBool	beginCap

SoSFBool	ccw

SoSFBool	convex

SoSFFloat	creaseAngle

SoMFVec2f	crossSection

SoSFBool	endCap

SoMFRotation	orientation

SoMFVec2f	scale

SoSFBool	solid

SoMFVec3f	spine

Methods from class SoVRMLExtrusion:

SoVRMLExtrusion()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLExtrusion node specifies geometric shapes based on a two-dimensional cross section extruded along a three-dimensional spine. The cross section can be scaled and rotated at each spine point to produce a wide variety of shapes.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLExtrusion node specifies geometric shapes based on a two-dimensional cross section extruded along a three-dimensional spine. The cross section can be scaled and rotated at each spine point to produce a wide variety of shapes.

An SoVRMLExtrusion is defined by a 2D crossSection piecewise linear curve (described as a series of connected vertices), a 3D spine piecewise linear curve (also described as a series of connected vertices), a list of 2D scale parameters, and a list of 3D orientation parameters. Shapes are constructed as follows: The cross-section curve, which starts as a curve in the XZ plane, is first scaled about the origin by the first scale parameter (first value scales in X, second value scales in Z). It is then rotated about the origin by the first orientation parameter, and translated by the vector given as the first vertex of the spine curve. It is then extruded through space along the first segment of the spine curve. Next, it is scaled and rotated by the second scale and orientation parameters and extruded by the second segment of the spine, and so on. The number of scale and orientation values shall equal the number of spine points, or contain one value that is applied to all points. The scale values must be > 0.

A transformed cross section is found for each joint (that is, at each vertex of the spine curve, where segments of the extrusion connect), and the joints and segments are connected to form the surface. No check is made for self-penetration. Each transformed cross section is determined as follows:

1.	Start with the cross section as specified, in the XZ plane.

2.	Scale it about (0, 0, 0) by the value for scale given for the current joint.

3.	Apply a rotation so that when the cross section is placed at its proper location on the spine it will be oriented properly. Essentially, this means that the cross section's Y axis (up vector coming out of the cross section) is rotated to align with an approximate tangent to the spine curve.

For all points other than the first or last: The tangent for spine[i] is found by normalizing the vector defined by (spine[i+1] - spine[i-1]).

If the spine curve is closed: The first and last points need to have the same tangent. This tangent is found as above, but using the points spine[0] for spine[i], spine[1] for spine[i+1] and spine[n-2] for spine[i-1], where spine[n-2] is the next to last point on the curve. The last point in the curve, spine[n-1], is the same as the first, spine[0].

If the spine curve is not closed: The tangent used for the first point is just the direction from spine[0] to spine[1], and the tangent used for the last is the direction from spine[n-2] to spine[n-1].

In the simple case where the spine curve is flat in the XY plane, these rotations are all just rotations about the Z axis. In the more general case where the spine curve is any 3D curve, you need to find the destinations for all 3 of the local X, Y, and Z axes so you can completely specify the rotation. The Z axis is found by taking the cross product of:

(spine[i-1] - spine[i]) and (spine[i+1] - spine[i]).

If the three points are collinear then this value is zero, so take the value from the previous point. Once you have the Z axis (from the cross product) and the Y axis (from the approximate tangent), calculate the X axis as the cross product of the Y and Z axes.

4.	Given the plane computed in step 3, apply the orientation to the cross-section relative to this new plane. Rotate it counter-clockwise about the axis and by the angle specified in the orientation field at that joint.

5.	Finally, the cross section is translated to the location of the spine point.

Surfaces of revolution: If the cross section is an approximation of a circle and the spine is straight, then the SoVRMLExtrusion is equivalent to a surface of revolution, where the scale parameters define the size of the cross section along the spine.

Cookie-cutter extrusions: If the scale is 1, 1 and the spine is straight, then the cross section acts like a cookie cutter, with the thickness of the cookie equal to the length of the spine.

Bend/twist/taper objects: These shapes are the result of using all fields. The spine curve bends the extruded shape defined by the cross section, the orientation parameters twist it around the spine, and the scale parameters taper it (by scaling about the spine).

SoVRMLExtrusion has three parts: the sides, the beginCap (the surface at the initial end of the spine) and the endCap (the surface at the final end of the spine). The caps have an associated SFBool field that indicates whether it exists (TRUE) or doesn't exist (FALSE).

When the beginCap or endCap fields are specified as TRUE, planar cap surfaces will be generated regardless of whether the crossSection is a closed curve. (If crossSection isn't a closed curve, the caps are generated as if it were -- equivalent to adding a final point to crossSection that's equal to the initial point. Note that an open surface can still have a cap, resulting (for a simple case) in a shape something like a soda can sliced in half vertically.) These surfaces are generated even if spine is also a closed curve. If a field value is FALSE, the corresponding cap is not generated.

SoVRMLExtrusion automatically generates its own normals. Orientation of the normals is determined by the vertex ordering of the triangles generated by SoVRMLExtrusion. The vertex ordering is in turn determined by the crossSection curve. If the crossSection is counterclockwise when viewed from the +Y axis, then the polygons will have counterclockwise ordering when viewed from 'outside' of the shape (and vice versa for clockwise ordered crossSection curves).

Texture coordinates are automatically generated by extrusions. Textures are mapped so that the coordinates range in the U direction from 0 to 1 along the crossSection curve (with 0 corresponding to the first point in crossSection and 1 to the last) and in the V direction from 0 to 1 along the spine curve (again with 0 corresponding to the first listed spine point and 1 to the last). When crossSection is closed, the texture has a seam that follows the line traced by the crossSection's start/end point as it travels along the spine. If the endCap and/or beginCap exist, the crossSection curve is uniformly scaled and translated so that the largest dimension of the cross-section (X or Z) produces texture coordinates that range from 0.0 to 1.0. The beginCap and endCap textures' S and T directions correspond to the X and Z directions in which the crossSection coordinates are defined.

See "Concepts - Geometry Nodes" for a description of the ccw, solid, convex, and creaseAngle fields.

FIELDS

SoSFBool	beginCap

SoSFBool	ccw

SoSFBool	convex

SoSFFloat	creaseAngle

SoMFVec2f	crossSection

SoSFBool	endCap

SoMFRotation	orientation

SoMFVec2f	scale

SoSFBool	solid

SoMFVec3f	spine

METHODS

SoVRMLExtrusion()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFVec2f	set_crossSection

SoMFRotation	set_orientation

SoMFVec2f	set_scale

SoMFVec3f	set_spine

FILE FORMAT/DEFAULTS

VRMLExtrusion {

beginCap	TRUE

ccw	TRUE

convex	TRUE

creaseAngle	0

crossSection	[ 1 1, 1 -1, -1 -1, -1 1, 1 1 ]

endCap	TRUE

orientation	0 0 1 0

scale	1 1

solid	TRUE

spine	[ 0 0 0, 0 1 0 ]

}


SoVRMLFog
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLFog - simulates fog

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLFog

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLFog.h>

Fields from class SoVRMLFog:

SoSFColor	color

SoSFString	fogType

SoSFFloat	visibilityRange

Methods from class SoVRMLFog:

SoVRMLFog()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLFog node provides a way to simulate atmospheric effects.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLFog node provides a way to simulate atmospheric effects by blending objects with the color specified by the color field based on the objects' distances from the viewer. The distances are calculated in the coordinate space of the SoVRMLFog node. The visibilityRange specifies the distance (in the SoVRMLFog node's coordinate space) at which objects are totally obscured by the fog. Objects located visibilityRange meters or more away from the viewer are drawn with a constant color of color. Objects very close to the viewer are blended very little with the fog color. A visibilityRange of 0.0 or less disables the SoVRMLFog node. Note that visibilityRange is affected by the scaling transformations of the SoVRMLFog node's parents - translations and rotations have no affect on visibilityRange.

SoVRMLFog nodes are bindable children nodes and thus there exists an SoVRMLFog stack, in which the top-most SoVRMLFog node on the stack is currently active. To push an SoVRMLFog node onto the top of the stack, a TRUE value is sent to the set_bind eventIn. Once active, the SoVRMLFog is then bound to the browser's view. A FALSE value of set_bind pops the SoVRMLFog from the stack and unbinds it from the browser viewer. See "Concepts - Bindable Children Nodes" for more details on the SoVRMLFog stack.

The fogType field controls how much of the fog color is blended with the object as a function of distance. If fogType is "LINEAR" (the default), then the amount of blending is a linear function of the distance, resulting in a depth cuing effect. If fogType is "EXPONENTIAL" then an exponential increase in blending should be used, resulting in a more natural fog appearance.

For best visual results, the SoVRMLBackground node (which is unaffected by the SoVRMLFog node) should be the same color as the fog node. The SoVRMLFog node can also be used in conjunction with the visibilityLimit field of SoVRMLNavigationInfo node to provide a smooth fade out of objects as they approach the far clipping plane.

See the section "Concepts - Lighting Model" for details on lighting calculations.

FIELDS

SoSFColor	color

SoSFString	fogType

SoSFFloat	visibilityRange

METHODS

SoVRMLFog()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_bind

SoSFColor	set_color

SoSFString	set_fogType

SoSFFloat	set_visibilityRange

eventOut

SoSFBool	isBound

SoSFColor	color_changed

SoSFString	fogType_changed

SoSFFloat	visibilityRange_changed

FILE FORMAT/DEFAULTS

VRMLFog {

color	1 1 1

fogType	"LINEAR"

visibilityRange	0

}


SoVRMLFontStyle

NAME

SoVRMLFontStyle - specifies font size, family, style, etc.

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLFontStyle

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLFontStyle.h>

enum Family	{
SoVRMLFontStyle::SERIF,
Use Serif style (such as Times-Roman)
SoVRMLFontStyle::SANS,
Use Sans Serif style (such as Helvetica)
SoVRMLFontStyle::TYPEWRITER
Use fixed pitch style (such as Courier)
}

enum Style	{
SoVRMLFontStyle::PLAIN,
No modification to Family
SoVRMLFontStyle::BOLD,
Embolden Family
SoVRMLFontStyle::ITALIC,
Italicize or Slant Family
SoVRMLFontStyle::BOLDITALIC
Embolden and Italicize Family
}

enum Justification	{
SoVRMLFontStyle::FIRST,
Not used
SoVRMLFontStyle::BEGIN,
Left edge
SoVRMLFontStyle:MIDDLE,
Centered about X axis
SoVRMLFontStyle::END
Right edge
}

Fields from class SoVRMLFontStyle:

SoMFString	family

SoSFBool	horizontal

SoMFString	justify

SoSFString	language

SoSFBool	leftToRight

SoSFFloat	size

SoSFFloat	spacing

SoSFString	style

SoSFBool	topToBottom

Methods from class SoVRMLFontStyle:

SoVRMLFontStyle()

SbString	getFontName()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLFontStyle node defines the size, font family, and style of text's font, as well as the direction of the text strings and any specific language rendering techniques that must be used for non-English text. See SoVRMLText node for application of SoVRMLFontStyle.

The size field specifies the height (in object space units) of glyphs rendered and determines the spacing of adjacent lines of text. All subsequent strings advance in Y by -(size * spacing). Only horizontal text is supported in this release.

Font attributes are defined with the family and style fields.

The family field specifies a case-sensitive MFString value that may be "SERIF" (the default) for a serif font such as Times Roman; "SANS" for a sans-serif font such as Helvetica; or "TYPEWRITER" for a fixed-pitch font such as Courier. A family value of empty quotes, "", is identical to "SERIF".

The style field specifies a case-sensitive SFString value that may be "PLAIN" (the default) for default plain type; "BOLD" for boldface type; "ITALIC" for italic type; or "BOLDITALIC" for bold and italic type. A style value of empty quotes, "", is identical to "PLAIN".

The horizontal, leftToRight, and topToBottom fields indicate the direction of the text. NOTE: Only horizontal text drawn leftToRight is supported in this release. Characters on each line of text advance in the positive X direction according to their natural advance width. Then each line of characters is advanced in the negative Y direction.

The justify field determines alignment of the above text layout relative to the origin of the object coordinate system. It is an MFString which can contain 2 values. The first value specifies alignment along the major axis and the second value specifies alignment along the minor axis. NOTE: Only the major axis alignment is supported in this release. A justify value of "" is equivalent to the default values.

The major alignment is along the X axis. The possible values for each enumerant of the justify field are "BEGIN", "MIDDLE", and "END. Each line of text is positioned individually according to the alignment enumerant.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLFontStyle node defines the size, font family, and style of text's font, as well as the direction of the text strings and any specific language rendering techniques that must be used for non-English text. See SoVRMLText node for application of SoVRMLFontStyle.

The size field specifies the height (in object space units) of glyphs rendered and determines the spacing of adjacent lines of text. All subsequent strings advance in either X or Y by -(size * spacing).

Font Family and Style

Font attributes are defined with the family and style fields. It is up to the browser to assign specific fonts to the various attribute combinations.

The family field specifies a case-sensitve MFString value that may be "SERIF" (the default) for a serif font such as Times Roman; "SANS" for a sans-serif font such as Helvetica; or "TYPEWRITER" for a fixed-pitch font such as Courier. A family value of empty quotes, "", is identical to "SERIF".

The style field specifies a case-sensitive SFString value that may be "PLAIN" (the default) for default plain type; "BOLD" for boldface type; "ITALIC" for italic type; or "BOLDITALIC" for bold and italic type. A style value of empty quotes, "", is identical to "PLAIN".

Direction, Justification and Spacing

The horizontal, leftToRight, and topToBottom fields indicate the direction of the text. The horizontal field indicates whether the text advances horizontally in its major direction (horizontal = TRUE, the default) or vertically in its major direction (horizontal = FALSE). The leftToRight and topToBottom fields indicate direction of text advance in the major (characters within a single string) and minor (successive strings) axes of layout. Which field is used for the major direction and which is used for the minor direction is determined by the horizontal field.

For horizontal text (horizontal = TRUE), characters on each line of text advance in the positive X direction if leftToRight is TRUE or in the negative X direction if leftToRight is FALSE. Characters are advanced according to their natural advance width. Then each line of characters is advanced in the negative Y direction if topToBottom is TRUE or in the positive Y direction if topToBottom is FALSE. Lines are advanced by the amount of size * spacing.

For vertical text (horizontal = FALSE), characters on each line of text advance in the negative Y direction if topToBottom is TRUE or in the positive Y direction if topToBottom is FALSE. Characters are advanced according to their natural advance height. Then each line of characters is advanced in the positive X direction if leftToRight is TRUE or in the negative X direction if leftToRight is FALSE. Lines are advanced by the amount of size * spacing.

The justify field determines alignment of the above text layout relative to the origin of the object coordinate system. It is an MFString which can contain 2 values. The first value specifies alignment along the major axis and the second value specifies alignment along the minor axis, as determined by the horizontal field. A justify value of "" is equivalent to the default values. If the second string, minor alignment, is not specified then it defaults to the value "FIRST". Thus, justify values of "", "BEGIN" and "BEGIN FIRST" are equivalent.

The major alignment is along the X axis when horizontal is TRUE and along the Y axis when horizontal is FALSE. The minor alignment is along the Y axis when horizontal is TRUE and along the X axis when horizontal is FALSE. The possible values for each enumerant of the justify field are "FIRST", "BEGIN", "MIDDLE", and "END". For major alignment, each line of text is positioned individually according to the major alignment enumerant. For minor alignment, the block of text representing all lines together is positioned according to the minor alignment enumerant. The following tables describe the behavior in terms of which portion of the text is at the origin:

Major Alignment, horizontal = TRUE:

Enumerant	leftToRight = TRUE	leftToRight = FALSE
FIRST	Left edge of each line	Right edge of each line
BEGIN	Left edge of each line	Right edge of each line
MIDDLE	Centered about X-axis	Centered about X-axis
END	Right edge of each line	Left edge of each line

Major Alignment, horizontal = FALSE:

Enumerant	topToBottom = TRUE	topToBottom = FALSE
FIRST	Top edge of each line	Bottom edge of each line
BEGIN	Top edge of each line	Bottom edge of each line
MIDDLE	Centered about Y-axis	Center about Y-axis
END	Bottom edge of each line	Top edge of each line

Minor Alignment, horizontal = TRUE:

Enumerant	topToBottom = TRUE	topToBottom = FALSE
FIRST	Baseline of first line	Baseline of first line
BEGIN	Top edge of first line	Bottom edge of first line
MIDDLE	Centered about Y-axis	Centered about Y-axis
END	Bottom edge of last line	Top edge of last line

Minor Alignment, horizontal = FALSE:

Enumerant	leftToRight = TRUE	leftToRight = FALSE
FIRST	Left edge of first line	Right edge of first line
BEGIN	Left edge of first line	Right edge of first line
MIDDLE	Centered about X-axis	Centered about X-axis
END	Right edge of last line	Left edge of last line

The default minor alignment is "FIRST". This is a special case of minor alignment when horizontal is TRUE. Text starts at the baseline at the Y-axis. In all other cases, :"FIRST" is identical to "BEGIN". In the following tables, each small cross indicates where the X and Y axes should be in relation to the text:

horizontal = TRUE:

horizontal = FALSE:

The language field specifies the context of the language for the text string. Due to the multilingual nature of the ISO 10646-1:1993, the language field is needed to provide a proper language attribute of the text string. The format is based on the POSIX locale specification as well as the RFC 1766: language[_territory]. The values for the language tag is based on the ISO 639, i.e. zh for Chinese, jp for Japanese, sc for Swedish. The territory tag is based on the ISO 3166 country code, i.e. TW is for Taiwan and CN for China for the "zh" Chinese language tag. If the language field is set to empty "", then local language bindings are used.

Please refer to these sites for more details:

    http://www.chemie.fu-berlin.de/diverse/doc/ISO_639.html
    http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html

FIELDS

SoMFString	family

Specify the family of font to use.

SoSFBool	horizontal

Characters advance in the X direction if TRUE. This release supports TRUE only.

SoMFString	justify

Indicates placement and alignment of strings. With LEFT justification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned. RIGHT justification is similar. CENTER justification places the center of the first string at the (transformed) origin, with the centers of all remaining strings aligned under it. The second justify string, FIRST, is not supported in this release.

SoSFString	language

Not supported in this release.

SoSFBool	leftToRight

Characters advance in the positive X direction if TRUE. This release supports TRUE only.

SoSFBool	topToBottom

Not supported in this release. Default value of FALSE is used.

SoSFFloat	size

Specifies the height of glyphs rendered and helps determine the spacing of adjacent lines.

SoSFFloat	spacing

Specifies the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height. A value of 1 indicates single spacing, a value of 2 indicates double spacing, and so on.

SoSFString	style

Defines style modification to the chosen font (bold, italic, etc.).

METHODS

SoVRMLFontStyle()

Constructor.

SbString	getFontName()

Return the font name used by this node based on the settings of family and style

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLFontStyle {

family	"SERIF"

horizontal	TRUE

justify	"BEGIN"

language	""

leftToRight	TRUE

size	1.0

spacing	1.0

style	"PLAIN"

topToBottom	TRUE

}


SoVRMLGeometry

NAME

SoVRMLGeometry - abstract base class for all VRML 2.0 geometry nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLGeometry.h>

Methods from class SoVRMLGeometry:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLGeometry node is the abstract base class for all VRML geometry nodes.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoRayPickAction


SoVRMLGridShape

NAME

SoVRMLGridShape - abstract base class for the SoVRMLElevationGrid node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLGridShape

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLGridShape.h>

Fields from class SoVRMLGridShape:

SoSFNode	color

SoSFBool	colorPerVertex

SoMFFloat	height

SoSFNode	normal

SoSFBool	normalPerVertex

SoSFNode	texCoord

SoSFInt32	xDimension

SoSFFloat	xSpacing

SoSFInt32	zDimension

SoSFFloat	zSpacing

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is an abstract base class for the SoVRMLElevationGrid node.

FIELDS

SoSFNode	color

An SoVRMLColor node whose colors are applied to the vertices or faces of the ElevationGrid.

SoSFBool	colorPerVertex

If TRUE, colors are applied to the vertices of the ElevationGrid. If FALSE, the colors are applied to the faces.

SoMFFloat	height

xDimension by zDimension array of scale factors representing the height above the grid for each vertex. The heights are stored in row major order.

SoSFNode	normal

An SoVRMLNormalNode containing the normals. If NULL, the normals will be automatically generated.

SoSFBool	normalPerVertex

If TRUE, normals are applied to the vertices of the ElevationGrid. If FALSE, the normals are applied to the faces.

SoSFNode	texCoord

An SoVRMLTextureCoordinate node.

SoSFInt32	xDimension

Number of divisions of the grid in the X direction.

SoSFFloat	xSpacing

Distance between the vertices in the X direction.

SoSFInt32	zDimension

Number of divisions of the grid in the Z direction.

SoSFFloat	zSpacing

Distance between the vertices in the Z direction.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_color

SoSFBool	set_colorPerVertex

SoMFFloat	set_height

SoSFNode	set_normal

SoSFBool	set_normalPerVertex

SoSFNode	set_texCoord

SoSFInt32	set_xDimension

SoSFFloat	set_xSpacing

SoSFInt32	set_zDimension

SoSFFloat	set_zSpacing

eventOut

SoSFNode	color_changed

SoSFBool	colorPerVertex_changed

SoMFFloat	height_changed

SoSFNode	normal_changed

SoSFBool	normalPerVertex_changed

SoSFNode	texCoord_changed

SoSFInt32	xDimension_changed

SoSFFloat	xSpacing_changed

SoSFInt32	zDimension_changed

SoSFFloat	zSpacing_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoPickAction

FILE FORMAT/DEFAULTS

This is an abstract base class. See the derived class for the format and default values.


SoVRMLGroup

NAME

SoVRMLGroup - group node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoVRMLParent > SoVRMLGroup

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLGroup.h>

enum CacheEnabled	{
SoVRMLGroup::OFF,
Never build or use a cache
SoVRMLGroup::ON,
Always try to build a cache
SoVRMLGroup::AUTO
Decide whether to cache based on some heuristic
}

Fields from class SoVRMLGroup:

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Fields from class SoVRMLParent:

SoMFNode	children

Methods from class SoVRMLGroup:

SoVRMLGroup()

SoVRMLGroup(int nChildren)

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

static SoType	getClassTypeId()

Methods from class SoVRMLParent:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

A SoVRMLGroup node is equivalent to an SoVRMLTransform node, without the transformation fields.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

A SoVRMLGroup node is equivalent to an SoVRMLTransform node, without the transformation fields.

See the "Concepts - Grouping and Children Nodes" section for a description of the children, addChildren, and removeChildren fields and eventIns.

The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLGroup's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts - Bounding Boxes" for a description of the bboxCenter and bboxSize fields.

Note: The following fields -- renderCaching, boundingBoxCaching, renderCulling, and pickCulling -- are specific to the TGS Open Inventor implementation and are not part of the VRML 2.0 specification. These fields are very useful for performance tuning, but are not written out if the output file is specified as VRML 2.0 format. See SoSeparator for a discussion of Open Inventor caching and culling.

FIELDS

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Specify a bounding box that encloses the children.

SoSFEnum	renderCaching

Whether to cache during rendering traversal.

SoSFEnum	boundingBoxCaching

Whether to cache during bounding box traversal.

SoSFEnum	renderCulling

Whether to cull during rendering traversal.

SoSFEnum	pickCulling

Whether to cull during pick traversal.

METHODS

SoVRMLGroup()

SoVRMLGroup(int nChildren)

Constructor that takes approximate number of children

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Set/get the number of render caches each VRMLGroup will have (2, by default). The more render caches each VRMLGroup is allowed to have, the more memory used. setNumRenderCaches only affects VRMLGroup nodes that are created after it is called, not VRMLGroup that were created before. Setting zero render caches globally turns off render caching.

This value can also be specified via environment variable IV_SEPARATOR_MAX_CACHES.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFNode	addChildren

SoMFNode	removeChildren

SoMFNode	set_children

eventOut

SoMFNode	children_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction, SoGetMatrixAction, SoSearchAction, SoWriteAction

FILE FORMAT/DEFAULTS

VRMLGroup {

children	[]

bboxCenter	0 0 0

bboxSize	-1 -1 -1

}


SoVRMLImageTexture

NAME

SoVRMLImageTexture - texture map node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLTexture > SoVRMLImageTexture

SYNOPSIS

#include <Inventor/VRMLNodes/SoVRMLImageTexture.h>

Fields from class SoVRMLImageTexture:

SoMFString	url

Fields from class SoVRMLTexture:

SoSFBool	repeatS

SoSFBool	repeatT

Methods from class SoVRMLImageTexture:

SoVRMLImageTexture()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLImageTexture node defines a texture map by specifying an image file and general parameters for mapping to geometry. Texture maps are defined in a 2D coordinate system, (s, t), that ranges from 0.0 to 1.0 in both directions. The bottom edge of the image corresponds to the S-axis of the texture map, and left edge of the image corresponds to the T-axis of the texture map. The lower-left pixel of the image corresponds to s=0, t=0, and the top-right pixel of the image corresponds to s=1, t=1.

Texture images may be one component (grayscale), two component (grayscale plus transparency), three component (full RGB color), or four-component (full RGB color plus transparency).

The repeatS and repeatT fields specify how the texture wraps in the S and T directions. If repeatS is TRUE (the default), the texture map is repeated outside the 0-to-1 texture coordinate range in the S direction so that it fills the shape. If repeatS is FALSE, the texture coordinates are clamped in the S direction to lie within the 0-to-1 range. The repeatT field is analogous to the repeatS field.

If the texture image's width or height is not a power of 2, or the image's width or height is greater than the maximum supported by OpenGL, then the image will be automatically scaled up or down to the next power of 2 or the maximum texture size. For maximum speed, point-sampling is used to do the scale; if you want more accurate resampling, pre-filter images to a power of 2 smaller than the maximum texture size (use the OpenGL glGetIntegerv(GL_MAX_TEXTURE_SIZE...) call to determine maximum texture for a specific OpenGL implementation).

The quality of the texturing is affected by the textureQuality field of the SoComplexity node. The textureQuality field affects what kind of filtering is done to the texture when it must be minified or magnified. The mapping of a particular texture quality value to a particular OpenGL filtering technique is implementation dependent, and varies based on the texturing performance. If mipmap filtering is required, mipmaps are automatically created using the simple box filter.

Open Inventor can read GIF, JPEG, PNG, RGB (native Silicon Graphics format), and BMP texture files.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLImageTexture node defines a texture map by specifying an image file and general parameters for mapping to geometry. Texture maps are defined in a 2D coordinate system, (s, t), that ranges from 0.0 to 1.0 in both directions. The bottom edge of the image corresponds to the S-axis of the texture map, and left edge of the image corresponds to the T-axis of the texture map. The lower-left pixel of the image corresponds to s=0, t=0, and the top-right pixel of the image corresponds to s=1, t=1.

The texture is read from the URL specified by the url field. To turn off texturing, set the url field to have no values ([]). Browsers are required to support the JPEG and PNG image file formats, and in addition, may support any other image formats. Support for the GIF format including transparent backgrounds is also recommended. See the section "Concepts - URLS and URNs" for details on the url field.

Texture images may be one component (grayscale), two component (grayscale plus transparency), three component (full RGB color), or four-component (full RGB color plus transparency). An ideal VRML implementation will use the texture image to modify the diffuse color and transparency of an object's material (specified in an SoVRMLMaterial node), then perform any lighting calculations using the rest of the object's material properties with the modified diffuse color to produce the final image. The texture image modifies the diffuse color and transparency depending on how many components are in the image, as follows:

1.	Diffuse color is multiplied by the grayscale values in the texture image.

2.	Diffuse color is multiplied by the grayscale values in the texture image; material transparency is multiplied by transparency values in texture image.

3.	RGB colors in the texture image replace the material's diffuse color.

4.	RGB colors in the texture image replace the material's diffuse color; transparency values in the texture image replace the material's transparency.

See "Concepts - Lighting Model" for details on lighting equations and the interaction between textures, materials, and geometries.

Browsers may approximate this ideal behavior to increase performance. One common optimization is to calculate lighting only at each vertex and combining the texture image with the color computed from lighting (performing the texturing after lighting). Another common optimization is to perform no lighting calculations at all when texturing is enabled, displaying only the colors of the texture image.

The repeatS and repeatT fields specify how the texture wraps in the S and T directions. If repeatS is TRUE (the default), the texture map is repeated outside the 0-to-1 texture coordinate range in the S direction so that it fills the shape. If repeatS is FALSE, the texture coordinates are clamped in the S direction to lie within the 0-to-1 range. The repeatT field is analogous to the repeatS field.

FIELDS

SoMFString	url

Filename (or URL) from which to read the texture image. Note: Open Inventor only tries to open the first url in the field.

METHODS

SoVRMLImageTexture()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFString	set_url

eventOut

SoMFString	url_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLImageTexture {

url	[]

repeatS	TRUE

repeatT	TRUE

}


SoVRMLIndexedFaceSet

NAME

SoVRMLIndexedFaceSet - indexed polygonal face shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexShape > SoVRMLIndexedShape > SoVRMLIndexedFaceSet

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h>

Fields from class SoVRMLIndexedFaceSet:

SoSFBool	ccw

SoSFBool	convex

SoSFFloat	creaseAngle

SoSFBool	solid

Fields from class SoVRMLIndexedShape:

SoMFInt32	colorIndex

SoMFInt32	coordIndex

SoMFInt32	normalIndex

SoMFInt32	texCoordIndex

Fields from class SoVRMLVertexShape:

SoSFNode	color

SoSFBool	colorPerVertex

SoSFNode	coord

SoSFNode	normal

SoSFBool	normalPerVertex

SoSFNode	texCoord

Methods from class SoVRMLIndexedFaceSet:

SoVRMLIndexedFaceSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLIndexedFaceSet node represents a 3D shape formed by constructing faces (polygons) from vertices listed in the coord field. The coord field must contain an SoVRMLCoordinate node. SoVRMLIndexedFaceSet uses the indices in its coordIndex field to specify the polygonal faces. An index of -1 indicates that the current face has ended and the next one begins. The last face may (but does not have to be) followed by a -1. If the greatest index in the coordIndex field is N, then the SoVRMLCoordinate node must contain N+1 coordinates (indexed as 0-N). SoVRMLIndexedFaceSet is specified in the local coordinate system and is affected by parent transformations.

For descriptions of the coord, normal, and texCoord fields, see the SoVRMLCoordinate, SoVRMLNormal, and SoVRMLTextureCoordinate nodes.

See "Concepts - Lighting Model" for details on lighting equations and the interaction between textures, materials, and geometries.

If the color field is not NULL then it must contain an SoVRMLColor node, whose colors are applied to the vertices or faces of the SoVRMLIndexedFaceSet as follows:

•	If colorPerVertex is FALSE, colors are applied to each face, as follows:

•	If the colorIndex field is not empty, then they are used to choose one color for each face of the SoVRMLIndexedFaceSet. There must be at least as many indices in the colorIndex field as there are faces in the SoVRMLIndexedFaceSet. If the greatest index in the colorIndex field is N, then there must be N+1 colors in the SoVRMLColor node. The colorIndex field must not contain any negative entries.

•	If the colorIndex field is empty, then the colors are applied to each face of the SoVRMLIndexedFaceSet in order. There must be at least as many colors in the SoVRMLColor node as there are faces.

•	If colorPerVertex is TRUE, colors are applied to each vertex, as follows:

•	If the colorIndex field is not empty, then it is used to choose colors for each vertex of the SoVRMLIndexedFaceSet in exactly the same manner that the coordIndex field is used to choose coordinates for each vertex from the SoVRMLCoordinate node. The colorIndex field must contain at least as many indices as the coordIndex field, and must contain end-of-face markers (-1) in exactly the same places as the coordIndex field. If the greatest index in the colorIndex field is N, then there must be N+1 colors in the SoVRMLColor node.

•	If the colorIndex field is empty, then the coordIndex field is used to choose colors from the SoVRMLColor node. If the greatest index in the coordIndex field is N, then there must be N+1 colors in the SoVRMLColor node.

If the normal field is NULL, then the browser should automatically generate normals, using creaseAngle to determine if and how normals are smoothed across shared vertices.

If the normal field is not NULL, then it must contain an SoVRMLNormal node, whose normals are applied to the vertices or faces of the SoVRMLIndexedFaceSet in a manner exactly equivalent to that described above for applying colors to vertices/faces.

If the texCoord field is not NULL, then it must contain an SoVRMLTextureCoordinate node. The texture coordinates in that node are applied to the vertices of the SoVRMLIndexedFaceSet as follows:

•	If the texCoordIndex field is not empty, then it is used to choose texture coordinates for each vertex of the SoVRMLIndexedFaceSet in exactly the same manner that the coordIndex field is used to choose coordinates for each vertex from the SoVRMLCoordinate node. The texCoordIndex field must contain at least as many indices as the coordIndex field, and must contain end-of-face markers (-1) in exactly the same places as the coordIndex field. If the greatest index in the texCoordIndex field is N, then there must be N+1 texture coordinates in the SoVRMLTextureCoordinate node.

•	If the texCoordIndex field is empty, then the coordIndex array is used to choose texture coordinates from the SoVRMLTextureCoordinate node. If the greatest index in the coordIndex field is N, then there must be N+1 texture coordinates in the SoVRMLTextureCoordinate node.

If the texCoord field is NULL, a default texture coordinate mapping is calculated using the bounding box of the shape. The longest dimension of the bounding box defines the S coordinates, and the next longest defines the T coordinates. If two or all three dimensions of the bounding box are equal, then ties should be broken by choosing the X, Y, or Z dimension in that order of preference. The value of the S coordinate ranges from 0 to 1, from one end of the bounding box to the other. The T coordinate ranges between 0 and the ratio of the second greatest dimension of the bounding box to the greatest dimension. See the figure below for an illustration of default texture coordinates for a simple box shaped SoVRMLIndexedFaceSet with a bounding box with X dimension twice as large as the Z dimension which is twice as large as the Y dimension:

See the introductory "Concepts - Geometry" section for a description of the ccw, solid, convex, and creaseAngle fields.

NOTE: An indexed face set may not render or pick correctly if any of its polygons are self-intersecting or non-planar.

FIELDS

SoSFBool	ccw

Indicates whether the vertices are ordered in a counter-clockwise direction when viewed from the outside (TRUE) or in a clockwise direction (FALSE).

SoSFBool	convex

Indicates whether faces of a shape are convex (TRUE). If nothing is known about the faces, this value is FALSE.

SoSFFloat	creaseAngle

Indicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when default normals are computed and used.

SoSFBool	solid

If the shape encloses a volume, the value is TRUE. Used as a hint to perform backface culling. If nothing is known, the field value is FALSE.

METHODS

SoVRMLIndexedFaceSet()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFint32	set_colorIndex

SoMFint32	set_coordIndex

SoMFint32	set_normalIndex

SoMFint32	set_texCoordIndex

SoSFNode	set_color

SoSFNode	set_coord

SoSFNode	set_normal

SoSFNode	set_texCoord

eventOut

SoSFNode	color_changed

SoSFNode	coord_changed

SoSFNode	normal_changed

SoSFNode	texCoord_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLIndexedFaceSet {

color	NULL

coord	NULL

normal	NULL

texCoord	NULL

ccw	TRUE

colorIndex	[]

colorPerVertex	TRUE

convex	TRUE

coordIndex	[]

creaseAngle	0

normalIndex	[]

normalPerVertex	TRUE

solid	TRUE

texCoordIndex	[]

}


SoVRMLIndexedLine

NAME

SoVRMLIndexedLine - abstract base class for the SoVRMLIndexLineSet node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexLine > SoVRMLIndexedLine

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLIndexedLine.h>

Fields from class SoVRMLIndexedLine:

SoMFInt32	colorIndex

SoMFInt32	coordIndex

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is an abstract base class for the SoVRMLIndexedLineSet node.

FIELDS

SoMFInt32	colorIndex

The indices of the colors to use for the lines or vertices depending on the value of the colorPerVertex field. If NULL, the colors are applied to each line of the SoVRMLIndexedLineSet in order.

SoMFInt32	coordIndex

Indices of the coordinates that the indexed line set uses as its vertices. The coordinates connect to form the lines.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_color

SoSFBool	set_colorPerVertex

SoSFNode	set_coord

eventOut

SoSFNode	color_changed

SoSFBool	colorPerVertex_changed

SoSFNode	coord_changed

FILE FORMAT/DEFAULTS

This is an abstract base class. See the derived class for the format and default values.


SoVRMLIndexedLineSet

NAME

SoVRMLIndexedLineSet - indexed polyline shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexLine > SoVRMLIndexedLine > SoVRMLIndexedLineSet

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLIndexedLineSet.h>

Fields from class SoVRMLIndexedLine:

SoMFInt32	colorIndex

SoMFInt32	coordIndex

Fields from class SoVRMLVertexLine:

SoSFNode	color

SoSFNode	coord

SoSFBool	colorPerVertex

Methods from class SoVRMLIndexedLineSet:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLIndexedLineSet node represents a 3D geometry formed by constructing polylines from 3D points specified in the coord field. SoVRMLIndexedLineSet uses the indices in its coordIndex field to specify the polylines by connecting together points from the coord field. An index of -1 indicates that the current polyline has ended and the next one begins. The last polyline may (but does not have to be) followed by a -1. SoVRMLIndexedLineSet is specified in the local coordinate system and is affected by parent transformations.

The coord field specifies the 3D vertices of the line set and is specified by an SoVRMLCoordinate node.

Lines are not lit, not texture-mapped, or not collided with during collision detection.

If the color field is not NULL, it must contain an SoVRMLColor node, and the colors are applied to the line(s) as follows:

•	If colorPerVertex is FALSE:

•	If the colorIndex field is not empty, then one color is used for each polyline of the SoVRMLIndexedLineSet. There must be at least as many indices in the colorIndex field as there are polylines in the SoVRMLIndexedLineSet. If the greatest index in the colorIndex field is N, then there must be N+1 colors in the SoVRMLColor node. The colorIndex field must not contain any negative entries.

•	If the colorIndex field is empty, then the colors are applied to each polyline of the SoVRMLIndexedLineSet in order. There must be at least as many colors in the SoVRMLColor node as there are polylines.

•	If colorPerVertex is TRUE:

•	If the colorIndex field is not empty, then colors are applied to each vertex of the SoVRMLIndexedLineSet in exactly the same manner that the coordIndex field is used to supply coordinates for each vertex from the SoVRMLCoordinate node. The colorIndex field must contain at least as many indices as the coordIndex field and must contain end-of-polyline markers (-1) in exactly the same places as the coordIndex field. If the greatest index in the colorIndex field is N, then there must be N+1 colors in the SoVRMLColor node.

•	If the colorIndex field is empty, then the coordIndex field is used to choose colors from the SoVRMLColor node. If the greatest index in the coordIndex field is N, then there must be N+1 colors in the SoVRMLColor node.

If the color field is NULL and there is a Material defined for the SoVRMLAppearance affecting this IndexedLineSet, then use the emissiveColor of the Material to draw the lines. See "Concepts - Lighting Model, Lighting Off" for details on lighting equations.

METHODS

SoVRMLIndexedLineSet()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_color

SoMFInt32	set_colorIndex

SoSFNode	set_coord

SoMFInt32	set_coordIndex

eventOut

SoSFNode	color_changed

SoSFNode	coord_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLIndexedLineSet {

color	NULL

colorIndex	[]

colorPerVertex	TRUE

coord	NULL

coordIndex	[]

}


SoVRMLIndexedShape

NAME

SoVRMLIndexedShape - abstract base class for SoVRMLIndexedFaceSet

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexShape > SoVRMLIndexedShape

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLIndexedShape.h>

Fields from class SoVRMLIndexedShape:

SoMFInt32	colorIndex

SoMFInt32	coordIndex

SoMFInt32	normalIndex

SoMFInt32	texCoordIndex

Fields from class SoVRMLVertexShape:

SoSFNode	color

SoSFNode	colorPerVertex

SoSFNode	coord

SoSFNode	normal

SoSFNode	normalPerVertex

SoSFNode	texCoord

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is the abstract base class for SoVRMLIndexedFaceSet.

FIELDS

SoMFInt32	colorIndex

The indices of the colors to use for the faces or vertices depending on the value of the colorPerVertex field. If NULL, the colors are applied to each face of the SoVRMLIndexedFaceSet in order.

SoMFInt32	coordIndex

Indices of the coordinates that the indexed face set uses as its vertices. The coordinates connect to form the faces.

SoMFInt32	normalIndex

The indices of the normals to use for the faces or vertices depending onthe value of the normalPerVertex field. If NULL, the normals are applied to each face of the SoVRMLIndexedFaceSet in order.

SoMFInt32	texCoordIndex

The indices of the texture coordinates for each vertex of the SoVRMLIndexedFaceSet. If this field is NULL, the coordIndex field is used to choose texture coordinates from the texture coordinate node.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFInt32	set_colorIndex

SoMFInt32	set_coordIndex

SoMFInt32	set_normalIndex

SoMFInt32	set_texCoordIndex

eventOut

SoMFInt32	colorIndex_changed

SoMFInt32	coordIndex_changed

SoMFInt32	normalIndex_changed

SoMFInt32	texCoordIndex_changed

FILE FORMAT/DEFAULTS

This is an abstract base class. See the derived class for the format and default values.


SoVRMLInline

NAME

SoVRMLInline - grouping node that refers to children through a URL

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInline

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLInline.h>

typedef void	SoVRMLInlineFetchURLCB(const SbString &url,
void *userData,
SoVRMLInline *node)

enum BboxVisibility	{
SoVRMLInline::NEVER,
Do not show bounding box
SoVRMLInline::UNTIL_LOADED,
Show bounding box (if specified) until data is loaded
SoVRMLInline::ALWAYS
Show bounding box along with data
}

Fields from class SoVRMLInline:

SoMFString	url

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Methods from class SoVRMLInline:

SoVRMLInline()

void	setFullURLName(const SbString &urlin)

const SbString &	getFullURLName()

SoGroup *	copyChildren() const

void	requestURLData()

SbBool	isURLDataRequested() const

SbBool	isURLDataHere() const

void	cancelURLDataRequest()

void	setChildData(SoNode * urlData)

SoNode *	getChildData() const

static void	setFetchURLCallBack(SoVRMLInlineFetchURLCB *f, void *userData)

static void	setBoundingBoxVisibility(BboxVisibility b)

static BboxVisibility	getBoundingBoxVisibility()

static void	setBoundingBoxColor(SbColor &c)

static const SbColor &	getBoundingBoxColor()

static void	setReadAsSoFile(SbBool onOff)

static SbBool	getReadAsSoFile()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node refers to children through a URL (Universal Resource Locator). The application is responsible for actually fetching data from the URL for an SoVRMLInline node to display.

See also the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLInline node is a grouping node that reads its children data from a location in the World Wide Web. Exactly when its children are read and displayed is not defined; reading the children may be delayed until the SoVRMLInline is actually visible to the viewer. The url field specifies the URL containing the children. An SoVRMLInline with an empty URL does nothing.

An Inline's URLs shall refer to a valid VRML file that contains a list of children nodes at the top level. See "Concepts - Grouping and Children Nodes". The results are undefined if the URL refers to a file that is not VRML or if the file contains non-children nodes at the top level.

If multiple URLs are specified, the browser may display a URL of a lower preference file while it is obtaining, or if it is unable to obtain the higher preference file. See "Concepts - URLS and URNs" for details on the url field and preference order.

The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLInlines's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts - Bounding Boxes" for a description of the bboxCenter and bboxSize fields.

FIELDS

SoMFString	url

URL which the application will be called back to fetch when this node is activated by a left mouse click (e.g. "http://www.sgi.com/Technology/Inventor").

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Specify a bounding box that encloses the children.

METHODS

SoVRMLInline()

Constructor.

void	setFullURLName(const SbString &urlin)

const SbString &	getFullURLName()

If the url field is not a local file and contains a relative URL (e.g. "foo.wrl" instead of "http://bogus.com/foo.wrl"), the inline cannot resolve the URL reference. This method allows the application to tell the inline what its full URL should be. getFullURLName returns the fullURL set here, or if not set, returns the contents of the name field.

SoGroup *	copyChildren() const

Return (hidden) children as Group

void	requestURLData()

SbBool	isURLDataRequested() const

SbBool	isURLDataHere() const

Request that URL data be fetched, and tell whether the URL data is here

void	cancelURLDataRequest()

Cancel URL request.

void	setChildData(SoNode * urlData)

SoNode *	getChildData() const

Set/get the child data the inline should display. Application should call this after it has fetched data for the inline node.

static void	setFetchURLCallBack(SoVRMLInlineFetchURLCB *f, void *userData)

Allow the viewer to fetch URLs when needed.

static void	setBoundingBoxVisibility(BboxVisibility b)

static BboxVisibility	getBoundingBoxVisibility()

Allow the user to specify how bounding boxes are displayed

static void	setBoundingBoxColor(SbColor &c)

static const SbColor &	getBoundingBoxColor()

Allow the user to specify the bounding box color

static void	setReadAsSoFile(SbBool onOff)

static SbBool	getReadAsSoFile()

Sets/gets the ReadAsSoFile flag. If TRUE, Assume that "url" points to other Inventor files on local filesystem, and load them directly as if this were an SoFile node instead of using VRMLInlineFetchURLCB.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFString	set_url

eventOut

SoMFString	url_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoPickAction, SoGetMatrixAction, SoSearchAction

FILE FORMAT/DEFAULTS

VRMLInline {

url	[]

bboxCenter	0 0 0

bboxSize	-1 -1 -1

}


SoVRMLInterpolator

NAME

SoVRMLInterpolator - abstract base class for VRML interpolators

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator

SYNOPSIS

#include <Inventor/VRMLNodes/SoVRMLInterpolator.h>

Methods from class SoVRMLInterpolator:

virtual int	getOutputs(SoVRMLInterpOutputList &list) const

SoVRMLInterpOutput *	getOutput(const SbName &outputName) const

SbBool	getOutputName(const SoVRMLInterpOutput *output,
SbName &outputName) const

void	evaluateWrapper(SoVRMLInterpOutput *interp)

SoVRMLInterpolator *	copy() const

static SoVRMLInterpolator *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoVRMLInterpList &list)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoVRMLInterpolator is the abstract base class for all VRML interpolators.

METHODS

virtual int	getOutputs(SoVRMLInterpOutputList &list) const

Returns a list of outputs in this VRML interpolator. This is virtual so that private outputs can be hidden. Use getOutputName() to get the names of the fields, and use getConnectionType() to figure out their types. Returns the number of outputs added to the list.

SoVRMLInterpOutput *	getOutput(const SbName &outputName) const

Returns a pointer to the VRML interpolator output with the given name. If no such output exists, NULL is returned.

SbBool	getOutputName(const SoVRMLInterpOutput *output,
SbName &outputName) const

Returns (in outputName) the name of the output pointed to. Returns FALSE if the output is not contained within the VRML interpolator instance.

void	evaluateWrapper(SoVRMLInterpOutput *interp)

Wrapper for the user's evaluate() interpolator.

SoVRMLInterpolator *	copy() const

Creates and returns a copy of the VRML interpolator. All connections to inputs are copied as is (without copying what's at the other end).

static SoVRMLInterpolator *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoVRMLInterpList &list)

A VRML interpolator can be given a name using setName() (which is a method on SoBase). These methods allow VRML interpolators to be looked up by name.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoVRMLColorInterpolator, SoVRMLCoordinateInterpolator, SoVRMLNormalInterpolator, SoVRMLOrientationInterpolator, SoVRMLPositionInterpolator, SoVRMLScalarInterpolator, SoVRMLTimeSensor


SoVRMLLOD

NAME

SoVRMLLOD - distance-based level-of-detail switching group node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoVRMLLOD

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLLOD.h>

Fields from class SoVRMLLOD:

SoMFNode	level

SoSFVec3f	center

SoMFFloat	range

Methods from class SoVRMLLOD:

SoVRMLLOD()

SoVRMLLOD(int nLevels)

static SoType	getClassTypeId()

virtual SbBool	affectsState() const

void	addLevel(SoNode *level1)

void	insertLevel(SoNode *level1,
int newLevelIndex)

SoNode *	getLevel(int index) const

int	findLevel(const SoNode *level1) const

int	getNumLevels() const

void	removeLevel(int index)

void	removeLevel(SoNode *level1)

void	removeAllLevels()

void	replaceLevel(int index,
SoNode *newLevel)

void	replaceLevel(SoNode *oldLevel,
SoNode *newLevel)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLLOD node allows applications to switch between various levels of detail or complexity for a given object, based on the distance from the user. The level field contains a list of nodes that represent the same object or objects at varying levels of detail, from highest to the lowest level of detail, and the range field specifies the ideal distances at which to switch between the levels.

The center field is a translation offset in the local coordinate system that specifies the center of the SoVRMLLOD object for distance calculations. In order to calculate which level to display, first the distance is calculated from the viewpoint, transformed into the local coordinate space of the SoVRMLLOD node, (including any scaling transformations), to the center point of the SoVRMLLOD. If the distance is less than the first value in the range field, then the first level of the SoVRMLLOD is drawn. If between the first and second values in the range field, the second level is drawn, and so on.

If there are N values in the range field, the SoVRMLLOD shall have N+1 nodes in its level field. Specifying too few levels will result in the last level being used repeatedly for the lowest levels of detail; if more levels than ranges are specified, the extra levels will be ignored. The exception to this rule is to leave the range field empty, which is a hint to the browser that it should choose a level automatically to maintain a constant display rate. Each value in the range field should be greater than the previous value; otherwise results are undefined.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLLOD node specifies various levels of detail or complexity for a given object, and provides hints for browsers to automatically choose the appropriate version of the object based on the distance from the user. The level field contains a list of nodes that represent the same object or objects at varying levels of detail, from highest to the lowest level of detail, and the range field specifies the ideal distances at which to switch between the levels. See the "Concepts - Grouping and Children Nodes" section for a details on the types of nodes that are legal values for level.

The center field is a translation offset in the local coordinate system that specifies the center of the SoVRMLLOD object for distance calculations. In order to calculate which level to display, first the distance is calculated from the viewpoint, transformed into the local coordinate space of the SoVRMLLOD node, (including any scaling transformations), to the center point of the SoVRMLLOD. If the distance is less than the first value in the range field, then the first level of the SoVRMLLOD is drawn. If between the first and second values in the range field, the second level is drawn, and so on.

If there are N values in the range field, the SoVRMLLOD shall have N+1 nodes in its level field. Specifying too few levels will result in the last level being used repeatedly for the lowest levels of detail; if more levels than ranges are specified, the extra levels will be ignored. The exception to this rule is to leave the range field empty, which is a hint to the browser that it should choose a level automatically to maintain a constant display rate. Each value in the range field should be greater than the previous value; otherwise results are undefined.

Authors should set SoVRMLLOD ranges so that the transitions from one level of detail to the next are smooth. Browsers may adjust which level of detail is displayed to maintain interactive frame rates, to display an already-fetched level of detail while a higher level of detail (contained in an Inline node) is fetched, or might disregard the author-specified ranges for any other implementation-dependent reason. For best results, specify ranges only where necessary, and nest SoVRMLLOD nodes with and without ranges. Browsers should try to honor the hints given by authors, and authors should try to give browsers as much freedom as they can to choose levels of detail based on performance.

SoVRMLLOD nodes are evaluated top-down in the scene graph. Only the descendants of the currently selected level are rendered and evaluated. Note that all nodes under an SoVRMLLOD node continue to receive and send events regardless of which SoVRMLLOD level is active.

FIELDS

SoMFNode	level

List of nodes that request the same object or objects at varying levels of detail from highest to lowest.

SoSFVec3f	center

Translation offset in the local coordinate system that specifies the center of the SoVRMLLOD objects.

SoMFFloat	range

Specifies the ideal distances at which to switch between the levels.

METHODS

SoVRMLLOD()

Constructor.

SoVRMLLOD(int nLevels)

Constructor that takes approximate number of levels.

static SoType	getClassTypeId()

Returns type identifier for this class.

virtual SbBool	affectsState() const

Overrides default method on SoNode.

void	addLevel(SoNode *level1)

Adds a level as last one in group.

void	insertLevel(SoNode *level1,
int newLevelIndex)

Adds a level so that it becomes the one with the given index.

SoNode *	getLevel(int index) const

Returns pointer to nth level node.

int	findLevel(const SoNode *level1) const

Finds index of given level within group.

int	getNumLevels() const

Returns number of levels.

void	removeLevel(int index)

Removes level with given index from group.

void	removeLevel(SoNode *level1)

Removes first instance of given level from group.

void	removeAllLevels()

Removes all levels from group.

void	replaceLevel(int index,
SoNode *newLevel)

Replaces level with given index with new level.

void	replaceLevel(SoNode *oldLevel,
SoNode *newLevel)

Replaces first instance of given level with new level.

EVENTS

eventIn

SoMFNode	set_level

eventOut

SoMFNode	level_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction, SoSearchAction, SoWriteAction

FILE FORMAT/DEFAULTS

VRMLLOD {

level	[]

center	0 0 0

range	[]

}


SoVRMLLight

NAME

SoVRMLLight - abstract base class for all VRML 2.0 light nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLLight

SYNOPSIS

#include <Inventor/VRMLNodes/SoVRMLLight.h>

Fields from class SoVRMLLight:

SoSFFloat	ambientIntensity

SoSFColor	color

SoSFFloat	intensity

SoSFBool	on

Methods from class SoVRMLLight:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoVRMLLight is the abstract base class for all light nodes. A light node defines an illumination source that may affect subsequent shapes in the scene graph, depending on the current lighting style. Light sources are affected by the current transformation. A light node under a transform does not affect any object outside that transform.

FIELDS

SoSFFloat	ambientIntensity

Specifies the brightness of the ambient emissions of the light.

SoSFColor	color

Specifies the spectral color properties of the light.

SoSFFloat	intensity

Specifies the brightness of the direct emission from the light.

SoSFBool	on

Specifies whether the light is on (TRUE) or off (FALSE).

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_ambientIntensity

SoSFColor	set_color

SoSFFloat	set_intensity

SoSFBool	set_on

eventOut

SoSFFloat	ambientIntensity_changed

SoSFColor	color_changed

SoSFFloat	intensity_changed

SoSFBool	on_changed

ACTION BEHAVIOR

SoGLRenderAction

FILE FORMAT/DEFAULTS

This is an abstract base class. See the derived class for the format and default values.


SoVRMLMaterial

NAME

SoVRMLMaterial - surface material definition node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLMaterial

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLMaterial.h>

Fields from class SoVRMLMaterial:

SoSFFloat	ambientIntensity

SoSFColor	diffuseColor

SoSFColor	emissiveColor

SoSFFloat	shininess

SoSFColor	specularColor

SoSFFloat	transparency

Methods from class SoVRMLMaterial:

SoVRMLMaterial()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLMaterial node specifies surface material properties for associated geometry nodes and are used by the VRML lighting equations during rendering. See "Concepts - Lighting Model" for a detailed description of the VRML lighting model equations.

All of the fields in the SoVRMLMaterial node range from 0.0 to 1.0.

The fields in the SoVRMLMaterial node determine the way light reflects off an object to create color:

•	The diffuseColor reflects all VRML light sources depending on the angle of the surface with respect to the light source. The more directly the surface faces the light, the more diffuse light reflects.

•	The ambientIntensity field specifies how much ambient light from light sources this surface should reflect. Ambient light is omnidirectional and depends only on the number of light sources, not their positions with respect to the surface. Ambient color is calculated as ambientIntensity * diffuseColor.

•	The specularColor and shininess determine the specular highlights--for example, the shiny spots on an apple. When the angle from the light to the surface is close to the angle from the surface to the viewer, the specularColor is added to the diffuse and ambient color calculations. Lower shininess values produce soft glows, while higher values result in sharper, smaller highlights.

•	Emissive color models "glowing" objects. This can be useful for displaying radiosity-based models (where the light energy of the room is computed explicitly), or for displaying scientific data.

•	Transparency is how "clear" the object is, with 1.0 being completely transparent, and 0.0 completely opaque.

FIELDS

SoSFFloat	ambientIntensity

Specifies how much ambient light from the light sources this surface should reflect.

SoSFColor	diffuseColor

Diffuse color of the surface.

SoSFColor	emissiveColor

Emissive color of the surface.

SoSFFloat	shininess

Shininess coefficient of the surface. Values range from 0.0 for no shininess to 1.0 for maximum shininess.

SoSFColor	specularColor

Specular color of the surface.

SoSFFloat	transparency

Transparency value of the surface. Values range from 0.0 for opaque to 1.0 for completely transparent surfaces.

METHODS

SoVRMLMaterial()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_ambientIntensity

SoSFColor	set_diffuseColor

SoSFColor	set_emissiveColor

SoSFFloat	set_shininess

SoSFColor	set_specularColor

SoSFFloat	set_transparency

eventOut

SoSFFloat	ambientIntensity_changed

SoSFColor	diffuseColor_changed

SoSFColor	emissiveColor_changed

SoSFFloat	shininess_changed

SoSFColor	specularColor_changed

SoSFFloat	transparency_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLMaterial {

ambientIntensity	0.2

diffuseColor	0.8 0.8 0.8

emissiveColor	0 0 0

shininess	0.2

specularColor	0 0 0

transparency	0

}


SoVRMLMovieTexture
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLMovieTexture - texture and sound node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLTexture > SoVRMLMovieTexture

SYNOPSIS

#include <Inventor/VRMLNodes/SoVRMLMovieTexture.h>

Fields from class SoVRMLMovieTexture:

SoSFBool	loop

SoSFFloat	speed

SoSFTime	startTime

SoSFTime	stopTime

SoMFString	url

Fields from class SoVRMLTexture:

SoSFBool	repeatS

SoSFBool	repeatT

Methods from class SoVRMLMovieTexture:

SoVRMLMovieTexture()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLMovieTexture node defines a time-dependent texture map (contained in a movie file) and parameters for controlling the movie and the texture mapping.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLMovieTexture node defines a time dependent texture map (contained in a movie file) and parameters for controlling the movie and the texture mapping. A SoVRMLMovieTexture can also be used as the source of sound data for an SoVRMLSound node, but in this special case is not used for rendering.

Texture maps are defined in a 2D coordinate system, (s, t), that ranges from 0.0 to 1.0 in both directions. The bottom edge of the image corresponds to the S-axis of the texture map, and left edge of the image corresponds to the T-axis of the texture map. The lower-left pixel of the image corresponds to s=0, t=0, and the top-right pixel of the image corresponds to s=1, t=1.

The url field that defines the movie data must support MPEG1-Systems (audio and video) or MPEG1-Video (video-only) movie file formats. See "Concepts - URLS and URNs" for details on the url field. It is recommended that implementations support grayscale or alpha transparency rendering if the specific movie format being used supports these features.

See "Concepts - Lighting Model" for details on lighting equations and the interaction between textures, materials, and geometries.

As soon as the movie is loaded, a duration_changed eventOut is sent. This indicates the duration of the movie, in seconds. This eventOut value can be read (for instance, by a Script) to determine the duration of a movie. A value of -1 implies the movie has not yet loaded or the value is unavailable for some reason.

The loop, startTime, and stopTime exposedFields and the isActive eventOut, and their affects on the SoVRMLMovieTexture node, are discussed in detail in the "Concepts - Time Dependent Nodes" section. The "cycle" of an SoVRMLMovieTexture is the length of time in seconds for one playing of the movie at the specified speed.

If an SoVRMLMovieTexture is inactive when the movie is first loaded, then frame 0 is shown in the texture if speed is nonnegative, or the last frame of the movie if speed is negative. A SoVRMLMovieTexture will always display frame 0 if speed = 0. For positive values of speed, the frame an active SoVRMLMovieTexture will display at time now corresponds to the frame at movie time (i.e., in the movie's local time system with frame 0 at time 0, at speed = 1):

        fmod (now - startTime, duration/speed)

If speed is negative, then the frame to display is the frame at movie time:

        duration + fmod(now - startTime, duration/speed)

When an SoVRMLMovieTexture becomes inactive, the frame corresponding to the time at which the SoVRMLMovieTexture became inactive will remain as the texture.

The speed exposedField indicates how fast the movie should be played. A speed of 2 indicates the movie plays twice as fast. Note that the duration_changed output is not affected by the speed exposedField. set_speed events are ignored while the movie is playing. A negative speed implies that the movie will play backwards. However, content creators should note that this may not work for streaming movies or very large movie files.

SoVRMLMovieTextures can be referenced by an SoVRMLAppearance node's texture field (as a movie texture) and by an SoVRMLSound node's source field (as an audio source only). A legal implementation of the SoVRMLMovieTexture node is not required to play audio if speed is not equal to 1.

FIELDS

SoSFBool	loop

Controls whether the sound continues when it reaches the end of a sound cycle as defined in the movie texture file. If loop is FALSE at the end of a cycle, execution is terminated. If TRUE, the sound continues into the next cycle.

SoSFFloat	speed

Indicates how fast the movie should be played.

SoSFTime	startTime

The starting time for the sound.

SoSFTime	stopTime

The stopping time for the sound. An SoVRMLMovieTexture node with loop TRUE at the end of every cycle continues forever if startTime>=stopTime or until stopTime if stopTime>startTime.

SoMFString	url

Specifies the movie data.

METHODS

SoVRMLMovieTexture()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_loop

SoSFFloat	set_speed

SoSFTime	set_startTime

SoSFTime	set_stopTime

SoMFString	set_url

eventOut

SoSFTime	duration_changed

SoSFBool	isActive

SoSFBool	loop_changed

SoSFFloat	speed_changed

SoSFTime	startTime_changed

SoSFTime	stopTime_changed

SoMFString	url_changed

FILE FORMAT/DEFAULTS

VRMLMovieTexture {

loop	FALSE

speed	1

startTime	0

stopTime	0

url	[]

repeatS	TRUE

repeatT	TRUE

}


SoVRMLNavigationInfo
(ACTION PARTIALLY IMPLEMENTED)

NAME

SoVRMLNavigationInfo - describes physical characteristics of viewer and viewing model

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLNavigationInfo

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLNavigationInfo.h>

Fields from class SoVRMLNavigationInfo:

SoMFFloat	avatarSize

SoSFBool	headlight

SoSFFloat	speed

SoMFString	type

SoSFFloat	visibilityLimit

Methods from class SoVRMLNavigationInfo:

SoVRMLNavigationInfo()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLNavigationInfo node contains information describing the physical characteristics of the viewer and viewing model.

Note: The binding behavior, the set_bind eventIn and the isBound eventOut are not implemented.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLNavigationInfo node contains information describing the physical characteristics of the viewer and viewing model. SoVRMLNavigationInfo is a bindable node (see "Concepts - Bindable Children Nodes") and thus there exists an SoVRMLNavigationInfo stack in the browser in which the top-most SoVRMLNavigationInfo on the stack is the currently active SoVRMLNavigationInfo. The current SoVRMLNavigationInfo is considered to be a child of the current SoVRMLViewpoint - regardless of where it is initially located in the file. Whenever the current SoVRMLViewpoint changes, the current SoVRMLNavigationInfo must be reparented to it. Whenever the current SoVRMLNavigationInfo changes, the new SoVRMLNavigationInfo must be reparented to the current SoVRMLViewpoint.

If a TRUE value is sent to the set_bind eventIn of an SoVRMLNavigationInfo, it is pushed onto the SoVRMLNavigationInfo stack and activated. When an SoVRMLNavigationInfo is bound, the browser uses the fields of the SoVRMLNavigationInfo to set the navigation controls of its user interface and the SoVRMLNavigationInfo is conceptually re-parented under the currently bound SoVRMLViewpoint. All subsequent scaling changes to the current SoVRMLViewpoint's coordinate system automatically change aspects (see below) of the SoVRMLNavigationInfo values used in the browser (e.g. scale changes to any parent transformation). A FALSE value of set_bind pops the SoVRMLNavigationInfo from the stack, results in an isBound FALSE event, and pops to the next entry in the stack which must be reparented to the current SoVRMLViewpoint. See "Concepts - Bindable Children Nodes" for more details on the binding stacks.

The type field specifies a navigation paradigm to use. Minimally, browsers shall support the following navigation types: "WALK", "EXAMINE", "FLY", and "NONE". Walk navigation is used for exploring a virtual world. It is recommended that the browser should support a notion of gravity in walk mode. Fly navigation is similar to walk except that no notion of gravity should be enforced. There should still be some notion of "up" however. Examine navigation is typically used to view individual objects and often includes (but does not require) the ability to spin the object and move it closer or further away. The "none" choice removes all navigation controls - the user navigates using only controls provided in the scene, such as guided tours. Also allowed are browser specific navigation types. These should include a unique suffix (e.g. _sgi.com) to prevent conflicts. The type field is multi-valued so that authors can specify fallbacks in case a browser does not understand a given type. If none of the types are recognized by the browser, then the default ["WALK", "ANY"] is used. These strings values are case sensitive ("walk" is not equal to "WALK").

The speed is the rate at which the viewer travels through a scene in meters per second. Since viewers may provide mechanisms to travel faster or slower, this should be the default or average speed of the viewer. If the SoVRMLNavigationInfo type is EXAMINE, speed should affect panning and dollying--it should have no effect on the rotation speed. The transformation hierarchy of the currently bound SoVRMLViewpoint (see above) scales the speed - translations and rotations have no effect on speed. Speed must be >= 0.0 - where 0.0 specifies a stationary avatar.

The avatarSize field specifies the user's physical dimensions in the world for the purpose of collision detection and terrain following. It is a multi-value field to allow several dimensions to be specified. The first value should be the allowable distance between the user's position and any collision geometry (as specified by SoVRMLCollision) before a collision is detected. The second should be the height above the terrain the viewer should be maintained. The third should be the height of the tallest object over which the viewer can "step". This allows staircases to be built with dimensions that can be ascended by all browsers. Additional values are browser dependent and all values may be ignored, but if a browser interprets these values the first 3 should be interpreted as described above. The transformation hierarchy of the currently bound SoVRMLViewpoint scales the avatarSize - translations and rotations have no effect on avatarSize.

For purposes of terrain following the browser needs a notion of the down direction (down vector), since gravity is applied in the direction of the down vector. This down vector should be along the negative Y-axis in the local coordinate system of the currently bound SoVRMLViewpoint (i.e., the accumulation of the SoVRMLViewpoint's parent transformations, not including the SoVRMLViewpoint's orientation field).

The visibilityLimit field sets the furthest distance the user is able to see. The browser may clip all objects beyond this limit, fade them into the background or ignore this field. A value of 0.0 (the default) indicates an infinite visibility limit. VisibilityLimit is restricted to be >= 0.0.

The speed, avatarSize and visibilityLimit values are all scaled by the transformation being applied to currently bound SoVRMLViewpoint. If there is no currently bound SoVRMLViewpoint, they are interpreted in the world coordinate system. This allows these values to be automatically adjusted when binding to an SoVRMLViewpoint that has a scaling transformation applied to it without requiring a new SoVRMLNavigationInfo node to be bound as well. If the scale applied to the SoVRMLViewpoint is non-uniform, the behavior is undefined.

The headlight field specifies whether a browser should turn a headlight on. A headlight is a directional light that always points in the direction the user is looking. Setting this field to TRUE allows the browser to provide a headlight, possibly with user interface controls to turn it on and off. Scenes that enlist precomputed lighting (e.g. radiosity solutions) can turn the headlight off. The headlight shall have intensity = 1, color = 1 1 1, ambientIntensity = 0.0, and direction = 0 0 -1.

It is recommended that the near clipping plane should be set to one-half of the collision radius as specified in the avatarSize field. This recommendation may be ignored by the browser, but setting the near plane to this value prevents excessive clipping of objects just above the collision volume and provides a region inside the collision volume for content authors to include geometry that should remain fixed relative to the viewer, such as icons or a heads-up display, but that should not be occluded by geometry outside of the collision volume.

The first SoVRMLNavigationInfo node found during reading of the world is automatically bound (receives a set_bind TRUE event) and supplies the initial navigation parameters.

FIELDS

SoMFFloat	avatarSize

The user's physical dimensions in the world for the purpose of collision detection and terrain following.

SoSFBool	headlight

Specifies whether the headlight should be turned on (TRUE).

SoSFFloat	speed

The rate at which the viewer travels through a scene.

SoMFString	type

Specifies a navigation paradigm to use. You may specify "ANY".

SoSFFloat	visibilityLimit

Sets the furthest distance the user is able to see.

METHODS

SoVRMLNavigationInfo()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_bind (Note: Not implemented)

SoMFFloat	set_avatarSize

SoSFBool	set_headlight

SoSFFloat	set_speed

SoMFString	set_type

SoSFFloat	set_visibilityLimit

eventOut

SoSFBool	isBound (Note: Not implemented)

SoMFFloat	avatarSize_changed

SoSFBool	headlight_changed

SoSFFloat	speed_changed

SoMFString	type_changed

SoSFFloat	visibilityLimit_changed

FILE FORMAT/DEFAULTS

VRMLNavigationInfo {

avatarSize	[ 0.25, 1.6, 0.75 ]

headlight	TRUE

speed	1.0

type	["WALK", "ANY"]

visibilityLimit	0.0

}


SoVRMLNormal

NAME

SoVRMLNormal - node that defines surface normals for shapes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLNormal

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLNormal.h>

Fields from class SoVRMLNormal:

SoMFVec3f	vector

Methods from class SoVRMLNormal:

SoVRMLNormal()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a set of 3D surface normal vectors to be used in the vector field of some geometry nodes (SoVRMLIndexedFaceSet, SoVRMLElevationGrid). This node contains one multiple-valued field that contains the normal vectors. Normals should be unit-length or results are undefined. Default normals are generated if none are given.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node defines a set of 3D surface normal vectors to be used in the vector field of some geometry nodes (SoVRMLIndexedFaceSet, SoVRMLElevationGrid). This node contains one multiple-valued field that contains the normal vectors. Normals should be unit-length or results are undefined.

To save network bandwidth, it is expected that implementations will be able to automatically generate appropriate normals if none are given. However, the results will vary from implementation to implementation.

FIELDS

SoMFVec3f	vector

Normal vectors.

METHODS

SoVRMLNormal()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFVec3f	set_vector

eventOut

SoMFVec3f	vector_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLNormal {

vector	[]

}


SoVRMLNormalInterpolator

NAME

SoVRMLNormalInterpolator - interpolates among a set of normals

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator > SoVRMLNormalInterpolator

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLNormalInterpolator.h>

Fields from class SoVRMLNormalInterpolator:

SoMFFloat	key

SoMFVec3f	keyValue

Methods from class SoVRMLNormalInterpolator:

SoVRMLNormalInperpolator()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node interpolates among a set of multi-valued Vec3f values, suitable for transforming normal vectors. All output vectors will have been normalized by the interpolator.

The number of normals in the keyValue field must be an integer multiple of the number of keyframes in the key field; that integer multiple defines how many normals will be contained in the value_changed events.

Normal interpolation is to be performed on the surface of the unit sphere. That is, the output values for a linear interpolation from a point P on the unit sphere to a point Q also on unit sphere should lie along the shortest arc (on the unit sphere) connecting points P and Q. Also, equally spaced input fractions will result in arcs of equal length. Cases where P and Q are diagonally opposing allow an infinite number of arcs. The interpolation for this case can be along any one of these arcs.

Refer to "Concepts - Interpolators" for a more detailed discussion of interpolators.

FIELDS

SoMFFloat	key

SoMFVec3f	keyValue

METHODS

SoVRMLNormalInperpolator()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_fraction

SoMFFloat	set_key

SoMFVec3f	set_keyValue

eventOut

SoMFVec3f	value_changed

SoMFFloat	key_changed

SoMFVec3f	keyValue_changed

FILE FORMAT/DEFAULTS

VRMLNormalInterpolator {

key	[]

keyValue	[]

}


SoVRMLOrientationInterpolator

NAME

SoVRMLOrientationInterpolator - interpolates among a set of rotation values

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator > SoVRMLOrientationInterpolator

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLOrientationInterpolator.h>

Fields from class SoVRMLOrientationInterpolator:

SoMFFloat	key

SoMFRotation	keyValue

Methods from class SoVRMLOrientationInterpolator:

SoVRMLOrientationInterpolator()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node interpolates among a set of SFRotation values. The rotations are absolute in object space and are, therefore, not cumulative. The keyValue field must contain exactly as many rotations as there are keyframes in the key field, or an error will be generated and results will be undefined.

An orientation represents the final position of an object after a rotation has been applied. An SoVRMLOrientationInterpolator will interpolate between two orientations by computing the shortest path on the unit sphere between the two orientations. The interpolation will be linear in arc length along this path. The path between two diagonally opposed orientations will be any one of the infinite possible paths with arc length pi.

If two consecutive keyValue values exist such that the arc length between them is greater than pi, then the interpolation will take place on the arc complement. For example, the interpolation between the orientations:

    0 1 0 0 --> 0 1 0 5.0

is equivalent to the rotation between the two orientations:

    0 1 0 2*PI --> 0 1 0 5.0

Refer to "Concepts - Interpolators" for a more detailed discussion of interpolators.

FIELDS

SoMFFloat	key

SoMFRotation	keyValue

METHODS

SoVRMLOrientationInterpolator()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_fraction

SoMFFloat	set_key

SoMFRotation	set_keyValue

eventOut

SoSFRotation	value_changed

SoMFFloat	key_changed

SoMFRotation	keyValue_changed

FILE FORMAT/DEFAULTS

VRMLOrientationInterpolator {

key	[]

keyValue	[]

}


SoVRMLPROTODef

NAME

SoVRMLPROTODef - contains the internal definition of a prototype

INHERITS FROM

SoBase > SoVRMLPROTODef

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPROTODef.h>

Methods from class SoVRMLPROTODef:

static SoType	getClassTypeId()

virtual int	getFields(SoVRMLPROTOFieldList &resultList) const

static int	getPROTOList(SoBaseList &list)

SbString	getPROTOName()

Methods from class SoBase:

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

DESCRIPTION

This class contains all the information required to set up an instance of a VRML 2.0 prototype. It is derived from SoBase and is created when a prototype is read from a file or buffer.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

int	getFields(SoVRMLPROTOFieldList &resultList) const

Appends pointers to all of this object's fields to resultList and returns the number of fields appended. Each item in the list is a pointer to an SoVRMLPROTOField.

static int	getPROTOList(SoBaseList &list)

Appends pointers to all of the SoVRMLPROTO nodes that have been defined to list, and returns the number of SoVRMLPROTO node pointers appended.

SbString	getPROTOName()

Returns the name of the PROTO defined by this SoVRMLPROTODef.


SoVRMLPROTOField

NAME

SoVRMLPROTOField - contains the internal definition for one of a prototype's fields, exposedFields, eventIns or eventOuts

INHERITS FROM

SoBase > SoVRMLPROTOField

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPROTOField.h>

enum Kind	{
SoVRMLPROTOField::PROTO_FIELD
Regular field
SoVRMLPROTOField::PROTO_EXPOSEDFIELD
Field with implied set_ and _changed eventIn and eventOut
SoVRMLPROTOField::PROTO_EVENTIN
eventIn
SoVRMLPROTOField::PROTO_EVENTOUT
eventOut
}

Methods from class SoVRMLPROTOField:

static SoType	getClassTypeId()

Kind	getFieldKind()

SoType	getFieldType()

SbString	getFieldName()

SbString	getFieldDefaultValue()

Methods from class SoBase:

Not applicable.

DESCRIPTION

The interface to a prototype is through the public fields, exposedFields, eventIns and eventOuts of a prototype declaration. This class defines one of these interfaces. The list of SoVRMLPROTOField definitions is created when the prototype is read from a file or buffer and cannot be created programmatically.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

Kind	getFieldKind()

Returns the kind of field this is.

SoType	getFieldType()

Returns the type of field this is.

SbString	getFieldName()

Returns the name of the field.

SbString	getFieldDefaultValue()

Returns the field's default value. Only fields and exposedFields have default values.


SoVRMLPROTOFieldList

NAME

SoVRMLPROTOFieldList - maintains a list of pointers to the field definitions of a prototype

INHERITS FROM

SbPList > SoVRMLPROTOFieldList

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPROTOFieldList.h>

Methods from class SoVRMLPROTOFieldList:

SoVRMLPROTOFieldList()

SoVRMLPROTOFieldList(int size)

SoVRMLPROTOFieldList(const SoFieldList &l)

~SoVRMLPROTOFieldList()

SoVRMLPROTOFieldList*	operator [](int i) const

DESCRIPTION

This subclass of SbPList holds lists of pointers to instances of class SoVRMLPROTOField.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

SoVRMLPROTOFieldList()

Constructor.

SoVRMLPROTOFieldList(int size)

Constructor that pre-allocates storage for size pointers.

SoVRMLPROTOFieldList(const SoFieldList &l)

Constructor that copies the contents of another list.

~SoVRMLPROTOFieldList()

Destructor.

SoVRMLPROTOFieldList*	operator [](int i) const

Accesses an element of a list.


SoVRMLPROTOInstance

NAME

SoVRMLPROTOInstance - instance of a prototype

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLPROTOInstance

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPROTOInstance.h>

SoVRMLPROTOInstance(SoVRMLPROTODef* protoDef)

static SoType	getClassTypeId()

void	setupInstance()

SoType	getPROTOType()

Methods from class SoNode:

Not applicable.

Methods from class SoFieldContainer:

Not applicable.

Methods from class SoBase:

Not applicable.

DESCRIPTION

A prototype definition read from a file or a buffer does not define an actual node instance. This class is used to create the instance of a previously defined prototype.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

METHODS

SoVRMLPROTOInstance(SoVRMLPROTODef* protoDef)

Creates an instance of the prototype defined by the definition protoDef.

static SoType	getClassTypeId()

Returns type identifier for this class.

void	setupInstance()

Finishes setting up an instance of a prototype. The steps required to create an instance of a prototype are:

1. Read in the prototype. You can read it in from a file or a buffer using the readAllVRML method of SoDB.

2. Find the prototype definition from the prototype's name using the static method findPROTO in SoBase.

SoVRMLPROTODef *spinProtoDef = (SoVRMLPROTODef *) SoBase::findPROTO(SbName("SpinGroup"));

3. Create an instance of the prototype.

SoVRMLPROTOInstance *spinInst = new SoVRMLPROTOInstance(spinProtoDef);

This will partially set up the instance and create the fields.

4. Set the values of the fields.

((SoSFTime *) (spinInst->getField("cycleInterval")))->setValue(4.0);

5. Finish the setup of the instance.

spinInst->setupInstance();

The order of the calls is important. If the value of the field is to be changed from the default, it must be changed before setupInstance is called.

SoType	getPROTOType()

Returns the type of the prototype being instanced. A type of a prototype determines where it can be instanced. The first node found in a prototype definition defines the type of the prototype.


SoVRMLParent

NAME

SoVRMLParent - abstract base class for all VRML grouping nodes that have children

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoVRMLParent

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLParent.h>

Fields from class SoVRMLParent:

SoMFNode	children

Methods from class SoVRMLParent:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLParent node is the abstract base class for all VRML grouping nodes that have children.

FIELDS

SoMFNode	children

METHODS

virtual void	addChild(SoNode *child)

Adds a child as last one in group

virtual void	insertChild(SoNode *child, int newChildIndex)

Adds a child so that it becomes the one with the given index

virtual SoNode *	getChild(int index) const

Returns pointer to nth child node

virtual int	findChild(const SoNode *child) const

Finds index of given child within group

virtual int	getNumChildren() const

Returns number of children

virtual void	removeChild(int index)

Removes child with given index from group

virtual void	removeChild(SoNode *child)

Removes first instance of given child from group

virtual void	removeAllChildren()

Removes all children from group

virtual void	replaceChild(int index, SoNode *newChild)

Replaces child with given index with new child

virtual void	replaceChild(SoNode *oldChild, SoNode *newChild)

Replaces first instance of given child with new child

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFNode	set_children

eventOut

SoMFNode	children_changed

ACTION BEHAVIOR

SoSearchAction


SoVRMLPixelTexture

NAME

SoVRMLPixelTexture - texture node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLTexture > SoVRMLPixelTexture

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPixelTexture.h>

Fields from class SoVRMLPixelTexture:

SoSFImage	image

Fields from class SoVRMLTexture:

SoSFBool	repeatS

SoSFBool	repeatT

Methods from class SoVRMLPixelTexture:

SoVRMLPixelTexture()

static SoType	getClassTypeId()

Methods from class SoBase:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

If the texture image's width or height is not a power of 2, or the image's width or height is greater than the maximum supported by OpenGL, then the image will be automatically scaled up or down to the next power of 2 or the maximum texture size. For maximum speed, point-sampling is used to do the scale; if you want more accurate resampling, pre-filter images to a power of 2 smaller than the maximum texture size (use the OpenGL glGetIntegerv(GL_MAX_TEXTURE_SIZE...) call to determine maximum texture for a specific OpenGL implementation).

The quality of the texturing is affected by the textureQuality field of the SoComplexity node. The textureQuality field affects what kind of filtering is done to the texture when it must be minified or magnified. The mapping of a particular texture quality value to a particular OpenGL filtering technique is implementation dependent, and varies based on the texturing performance. If mipmap filtering is required, mipmaps are automatically created using the simple box filter.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLPixelTexture node defines a 2D image-based texture map as an explicit array of pixel values and parameters controlling tiling repetition of the texture onto geometry.

Texture maps are defined in a 2D coordinate system, (s, t), that ranges from 0.0 to 1.0 in both directions. The bottom edge of the pixel image corresponds to the S-axis of the texture map, and left edge of the pixel image corresponds to the T-axis of the texture map. The lower-left pixel of the pixel image corresponds to s=0, t=0, and the top-right pixel of the image corresponds to s=1, t=1.

Images may be one component (grayscale), two component (grayscale plus alpha opacity), three component (full RGB color), or four-component (full RGB color plus alpha opacity). An ideal VRML implementation will use the texture image to modify the diffuse color and transparency ( = 1 - alpha opacity) of an object's material (specified in an SoVRMLMaterial node), then perform any lighting calculations using the rest of the object's material properties with the modified diffuse color to produce the final image. The texture image modifies the diffuse color and transparency depending on how many components are in the image, as follows:

1.	Diffuse color is multiplied by the grayscale values in the texture image.

2.	Diffuse color is multiplied by the grayscale values in the texture image; material transparency is multiplied by transparency values in texture image.

3.	RGB colors in the texture image replace the material's diffuse color.

4.	RGB colors in the texture image replace the material's diffuse color; transparency values in the texture image replace the material's transparency.

Browsers may approximate this ideal behavior to increase performance. One common optimization is to calculate lighting only at each vertex and combining the texture image with the color computed from lighting (performing the texturing after lighting). Another common optimization is to perform no lighting calculations at all when texturing is enabled, displaying only the colors of the texture image.

See "Concepts - Lighting Model" for details on the VRML lighting equations.

See the "Field Reference - SFImage" specification for details on how to specify an image.

The repeatS and repeatT fields specify how the texture wraps in the S and T directions. If repeatS is TRUE (the default), the texture map is repeated outside the 0-to-1 texture coordinate range in the S direction so that it fills the shape. If repeatS is FALSE, the texture coordinates are clamped in the S direction to lie within the 0-to-1 range. The repeatT field is analogous to the repeatS field.

FIELDS

SoSFImage	image

The texture map.

METHODS

SoVRMLPixelTexture()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFImage	set_image

eventOut

SoSFImage	image_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLPixelTexture {

image	0 0 0

repeatS	TRUE

repeatT	TRUE

}


SoVRMLPlaneSensor
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLPlaneSensor - maps pointing device motion onto a plane

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLPlaneSensor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPlaneSensor.h>

Fields from class SoVRMLPlaneSensor:

SoSFBool	autoOffset

SoSFBool	enabled

SoSFVec2f	maxPosition

SoSFVec2f	minPosition

SoSFVec3f	offset

Methods from class SoVRMLPlaneSensor:

SoVRMLPlaneSensor()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLPlaneSensor maps pointing device (e.g. mouse or wand) motion into translation in two dimensions, in the XY plane of its local space. SoVRMLPlaneSensor uses the descendant geometry of its parent node to determine if a hit occurs.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLPlaneSensor maps pointing device (e.g. mouse or wand) motion into translation in two dimensions, in the XY plane of its local space. SoVRMLPlaneSensor uses the descendant geometry of its parent node to determine if a hit occurs.

The enabled exposed field enables and disables the SoVRMLPlaneSensor - if TRUE, the sensor reacts appropriately to user events, if FALSE, the sensor does not track user input or send output events. If enabled receives a FALSE event and isActive is TRUE, the sensor becomes disabled and deactivated, and outputs an isActive FALSE event. If enabled receives a TRUE, event the sensor is enabled and ready for user activation.

The SoVRMLPlaneSensor generates events if the pointing device is activated while over any descendant geometry nodes of its parent group and then moved while activated. Typically, the pointing device is a 2D device such as a mouse. The pointing device is considered to be moving within a plane at a fixed distance from the viewer and perpendicular to the line of sight; this establishes a set of 3D coordinates for the pointer. If a 3D pointer is in use, then the sensor generates events only when the pointer is within the user's field of view. In either case, the pointing device is considered to "pass over" geometry when that geometry is intersected by a line extending from the viewer and passing through the pointer's 3D coordinates. If multiple sensors' geometry intersect this line (hereafter called the bearing), only the nearest will be eligible to generate events.

Upon activation of the pointing device (e.g. mouse button down) over the sensor's geometry, an isActive TRUE event is sent. Dragging motion is mapped into a relative translation in the XY plane of the sensor's local coordinate system as it was defined at the time of activation. For each subsequent position of the bearing, a translation_changed event is output which corresponds to a relative translation from the original intersection point projected onto the XY plane, plus the offset value. The sign of the translation is defined by the XY plane of the sensor's coordinate system. trackPoint_changed events reflect the unclamped drag position on the surface of this plane. When the pointing device is deactivated and autoOffset is TRUE, offset is set to the last translation value and an offset_changed event is generated. See "Concepts - Drag Sensors" for more details.

When the sensor generates an isActive TRUE event, it grabs all further motion events from the pointing device until it releases and generates an isActive FALSE event (other pointing device sensors cannot generate events during this time). Motion of the pointing device while isActive is TRUE is referred to as a "drag". If a 2D pointing device is in use, isActive events will typically reflect the state of the primary button associated with the device (i.e. isActive is TRUE when the primary button is pressed, and FALSE when not released). If a 3D pointing device (e.g. wand) is in use, isActive events will typically reflect whether the pointer is within or in contact with the sensor's geometry.

minPosition and maxPosition may be set to clamp translation events to a range of values as measured from the origin of the XY plane. If the X or Y component of minPosition is greater than the corresponding component of maxPosition, translation_changed events are not clamped in that dimension. If the X or Y component of minPosition is equal to the corresponding component of maxPosition, that component is constrained to the given value; this technique provides a way to implement a line sensor that maps dragging motion into a translation in one dimension.

While the pointing device is activated, trackPoint_changed and translation_changed events are output. trackPoint_changed events represent the unclamped intersection points on the surface of the local XY plane. If the pointing device is dragged off of the XY plane while activated (e.g. above horizon line), browsers may interpret this in several ways (e.g. clamp all values to the horizon). Each movement of the pointing device, while isActive is TRUE, generates trackPoint_changed and translation_changed events.

See "Concepts - Pointing Device Sensors and Drag Sensors" for more details.

FIELDS

SoSFBool	autoOffset

Specifies whether to set the offset to the last translation value (TRUE).

SoSFBool	enabled

Enables (TRUE) or disables (FALSE) the sensor.

SoSFVec2f	maxPosition

SoSFVec2f	minPosition

Used to clamp translation events to a range of values as measured from the origin of the XY plane.

SoSFVec3f	offset

Amount to add to the translation event value.

METHODS

SoVRMLPlaneSensor()

Constructor.

static void	enableEvents(SbBool OnOffFlag)

Enables/disables events for all SoVRMLPlaneSensor objects. If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.

static SbBool	isEventsEnabled()

Queries if events are enabled for all objects of this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_autoOffset

SoSFBool	set_enabled

SoSFVec2f	set_maxPosition

SoSFVec2f	set_minPosition

SoSFVec3f	set_offset

eventOut

SoSFBool	isActive

SoSFVec3f	trackPoint_changed

SoSFVec3f	translation_changed

SoSFBool	autoOffset_changed

SoSFBool	enabled_changed

SoSFVec2f	maxPosition_changed

SoSFVec2f	minPosition_changed

SoSFVec3f	offset_changed

FILE FORMAT/DEFAULTS

VRMLPlaneSensor {

autoOffset	TRUE

enabled	TRUE

maxPosition	-1 -1

minPosition	0 0

offset	0 0 0

}


SoVRMLPointLight

NAME

SoVRMLPointLight - node representing a point light source

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLLight > SoVRMLPointLight

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPointLight.h>

Fields from class SoVRMLPointLight:

SoSFVec3f	attenuation

SoSFVec3f	location

SoSFFloat	radius (Note: Not implemented)

Fields from class SoVRMLLight:

SoSFFloat	ambientIntensity

SoSFColor	color

SoSFFloat	intensity

SoSFBool	on

Methods from class SoVRMLPointLight:

SoVRMLPointLight()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLPointLight node specifies a point light source at a 3D location in the local coordinate system. A point source emits light equally in all directions; that is, it is omnidirectional. SoVRMLPointLights are specified in their local coordinate system and are affected by parent transformations.

Note: SoVRMLPointLights only illuminate objects in their enclosing parent group (similar to Directional lights). This is a slight deviation from the behavior described by the VRML 2.0 specification.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLPointLight node specifies a point light source at a 3D location in the local coordinate system. A point source emits light equally in all directions; that is, it is omnidirectional. SoVRMLPointLights are specified in their local coordinate system and are affected by parent transformations.

See "Concepts - Light Sources" for a detailed description of the ambientIntensity, color, and intensity fields.

A SoVRMLPointLight may illuminate geometry within radius (>= 0.0) meters of its location. Both radius and location are affected by parent transformations (scale radius and transform location).

A SoVRMLPointLight's illumination falls off with distance as specified by three attenuation coefficients. The attenuation factor is 1/(attenuation[0] + attenuation[1]*r + attenuation[2]*r^2), where r is the distance of the light to the surface being illuminated. The default is no attenuation. An attenuation value of 0 0 0 is identical to 1 0 0. Attenuation values must be >= 0.0. Renderers that do not support a full attenuation model may approximate as necessary. See "Concepts - Lighting Model" for a detailed description of VRML's lighting equations.

FIELDS

SoSFVec3f	attenuation

Attenuation coefficients.

SoSFVec3f	location

Location of the source.

SoSFFloat	radius (Note: Not implemented)

Meters from the location the light can illuminate.

METHODS

SoVRMLPointLight()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_ambientIntensity

SoSFVec3f	set_attenuation

SoSFColor	set_color

SoSFFloat	set_intensity

SoSFVec3f	set_location

SoSFBool	set_on

SoSFFloat	set_radius

eventOut

SoSFFloat	ambientIntensity_changed

SoSFVec3f	attenuation_changed

SoSFColor	color_changed

SoSFFloat	intensity_changed

SoSFVec3f	location_changed

SoSFBool	on_changed

SoSFFloat	radius_changed

ACTION BEHAVIOR

SoGLRenderAction

FILE FORMAT/DEFAULTS

VRMLPointLight {

ambientIntensity	0

attenuation	1 0 0

color	1 1 1

intensity	1

location	0 0 0

on	TRUE

radius	100

}


SoVRMLPointSet

NAME

SoVRMLPointSet - point set shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexPoint > SoVRMLPointSet

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPointSet.h>

Fields from class SoVRMLVertexPoint:

SoSFNode	color

SoSFNode	coord

Methods from class SoVRMLPointSet:

SoVRMLPointSet()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLPointSet node specifies a set of 3D points in the local coordinate system with associated colors at each point. The coord field specifies an SoVRMLCoordinate node (or instance of an SoVRMLCoordinate node) - results are undefined if the coord field specifies any other type of node. SoVRMLPointSet uses the coordinates in order. If the coord field is NULL, then the SoVRMLPointSet is empty.

SoVRMLPointSets are not lit, not texture-mapped, or collided with during collision detection.

If the color field is not NULL, it must specify an SoVRMLColor node that contains at least the number of points contained in the coord node - results are undefined if the color field specifies any other type of node. Colors shall be applied to each point in order. The results are undefined if the number of values in the SoVRMLColor node is less than the number of values specified in the SoVRMLCoordinate node

If the color field is NULL and there is an SoVRMLMaterial defined for the SoVRMLAppearance affecting this SoVRMLPointSet, then use the emissiveColor of the Material to draw the points. See "Concepts - Lighting Model, Lighting Off" for details on lighting equations.

FIELDS

SoSFNode	coord

An SoVRMLCoordinate node containing the coordinates of the points.

SoSFNode	color

An SoVRMLColor node containing the colors of the points.

METHODS

SoVRMLPointSet()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_color

SoSFNode	set_coord

eventOut

SoSFNode	color_changed

SoSFNode	coord_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLPointSet {

coord	NULL

color	NULL

}


SoVRMLPositionInterpolator

NAME

SoVRMLPositionInterpolator - interpolates among a set of position values

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator > SoVRMLPositionInterpolator

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLPositionInterpolator.h>

Fields from class SoVRMLPositionInterpolator:

SoMFFloat	key

SoMFVec3f	keyValue

Methods from class SoVRMLPositionInterpolator:

SoVRMLPositionInterpolator()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node linearly interpolates among a set of SFVec3f values. This is appropriate for interpolating a translation. The vectors are interpreted as absolute positions in object space. The keyValue field must contain exactly as many values as in the key field.

Refer to "Concepts - Interpolators" for a more detailed discussion of interpolators.

FIELDS

SoMFFloat	key

SoMFVec3f	keyValue

METHODS

SoVRMLPositionInterpolator()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_fraction

SoMFFloat	set_key

SoMFVec3f	set_keyValue

eventOut

SoSFVec3f	value_changed

SoMFFloat	key_changed

SoMFVec3f	keyValue_changed

FILE FORMAT/DEFAULTS

VRMLPositionInterpolator {

key	[]

keyValue	[]

}


SoVRMLProximitySensor

NAME

SoVRMLProximitySensor - generates events when the user moves into, out of, or within a specified region of space

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLProximitySensor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLProximitySensor.h>

Fields from class SoVRMLProximitySensor:

SoSFVec3f	center

SoSFBool	enabled

SoSFVec3f	size

Methods from class SoVRMLProximitySensor:

SoVRMLProximitySensor()

static void	enableEvents(SbBool OnOffFlag)

static SbBool	isEventsEnabled()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLProximitySensor generates events when the user enters, exits, and moves within a region in space (defined by a box).

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLProximitySensor generates events when the user enters, exits, and moves within a region in space (defined by a box). A proximity sensor can be enabled or disabled by sending it an enabled event with a value of TRUE or FALSE - a disabled sensor does not send output events.

A SoVRMLProximitySensor generates isActive TRUE/FALSE events as the viewer enters and exits the rectangular box defined by its center and size fields. Browsers shall interpolate user positions and timestamp the isActive events with the exact time the user first intersected the proximity region. The center field defines the center point of the proximity region in object space, and the size field specifies a vector which defines the width (x), height (y), and depth (z) of the box bounding the region. SoVRMLProximitySensor nodes are affected by the hierarchical transformations of its parents.

The enterTime event is generated whenever the isActive TRUE event is generated (user enters the box), and exitTime events are generated whenever isActive FALSE event is generated (user exits the box).

The position_changed and orientation_changed events send events whenever the position and orientation of the viewer changes with respect to the SoVRMLProximitySensor's coordinate system - this includes enter and exit times. Note that the user movement may be as a result of a variety of circumstances (e.g. browser navigation, proximity sensor's coordinate system changes, bound Viewpoint's position or orientation changes, or the SoVRMLProximitySensor's coordinate system changes).

Each SoVRMLProximitySensor behaves independently of all other SoVRMLProximitySensors - every enabled SoVRMLProximitySensor that is affected by the user's movement receives and sends events, possibly resulting in multiple SoVRMLProximitySensors receiving and sending events simultaneously. Unlike SoVRMLTouchSensors, there is no notion of an SoVRMLProximitySensor lower in the scene graph "grabbing" events.

Instanced (DEF/USE) SoVRMLProximitySensors use the union of all the boxes to check for enter and exit - an instanced SoVRMLProximitySensor will detect enter and exit for all instances of the box and send output events appropriately.

A SoVRMLProximitySensor that surrounds the entire world will have an enterTime equal to the time that the world was entered and can be used to start up animations or behaviors as soon as a world is loaded. A SoVRMLProximitySensor with a (0 0 0) size field cannot generate events - this is equivalent to setting the enabled field to FALSE.

FIELDS

SoSFVec3f	center

SoSFVec3f	size

Define the rectangular box within which isActive event is generated.

SoSFBool	enabled

Enable (TRUE) or disable (FALSE) the sensor.

METHODS

SoVRMLProximitySensor()

Constructor.

static void	enableEvents(SbBool OnOffFlag)

Enables/disables events for all SoVRMLProximitySensor objects. If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.

static SbBool	isEventsEnabled()

Queries if events are enabled for all objects of this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFVec3f	set_center

SoSFBool	set_enabled

SoSFVec3f	set_size

eventOut

SoSFBool	isActive

SoSFVec3f	position_changed

SoSFRotation	orientation_changed

SoSFTime	enterTime

SoSFTime	exitTime

SoSFVec3f	center_changed

SoSFBool	enabled_changed

SoSFVec3f	size_changed

FILE FORMAT/DEFAULTS

VRMLProximitySensor {

center	0 0 0

enabled	TRUE

size	0 0 0

}


SoVRMLScalarInterpolator

NAME

SoVRMLScalarInterpolator - interpolates among a set of float values

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator > SoVRMLScalarInterpolator

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLScalarInterpolator.h>

Fields from class SoVRMLScalarInterpolator:

SoMFFloat	key

SoMFFloat	keyValue

Methods from class SoVRMLScalarInterpolator:

SoVRMLScalarInterpolator()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

This node linearly interpolates among a set of SFFloat values. This interpolator is appropriate for any parameter defined using a single floating point value, e.g., width, radius, intensity, etc. The keyValue field must contain exactly as many numbers as there are keyframes in the key field.

Refer to "Concepts - Interpolators" for a more detailed discussion of interpolators.

FIELDS

SoMFFloat	key

SoMFFloat	keyValue

METHODS

SoVRMLScalarInterpolator()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_fraction

SoMFFloat	set_key

SoMFFloat	set_keyValue

eventOut

SoSFFloat	value_changed

SoMFFloat	key_changed

SoMFFloat	keyValue_changed

FILE FORMAT/DEFAULTS

VRMLScalarInterpolator {

key	[]

keyValue	[]

}


SoVRMLScript
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLScript - used to program behavior in a scene

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLScript

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLScript.h>

Fields from class SoVRMLScript:

SoMFString	url

SoSFBool	directOutput

SoSFBool	mustEvaluate

Methods from class SoVRMLScript:

SoVRMLScript()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLScript node is used to program behavior in a scene. SoVRMLScript nodes typically receive events that signify a change or user action, contain a program module that performs some computation, and effect change somewhere else in the scene by sending output events.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLScript node is used to program behavior in a scene. SoVRMLScript nodes typically receive events that signify a change or user action, contain a program module that performs some computation, and effect change somewhere else in the scene by sending output events. Each SoVRMLScript node has associated programming language code, referenced by the url field, that is executed to carry out the SoVRMLScript node's function. That code will be referred to as "the script" in the rest of this description.

Browsers are not required to support any specific language. See the section in "Concepts - Scripting" for detailed information on scripting languages. Browsers are required to adhere to the language bindings of languages specified in annexes of the specification. See the section "Concepts - URLS and URNs" for details on the url field.

When the script is created, any language-dependent or user-defined initialization is performed. The script is able to receive and process events that are sent to it. Each event that can be received must be declared in the SoVRMLScript node using the same syntax as is used in a prototype definition:

    eventIn type name

The type can be any of the standard VRML fields (see "Field Reference"), and name must be an identifier that is unique for this SoVRMLScript node.

The SoVRMLScript node should be able to generate events in response to the incoming events. Each event that can be generated must be declared in the SoVRMLScript node using the following syntax:

    eventOut type name

SoVRMLScript nodes cannot have exposedFields. The implementation ramifications of exposedFields is far too complex and thus not allowed.

If the SoVRMLScript node's mustEvaluate field is FALSE, the browser can delay sending input events to the script until its outputs are needed by the browser. If the mustEvaluate field is TRUE, the browser should send input events to the script as soon as possible, regardless of whether the outputs are needed. The mustEvaluate field should be set to TRUE only if the SoVRMLScript has effects that are not known to the browser (such as sending information across the network); otherwise, poor performance may result.

Once the script has access to a VRML node (via an SFNode or MFNode value either in one of the SoVRMLScript node's fields or passed in as an eventIn), the script should be able to read the contents of that node's exposed field. If the SoVRMLScript node's directOutput field is TRUE, the script may also send events directly to any node to which it has access, and may dynamically establish or break routes. If directOutput is FALSE (the default), then the script may only affect the rest of the world via events sent through its eventOuts.

A script is able to communicate directly with the VRML browser to get the current time, the current world URL, and so on. This is strictly defined by the API for the specific language being used.

It is expected that all other functionality (such as networking capabilities, multi-threading capabilities, and so on) will be provided by the scripting language.

The location of the SoVRMLScript node in the scene graph has no effect on its operation. For example, if a parent of an SoVRMLScript node is an SoVRMLSwitch node with whichChoice set to -1 (i.e. ignore its children), the SoVRMLScript continues to operate as specified (receives and sends events).

FIELDS

SoMFString	url

Associated programming language code.

SoSFBool	directOutput

If TRUE, the script can send events directly to the other nodes. If FALSE, the scripts must use eventOuts to affect the rest of the world. Default is FALSE.

SoSFBool	mustEvaluate

If FALSE, delay sending input events to the script until needed. If TRUE, send as soon as possible. Default is FALSE.

And any number of:

eventIn	eventTypeName eventName

field	fieldTypeName fieldName initialValue

eventOut	eventTypeName eventName

METHODS

SoVRMLScript()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULTS

VRMLScript{

url	[]

directedOutput	FALSE

mustEvaluate	FALSE

}


SoVRMLShape

NAME

SoVRMLShape - defines a shape by specifying its appearance and geometry

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLShape

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLShape.h>

enum CacheEnabled	{
SoVRMLShape::OFF,
Never build or use a cache
SoVRMLShape::ON,
Always try to build a cache
SoVRMLShape::AUTO
Decide whether to cache based on some heuristic
}

Fields from class SoVRMLShape:

SoSFNode	appearance

SoSFNode	geometry

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

Methods from class SoVRMLShape:

SoVRMLShape()

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLShape node has two fields: appearance and geometry which are used to create rendered objects in the world. The appearance field specifies an SoVRMLAppearance node that specifies the visual attributes (e.g. material and texture) to be applied to the geometry. The geometry field specifies a geometry node. The specified geometry node is rendered with the specified appearance nodes applied.

See "Concepts - Lighting Model" for details of the VRML lighting model and the interaction between SoVRMLAppearance and geometry nodes.

If the geometry field is NULL the object is not drawn.

FIELDS

SoSFNode	appearance

Specifies an SoVRMLAppearance node that defines the visual attributes.

SoSFNode	geometry

A geometry node.

SoSFEnum	renderCaching

Whether to cache during rendering traversal.

SoSFEnum	boundingBoxCaching

Whether to cache during bounding box traversal.

METHODS

SoVRMLShape()

Constructor.

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Set/get the number of render caches each VRMLShape will have (2, by default). The more render caches each VRMLShape is allowed to have, the more memory used. setNumRenderCaches only affects VRMLShape nodes that are created after it is called, not VRMLShape that were created before. Setting zero render caches globally turns off render caching.

This value can also be specified via environment variable IV_SEPARATOR_MAX_CACHES.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_appearance

SoSFNode	set_geometry

eventOut

SoSFNode	appearance_changed

SoSFNode	geometry_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLShape {

appearance	NULL

geometry	NULL

}


SoVRMLSound
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLSound - specifies position and spatial representation of a sound

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLSound

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLSound.h

Fields from class SoVRMLSound:

SoSFVec3f	direction

SoSFFloat	intensity

SoSFVec3f	location

SoSFFloat	maxBack

SoSFFloat	maxFront

SoSFFloat	minBack

SoSFFloat	minFront

SoSFFloat	priority

SoSFNode	source

SoSFBool	spatialize

Methods from class SoVRMLSound:

SoVRMLSound()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLSound node describes the positioning and spatial presentation of a sound in a VRML scene. The sound may be located at a point and emit sound in a spherical or ellipsoid pattern, in the local coordinate system. The ellipsoid is pointed in a particular direction and may be shaped to provide more or less directional focus from the location of the sound. The sound node may also be used to describe an ambient sound which tapers off at a specified distance from the sound node.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLSound node describes the positioning and spatial presentation of a sound in a VRML scene. The sound may be located at a point and emit sound in a spherical or ellipsoid pattern, in the local coordinate system. The ellipsoid is pointed in a particular direction and may be shaped to provide more or less directional focus from the location of the sound. The sound node may also be used to describe an ambient sound which tapers off at a specified distance from the sound node.

The SoVRMLSound node also enables ambient background sound to be created by setting of the maxFront and maxBack to the radius of the area for the ambient noise. If ambient noise is required for the whole scene then these values should be set to at least cover the distance from the location to the farthest point in scene from that point (including effects of transforms).

The source field specifies the sound source for the sound node. If there is no source specified the SoVRMLSound will emit no audio. The source field shall specify either an SoVRMLAudioClip or an SoVRMLMovieTexture node. Furthermore, the SoVRMLMovieTexture node must refer to a movie format that supports sound (e.g. MPEG1-Systems).

The intensity field adjusts the volume of each sound source; The intensity is an SFFloat that ranges from 0.0 to 1.0. An intensity of 0 is silence, and an intensity of 1 is the full volume of the sound in the sample or the full volume of the MIDI clip.

The priority field gives the author some control over which sounds the browser will choose to play when there are more sounds active than sound channels available. The priority varies between 0.0 and 1.0, with 1.0 being the highest priority. For most applications priority 0.0 should be used for a normal sound and 1.0 should be used only for special event or cue sounds (usually of short duration) that the author wants the user to hear even if they are farther away and perhaps of lower intensity than some other ongoing sounds. Browsers should make as many sound channels available to the scene as is efficiently possible.

If the browser does not have enough sound channels to play all of the currently active sounds, it is recommended that the browser sort the active sounds into an ordered list using the following sort keys:

1.	decreasing priority;

2.	for sounds with priority > 0.5, increasing (now-startTime)

3.	decreasing intensity at viewer location ((intensity/distance)**2);

where now represents the current time, and startTime is the startTime field of the audio source node specified in the source field.

It is important that sort key #2 be used for the high priority (event and cue) sounds so that new cues will be heard even when the channels are "full" of currently active high priority sounds. Sort key #2 should not be used for normal priority sounds so selection among them will be based on sort key #3 - intensity and distance from the viewer.

The browser should play as many sounds from the beginning of this sorted list as it has available channels. On most systems the number of concurrent sound channels is distinct from the number of concurrent MIDI streams. On these systems the browser may maintain separate ordered lists for sampled sounds and MIDI streams.

A sound's location in the scene graph determines its spatial location (the sound's location is transformed by the current transformation) and whether or not it can be heard. A sound can only be heard while it is part of the traversed scene; sound nodes that are descended from SoVRMLLOD, SoVRMLSwitch, or any grouping or prototype node that disables traversal (i.e. drawing) of its children will not be audible unless they are traversed. If a sound is silenced for a time under an SoVRMLSwitch or SoVRMLLOD node, and later it becomes part of the traversal again, the sound picks up where it would have been had it been playing continuously.

Around the location of the emitter, minFront and minBack determine the extent of the full intensity region in front of and behind the sound. If the location of the sound is taken as a focus of an ellipsoid, the minBack and minFront values, in combination with the direction vector determine the two focii of an ellipsoid bounding the ambient region of the sound. Similarly, maxFront and maxBack determine the limits of audibility in front of and behind the sound; they describe a second, outer ellipsoid. If minFront equals minBack and maxFront equals maxBack, the sound is omnidirectional, the direction vector is ignored, and the min and max ellipsoids become spheres centered around the sound node. The fields minFront, maxFront, minBack, and maxBack are scaled by the parent transformations - these values must be >= 0.0.

The inner ellipsoid defines a space of full intensity for the sound. Within that space the sound will play at the intensity specified in the sound node. The outer ellipsoid determines the maximum extent of the sound. Outside that space, the sound cannot be heard at all. In between the two ellipsoids, the intensity drops off proportionally with inverse square of the distance. With this model, an SoVRMLSound usually will have smooth changes in intensity over the entire extent is which it can be heard. However, if at any point the maximum is the same as or inside the minimum, the sound is cut off immediately at the edge of the minimum ellipsoid.

The ideal implementation of the sound attenuation between the inner and outer ellipsoids is an inverse power dropoff. A reasonable approximation to this ideal model is a linear dropoff in decibel value. Since an inverse power dropoff never actually reaches zero, it is necessary to select an appropriate cutoff value for the outer ellipsoid so that the outer ellipsoid contains the space in which the sound is truly audible and excludes space where it would be negligible. Keeping the outer ellipsoid as small as possible will help limit resources used by nearly inaudible sounds. Experimentation suggests that a 20dB dropoff from the maximum intensity is a reasonable cutoff value that makes the bounding volume (the outer ellipsoid) contain the truly audible range of the sound. Since actual physical sound dropoff in an anechoic environment follows the inverse square law, using this algorithm it is possible to mimic real-world sound attenuation by making the maximum ellipsoid ten times larger than the minimum ellipsoid. This will yield inverse square dropoff between them.

Browsers should support spatial localization of sound as well as their underlying sound libraries will allow. The spatialize field is used to indicate to browsers that they should try to locate this sound. If the spatialize field is TRUE, the sound should be treated as a monaural sound coming from a single point. A simple spatialization mechanism just places the sound properly in the pan of the stereo (or multichannel) sound output. Sounds are faded out over distance as described above. Browsers may use more elaborate sound spatialization algorithms if they wish.

Authors can create ambient sounds by setting the spatialize field to FALSE. In that case, stereo and multichannel sounds should be played using their normal separate channels. The distance to the sound and the minimum and maximum ellipsoids (discussed above) should affect the intensity in the normal way. Authors can create ambient sound over the entire scene by setting the minFront and minBack to the maximum extents of the scene.

FIELDS

SoSFVec3f	direction

The direction the ellipsoidal sound pattern is pointing.

SoSFFloat	intensity

Adjusts the volume of each sound source.

SoSFVec3f	location

Position of the sound source.

SoSFFloat	maxBack

SoSFFloat	maxFront

SoSFFloat	minBack

SoSFFloat	minFront

Around the location of the emitter, minFront and minBack determine the extent of the full intensity region in front of and behind the sound. If the location of the sound is taken as a focus of an ellipsoid, the minBack and minFront values, in combination with the direction vector determine the two focii of an ellipsoid bounding the ambient region of the sound. Similarly, maxFront and maxBack determine the limits of audibility in front of and behind the sound; they describe a second, outer ellipsoid.

SoSFFloat	priority

Controls which sound is heard when more than one sound is active.

SoSFNode	source

Sound source for the sound node.

SoSFBool	spatialize

If TRUE, the sound is treated as a monaural sound from a single point. If FALSE, ambient sounds can be created.

METHODS

SoVRMLSound()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFVec3f	set_direction

SoSFFloat	set_intensity

SoSFVec3f	set_location

SoSFFloat	set_maxBack

SoSFFloat	set_maxFront

SoSFFloat	set_minBack

SoSFFloat	set_minFront

SoSFFloat	set_priority

SoSFNode	set_source

eventOut

SoSFVec3f	direction_changed

SoSFFloat	intensity_changed

SoSFVec3f	location_changed

SoSFFloat	maxBack_changed

SoSFFloat	maxFront_changed

SoSFFloat	minBack_changed

SoSFFloat	minFront_changed

SoSFFloat	priority_changed

SoSFNode	source_changed

FILE FORMAT/DEFAULTS

VRMLSound {

direction	0 0 1

intensity	1

location	0 0 0

maxBack	10

maxFront	10

minBack	1

minFront	1

priority	0

source	NULL

spatialize	TRUE

}


SoVRMLSphere

NAME

SoVRMLSphere - sphere shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLSphere

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLSphere.h>

Fields from class SoVRMLSphere:

SoSFFloat	radius

Methods from class SoVRMLSphere:

SoVRMLSphere()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLSphere node specifies a sphere centered at (0, 0, 0) in the local coordinate system. The radius field specifies the radius of the sphere and must be >= 0.0.

When a texture is applied to a sphere, the texture covers the entire surface, wrapping counterclockwise from the back of the sphere. The texture has a seam at the back where the YZ plane intersects the sphere. SoVRMLTextureTransform affects the texture coordinates of the SoVRMLSphere.

The SoVRMLSphere geometry is considered to be solid and thus requires outside faces only. When viewed from the inside the results are undefined.

FIELDS

SoSFFloat	radius

Radius of the sphere.

METHODS

SoVRMLSphere()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

SoVRMLSphere {

radius	1

}


SoVRMLSphereSensor
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLSphereSensor - maps pointing device motion onto a sphere

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLSphereSensor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLSphereSensor.h>

Fields from class SoVRMLSphereSensor:

SoSFBool	autoOffset

SoSFBool	enabled

SoSFRotation	offset

Methods from class SoVRMLSphereSensor:

SoVRMLSphereSensor()

static void	enableEvents(SbBool OnOffFlag)

static SbBool	isEventsEnabled()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLSphereSensor maps pointing device (e.g. mouse or wand) motion into spherical rotation about the center of its local space.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLSphereSensor maps pointing device (e.g. mouse or wand) motion into spherical rotation about the center of its local space. SoVRMLSphereSensor uses the descendant geometry of its parent node to determine if a hit occurs. The feel of the rotation is as if you were rolling a ball.

The enabled exposed field enables and disables the SoVRMLSphereSensor - if TRUE, the sensor reacts appropriately to user events, if FALSE, the sensor does not track user input or send output events. If enabled receives a FALSE event and isActive is TRUE, the sensor becomes disabled and deactivated, and outputs an isActive FALSE event. If enabled receives a TRUE event the sensor is enabled and ready for user activation.

The SoVRMLSphereSensor generates events if the pointing device is activated while over any descendant geometry nodes of its parent group and then moved while activated. Typically, the pointing device is a 2D device such as a mouse. The pointing device is considered to be moving within a plane at a fixed distance from the viewer and perpendicular to the line of sight; this establishes a set of 3D coordinates for the pointer. If a 3D pointer is in use, then the sensor generates events only when the pointer is within the user's field of view. In either case, the pointing device is considered to "pass over" geometry when that geometry is intersected by a line extending from the viewer and passing through the pointer's 3D coordinates. If multiple sensors' geometries intersect this line (hereafter called the bearing), only the nearest will be eligible to generate events.

Upon activation of the pointing device (e.g. mouse button down) over the sensor's geometry an isActive TRUE event is sent. The vector defined by the initial point of intersection on the SoVRMLSphereSensor's geometry and the local origin determines the radius of the sphere used to map subsequent pointing device motion while dragging. The virtual sphere defined by this radius and the local origin at the time of activation are used to interpret subsequent pointing device motion and is not affected by any changes to the sensor's coordinate system while the sensor is active. For each position of the bearing, a rotation_changed event is output which corresponds to a relative rotation from the original intersection, plus the offset value. The sign of the rotation is defined by the local coordinate system of the sensor. trackPoint_changed events reflect the unclamped drag position on the surface of this sphere. When the pointing device is deactivated and autoOffset is TRUE, offset is set to the last rotation value and an offset_changed event is generated. See "Concepts - Drag Sensors" for more details.

When the sensor generates an isActive TRUE event, it grabs all further motion events from the pointing device until it releases and generates an isActive FALSE event (other pointing device sensors cannot generate events during this time). Motion of the pointing device while isActive is TRUE is referred to as a "drag". If a 2D pointing device is in use, isActive events will typically reflect the state of the primary button associated with the device (i.e. isActive is TRUE when the primary button is pressed and FALSE when released). If a 3D pointing device (e.g. wand) is in use, isActive events will typically reflect whether the pointer is within or in contact with the sensor's geometry.

While the pointing device is activated, trackPoint_changed and rotation_changed events are output. trackPoint_changed events represent the unclamped intersection points on the surface of the invisible sphere. If the pointing device is dragged off the sphere while activated, browsers may interpret this in several ways (e.g. clamp all values to the sphere, continue to rotate as the point is dragged away from the sphere, etc.). Each movement of the pointing device, while isActive is TRUE, generates trackPoint_changed and rotation_changed events.

See "Concepts - Pointing Device Sensors and Drag Sensors" for more details.

FIELDS

SoSFBool	autoOffset

Specifies whether to set offset to the last rotation value (TRUE).

SoSFBool	enabled

Enables (TRUE) or disables (FALSE) the sensor.

SoSFRotation	offset

Amount to add to the rotation value.

METHODS

SoVRMLSphereSensor()

Constructor.

static void	enableEvents(SbBool OnOffFlag)

Enables/disables events for all SoVRMLSphereSensor objects. If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.

static SbBool	isEventsEnabled()

Queries if events are enabled for all objects of this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_autoOffset

SoSFBool	set_enabled

SoSFRotation	set_offset

eventOut

SoSFBool	isActive

SoSFRotation	rotation_changed

SoSFVec3f	trackPoint_changed

SoSFBool	autoOffset_changed

SoSFBool	enabled_changed

SoSFRotation	offset_changed

FILE FORMAT/DEFAULTS

VRMLSphereSensor {

autoOffset	TRUE

enabled	TRUE

offset	0 1 0 0

}


SoVRMLSpotLight

NAME

SoVRMLSpotLight - node representing a spotlight source

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLLight > SoVRMLSpotLight

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLSpotLight.h>

Fields from class SoVRMLSpotLight:

SoSFVec3f	attenuation

SoSFFloat	beamWidth

SoSFFloat	cutOffAngle

SoSFVec3f	direction

SoSFVec3f	location

SoSFFloat	radius (Note: Not implemented)

Methods from class SoVRMLSpotLight:

SoVRMLSpotLight()

static SoType	getClassTypeId()

Fields from class SoVRMLLight:

SoSFFloat	ambientIntensity

SoSFColor	color

SoSFFloat	intensity

SoSFBool	on

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLSpotLight node defines a light source that emits light from a specific point along a specific direction vector and constrained within a solid angle. SoVRMLSpotlights may illuminate geometry nodes that respond to light sources and intersect the solid angle. SoVRMLSpotlights are specified in their local coordinate system and are affected by parent transformations.

Note: SoVRMLSpotLights only illuminate objects in their enclosing parent group (similar to Directional lights). This is a slight deviation from the behavior described by the VRML 2.0 specification.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLSpotLight node defines a light source that emits light from a specific point along a specific direction vector and constrained within a solid angle. SoVRMLSpotlights may illuminate geometry nodes that respond to light sources and intersect the solid angle. SoVRMLSpotlights are specified in their local coordinate system and are affected by parent transformations.

See "Concepts - Light Sources" for a detailed description of ambientIntensity, color, intensity, and VRML's lighting equations. See "Concepts - Lighting Model" for a detailed description of the VRML lighting equations.

The location field specifies a translation offset of the center point of the light source from the light's local coordinate system origin. This point is the apex of the solid angle which bounds light emission from the given light source. The direction field specifies the direction vector of the light's central axis defined in its own local coordinate system. The on field specifies whether the light source emits light--if TRUE, then the light source is emitting light and may illuminate geometry in the scene, if FALSE it does not emit light and does not illuminate any geometry. The radius field specifies the radial extent of the solid angle and the maximum distance from location than may be illuminated by the light source - the light source does not emit light outside this radius. The radius must be >= 0.0.

The cutOffAngle field specifies the outer bound of the solid angle. The light source does not emit light outside of this solid angle. The beamWidth field specifies an inner solid angle in which the light source emits light at uniform full intensity. The light source's emission intensity drops off from the inner solid angle (beamWidth) to the outer solid angle (cutOffAngle). The drop off function from the inner angle to the outer angle is a cosine raised to a power function:

    intensity(angle) = intensity * (cosine(angle) ** exponent)

    where exponent = 0.5*log(0.5)/log(cos(beamWidth)),
          intensity is the SpotLight's field value,
          intensity(angle) is the light intensity at an arbitrary
              angle from the direction vector,
          and angle ranges from 0.0 at central axis to cutOffAngle.

If beamWidth > cutOffAngle, then beamWidth is assumed to be equal to cutOffAngle and the light source emits full intensity within the entire solid angle defined by cutOffAngle. Both beamWidth and cutOffAngle must be greater than 0.0 and less than or equal to pi/2. See the figure below for an illustration of the SoVRMLSpotLight's field semantics (note: this example uses the default attenuation).

The light's illumination falls off with distance as specified by three attenuation coefficients. The attenuation factor is 1/(attenuation[0] + attenuation[1]*r + attenuation[2]*r^2), where r is the distance of the light to the surface being illuminated. The default is no attenuation. An attenuation value of 0 0 0 is identical to 1 0 0. Attenuation values must be >= 0.0.

FIELDS

SoSFVec3f	attenuation

Attenuation coefficients.

SoSFFloat	beamWidth (See note.)

Inner solid angle of illumination.

Note: This field is not fully supported. Light intensity drops off immediately from the center of the cone and goes to zero at cutOffAngle. This is an OpenGL limitation.

SoSFFloat	cutOffAngle

Outer solid angle of illumination.

SoSFVec3f	direction

Direction vector of the light's central axis.

SoSFVec3f	location

Specifies a translation offset of the centerpoint of the light source from the light's local coordinate system origin.

SoSFFloat	radius (Note: Not implemented)

Specifies the radial extent of the solid angle and the maximum distances from location that may be illuminated by the light source.

METHODS

SoVRMLSpotLight()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFFloat	set_ambientIntensity

SoSFVec3f	set_attenuation

SoSFFloat	set_beamWidth

SoSFColor	set_color

SoSFFloat	set_cutOffAngle

SoSFVec3f	set_direction

SoSFFloat	set_intensity

SoSFVec3f	set_location

SoSFBool	set_on

SoSFFloat	set_radius

eventOut

SoSFFloat	ambientIntensity_changed

SoSFVec3f	attenuation_changed

SoSFFloat	beamWidth_changed

SoSFColor	color_changed

SoSFFloat	cutOffAngle_changed

SoSFVec3f	direction_changed

SoSFFloat	intensity_changed

SoSFVec3f	location_changed

SoSFBool	on_changed

SoSFFloat	radius_changed

ACTION BEHAVIOR

SoGLRenderAction

FILE FORMAT/DEFAULTS

VRMLSpotLight {

ambientIntensity	0

attenuation	1 0 0

beamWidth	1.570796

color	1 1 1

cutOffAngle	0.785398

direction	0 0 -1

intensity	1

location	0 0 0

on	TRUE

radius	100

}


SoVRMLSwitch

NAME

SoVRMLSwitch - group node that traverses one chosen child

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLSwitch

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLSwitch.h>

Fields from class SoVRMLSwitch:

SoMFNode	choice

SoSFInt32	whichChoice

Methods from class SoVRMLSwitch:

SoVRMLSwitch()

SoVRMLSwitch(int nChoices)

virtual SbBool	affectsState() const

void	addChoice(SoNode *choice1)

void	insertChoice(SoNode *choice1,
int newLevelIndex)

SoNode *	getChoice(int index) const

int	findChoice(const SoNode *choice1) const

int	getNumChoices() const

void	removeChoice(int index)

void	removeChoice(SoNode *choice1)

void 	removeAllChoices()

void	replaceChoice(int index,
SoNode *newChoice)

void	replaceChoice(SoNode *oldChoice,
SoNode *newChoice)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLSwitch grouping node traverses zero or one of the nodes specified in the choice field.

See the "Concepts - Grouping and Children Nodes" section which describes "children nodes" for a details on the types of nodes that are legal values for choice.

The whichChoice field specifies the index of the child to traverse, where the first child has index 0. If whichChoice is less than zero or greater than the number of nodes in the choice field then nothing is chosen.

Note that all nodes under an SoVRMLSwitch continue to receive and send events regardless of the value of whichChoice.

FIELDS

SoMFNode	choice

Nodes to chose from.

SoSFInt32	whichChoice

Specifies the index of the child to traverse.

METHODS

SoVRMLSwitch()

Constructor.

SoVRMLSwitch(int nChoices)

Constructor that takes approximate number of choices

void	addChoice(SoNode *choice1)

Adds a choice as last one in group

void	insertChoice(SoNode *choice1,
int newLevelIndex)

Adds a choice so that it becomes the one with the given index

SoNode *	getChoice(int index) const

Returns pointer to nth choice node

int	findChoice(const SoNode *choice1) const

Finds index of given choice within group

int	getNumChoices() const

Returns number of choices

void	removeChoice(int index)

Removes choice with given index from group

void	removeChoice(SoNode *choice1)

Removes first instance of given choice from group.

void 	removeAllChoices()

Removes all choices from group.

void	replaceChoice(int index,
SoNode *newChoice)

Replaces choice with given index with new choice.

void	replaceChoice(SoNode *oldChoice,
SoNode *newChoice)

Replaces first instance of given choice with new choice

virtual SbBool	affectsState() const

Overrides method in SoNode to return FALSE if there is no selected child or the selected child does not affect the state.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFNode	set_choice

SoSFInt32	set_whichChoice

eventOut

SoMFNode	choice_changed

SoSFInt32	whichChoice_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction, SoGetMatrixAction, SoSearchAction, SoWriteAction

FILE FORMAT/DEFAULTS

VRMLSwitch {

choice	[]

whichChoice	-1

}


SoVRMLText

NAME

SoVRMLText - text shape node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLText

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLText.h>

Fields from class SoVRMLText:

SoMFString	string

SoSFNode	fontStyle

SoMFFloat	length

SoSFFloat	maxExtent

Methods from class SoVRMLText:

SoVRMLText()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLText node specifies a two-sided, flat text string object positioned in the X-Y plane of the local coordinate system based on values defined in the fontStyle field (see SoVRMLFontStyle node).

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLText node specifies a two-sided, flat text string object positioned in the X-Y plane of the local coordinate system based on values defined in the fontStyle field (see SoVRMLFontStyle node). Text nodes may contain multiple text strings specified using the UTF-8 encoding as specified by the ISO 10646-1:1993 standard (http://www.iso.ch/cate/d18741.html). Due to the drastic changes in Korean Jamo language, the character set of the UTF-8 will be based on ISO 10646-1:1993 plus pDAM 1 - 5 (including the Korean changes). The text strings are stored in visual order.

The text strings are contained in the string field. The fontStyle field contains one SoVRMLFontStyle node that specifies the font size, font family and style, direction of the text strings, and any specific language rendering techniques that must be used for the text.

The maxExtent field limits and scales all of the text strings if the length of the maximum string is longer than the maximum extent, as measured in the local coordinate space. If the text string with the maximum length is shorter than the maxExtent, then there is no scaling. The maximum extent is measured horizontally for horizontal text (SoVRMLFontStyle node: horizontal=TRUE) and vertically for vertical text (SoVRMLFontStyle node: horizontal=FALSE). The maxExtent field must be >= 0.0.

The length field contains an MFFloat value that specifies the length of each text string in the local coordinate space. If the string is too short, it is stretched (either by scaling the text or by adding space between the characters). If the string is too long, it is compressed (either by scaling the text or by subtracting space between the characters). If a length value is missing--for example, if there are four strings but only three length values--the missing values are considered to be 0.

For both the maxExtent and length fields, specifying a value of 0 indicates to allow the string to be any length.

Textures are applied to text as follows. The texture origin is at the origin of the first string, as determined by the justification. The texture is scaled equally in both S and T dimensions, with the font height representing 1 unit. S increases to the right, and T increases up.

ISO 10646-1:1993 Character Encodings

Characters in ISO 10646 are encoded in multiple octets. Code space is divided into four units, as follows:

+-------------+-------------+-----------+------------+
| Group-octet | Plane-octet | Row-octet | Cell-octet |
+-------------+-------------+-----------+------------+

The ISO 10646-1:1993 allows two basic forms for characters:

1.	UCS-2 (Universal Coded Character Set-2). Also known as the Basic Multilingual Plane (BMP). Characters are encoded in the lower two octets (row and cell). Predictions are that this will be the most commonly used form of 10646.

2.	UCS-4 (Universal Coded Character Set-4). Characters are encoded in the full four octets.

In addition, three transformation formats (UCS Transformation Format (UTF) are accepted: UTF-7, UTF-8, and UTF-16. Each represents the nature of the transformation - 7-bit, 8-bit, and 16-bit. The UTF-7 and UTF-16 can be referenced in the Unicode Standard 2.0 book.

The UTF-8 maintains transparency for all of the ASCII code values (0...127). It allows ASCII text (0x0..0x7F) to appear without any changes and encodes all characters from 0x80.. 0x7FFFFFFF into a series of six or fewer bytes.

If the most significant bit of the first character is 0, then the remaining seven bits are interpreted as an ASCII character. Otherwise, the number of leading 1 bits will indicate the number of bytes following. There is always a 0 bit between the count bits and any data.

First byte could be one of the following. The X indicates bits available to encode the character.

 0XXXXXXX	only one byte   0..0x7F (ASCII)
 110XXXXX	two bytes       Maximum character value is 0x7FF
 1110XXXX	three bytes     Maximum character value is 0xFFFF
 11110XXX	four bytes      Maximum character value is 0x1FFFFF
 111110XX	five bytes      Maximum character value is 0x3FFFFFF
 1111110X	six bytes       Maximum character value is 0x7FFFFFFF

All following bytes have this format: 10XXXXXX

A two byte example. The symbol for a register trade mark is "circled R registered sign" or 174 in ISO/Latin-1 (8859/1). It is encoded as 0x00AE in UCS-2 of the ISO 10646. In UTF-8 it is has the following two byte encoding 0xC2, 0xAE.

See "Concepts - Lighting Model" for details on VRML lighting equations and how SoVRMLAppearance, SoVRMLMaterial and textures interact with lighting.

The SoVRMLText node does not perform collision detection.

FIELDS

SoMFString	string

Text strings.

SoSFNode	fontStyle

An SoVRMLFontStyle node that specifies the font size, font family and style, direction of the text strings, and and specific language rendering techniques.

SoMFFloat	length

The length of each text string in the local coordinate space.

SoSFFloat	maxExtent (See Note.)

Limits and scales all the text strings if the length of the maximum string is longer than the maximum extent.

Note: The behavior described above is not currently implemented.

METHODS

SoVRMLText()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFString	set_string

SoSFNode	set_fontStyle

SoMFFloat	set_length

SoSFFloat	set_maxExtent

eventOut

SoMFString	string_changed

SoSFNode	fontStyle_changed

SoMFFloat	length_changed

SoSFFloat	maxExtent_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction

FILE FORMAT/DEFAULTS

VRMLText {

string	[]

fontStyle	NULL

length	[]

maxExtent	0.0

}


SoVRMLTexture

NAME

SoVRMLTexture - abstract base class for all VRML texture nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLTexture

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLTexture.h>

Fields from class SoVRMLTexture:

SoSFBool	repeatS

SoSFBool	repeatT

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoVRMLTexture is the abstract base class for all VRML texture nodes.

FIELDS

SoSFBool	repeatS

SoSFBool	repeatT

The repeatS and repeatT fields specify how the texture wraps in the S and T directions. If repeatS is TRUE (the default), the texture map is repeated outside the 0-to-1 texture coordinate range in the S direction so that it fills the shape. If repeatS is FALSE, the texture coordinates are clamped in the S direction to lie within the 0-to-1 range. The repeatT field is analogous to the repeatS field.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoVRMLImageTexture, SoVRMLMovieTexture, SoVRMLPixelTexture


SoVRMLTextureCoordinate

NAME

SoVRMLTextureCoordinate - texture coordinate node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLTextureCoordinate

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLTextureCoordinate.h>

Fields from class SoVRMLTextureCoordinate:

SoMFVec2f	point

Methods from class SoVRMLTextureCoordinate:

SoVRMLTextureCoordinate()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLTextureCoordinate node specifies a set of 2D texture coordinates used by vertex-based geometry nodes (e.g. SoVRMLIndexedFaceSet and SoVRMLElevationGrid) to map from textures to the vertices. Texture map parameter values range from 0.0 to 1.0 in S and T. The horizontal coordinate, S, is specified first, followed by the vertical coordinate, T.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLTextureCoordinate node specifies a set of 2D texture coordinates used by vertex-based geometry nodes (e.g. SoVRMLIndexedFaceSet and SoVRMLElevationGrid) to map from textures to the vertices. Textures are two dimensional color functions that given an S and T pair return a color value. Texture maps parameter values range from 0.0 to 1.0 in S and T. However, SoVRMLTextureCoordinate values, specified by the point field, can range from -infinity to +infinity. Texture coordinates identify a location (and thus a color value) in the texture map. The horizontal coordinate, S, is specified first, followed by the vertical coordinate, T.

If the texture map is repeated in a given direction (S or T), then a texture coordinate C is mapped into a texture map that has N pixels in the given direction as follows:

        Location = (C - floor(C)) * N

If the texture is not repeated:

        Location = (C > 1.0 ? 1.0 : (C < 0.0 ? 0.0 : C)) * N

See texture nodes for details on repeating textures (SoVRMLImageTexture, SoVRMLMovieTexture, SoVRMLPixelTexture).

FIELDS

SoMFVec2f	point

Texture coordinate points.

METHODS

SoVRMLTextureCoordinate()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFVec2f	set_point

eventOut

SoMFVec2f	point_changed

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoCallbackAction

FILE FORMAT/DEFAULTS

SoVRMLTextureCoordinate {

point	[]

}


SoVRMLTextureTransform

NAME

SoVRMLTextureTransform - defines a 2D transformation

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLTextureTransform

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLTextureTransform.h>

Fields from class SoVRMLTextureTransform:

SoSFVec2f	center

SoSFFloat	rotation

SoSFVec2f	scale

SoSFVec2f	translation

Methods from class SoVRMLTextureTransform:

SoVRMLTextureTransform()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLTextureTransform node defines a 2D transformation that is applied to texture coordinates (see SoVRMLTextureCoordinate). This node affects the way textures are applied to the surface of geometry. The transformation consists of (in order) a non-uniform scale about an arbitrary center point, a rotation about the center point, and a translation. This allows for changes to the size, orientation, and position of textures on shapes. Note that these changes appear reversed when viewed in the surface of geometry. For example, a scale value of 2 2 will scale the texture coordinates and have the net effect of shrinking the texture size by a factor of 2 (texture coordinates are twice as large and thus cause the texture to repeat). A translation of 0.5 0.0 translates the texture coordinates +.5 units along the S-axis and has the net effect of translating the texture -0.5 along the S-axis on the geometry's surface. A rotation of pi/2 of the texture coordinates results in a - pi/2 rotation of the texture on the geometry.

Note: The VRML 2.0 specification indicates that transformations should be performed in the order translate, rotate, and scale. Open Inventor performs the transformations in the order scale, rotate, translate.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLTextureTransform node defines a 2D transformation that is applied to texture coordinates (see SoVRMLTextureCoordinate). This node affects the way textures are applied to the surface of geometry. The transformation consists of (in order) a translation, a rotation about an arbitrary center point, and a non-uniform scale about the center point. This allows for changes to the size, orientation, and position of textures on shapes. Note that these changes appear reversed when viewed in the surface of geometry. For example, a scale value of 2 2 will scale the texture coordinates and have the net effect of shrinking the texture size by a factor of 2 (texture coordinates are twice as large and thus cause the texture to repeat). A translation of 0.5 0.0 translates the texture coordinates +.5 units along the S-axis and has the net effect of translating the texture -0.5 along the S-axis on the geometry's surface. A rotation of pi/2 of the texture coordinates results in a - pi/2 rotation of the texture on the geometry.

The center field specifies a translation offset in texture coordinate space about which the rotation and scale fields are applied. The scale field specifies a scaling factor in S and T of the texture coordinates about the center point - scale values must be >= 0.0. The rotation field specifies a rotation in radians of the texture coordinates about the center point after the scale has taken place. The translation field specifies a translation of the texture coordinates.

Given a 2-dimensional texture coordinate T and an SoVRMLTextureTransform node, T is transformed into point T' by a series of intermediate transformations. In matrix-transformation notation, where C (center), T (translation), R (rotation), and S (scale) are the equivalent transformation matrices,

  T' = TT x C x R x S x -TC x T  (where T is a column vector)

Note that SoVRMLTextureTransforms cannot combine or accumulate.

FIELDS

SoSFVec2f	center

Specifies a translation offset in texture coordinate space about which the rotation and scale fields are applied.

SoSFFloat	rotation

Specifies a rotation in radians of the texture coordinates about the center after the scale has taken place.

SoSFVec2f	scale

Scaling factors in S and T.

SoSFVec2f	translation

Translation in S and T.

METHODS

SoVRMLTextureTransform()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFVec2f	set_center

SoSFFloat	set_rotation

SoSFVec2f	set_scale

SoSFVec2f	set_translation

eventOut

SoSFVec2f	center_changed

SoSFFloat	rotation_changed

SoSFVec2f	scale_changed

SoSFVec2f	translation_changed

ACTION BEHAVIOR

SoGLRenderAction, SoPickAction, SoCallbackAction, SoGetMatrixAction

FILE FORMAT/DEFAULTS

VRMLTextureTransform {

center	0 0

rotation	0

scale	1 1

translation	0 0

}


SoVRMLTimeSensor

NAME

SoVRMLTimeSensor - generates events as time passes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLInterpolator > SoVRMLTimeSensor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLTimeSensor.h>

Fields from class SoVRMLTimeSensor:

SoSFTime	cycleInterval

SoSFBool	enabled

SoSFBool	loop

SoSFTime	startTime

SoSFTime	stopTime

Methods from class SoVRMLTimeSensor:

SoVRMLTimeSensor()

static void	enableEvents(SbBool OnOffFlag)

static SbBool	isEventsEnabled()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoVRMLTimeSensors generate events as time passes. SoVRMLTimeSensors can be used to drive continuous simulations and animations, periodic activities (e.g., one per minute), and/or single occurrence events such as an alarm clock.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

SoVRMLTimeSensors generate events as time passes. SoVRMLTimeSensors can be used to drive continuous simulations and animations, periodic activities (e.g., one per minute), and/or single occurrence events such as an alarm clock. SoVRMLTimeSensor discrete eventOuts include: isActive, which becomes TRUE when the SoVRMLTimeSensor begins running, and FALSE when it stops running, and cycleTime, a time event at startTime and at the beginning of each new cycle (useful for synchronization with other time-based objects). The remaining outputs generate continuous events and consist of fraction_changed, which is an SFFloat in the closed interval [0,1] representing the completed fraction of the current cycle, and time, an SFTime event specifying the absolute time for a given simulation tick.

If the enabled exposedField is TRUE, the SoVRMLTimeSensor is enabled and may be running. If a set_enabled FALSE event is received while the SoVRMLTimeSensor is running, then the sensor should evaluate and send all relevant outputs, send a FALSE value for isActive, and disable itself. However, events on the exposedFields of the SoVRMLTimeSensor (such as set_startTime) are processed and their corresponding eventOuts (startTime_changed) are sent regardless of the state of enabled. The remaining discussion assumes enabled is TRUE.

The loop, startTime, and stopTime exposedFields, and the isActive eventOut and their affects on the SoVRMLTimeSensor node, are discussed in detail in the "Concepts - Time Dependent Nodes" section. The "cycle" of an SoVRMLTimeSensor lasts for cycleInterval seconds. The value of cycleInterval must be greater than 0 (a value less than or equal to 0 produces undefined results). Because the SoVRMLTimeSensor is more complex than the abstract SoVRMLTimeDep node and generates continuous eventOuts, some of the information in the "Time Dependent Nodes" section is repeated here.

A cycleTime eventOut can be used for synchronization purposes, e.g., sound with animation. The value of a cycleTime eventOut will be equal to the time at the beginning of the current cycle. A cycleTime eventOut is generated at the beginning of every cycle, including the cycle starting at startTime. The first cycleTime eventOut for an SoVRMLTimeSensor node can be used as an alarm (single pulse at a specified time).

When an SoVRMLTimeSensor becomes active it will generate an isActive = TRUE event and begin generating time, fraction_changed, and cycleTime events, which may be routed to other nodes to drive animation or simulated behaviors - (see below for behavior at read time). The time event outputs the absolute time for a given tick of the SoVRMLTimeSensor (time fields and events represent the number of seconds since midnight GMT January 1, 1970). fraction_changed events output a floating point value in the closed interval [0, 1], where 0 corresponds to startTime and 1 corresponds to startTime + N*cycleInterval, where N = 1, 2, ... . That is, the time and fraction_changed eventOuts can be computed as:

    time = now
    f = fmod(now - startTime, cycleInterval)
    if (f == 0.0 && now > startTime)
        fraction_changed = 1.0
    else
        fraction_changed = f / cycleInterval

A SoVRMLTimeSensor can be set up to be active at read time by specifying loop TRUE (not the default) and stopTime <= startTime (satisfied by the default values). The time events output absolute times for each tick of the SoVRMLTimeSensor -- times must start at startTime and end with either startTime+cycleInterval, stopTime, or loop forever depending on the values of the other fields. An active SoVRMLTimeSensor must stop at the first simulation tick when time now >= stopTime > startTime.

No guarantees are made with respect to how often an SoVRMLTimeSensor will generate time events, but an SoVRMLTimeSensor should generate events at least at every simulation tick. SoVRMLTimeSensors are guaranteed to generate final time and fraction_changed events. If loop is FALSE, the final time event will be generated with a value of (startTime+cycleInterval) or stopTime (if stopTime > startTime), whichever value is less. If loop is TRUE at the completion of every cycle, then the final event will be generated as evaluated at stopTime (if stopTime > startTime) or never.

An active SoVRMLTimeSensor ignores set_cycleInterval, and set_startTime events. An active SoVRMLTimeSensor also ignores set_stopTime events for set_stopTime < startTime. For example, if a set_startTime event is received while an SoVRMLTimeSensor is active, then that set_startTime event is ignored (the startTime field is not changed, and a startTime_changed eventOut is not generated). If an active SoVRMLTimeSensor receives a set_stopTime event that is less than now and greater than or equal to startTime, it behaves as if the stopTime requested is now and sends the final events based on now (note that stopTime is set as specified in the eventIn).

FIELDS

SoSFTime	cycleInterval

Time for each cycle in seconds.

SoSFBool	enabled

Enables (TRUE) or disables (FALSE) the sensor.

SoSFBool	loop

Specifies whether a cycle should be repeated (TRUE) or terminated (FALSE) at the end of the cycle.

SoSFTime	startTime

Starting time of the cycle.

SoSFTime	stopTime

Stop time of the cycle.

METHODS

SoVRMLTimeSensor()

Constructor.

static void	enableEvents(SbBool OnOffFlag)

Enables/disables events for all SoVRMLTimeSensor objects. If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.

static SbBool	isEventsEnabled()

Queries if events are enabled for all objects of this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFTime	set_cycleInterval

SoSFBool	set_enabled

SoSFBool	set_loop

SoSFTime	set_startTime

SoSFTime	set_stopTime

eventOut

SoSFTime	cycleTime

SoSFFloat	fraction_changed

SoSFBool	isActive

SoSFTime	time

SoSFTime	cycleInterval_changed

SoSFBool	enabled_changed

SoSFBool	loop_changed

SoSFTime	startTime_changed

SoSFTime	stopTime_changed

FILE FORMAT/DEFAULTS

VRMLTimeSensor {

cycleInterval	1

enabled	TRUE

loop	FALSE

startTime	0

stopTime	0

}


SoVRMLTouchSensor

NAME

SoVRMLTouchSensor - detects when the user has pointed at a specific piece of geometry

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLTouchSensor

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLTouchSensor.h>

Fields from class SoVRMLTouchSensor:

SoSFBool	enabled

Methods from class SoVRMLTouchSensor:

SoVRMLTouchSensor()

static void	enableEvents(SbBool OnOffFlag)

static SbBool	isEventsEnabled()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

A SoVRMLTouchSensor tracks the location and state of the pointing device and detects when the user points at geometry contained by the SoVRMLTouchSensor's parent group. This sensor can be enabled or disabled by sending it an enabled event with a value of TRUE or FALSE. If the SoVRMLTouchSensor is disabled, it does not track user input or send output events.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

A SoVRMLTouchSensor tracks the location and state of the pointing device and detects when the user points at geometry contained by the SoVRMLTouchSensor's parent group. This sensor can be enabled or disabled by sending it an enabled event with a value of TRUE or FALSE. If the SoVRMLTouchSensor is disabled, it does not track user input or send output events.

The SoVRMLTouchSensor generates events as the pointing device "passes over" any geometry nodes that are descendants of the SoVRMLTouchSensor's parent group. Typically, the pointing device is a 2D device such as a mouse. In this case, the pointing device is considered to be moving within a plane a fixed distance from the viewer and perpendicular to the line of sight; this establishes a set of 3D coordinates for the pointer. If a 3D pointer is in use, then the SoVRMLTouchSensor generates events only when the pointer is within the user's field of view. In either case, the pointing device is considered to "pass over" geometry when that geometry is intersected by a line extending from the viewer and passing through the pointer's 3D coordinates. If multiple surfaces intersect this line (hereafter called the bearing), only the nearest will be eligible to generate events.

The isOver eventOut reflects the state of the pointing device with regard to whether it is over the SoVRMLTouchSensor's geometry or not. When the pointing device changes state from a position such that its bearing does not intersect any of the SoVRMLTouchSensor's geometry to one in which it does intersect geometry, an isOver TRUE event is generated. When the pointing device moves from a position such that its bearing intersects geometry to one in which it no longer intersects the geometry, or some other geometry is obstructing the SoVRMLTouchSensor's geometry, an isOver FALSE event is generated. These events are generated only when the pointing device has moved and changed `over state; events are not generated if the geometry itself is animating and moving underneath the pointing device.

As the user moves the bearing over the SoVRMLTouchSensor's geometry, the point of intersection (if any) between the bearing and the geometry is determined. Each movement of the pointing device, while isOver is TRUE, generates hitPoint_changed, hitNormal_changed, and hitTexCoord_changed events. hitPoint_changed events contain the 3D point on the surface of the underlying geometry, given in the SoVRMLTouchSensor's coordinate system. hitNormal_changed events contain the surface normal vector at the hitPoint. hitTexCoord_changed events contain the texture coordinates of that surface at the hitPoint, which can be used to support the 3D equivalent of an image map.

If isOver is TRUE, the user may activate the pointing device to cause the SoVRMLTouchSensor to generate isActive events (e.g. press the primary mouse button). When the SoVRMLTouchSensor generates an isActive TRUE event, it grabs all further motion events from the pointing device until it releases and generates an isActive FALSE event (other pointing device sensors will not generate events during this time). Motion of the pointing device while isActive is TRUE is referred to as a "drag". If a 2D pointing device is in use, isActive events will typically reflect the state of the primary button associated with the device (i.e. isActive is TRUE when the primary button is pressed, and FALSE when not released). If a 3D pointing device is in use, isActive events will typically reflect whether the pointer is within or in contact with the SoVRMLTouchSensor's geometry.

The eventOut field touchTime is generated when all three of the following conditions are true:

•	the pointing device was over the geometry when it was initially activated (isActive is TRUE),

•	the pointing device is currently over the geometry (isOver is TRUE),

•	and, the pointing device is deactivated (isActive FALSE event is also generated).

See "Concepts - Pointing Device Sensors" for more details.

FIELDS

SoSFBool	enabled

Enables (TRUE) or disables (FALSE) the sensor.

METHODS

SoVRMLTouchSensor()

Constructor.

static void	enableEvents(SbBool OnOffFlag)

Enables/disables events for all SoVRMLTouchSensor objects. If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.

static SbBool	isEventsEnabled()

Queries if events are enabled for all objects of this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_enabled

eventOut

SoSFBool	enabled_changed

SoSFVec3f	hitNormal_changed

SoSFVec3f	hitPoint_changed

SoSFVec2f	hitTexCoord_changed

These XXX_changed events are not generated unless isActive is true, in other words, only while a mouse button is pressed.

SoSFBool	isActive

This event (with a value of FALSE) is always generated when the mouse button is released.

SoSFBool	isOver

This event is not generated unless a mouse button is pressed while the pointing device is over the geometry. In that case, an isActive event is also generated.

SoSFTime	touchTime

This event is only generated if the cursor is still over the object when the mouse button is released.

FILE FORMAT/DEFAULTS

VRMLTouchSensor {

enabled	TRUE

}


SoVRMLTransform

NAME

SoVRMLTransform - grouping node that defines a coordinate system for its children

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoVRMLParent > SoVRMLGroup > SoVRMLTransform

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLTransform.h>

Fields from class SoVRMLTransform:

SoSFVec3f	center

SoSFRotation	rotation

SoSFVec3f	scale

SoSFRotation	scaleOrientation

SoSFVec3f	translation

Fields from class SoVRMLGroup:

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Fields from class SoVRMLParent:

SoMFNode	children

Methods from class SoVRMLTransform:

SoVRMLTransform()

SoVRMLTransform(int nChildren)

void	pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint)

void	getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

void	combineLeft(SoVRMLTransform *nodeOnLeft)

void	combineRight(SoVRMLTransform *nodeOnRight)

void	setMatrix(const SbMatrix &mat)

void	recenter(const SbVec3f &newCenter)

static SoType	getClassTypeId()

Methods from class SoVRMLGroup:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Methods from class SoVRMLParent:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,SoNode *newChild)

void	replaceChild(SoNode *oldChild,SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

A SoVRMLTransform is a grouping node that defines a coordinate system for its children that is relative to the coordinate systems of its parents.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

A SoVRMLTransform is a grouping node that defines a coordinate system for its children that is relative to the coordinate systems of its parents. See also "Concepts - Coordinate Systems and Transformations."

See the "Concepts - Grouping and Children Nodes" section for a description of the children, addChildren, and removeChildren fields and eventIns.

The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLTransform's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts - Bounding Boxes" for a description of the bboxCenter and bboxSize fields.

The translation, rotation, scale, scaleOrientation and center fields define a geometric 3D transformation consisting of (in order) a (possibly) non-uniform scale about an arbitrary point, a rotation about an arbitrary point and axis, and a translation. The center field specifies a translation offset from the local coordinate system's origin, (0,0,0). The rotation field specifies a rotation of the coordinate system. The scale field specifies a non-uniform scale of the coordinate system - scale values must be >= 0.0. The scaleOrientation specifies a rotation of the coordinate system before the scale (to specify scales in arbitrary orientations). The scaleOrientation applies only to the scale operation. The translation field specifies a translation to the coordinate system.

Given a 3-dimensional point P and Transform node, P is transformed into point P' in its parent's coordinate system by a series of intermediate transformations. In matrix-transformation notation, where C (center), SR (scaleOrientation), T (translation), R (rotation), and S (scale) are the equivalent transformation matrices,

  P' = T x C x R x SR x S x -SR x -TC x P
      (where P is a column vector)

The SoVRMLTransform node:

Transform {
    center            C
    rotation          R
    scale              S
    scaleOrientation   SR
    translation        T
    children           [...]
}

is equivalent to the nested sequence of:

Transform { translation T
 Transform { translation C
  Transform { rotation R
   Transform { rotation SR
    Transform { scale S
     Transform { rotation -SR
      Transform { translation -C
              ...
}}}}}}}

FIELDS

SoSFVec3f	center

Origin of scale and rotation.

SoSFRotation	rotation

Rotation.

SoSFVec3f	scale

Scale factor.

SoSFRotation	scaleOrientation

Rotational orientation for scale.

SoSFVec3f	translation

Translation vector.

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

Specify a bounding box that encloses the SoVRMLTransform's children. Used as a hint only.

METHODS

SoVRMLTransform()

Constructor.

SoVRMLTransform(int nChildren)

Constructor that takes approximate number of children

void	pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint)

Sets the transform to translate the origin to the fromPoint and rotate the negative z-axis (0,0,-1) to lie on the vector from fromPoint to toPoint. This always tries to keep the "up" direction the positive y-axis, unless that is impossible. All current info in the node is wiped out.

void	getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

void	getRotationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

void	getTranslationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

Returns composite matrices that take you from object space to each of scale/rotation/translation spaces

void	multLeft(const SbMatrix &mat)

void	multRight(const SbMatrix &mat)

Convenience functions that combine the effects of a matrix transformation into the transformation stored in this node. The first method premultiplies the transformation and the second postmultiplies it.

void	combineLeft(SoVRMLTransform *nodeOnLeft)

void	combineRight(SoVRMLTransform *nodeOnRight)

These are the same as multLeft() and multRight(), except that the transformation to multiply into this node comes from another transformation node.

void	setMatrix(const SbMatrix &mat)

Sets the fields in the node to implement the transformation represented by the given matrix

void	recenter(const SbVec3f &newCenter)

Changes the center of the transformation to the given point without affecting the overall effect of the transformation

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoMFNode	addChildren

SoMFNode	removeChildren

SoSFVec3f	set_center

SoMFNode	set_children

SoSFRotation	set_rotation

SoSFVec3f	set_scale

SoSFRotation	set_scaleOrientation

SoSFVec3f	set_translation

eventOut

SoSFVec3f	center_changed

SoMFNode	children_changed

SoSFRotation	rotation_changed

SoSFVec3f	scale_changed

SoSFRotation	scaleOrientation_changed

SoSFVec3f	translation_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction, SoGetMatrixAction, SoSearchAction, SoWriteAction

FILE FORMAT/DEFAULTS

VRMLTransform {

center	0 0 0

children	[]

rotation	0 0 1  0

scale	1 1 1

scaleOrientation	0 0 1  0

translation	0 0 0

bboxCenter	0 0 0

bboxSize	-1 -1 -1

}


SoVRMLVertexLine

NAME

SoVRMLVertexLine - abstract base class for SoVRMLIndexedLineSet

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexLine

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLVertexLine.h>

Fields from class SoVRMLVertexLine:

SoSFNode	color

SoSFBool	colorPerVertex

SoSFNode	coord

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is an abstract base class for SoVRMLIndexedLineSet.

FIELDS

SoSFNode	color

An SoVRMLColor node whose colors are applied to the vertices or lines of the IndexedLineSet.

SoSFBool	colorPerVertex

If TRUE, colors are applied to the vertices of the IndexedLineSet. If FALSE, the colors are applied to the lines.

SoSFNode	coord

An SoVRMLCoordinate node defining the IndexedLineSet.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_color

SoSFBool	set_colorPerVertex

SoSFNode	set_coord

eventOut

SoSFNode	color_changed

SoSFBool	colorPerVertex_changed

SoSFNode	coord_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

FILE FORMAT/DEFAULTS

This is an abstract base class. See the derived class for the format and default values.


SoVRMLVertexPoint

NAME

SoVRMLVertexPoint - abstract base class for the SoVRMLPointSet node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexPoint

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLVertexPoint.h>

Fields from class SoVRMLVertexPoint:

SoSFNode	color

SoSFNode	coord

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is the abstract base class for the SoVRMLPointSet node.

FIELDS

SoSFNode	color

An SoVRMLColor node whose colors are applied to the points of the PointSet.

SoSFNode	coord

An SoVRMLCoordinate node defining the IndexedPointSet.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_color

SoSFBool	set_colorPerVertex

SoSFNode	set_coord

eventOut

SoSFNode	color_changed

SoSFBool	colorPerVertex_changed

SoSFNode	coord_changed

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoPickAction

FILE FORMAT/DEFAULTS

This is an abstract base class. See the derived class for the format and default values.


SoVRMLVertexShape

NAME

SoVRMLVertexShape - abstract base class for the SoVRMLIndexedFaceSet node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVRMLGeometry > SoVRMLVertexShape

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLVertexShape.h>

Fields from class SoVRMLVertexShape:

SoSFNode	color

SoSFBool	colorPerVertex

SoSFNode	coord

SoSFNode	normal

SoSFBool	normalPerVertex

SoSFNode	texCoord

Methods from class SoVRMLVertexShape:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

SoVRMLVertexShape is an abstract base class for the SoVRMLIndexedFaceSet node.

FIELDS

SoSFNode	color

An SoVRMLColor node whose colors are applied to the vertices or faces of the IndexedFaceSet.

SoSFBool	colorPerVertex

If TRUE, colors are applied to the vertices of the IndexedFaceSet. If FALSE, the colors are applied to the faces.

SoSFNode	coord

An SoVRMLCoordinate node defining the IndexedFaceSet.

SoSFNode	normal

An SoVRMLNormalNode containing the normals. If NULL, the normals will be automatically generated.

SoSFBool	normalPerVertex

If TRUE, normals are applied to the vertices of the IndexedFaceSet. If FALSE, the normals are applied to the faces.

SoSFNode	texCoord

An SoVRMLTextureCoordinate node.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFNode	set_color

SoSFBool	set_colorPerVertex

SoSFNode	set_coord

SoSFNode	set_normal

SoSFBool	set_normalPerVertex

SoSFNode	set_texCoord

eventOut

SoSFNode	color_changed

SoSFBool	colorPerVertex_changed

SoSFNode	coord_changed

SoSFNode	normal_changed

SoSFBool	normalPerVertex_changed

SoSFNode	texCoord_changed

FILE FORMAT/DEFAULTS

This is an abstract base class. See the derived class for the format and default values.

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction


SoVRMLViewpoint

NAME

SoVRMLViewpoint - specifies position from which the user might view the scene

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLViewpoint

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLViewpoint.h>

Fields from class SoVRMLViewpoint:

SoSFFloat	fieldOfView

SoSFBool	jump

SoSFRotation	orientation

SoSFVec3f	position

SoSFString	description

Methods from class SoVRMLViewpoint:

SoVRMLViewpoint()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLViewpoint node defines a specific location in a local coordinate system from which the user might view the scene.

Note: The binding behavior and associated eventIns and eventOuts are not implemented.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLViewpoint node defines a specific location in a local coordinate system from which the user might view the scene. SoVRMLViewpoints are bindable children nodes and thus there exists an SoVRMLViewpoint stack in the browser in which the top-most SoVRMLViewpoint on the stack is the currently active SoVRMLViewpoint. If a TRUE value is sent to the set_bind eventIn of an SoVRMLViewpoint, it is moved to the top of the SoVRMLViewpoint stack and thus activated. When an SoVRMLViewpoint is at the top of the stack, the user's view is conceptually reparented as a child of the SoVRMLViewpoint. All subsequent changes to the SoVRMLViewpoint's coordinate system change the user's view (e.g. changes to any parent transformation nodes or to the SoVRMLViewpoint's position or orientation fields). Sending a set_bind FALSE event removes the SoVRMLViewpoint from the stack and results in isBound FALSE and bindTime events. If the popped SoVRMLViewpoint is at the top of the viewpoint stack the user's view is reparented to the next entry in the stack. See "Concepts - Bindable Children Nodes" for more details on the the binding stacks. When an SoVRMLViewpoint is moved to the top of the stack, the existing top of stack Viewpoint sends an isBound FALSE event and is pushed onto the stack.

SoVRMLViewpoints have the additional requirement from other binding nodes in that they store the relative transformation from the user view to the current SoVRMLViewpoint when they are moved to the top of stack. This is needed by the jump field, described below.

An author can automatically move the user's view through the world by binding the user to an SoVRMLViewpoint and then animating either the SoVRMLViewpoint or the transformations above it. Browsers shall allow the user view to be navigated relative to the coordinate system defined by the SoVRMLViewpoint (and the transformations above it), even if the SoVRMLViewpoint or its parent transformations are being animated.

The bindTime eventOut sends the time at which the SoVRMLViewpoint is bound or unbound. This can happen during loading, when a set_bind event is sent to the SoVRMLViewpoint, or when the browser binds to the SoVRMLViewpoint via its user interface (see below).

The position and orientation fields of the SoVRMLViewpoint node specify relative locations in the local coordinate system. Position is relative to the coordinate system's origin (0,0,0), while orientation specifies a rotation relative to the default orientation; the default orientation has the user looking down the -Z axis with +X to the right and +Y straight up. SoVRMLViewpoints are affected by the transformation hierarchy.

Navigation types (see SoVRMLNavigationInfo) that require a definition of a down vector (e.g. terrain following) shall use the negative Y-axis of the coordinate system of the currently bound SoVRMLViewpoint. Likewise navigation types (see SoVRMLNavigationInfo) that require a definition of an up vector shall use the positive Y-axis of the coordinate system of the currently bound SoVRMLViewpoint. Note that the orientation field of the SoVRMLViewpoint does not affect the definition of the down or up vectors. This allows the author to separate the viewing direction from the gravity direction.

The jump field specifies whether the user's view `jumps' (or animates) to the position and orientation of a bound SoVRMLViewpoint. Regardless of the value of jump at bind time, the relative viewing transformation between the user's view and the current SoVRMLViewpoint shall be stored with the current SoVRMLViewpoint for later use when un-jumping. The following is a re-write of the general bind stack rules described in "Concepts - Bindable Child Nodes, Bind Stack Behavior" with additional rules regarding Viewpoints (in bold):

1.	During read:

•	the first encountered SoVRMLViewpoint is bound by pushing it to the top of the SoVRMLViewpoint stack,

·	nodes contained within SoVRMLInlines are not candidates for the first encountered SoVRMLViewpoint,

·	the first node within a prototype is a valid candidate for the first encountered SoVRMLViewpoint;

·	the first encountered SoVRMLViewpoint sends an isBound TRUE event.

2.	When a set_bind TRUE eventIn is received by an SoVRMLViewpoint:

•	if it is not on the top of the stack:

·	the relative transformation from the current top of stack SoVRMLViewpoint to the user's view is stored with the current top of stack SoVRMLViewpoint,

·	the current top of stack node sends an isBound eventOut FALSE,

·	the new node is moved to the top of the stack and becomes the currently bound SoVRMLViewpoint,

·	the new SoVRMLViewpoint (top of stack) sends an isBound TRUE eventOut,

·	if jump is TRUE for the new SoVRMLViewpoint, then the user's view is `jumped' (or animated) to match the values in the position and orientation fields of the new SoVRMLViewpoint;

·	else if the node is already at the top of the stack, then this event has no effect.

3.	When a set_bind FALSE eventIn is received by an SoVRMLViewpoint:

•	it is removed from the stack,

•	if it is on the top of the stack:

·	it sends an isBound eventOut FALSE,

·	the next node in the stack becomes the currently bound SoVRMLViewpoint (i.e. pop) and issues an isBound TRUE eventOut,

·	if its jump is TRUE the user's view is 'jumped’ (or animated) to the position and orientation of the next SoVRMLViewpoint in the stack with the stored relative transformation for with this next SoVRMLViewpoint applied,

4.	If a set_bind FALSE eventIn is received by a node not in the stack, the event is ignored and isBound events are not sent.

5.	When a node replaces another node at the top of the stack, the isBound TRUE and FALSE eventOuts from the two nodes are sent simultaneously (i.e. identical timestamps).

6.	If a bound node is deleted then it behaves as if it received a set_bind FALSE event (see #3).

Note that the jump field may change after an SoVRMLViewpoint is bound - the rules described above still apply. If jump was TRUE when the SoVRMLViewpoint is bound, but changed to FALSE before the set_bind FALSE is sent, then the SoVRMLViewpoint does not un-jump during unbind. If jump was FALSE when the SoVRMLViewpoint is bound, but changed to TRUE before the set_bind FALSE is sent, then the SoVRMLViewpoint does perform the un-jump during unbind.

The fieldOfView field specifies a preferred field of view from this viewpoint, in radians. A small field of view roughly corresponds to a telephoto lens; a large field of view roughly corresponds to a wide-angle lens. The field of view should be greater than zero and smaller than pi; the default value corresponds to a 45 degree field of view. The value of fieldOfView represents the maximum viewing angle in any direction axis of the view. For example, a browser with a rectangular viewing projection shall use an angle of fieldOfView for the larger direction (depending on aspect ratio) and fieldOfView times aspect ratio in the smaller direction. If the aspect ratio is 2x1 (i.e. horizontal twice the vertical) and the fieldOfView is 1.0, then the horizontal viewing angle would be 1.0 and the vertical viewing angle would be 0.5. fieldOfView is a hint to the browser and may be ignored.

The description field identifies SoVRMLViewpoints that are recommended to be publicly accessible through the browser's user interface (e.g. SoVRMLViewpoints menu). The string in the description field should be displayed if this functionality is implemented. If description is empty, then the SoVRMLViewpoint should not appear in any public user interface. It is recommended that the browser bind and move to an SoVRMLViewpoint when its description is selected, either animating to the new position or jumping directly there. Once the new position is reached both the isBound and bindTime eventOuts are sent.

The URL syntax ".../scene.wrl#ViewpointName" specifies the user's initial view when entering "scene.wrl" to be the first SoVRMLViewpoint in file "scene.wrl" that appears as "DEF ViewpointName Viewpoint { ... }" - this overrides the first SoVRMLViewpoint in the file as the initial user view and receives a set_bind TRUE message. If the SoVRMLViewpoint "ViewpointName" is not found, then assume that no SoVRMLViewpoint was specified and use the first SoVRMLViewpoint in the file. The URL syntax "#ViewpointName" specifies a view within the existing file. If this is loaded, then it receives a set_bind TRUE message.

If an SoVRMLViewpoint is bound (set_bind) and is the child of an SoVRMLLOD, SoVRMLSwitch, or any node or prototype that disables its children, then the result is undefined. If an SoVRMLViewpoint is bound that results in collision with geometry, then the browser performs its self-defined navigation adjustments as if the user navigated to this point (see SoVRMLCollision).

FIELDS

SoSFFloat	fieldOfView

Specifies a preferred field of view from the viewpoint, in radians. A small field of view roughly corresponds to a telephoto lens; a large field of view roughly corresponds to a wide-angle lens. The field of view should be greater than zero and smaller than pi.

SoSFBool	jump

Specifies whether the user's view "jumps" to the position and orientation.

SoSFRotation	orientation

Specifies a rotation relative to the default orientation.

SoSFVec3f	position

Specifies a position relative to the coordinate system's origin (0,0,0).

SoSFString	description

Specifies viewpoints that are recommended to be publicly accessible.

METHODS

SoVRMLViewpoint()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFBool	set_bind (Not implemented)

SoSFFloat	set_fieldOfView

SoSFBool	set_jump

SoSFRotation	set_orientation

SoSFVec3f	set_position

eventOut

SoSFTime	bindTime (Not implemented)

SoSFBool	isBound (Not implemented)

SoSFFloat	fieldOfView_changed

SoSFBool	jump_changed

SoSFRotation	orientation_changed

SoSFVec3f	position_changed

FILE FORMAT/DEFAULTS

Viewpoint {

fieldOfView	0.785398

jump	TRUE

orientation	0 0 1  0

position	0 0 10

description	""

}


SoVRMLVisibilitySensor
(ACTION NOT IMPLEMENTED)

NAME

SoVRMLVisibilitySensor - detects visibility changes of a rectangular box

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLVisibilitySensor

SYNOPSIS

#include <Inventor/VRMLNodes/SoVRMLVisibilitySensor.h>

Fields from class SoVRMLVisibilitySensor:

SoSFVec3f	center

SoSFBool	enabled

SoSFVec3f	size

Methods from class SoVRMLVisibilitySensor:

SoVRMLVisibilitySensor()

static void	enableEvents(SbBool OnOffFlag)

static SbBool	isEventsEnabled()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoVRMLVisibilitySensor detects visibility changes of a rectangular box as the user navigates the world. SoVRMLVisibilitySensor is typically used to detect when the user can see a specific object or region in the scene, and to activate or deactivate some behavior or animation in order to attract the user or improve performance.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLVisibilitySensor detects visibility changes of a rectangular box as the user navigates the world. SoVRMLVisibilitySensor is typically used to detect when the user can see a specific object or region in the scene, and to activate or deactivate some behavior or animation in order to attract the user or improve performance.

The enabled field enables and disables the SoVRMLVisibilitySensor. If enabled is set to FALSE, the SoVRMLVisibilitySensor does not send output events. If enabled is TRUE, then the SoVRMLVisibilitySensor detects changes to the visibility status of the box specified and sends events through the isActive eventOut. A TRUE event is output to isActive when any portion of the box impacts the rendered view, and a FALSE event is sent when the box has no effect on the view. Browsers shall guarantee that if isActive is FALSE that the box has absolutely no effect on the rendered view - browsers may error liberally when isActive is TRUE (e.g. maybe it does affect the rendering).

The exposed fields center and size specify the object space location of the box center and the extents of the box (i.e. width, height, and depth). The SoVRMLVisibilitySensor's box is affected by hierarchical transformations of its parents.

The enterTime event is generated whenever the isActive TRUE event is generated, and exitTime events are generated whenever isActive FALSE events are generated.

Each SoVRMLVisibilitySensor behaves independently of all other SoVRMLVisibilitySensors - every enabled SoVRMLVisibilitySensor that is affected by the user's movement receives and sends events, possibly resulting in multiple SoVRMLVisibilitySensors receiving and sending events simultaneously. Unlike SoVRMLTouchSensors, there is no notion of an SoVRMLVisibilitySensor lower in the scene graph "grabbing" events. Instanced (DEF/USE) SoVRMLVisibilitySensors use the union of all the boxes defined by their instances to check for enter and exit - an instanced SoVRMLVisibilitySensor will detect enter, motion, and exit for all instances of the box and send output events appropriately.

FIELDS

SoSFVec3f	center

Object space location of the box center.

SoSFBool	enabled

Enables (TRUE) or disables (FALSE) the sensor.

SoSFVec3f	size

Width, height, and depth of the box.

METHODS

SoVRMLVisibilitySensor()

Constructor.

static void	enableEvents(SbBool OnOffFlag)

Enables/disables events for all SoVRMLVisibilitySensor objects. If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.

static SbBool	isEventsEnabled()

Queries if events are enabled for all objects of this class.

static SoType	getClassTypeId()

Returns type identifier for this class.

EVENTS

eventIn

SoSFVec3f	set_center

SoSFBool	set_enabled

SoSFVec3f	set_size

eventOut

SoSFTime	enterTime

SoSFTime	exitTime

SoSFBool	isActive

SoSFVec3f	center_changed

SoSFBool	enabled_changed

SoSFVec3f	size_changed

FILE FORMAT/DEFAULTS

VRMLVisibilitySensor {

center	0 0 0

enabled	TRUE

size	0 0 0

}


SoVRMLWorldInfo

NAME

SoVRMLWorldInfo - contains information about the world

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVRMLWorldInfo

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLWorldInfo.h>

Fields from class SoVRMLWorldInfo:

SoMFString	info

SoSFString	title

Methods from class SoVRMLWorldInfo:

SoVRMLWorldInfo()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

See the VRML 2.0 Specification, below.

VRML 2.0 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML 2.0 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML 2.0 specification that are not present in this help file. The complete VRML 2.0 spec is available at http://www.web3d.org.

The SoVRMLWorldInfo node contains information about the world. This node has no effect on the visual appearance or behavior of the world - it is strictly for documentation purposes. The title field is intended to store the name or title of the world so that browsers can present this to the user - for instance, in their window border. Any other information about the world can be stored in the info field - for instance, the scene author, copyright information, and public domain information.

FIELDS

SoMFString	info

Any additional information that the author wishes to pass to the user.

SoSFString	title

Title of the world.

METHODS

SoVRMLWorldInfo()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULTS

SoVRMLWorldInfo {

info	[]

title	""

}


SoValueOrdering

NAME

SoValueOrdering - group node derived from SoRenderList that alters the decimation of shapes below it depending on their rendering value as approximated by their size on the screen. This makes it possible to render scenes with large numbers of shapes without needing LOD nodes.

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoRenderList > SoValueOrdering

SYNOPSIS

#include <Inventor/nodes/SoValueOrdering.h>

Fields from class SoValueOrdering:

SoSFBool	dropCulling

SoSFUInt32	dropScreenArea

SoSFBool	adjustDecimation

SoSFBool	boundingBoxSubstitutes

SoSFBool	decimateSubstitutes

SoSFBool	lowValueCulling

Methods from class SoRenderList:

void	addRenderObjectType(SoType t)

void	removeRenderObjectType(SoType t)

int	getNumRenderObjectTypes() const

SoType	getRenderObjectType(int i) const

void	addRenderObjectName(SbName n)

void	removeRenderObjectName(SbName n)

int	getNumRenderObjectNames() const

SbName	getRenderObjectName(int i) const

void	removeAllRenderObjectNames()

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

static SoType	getClassTypeId()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

The SoValueOrdering node uses the functionality from SoRenderList to create a list of paths to the shapes beneath it. It then traverses the linear list and determines the rendering value and cost of each shape. The rendering value is based on the object's approximate screen size and its cost is based on a count of the number of primitives the shape contains.

During each render traversal, the ValueOrdering node determines how many primitives a shape deserves based on its rendering value. If the shape contains multiple levels of detail, then the ValueOrdering node will choose the correct level of detail. However, this node also has two techniques that allow it to handle scenes that do not contain levels of detail: bounding box substitutes and drop culling.

With drop culling enabled, a user can specify a size in pixels such that when the shape is less than this size, the shape is not rendered.

If bounding box substitutes are enabled and the ValueOrdering node calculates that the number of triangles that the object deserves is closer to 12 (the number of triangles in a bounding box) than to the minimum number of triangles the shape can draw, then the ValueOrdering node will draw a bounding box instead of the shape.

If decimate substitutes are enabled, then the ValueOrdering will apply a GlobalSimpifyAction to shapes that it determines need simplification. Sometimes a shape has so many triangles that neither the bounding box nor the shape is a satisfactory choice given the shape's calculated value. In this case, the ValueOrdering will create and use a simplified version. The simplification is done when Inventor has been idle for over a second.

If low value culling is enabled, then the shape will not be rendered if the ValueOrdering node decides that its value in triangles is not even worth rendering a bounding box.  This will happen if the decimation percentage value is set very low.

The typical scenario where this node is useful is in CAD model assembly viewing, where all or most of the scene is visible, but lots of details may be so small that there is no point in drawing them until the user zooms in on them. Replacing such detail with its bounding box is adequate in many cases and does not have the disk and memory costs, along with the preprocessing time, associated with maintaining multiple levels of detail.

FIELDS

SoSFBool	dropCulling

Enables culling of shapes that are too small on the screen.

SoSFUInt32	dropScreenArea

Sets threshold in pixels for drop culling.

SoSFBool	boundingBoxSubstitutes

Enables use of bounding boxes for shapes whose rendering value is too low to render the shape itself.

SoSFBool	decimateSubstitutes

If true, then this node will automatically decide when a decimated version of a shape needs to be created. It will apply an SoGlobalSimplifyAction, and use the results instead of the shape when needed.

SoSFBool	lowValueCulling

Enables culling of shapes whose rendering value is too low.

SoSFBool	adjustDecimation

Allows ValueOrdering node to adjust decimation percentage value depending on the shape's rendering value.

ACTION BEHAVIOR

SoGLRenderAction, SoGetPrimitiveCountAction

Uses value calculation to influence traversal. All other actions use standard SoSeparator traversal.

FILE FORMAT/DEFAULT

ValueOrdering {

dropCulling	TRUE

dropScreenArea	5

boundingBoxSubstitutes	TRUE

decimateSubstitutes	TRUE

lowValueCulling	TRUE

adjustDecimation	TRUE

}

SEE ALSO

SoGetPrimitiveCountAction, SoLevelOfSimplification, SoOctreeOrdering, SoRenderList


SoVertexFlag

NAME

SoVertexFlag - class to mark/unmark vertices for beveling

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVertexFlag

SYNOPSIS

#include <Inventor/nodes/SoVertexFlag.h>

Fields from class SoVertexFlag:

SoMFInt32	vertexMarked

SoMFInt32	vertexUnmarked

Methods from class SoVertexFlag:

SoVertexFlag()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node specifies the current marked/unmarked vertices for all subsequent shapes. Marked vertices will be beveled by SoBevelAction; unmarked vertices will not. It is defined using int_32t arrays.

For vertex-based shapes, the array elements are simply indices of the selected vertices in the coordinate array.

For SoCube and SoVRMLBox, the following vertices can be marked/unmarked:

For SoCone and SoVRMLCone, at least one value greater than or equal to 0 in the array marks/unmarks the top of the cone (which is the only vertex that can be marked).

For SoCylinder and SoVRMLCylinder, no vertex can be marked/unmarked.

FIELDS

SoMFInt32	vertexMarked

SoMFInt32	vertexUnmarked

These are the fields for marked/unmarked vertices. If a vertex appears in both arrays, it is unmarked.

METHODS

SoVertexFlag()

Constructor.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

VertexFlag {

vertexMarked	-1

vertexUnmarked	-1

}

SEE ALSO

SoBevelAction, SoBevelProperty, SoEdgeFlag


SoVertexProperty

NAME

SoVertexProperty - vertex property node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoVertexProperty

SYNOPSIS

#include <Inventor/nodes/SoVertexProperty.h>

enum Binding	{
SoVertexProperty::OVERALL
Whole object has same material/normal
SoVertexProperty::PER_PART
One material/normal for each part of object
SoVertexProperty::PER_PART_INDEXED
One material/normal for each part, indexed
SoVertexProperty::PER_FACE
One material/normal for each face of object
SoVertexProperty::PER_FACE_INDEXED
One material/normal for each face, indexed
SoVertexProperty::PER_VERTEX
One material/normal for each vertex of object
SoVertexProperty::PER_VERTEX_INDEXED
One material/normal for each vertex, indexed
}

Fields from class SoVertexProperty:

SoMFVec3f	vertex

SoMFVec3f	normal

SoMFUInt32	orderedRGBA

SoMFVec2f	texCoord

SoSFEnum	normalBinding

SoSFEnum	materialBinding

Methods from class SoVertexProperty:

SoVertexProperty()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

static SoType	getClassTypeId()

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This property node may be used to efficiently specify coordinates, normals, texture coordinates, colors, transparency values, material binding and normal binding for vertex-based shapes, i.e., shapes of class SoVertexShape. An SoVertexProperty node can be used as a child of a group node in a scene graph, in which case the properties it specifies are inherited by subsequent shape nodes in the graph. It can also be directly referenced as the VertexProperty SoSFField of a vertex-based shape, bypassing scene graph inheritance.

When directly referenced by a VertexProperty SoSFField of a vertex-based shape, the SoVertexProperty node is the most efficient way of specifying vertex-based shapes. Use of the directly referenced SoVertexProperty node results in significantly faster scene rendering than scene graph inheritance of vertex properties, provided all required vertex properties are specified in the SoVertexProperty node.

Because the class SoVertexProperty is derived from SoNode, a vertex property node can be inserted as a child node in a scene graph. When inserted as a node in a scene graph, the SoVertexProperty node is traversed as any other property node and the properties it specifies are inherited by subsequent shape nodes in the scene graph. It specifies the current material and normal bindings, and can be used to specify the current 3D coordinates, the current normals, the current texture coordinates, the current diffuse colors, and the current transparencies.

All multiple-valued fields in the SoVertexProperty node are optional. If a field is not present (i.e. if it has 0 values), then shapes that require the missing information are required to obtain it from the current traversal state. However, users are cautioned that, for optimal performance, the vertex property node should be referenced as the VertexProperty field of an SoVertexShape, and should specify in its fields all values required to render that shape.

The various fields in a vertex property node can be used in place of corresponding fields in other property nodes, as follows: The vertex field contains 3D coordinates, as in the point field of an SoCoordinate3 node. The normal field contains normal vectors, as in the vector field of the SoNormal node. The orderedRGBA field contains packed colors in the hexadecimal format 0xrrggbbaa, where rr is the red value (between 00 and 0xFF hex) gg is the green value (between 00 and 0xFF hex) bb is the blue value (between 00 and 0xFF hex) aa is the alpha value (between 00 = transparent and 0xFF = opaque). The packed colors are equivalent to an SoPackedColor node, and provide values for both diffuse color and transparency. The texCoord field replaces the point field of the SoTextureCoordinate2 node.

If the transparency type is SoGLRenderAction::SCREEN_DOOR, only the first transparency value will be used. With other transparency types, multiple transparencies will be used.

The materialBinding field replaces the value field of the SoMaterialBinding node. The materialBinding field in a directly referenced SoVertexProperty node has no effect unless there is a nonempty orderedRGBA field, in which case the material binding specifies the assignment of diffuse colors and alpha values to the shape. The materialBinding field can take as value any of the material bindings supported by Open Inventor.

The normalBinding field replaces the value field of the SoNormalBinding node. The normalBinding field of a directly referenced SoVertexProperty node has no effect unless there is a nonempty normal field, in which case the normal binding specifies the assignment of normal vectors to the shape. The value of the normalBinding field can be any of the normal bindings supported by Open Inventor.

FIELDS

SoMFVec3f	vertex

vertex coordinate(s).

SoMFVec3f	normal

normal vector(s).

SoMFUInt32	orderedRGBA

packed color(s), including transparencies.

SoMFVec2f	texCoord

texture coordinate(s).

SoSFEnum	normalBinding

normal binding.

SoSFEnum	materialBinding

material binding.

METHODS

SoVertexProperty()

Creates an SoVertexProperty node with default settings.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoPickAction

When traversed in a scene graph, sets coordinates, normals, texture coordinates, diffuse colors, transparency, normal binding and material binding in current traversal state. If not traversed, has no effect on current traversal state associated with action. The normalBinding field has no effect if there are no normals. The materialBinding has no effect if there are no packed colors.

SoGetBoundingBoxAction

When traversed in a scene graph, sets coordinates in current traversal state. If not traversed, has no effect on current traversal state associated with action.

FILE FORMAT/DEFAULT

VertexProperty {

vertex	[  ]

normal	[  ]

texCoord	[  ]

orderedRGBA	[  ]

materialBinding	OVERALL

normalBinding	PER_VERTEX_INDEXED

}

SEE ALSO

SoIndexedTriangleStripSet SoIndexedFaceSet SoIndexedLineSet SoTriangleStripSet SoLineSet SoFaceSet SoPointSet SoQuadMesh SoVertexShape SoIndexedShape SoNonindexedShape


SoVertexShape

NAME

SoVertexShape - abstract base class for all vertex-based shape nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape

SYNOPSIS

#include <Inventor/nodes/SoVertexShape.h>

Fields from class SoVertexShape:

SoSFNode	vertexProperty

Methods from class SoVertexShape:

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node is the abstract base class for all vertex-based shape (geometry) nodes. It is used as a repository for convenience functions for subclasses and to provide a type identifier to make it easy to determine whether a shape is vertex-based. It contains one public field, the SoVertexProperty field.

All subclasses of this node draw objects constructed from vertices. If the vertexProperty field is non-null and there are coordinates in the associated vertex property node, then those coordinates are used. Otherwise the objects are drawn using the current coordinates in the state. The coordinates of the shape are transformed by the current transformation matrix and are drawn with the current light model and drawing style.

Subclasses that construct polygons from vertices may not render or pick correctly if any of their polygons are self-intersecting or non-planar.

All vertex shape subclasses use the bounding box of the shape to determine default texture coordinates. The longest dimension of the bounding box defines the S coordinates, and the next longest defines the T coordinates. The value of the S coordinate ranges from 0 to 1, from one end of the bounding box to the other. The T coordinate ranges between 0 and the ratio of the second greatest dimension of the bounding box to the greatest dimension.

When a vertex-based shape is picked with an SoRayPickAction, a detail is always returned. If the shape is composed of faces (such as SoFaceSet or SoTriangleStripSet), an SoFaceDetail is returned. If the shape is composed of line segments (such as SoLineSet), an SoLineDetail is returned. If the shape is composed of points (such as SoPointSet), an SoPointDetail is returned. Note that the type of detail returned is not affected by the current drawing style.

Similarly, each class of vertex-based shape invokes appropriate callbacks if those callbacks are registered with the SoCallbackAction. Shapes made of faces invoke triangle callbacks for each generated triangle. (Faces may be triangulated to create these triangles.) Shapes made of line segments invoke line segment callbacks for each segment, and shapes made of points invoke point callbacks.

The subclass SoIndexedShape is a base class for vertex-based shapes that index into the current set of coordinates. The subclass SoNonIndexedShape is a base class for vertex-based shapes that use the current coordinates in order.

FIELDS

SoSFNode	vertexProperty

vertex property node.

METHODS

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoIndexedShape, SoNonIndexedShape, SoVertexProperty


SoWWWAnchor

NAME

SoWWWAnchor - separator group node with a URL hyperlink

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoLocateHighlight > SoWWWAnchor

SYNOPSIS

#include <Inventor/nodes/SoWWWAnchor.h>

typedef void	SoWWWAnchorCB(const SbString &url,
void *userData,
SoWWWAnchor *node)

enum Mapping	{
SoWWWAnchor::NONE
Do not add information to the URL
SoWWWAnchor::POINT
Add object-space coordinates to URL
}

Fields from class SoWWWAnchor:

SoSFString	name

SoSFString	description

SoSFEnum	map

Fields from class SoLocateHighlight:

SoSFColor	color

SoSFEnum	style

SoSFEnum	mode

Fields from class SoSeparator:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Methods from class SoWWWAnchor:

SoWWWAnchor()

static SoType	getClassTypeId()

void	setFullURLName(const SbString &url)

const SbString &	getFullURLName()

static void	setFetchURLCallBack(SoWWWAnchorCB *f,
void *userData)

static void	setHighlightURLCallBack(SoWWWAnchorCB *f,
void *userData)

Methods from class SoSeparator:

static void	setNumRenderCaches(int howMany)

static int	getNumRenderCaches()

Methods from class SoGroup:

void	addChild(SoNode *child)

void	insertChild(SoNode *child,
int newChildIndex)

SoNode *	getChild(int index) const

int	findChild(const SoNode *child) const

int	getNumChildren() const

void	removeChild(int index)

void	removeChild(SoNode *child)

void	removeAllChildren()

void	replaceChild(int index,
SoNode *newChild)

void	replaceChild(SoNode *oldChild,
SoNode *newChild)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node defines a separator group which has a URL (Universal Resource Locator) hyperlink. When clicked on, this node invokes an application callback to fetch the URL. The application may fetch the data itself, or call a World Wide Web browser like the HTML based Netscape Navigator or the VRML based WebSpace Navigator to load the URL.

FIELDS

SoSFString	name

URL which the application will be called back to fetch when this node is activated by a left mouse click (e.g. "http://www.sgi.com/Technology/Inventor").

SoSFString	description

A description of the URL which may make more sense to users than the URL itself (e.g. "The Open Inventor Home Page").

SoSFEnum	map

Specifies what additional information should be added to the end of the URL when passed back to the application for fetching. If set to POINT, then the x,y,z location of the object space intersection point when the mouse was clicked will be suffixed to the URL. Since the comma character does not transmit through some web browsers, it is written in hex form (e.g. if the intersection point is 17,4.5,1 the URL passed to the application callback would be "http://www.sgi.com/Technology/Inventor?17%2c4.5%2c1").

METHODS

SoWWWAnchor()

Creates an anchor node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

void	setFullURLName(const SbString &url)

const SbString &	getFullURLName()

If the name field contains a relative URL (e.g. "foo.wrl" instead of "http://bogus.com/foo.wrl"), the anchor cannot resolve the URL reference. This method allows the application to tell the anchor what its full URL should be. getFullURLName() returns the fullURL set here, or if not set, returns the contents of the name field.

static void	setFetchURLCallBack(SoWWWAnchorCB *f,
void *userData)

Application callbacks invoked when the mouse is clicked on an anchor so that the application can fetch the URL or call Netscape or WebSpace to fetch the URL.

static void	setHighlightURLCallBack(SoWWWAnchorCB *f,
void *userData)

Application callbacks invoked when the mouse is moved over an anchor so that the app can provide feedback such as changing the cursor, or displaying the anchor description and name.

ACTION BEHAVIOR

SoHandleEventAction

When the left mouse is clicked over a child of this anchor node, the application is called back to fetch the URL (see setFetchURLCallBack()).

FILE FORMAT/DEFAULT

WWWAnchor {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

mode	AUTO

style	EMISSIVE

color	0.3 0.3 0.3

name	"<Undefined URL>"

description	""

map	NONE

}

SEE ALSO

SoWWWInline


SoWWWInline

NAME

SoWWWInline - node that refers to children through a URL

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoWWWInline

SYNOPSIS

#include <Inventor/nodes/SoWWWInline.h>

typedef void	SoWWWInlineFetchURLCB(const SbString &url,
void *userData,
SoWWWInline *node)

enum BboxVisibility	{
SoWWWInline::NEVER
Do not show bounding box
SoWWWInline::UNTIL_LOADED
Show bounding box (if specified) until data is loaded
SoWWWInline::ALWAYS
Show bounding box along with data
}

Fields from class SoWWWInline:

SoSFString	name

SoSFVec3f	bboxCenter

SoSFVec3f	bboxSize

SoSFNode	alternateRep

Methods from class SoWWWInline:

SoWWWInline()

static SoType	getClassTypeId()

void	setFullURLName(const SbString &url)

const SbString &	getFullURLName()

SoGroup *	copyChildren() const

void	requestURLData()

SbBool	isURLDataRequested() const

SbBool	isURLDataHere() const

void	cancelURLDataRequest()

void	setChildData(SoNode *urlData)

SoNode *	getChildData() const

static void	setFetchURLCallBack(SoWWWInlineFetchURLCB *f,
void *userData)

static void	setBoundingBoxVisibility(BboxVisibility b)

static BboxVisibility	getBoundingBoxVisibility()

static void	setBoundingBoxColor(SbColor &c)

static const SbColor &	getBoundingBoxColor()

static void	setReadAsSoFile(SbBool onOff)

static SbBool	getReadAsSoFile()

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This node refers to children through a URL (Universal Resource Locator). The application is responsible for actually fetching data from the URL for an SoWWWInline node to display.

FIELDS

SoSFString	name

Specifies the URL which the application should fetch as child data to this node (e.g. "http://bogus.com/homeWorld.wrl.gz").

SoSFVec3f	bboxCenter

Defines the center of the bounding box surrounding the URL child data.

SoSFVec3f	bboxSize

Defines the size of the bounding box surrounding the URL child data.

SoSFNode	alternateRep

Specifies child data that can be used instead of fetching data from the URL. On read, if this field is set and there is no fetch URL callback registered, the alternateRep will be used as the child data. Otherwise, it is the applications responsibility to set the child data (see setChildData()).

METHODS

SoWWWInline()

Creates an inline node with default settings.

static SoType	getClassTypeId()

Returns type identifier for this class.

void	setFullURLName(const SbString &url)

const SbString &	getFullURLName()

If the name field contains a relative URL (e.g. "foo.wrl" instead of "http://bogus.com/foo.wrl"), the inline cannot resolve the URL reference. This method allows the application to tell the anchor what its full URL should be. getFullURLName() returns the fullURL set here, or if not set, returns the contents of the name field.

SoGroup *	copyChildren() const

Return a copy of the hidden children as a Group. The children are set by the application through setChildData().

void	requestURLData()

Request that URL data be fetched. This will invoke the application callback to actually fetch the data and can be called before the inline does this for itself (see setFetchURLCallBack()).

SbBool	isURLDataRequested() const

SbBool	isURLDataHere() const

Return whether URL data has been requested and whether that data is here (i.e. whether setChildData() has been called.)

void	cancelURLDataRequest()

Cancel the active URL data fetch request.

void	setChildData(SoNode *urlData)

SoNode *	getChildData() const

Set/get the child data the inline should display. The application should set child data after it has fetched data for an inline node.

static void	setFetchURLCallBack(SoWWWInlineFetchURLCB *f,
void *userData)

Application callbacks invoked when the inline needs its URL data fetched. This happens the first time the inline is rendered, or if it needs to compute a bounding box and the bboxSize field is not set, or when requestURLData() is called.

static void	setBoundingBoxVisibility(BboxVisibility b)

static BboxVisibility	getBoundingBoxVisibility()

This allows the application to specify when bounding boxes are displayed. The bounding box can be rendered along with the children (ALWAYS), only until the child data is loaded (UNTIL_LOADED), or not at all (NEVER). Default is UNTIL_LOADED

static void	setBoundingBoxColor(SbColor &c)

static const SbColor &	getBoundingBoxColor()

This allows the application to specify the color of bounding boxes displayed.

static void	setReadAsSoFile(SbBool onOff)

static SbBool	getReadAsSoFile()

Sets/gets the ReadAsSoFile flag. If TRUE, assume that "url" points to other Open Inventor files on local filesystem, and load them directly as if this were an SoFile node instead of using WWWInlineFetchURLCB.

ACTION BEHAVIOR

SoGLRenderAction

This renders the child data if it has been set by the application. It will render a wireframe bounding box as specified by the bboxCenter and bboxSize fields, and the setting passed to setBoundingBoxVisibility(). If no fetch URL callback is set and the alternateRep is not NULL, the alternateRep will be rendered until child data has been set.

FILE FORMAT/DEFAULT

WWWInline {

name	"<Undefined file>"

bboxCenter	0 0 0

bboxSize	0 0 0

alternateRep	NULL

}

SEE ALSO

SoWWWAnchor, SoFile


SoWin

NAME

SoWin - routines for Open Inventor/Windows compatibility.

INHERITS FROM

SoWin

SYNOPSIS

#include <Inventor/Win/SoWin.h>

Methods from class SoWin:

static HWND	init(const char *appName,
const char *className = "Inventor")

static void	init(HWND topLevelWidget)

static void	mainLoop()

static void	nextEvent(UINT appContext,
MSG *event)

static BOOLEAN	dispatchEvent(MSG *event)

static UINT	getAppContext()

static UINT *	getDisplay()

static HWND	getTopLevelWidget()

static void	show(HWND widget)

static void	hide(HWND widget)

static char *	encodeString(char *s)

static char *	decodeString(char * xs)

static void	setWidgetSize(HWND w,
const SbVec2s &size)

static SbVec2s	getWidgetSize(HWND w)

static HWND	getShellWidget(HWND w)

static void	createSimpleErrorDialog(HWND widget,
char *dialogTitle,
char *errorStr1,
char *errorStr2 = NULL)

static void	getPopupArgs(UINT *d,
int scr,
PLONG args,
int *n)

static void	addColormapToShell(HWND widget,
HWND shell)

DESCRIPTION

The SoWin class initializes Open Inventor for use with Microsoft Windows. SoWin::init() must be called in order for Open Inventor to work properly with Windows. SoWin::mainLoop() must be called in order for extension device messages to be passed to Open Inventor render areas. The other methods are convenience functions.

Refer to the SoWinComponent reference pages for examples on how this class should be used when using Open Inventor Windows components.

METHODS

static HWND	init(const char *appName,
const char *className = "Inventor")

This is called to initialize Open Inventor and Windows, and bind Open Inventor with Windows message handling so that Open Inventor sensors will work correctly. This returns the top level shell window handle. This method will call SoDB::init(), SoNodeKit::init(), and SoInteraction::init() and will create an initial window.

static void	init(HWND topLevelWidget)

This alternate form of init allows the application to initialize Windows. The passed window handle should be the top level window handle returned from the Windows initialization. This method will call SoDB::init(), SoNodeKit::init(), and SoInteraction::init().

static void	mainLoop()

This retrieves and dispatches messages (loops forever). It calls SoWin::nextEvent() and SoWin::dispatchEvent() to do this.

static void	nextEvent(UINT appContext,
MSG *event)

Get the nextEvent by callingGetMessage. The appContext can be had by calling SoWin::getAppContext().

static BOOLEAN	dispatchEvent(MSG *event)

Dispatch the passed message to a handler. This returns TRUE if a handler was found, else it returns FALSE.

static UINT	getAppContext()

static UINT *	getDisplay()

These methods are included for portability only.

static HWND	getTopLevelWidget()

Return information based on the initial window handle returned by or passed to init.

static void	show(HWND widget)

static void	hide(HWND widget)

Convenience routines to show and hide the passed window handle.

This includes any children the window may have.

static char *	encodeString(char *s)

static char *	decodeString(char * xs)

These methods are included for portability only.

static void	setWidgetSize(HWND w,
const SbVec2s &size)

static SbVec2s	getWidgetSize(HWND w)

Convenience routines to set/get the size of the given window.

static HWND	getShellWidget(HWND w)

Convenience routine which will return the topmost window containing the given window handle. The window handle tree is traversed up until the last window handle is found using GetParent.

static void	createSimpleErrorDialog(HWND widget,
char *dialogTitle,
char *errorStr1,
char *errorStr2 = NULL)

Convenience routine which brings a simple Windows error dialog box displaying the given error string(s) and window title. The OK button, which destroys the dialog, is the only button displayed.

static void	getPopupArgs(UINT *d,
int scr,
PLONG args,
int *n)

This method is included for portability only.

static void	addColormapToShell(HWND widget,
HWND shell)

This method is included for portability only.

SEE ALSO

SoWinComponent


SoWinClipboard

NAME

SoWinClipboard - supports copy/paste for Open Inventor using the Windows clipboard

INHERITS FROM

SoWinClipboard

SYNOPSIS

#include <Inventor/Win/SoWinClipboard.h>

typedef void	SoWinClipboardPasteCB(void *userData,
SoPathList *pathList)

Methods from class SoWinClipboard:

SoWinClipboard(HWND w,
int cbFormat = CF_TEXT)

~SoWinClipboard()

void	copy(SoNode *node,
time_t eventTime)

void	copy(SoPath *path,
time_t eventTime)

void	copy(SoPathList *pathList,
time_t eventTime)

void	paste(time_t eventTime,
SoWinClipboardPasteCB *pasteDoneFunc,
void *userData = NULL)

DESCRIPTION

This class manages data transfers for copy and paste to and from the Windows clipboard. Transfers may occur within the same window, from one window to another window, and from process to process.

Clipboard support is currently strictly text. The copy type cbFormat will be forced to CF_TEXT, no matter what, if anything, is specified in the second argument of the constructor.

METHODS

SoWinClipboard(HWND w,
int cbFormat = CF_TEXT)

~SoWinClipboard()

Constructor and destructor. w is the window that will be used for the clipboard operations. cbFormat specifies the Windows clipboard format to be used for the data transfer.

void	copy(SoNode *node,
time_t eventTime)

void	copy(SoPath *path,
time_t eventTime)

void	copy(SoPathList *pathList,
time_t eventTime)

This copies the passed scene graph object to the clipboard using the current clipboard format. The eventTime should be the time returned by the system routine time(), and can be used to insure synchronization of copy and paste requests.

For example,

#include <windows.h>

#include <time.h>

#include <...>

...	(necessary Inventor includes)

void SomeFunc(some_args)

{

HWND hwnd;

// (window value gets set in normal Windows usage

// or is passed in as an argument)

...

SoNode *the_node

// a node to copy to the clipboard

// (will be incorporated in a pathlist)

...

SoWinClipboard the_clipboard(hwnd);

// CF_TEXT is forced as the clipboard format

...

the_clipboard.copy(the_node, time(NULL));

// copy the node to the clipboard

...

}

void	paste(time_t eventTime,
SoWinClipboardPasteCB *pasteDoneFunc,
void *userData = NULL)

This requests data from the clipboard in the current clipboard format. When the data is retrieved, the pasteDoneFunc callback is invoked. The newly pasted data is passed as the callback function's pathList argument (an SoPathList).

SEE ALSO

SoSelection, SoWin


SoWinCollisionViewer

NAME

SoWinCollisionViewer - class to manage collisions between the camera and the scene

INHERITS FROM

SoWinCollisionViewer

SYNOPSIS

#include <Inventor/collision/SoWinCollisionViewer.h>

typedef void	SoWinCollisionViewerCB(void* userData,
SoWinCollisionViewer* viewer)

Methods from class SoWinCollisionViewer

SoWinCollisionViewer(SoWinViewer* viewer)

~SoWinCollisionViewer()

SoWinViewer*	getViewer() const

void	setDistance(float distance)

float	getDistance() const

void 	setCollisionDetection(SbBool value = TRUE)

SbBool	getCollisionDetection() const

void 	setZBufferOptimization(SbBool value = TRUE)

SbBool	getZBufferOptimization() const

void	addCallback(SoWinCollisionViewerCB* cbk,
void* ud = NULL)

void	removeCallback(SoWinCollisionViewerCB* cbk,
void* ud = NULL)

DESCRIPTION

This class is used to constrain a viewer, preventing the viewer's camera from colliding with the objects in the scene. It overrides the RenderCallback on the viewer that it's attached to.

The programmer can define the maximum distance between the camera and the objects.

When Z-buffer optimization is enabled, the algorithm looks at the Z-buffer to see if there is an object in front of the camera when the user moves forward, and an SoIntersectionDetectionAction when the user moves backward.

NOTE: This class is not a viewer.

METHODS

SoWinCollisionViewer(SoWinViewer* viewer)

Constructor.

~SoWinCollisionViewer()

Destructor.

SoWinViewer*	getViewer() const

Gets the original viewer.

void	setDistance(float distance)

float	getDistance() const

Sets/gets the distance between the camera and the objects.

void	setCollisionDetection(SbBool value = TRUE)

SbBool	getCollisionDetection() const

Sets/gets the collision detection active. The default value is TRUE.

void	setZBufferOptimization(SbBool value = TRUE)

SbBool	getZBufferOptimization() const

Sets/gets the Z buffer optimization active. The default value is TRUE.

void	setNumSteps(int num_steps)

int	getNumSteps() const

Sets/gets the number of steps to be used in the collision computation. The default number of steps is 4. The minimum value is 2.

void	addCallback(SoWinCollisionViewerCB* cbk,
void* ud = NULL)

void	removeCallback(SoWinCollisionViewerCB* cbk,
void* ud = NULL)

Adds/removes callbacks. These callbacks are called when a collision occurs between the camera and the scene.

SEE ALSO

SoCollisionManager, SoIntersectionDetectionAction


SoWinComponent

NAME

SoWinComponent - abstract base class for all Open Inventor components

INHERITS FROM

SoWinComponent

SYNOPSIS

#include <Inventor/Win/SoWinComponent.h>

typedef void	SoWinComponentCB(void *userData,
SoWinComponent *comp)

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

Abstract base class from which all Open Inventor Windows components are derived. This class provides a basic C++ protocol for building and displaying Windows components. Components are used to encapsulate some function or task into a reusable package in the form of a Windows window handle that can be used in any Open Inventor Windows program. See the Example section on how to build and use SoWinComponents.

METHODS

virtual void	show()

virtual void	hide()

This shows and hides the component.

SbBool	isVisible()

Returns TRUE if this component is mapped onto the screen. For a component to be visible, its window handle and the shell containing this window handle must be mapped (which is FALSE when the component is iconified).

Subclasses should call this routine before redrawing anything and in any sensor trigger methods. Calling this will check the current visibility (which is really cheap) and invoke the visibility changed callbacks if the state changes (see addVisibilityChangeCallback()).

HWND	getWidget() const

This returns the base window handle for this component. If the component created its own shell, this returns the topmost window handle beneath the shell. Call getShellWidget() to obtain the shell.

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

Returns TRUE if this component is a top level shell component (has its own window). Subclasses may use this to decide if they are allowed to resize themselves. Also method to return the shell window handle (NULL if the shell hasn't been created by this component).

HWND	getParentWidget() const

Return the parent window handle, be it a shell or not.

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Convenience routines on the window handle.

UINT *	getDisplay()

This method is included for portability only.

void	setTitle(const char *newTitle)

const char *	getTitle() const

The window title can be set for topLevelShell components or components which are directly under a shell window handle (i.e. components which have their own window).

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

These methods are included for portability only.

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL. A pointer to this class will be passed as the callback data.

Note: this callback is supplied because the user may wish to delete this component when it is closed.

static SoWinComponent *	getComponent(HWND w)

This returns the SoWinComponent for this window handle. If the window handle does not match that of any Open Inventor component, then NULL is returned.

const char *	getWidgetName() const

const char *	getClassName() const

Routines which return the window handle name and the class name. The window handle name is passed to the build method. The class name is predefined by each component.

EXAMPLE

This example shows how an Open Inventor component can be built inside a program using the Windows window handle set. The example uses the SoWinExaminerViewer window handle to view some simple geometry.

#include <Inventor/Win/SoWin.h>

#include <Inventor/nodes/SoCone.h>

#include <Inventor/Win/viewers/SoWinExaminerViewer.h>

void main(int, char **argv)

    // Initialize Inventor and Windows, which must be done

    // before any Inventor calls are made.

    HWND myWindow = SoWin::init(argv[0]);

    // create the viewer in the toplevel window

    // and set some scene to display

    SoWinExaminerViewer *myViewer = new SoWinExaminerViewer(myWindow);

    myViewer->setSceneGraph( new SoCone() );

    // manage and map window on screen

    myViewer->show();

    SoWin::show(myWindow); // calls Show()

    // Loop forever

    SoWin::mainLoop();

SEE ALSO

SoWin, SoWinRenderArea, SoWinViewer, SoWinMaterialEditor


SoWinConstrainedViewer

NAME

SoWinConstrainedViewer - base viewer class which adds camera constraints given a world up direction

INHERITS FROM

SoWinComponent > SoWinGLWidget > SoWinRenderArea > SoWinViewer > SoWinFullViewer > SoWinConstrainedViewer

SYNOPSIS

#include <Inventor/Win/viewers/SoWinConstrainedViewer.h>

Methods from class SoWinConstrainedViewer:

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Methods from class SoWinFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

HWND	getAppPushButtonParent() const

void	addAppPushButton(HWND newButton)

void	insertAppPushButton(HWND newButton,
int index)

void	removeAppPushButton(HWND oldButton)

int	findAppPushButton(HWND oldButton)

int	lengthAppPushButton()

HWND	getRenderAreaWidget()

Methods from class SoWinViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

void	setCursorStyle( SoWinViewer::CursorStyle style )	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

Methods from class SoWinRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This is a base class for the SoWinWalkViewer and SoWinFlyViewer component viewers. This class adds methods and convenience routines available to subclasses to constrain the camera given a world up direction. This prevents the camera from looking upside down. By default the +Y direction is used.

METHODS

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Specifies the upward direction of the viewer. This up direction is used by the viewers to constrain the camera when tilting up/down, and also used when rotating the camera right/left. The default is the +Y (0,1,0) direction.

SEE ALSO

SoWinFullViewer, SoWinViewer, SoWinComponent, SoWinRenderArea, SoWinWalkViewer, SoWinFlyViewer


SoWinDevice

NAME

SoWinDevice - abstract base class device for use with the SoWinRenderArea

INHERITS FROM

SoWinDevice

SYNOPSIS

#include <Inventor/Win/devices/SoWinDevice.h>

Methods from class SoWinDevice:

virtual void	enable(HWND w,
FARPROC f,
PVOID data,
HWND win = NULL)

virtual void	disable(HWND w,
FARPROC f,
PVOID data)

virtual const SoEvent *	translateEvent(MSG *xevent)

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

DESCRIPTION

This is the abstract base class for devices in the Open Inventor Windows component and utility library. When a device is registered with an SoWinRenderArea, the device is able to generate messages in the render area window.

METHODS

virtual void	enable(HWND w,
FARPROC f,
PVOID data,
HWND win = NULL)

virtual void	disable(HWND w,
FARPROC f,
PVOID data)

Enable and disable the device for the passed window handle. When enabled, the callback function f will be invoked when messages occur in the window. data is the clientData which will be passed.

virtual const SoEvent *	translateEvent(MSG *xevent)

This attempts to convert the passed message into an SoEvent. If the message was not generated by this device, then NULL is returned.

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

Set and get the size of the window this device is registered for. This allows the device to correctly convert position information from Windows coordinates (origin at top left) to Open Inventor window coordinates (origin at bottom left). (SoWinRenderArea will automatically call this method for each device registered on it whenever the window size changes.) Note: Setting the window size only affects the size as perceived by the device and not the actual window size.

SEE ALSO

SoWinMouse, SoWinKeyboard, SoWinRenderArea


SoWinDirectionalLightEditor

NAME

SoWinDirectionalLightEditor - component for editing directional lights

INHERITS FROM

SoWinComponent > SoWinDirectionalLightEditor

SYNOPSIS

#include <Inventor/Win/SoWinDirectionalLightEditor.h>

typedef void	SoWinDirectionalLightEditorCB(void *userData,
const SoDirectionalLight *light)

Methods from class SoWinDirectionalLightEditor:

SoWinDirectionalLightEditor(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinDirectionalLightEditor()

void	attach(SoPath *pathToLight)

void	detach()

SbBool	isAttached()

void	addLightChangedCallback(SoWinDirectionalLightEditorCB *f,
void *userData = NULL)

void	removeLightChangedCallback(SoWinDirectionalLightEditorCB *f,
void *userData = NULL)

void	setLight(const SoDirectionalLight &newLight)

const SoDirectionalLight &	getLight() const

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used to edit an SoDirectionalLight node (color, intensity, and direction are changed). In addition to directly editing directional light nodes, the editor can also be used with callbacks which will be called whenever the light is changed. The component consists of a render area and a value slider in the main window, with controls to display a color picker. In the render area there appears a sphere representing the world, and a directional light manipulator representing the direction of the light. Picking on the manipulator and moving the mouse provides direct manipulation of the light direction. The color picker is used to edit the color, and the value slider edits the intensity.

The editor can currently be attached to only one light at a time. Attaching to two different lights will automatically detach the first one before attaching the second.

METHODS

SoWinDirectionalLightEditor(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinDirectionalLightEditor()

Constructor and destructor.

void	attach(SoPath *pathToLight)

void	detach()

Attach/detach the editor to/from a directional light. When attached, changes made in the editor directly affect the attached light.

SbBool	isAttached()

Returns TRUE if the editor is attached.

void	addLightChangedCallback(SoWinDirectionalLightEditorCB *f,
void *userData = NULL)

void	removeLightChangedCallback(SoWinDirectionalLightEditorCB *f,
void *userData = NULL)

Additional way of using the directional light editor, by registering a callback and setting the light.

void	setLight(const SoDirectionalLight &newLight)

const SoDirectionalLight &	getLight() const

Set new light values, and get the current light values.

SEE ALSO

SoWinComponent, SoDirectionalLight


SoWinExaminerViewer

NAME

SoWinExaminerViewer - viewer component which uses a virtual trackball to view the data

INHERITS FROM

SoWinComponent > SoWinGLWidget > SoWinRenderArea > SoWinViewer > SoWinFullViewer > SoWinExaminerViewer

SYNOPSIS

#include <Inventor/Win/viewers/SoWinExaminerViewer.h>

Methods from class SoWinExaminerViewer:

SoWinExaminerViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinExaminerViewer()

void	setFeedbackVisibility(SbBool onOrOff)

SbBool	isFeedbackVisible() const

void	setFeedbackSize(int newSize)

int	getFeedbackSize() const

void	setAnimationEnabled(SbBool onOrOff)

SbBool	isAnimationEnabled()

void	stopAnimating()

SbBool	isAnimating()

Methods from class SoWinFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

HWND	getAppPushButtonParent() const

void	addAppPushButton(HWND newButton)

void	insertAppPushButton(HWND newButton,
int index)

void	removeAppPushButton(HWND oldButton)

int	findAppPushButton(HWND oldButton)

int	lengthAppPushButton()

HWND	getRenderAreaWidget()

Methods from class SoWinViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

void	setCursorStyle( SoWinViewer::CursorStyle style )	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

Methods from class SoWinRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The Examiner viewer component allows you to rotate the view around a point of interest using a virtual trackball. The viewer uses the camera focalDistance field to figure out the point of rotation, which is usually set to be at the center of the scene. In addition to allowing you to rotate the camera around the point of interest, this viewer also allows you to translate the camera in the viewer plane, as well as dolly (move forward and backward) to get closer to or further away from the point of interest. The viewer also supports seek to quickly move the camera to a desired object or point.

METHODS

SoWinExaminerViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinExaminerViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoWinViewer reference page for a description of the viewer types.

void	setFeedbackVisibility(SbBool onOrOff)

SbBool	isFeedbackVisible() const

Show/Hide the point of rotation feedback, which only appears while in viewing mode (default in off).

void	setFeedbackSize(int newSize)

int	getFeedbackSize() const

Set/get the point of rotation feedback size in pixels (default 20 pix).

void	setAnimationEnabled(SbBool onOrOff)

SbBool	isAnimationEnabled()

Enable/disable the spinning animation feature of the viewer (enabled by default).

void	stopAnimating()

SbBool	isAnimating()

Stop animation, if it is occurring, and query if the viewer is currently animating.

USAGE

(For 3-button mouse only.)

Left Mouse: Rotate the virtual trackball.

Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left, right.

Ctrl + Middle Mouse or
Left + Middle Mouse: Dolly in and out (gets closer to and further away from the object).

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

Right Mouse: Open the popup menu.

ALT: (Win32) When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

Examiner Viewer (illustration and additional info on mouse buttons), SoWinFullViewer, SoWinViewer, SoWinComponent, SoWinRenderArea, SoWinWalkViewer, SoWinFlyViewer, SoWinPlaneViewer


SoWinFlyViewer

NAME

SoWinFlyViewer - viewer component for flying through space, with a constant world up

INHERITS FROM

SoWinComponent > SoWinGLWidget > SoWinRenderArea > SoWinViewer > SoWinFullViewer > SoWinConstrainedViewer > SoWinFlyViewer

SYNOPSIS

#include <Inventor/Win/viewers/SoWinFlyViewer.h>

Methods from class SoWinFlyViewer:

SoWinFlyViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinFlyViewer()

Methods from class SoWinConstrainedViewer:

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Methods from class SoWinFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

HWND	getAppPushButtonParent() const

void	addAppPushButton(HWND newButton)

void	insertAppPushButton(HWND newButton,
int index)

void	removeAppPushButton(HWND oldButton)

int	findAppPushButton(HWND oldButton)

int	lengthAppPushButton()

HWND	getRenderAreaWidget()

Methods from class SoWinViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

void	setCursorStyle( SoWinViewer::CursorStyle style )	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

Methods from class SoWinRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

Fly Viewer - this viewer is intended to simulate flight through space, with a constant world up direction. The viewer only constrains the camera to keep the user from flying upside down. No mouse buttons need to be pressed in order to fly. The mouse position is used only for steering, while mouse clicks are used to increase or decrease the viewer speed.

The viewer allows you to tilt your head up/down/right/left and move in the direction you are looking (forward or backward). The viewer also supports seek to quickly move the camera to a desired object or point.

METHODS

SoWinFlyViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinFlyViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoWinViewer reference page for a description of the viewer types.

USAGE

(For 3-button mouse only.)

Left Mouse: Click to increase speed.

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

<u> + Left Mouse: Press (but do not hold down) the <u> key, then click on a target object to set the "up" direction to the surface normal. By default +y is the "up" direction.

Middle Mouse: Click to decrease speed.

Left and Middle Mouse: Click both simultaneously to stop.

Ctrl: Hold the key down to temporarily stop and rotate the viewpoint.

Right Mouse: Open the popup menu.

ALT: (Win32) When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

Fly Viewer (illustration and additional info on mouse buttons), SoWinFullViewer, SoWinViewer, SoWinComponent, SoWinRenderArea, SoWinWalkViewer, SoWinExaminerViewer, SoWinPlaneViewer


SoWinFullViewer

NAME

SoWinFullViewer - base viewer class which adds a decoration around the rendering area

INHERITS FROM

SoWinComponent > SoWinGLWidget > SoWinRenderArea > SoWinViewer > SoWinFullViewer

SYNOPSIS

#include <Inventor/Win/viewers/SoWinFullViewer.h>

enum BuildFlag	{
SoWinFullViewer::BUILD_NONE
Doesn't build anything extra
SoWinFullViewer::BUILD_DECORATION
Build the decoration only
SoWinFullViewer::BUILD_POPUP
Build the popup menu only
SoWinFullViewer::BUILD_ALL
Build everything by default
}

Methods from class SoWinFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

HWND	getAppPushButtonParent() const

void	addAppPushButton(HWND newButton)

void	insertAppPushButton(HWND newButton,
int index)

void	removeAppPushButton(HWND oldButton)

int	findAppPushButton(HWND oldButton)

int	lengthAppPushButton()

HWND	getRenderAreaWidget()

Methods from class SoWinViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

void	setCursorStyle( SoWinViewer::CursorStyle style )	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

Methods from class SoWinRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This is a base class used by all viewer components. The class adds a decoration around the rendering area which includes thumb wheels, a zoom slider and push buttons. This base class also includes a viewer popup menu and a preference sheet with generic viewing functions. The constructors for the various subclasses of SoWinFullViewer provide a flag for specifying whether the decoration and popup menus should be built.

METHODS

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

Show/hide the viewer component trim (default on). See the viewer constructor to prevent the decoration from being built.

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Enable/disable the viewer popup menu (default enabled). See the viewer constructor to prevent the popup menu from being built.

HWND	getAppPushButtonParent() const

void	addAppPushButton(HWND newButton)

void	insertAppPushButton(HWND newButton,
int index)

void	removeAppPushButton(HWND oldButton)

int	findAppPushButton(HWND oldButton)

int	lengthAppPushButton()

Add/remove push buttons for the application, which will be placed in the left hand side decoration trim. Adding buttons appends them to the end of the list, while inserting them places them at the desired index

Note: The button bitmaps should be 24-by-24 pixels to fit nicely into the decoration trim like the other viewer buttons.

HWND	getRenderAreaWidget()

Returns the render area window handle.

SEE ALSO

SoWinViewer, SoWinComponent, SoWinRenderArea, SoWinExaminerViewer, SoWinWalkViewer, SoWinFlyViewer, SoWinPlaneViewer


SoWinGLWidget

NAME

SoWinGLWidget -component for OpenGL rendering

INHERITS FROM

SoWinComponent > SoWinGLWidget

SYNOPSIS

#include <Inventor/Win/SoWinGLWidget.h>

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This abstract base class provides a C++ wrapper around an OpenGL drawing window. It allows OpenGL rendering to be performed within a Windows window and is used by the SoWinRenderArea. SoWinGLWidget uses a parent window with two separate OpenGL windows (one for single buffering and one for double buffering), with routines to return the appropriate windows.

Subclasses only need to redefine the redraw() routine for rendering and processEvent() routine if they are interested in receiving Windows messages.

METHODS

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

These methods are included for portability only.

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Routine which dynamically changes between single and double buffering. Default is double buffer off. (The SoWinRenderArea subclass makes it double buffer by default.)

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Set/query drawing to the front buffer. Controls drawing to the front buffer when an obscured portion of the window is exposed. Default: FALSE.

HWND	getNormalWindow()

HWND	getOverlayWindow()	[See Note2]

HGLRC	getNormalContext()

HGLRC	getOverlayContext()	[See Note2]

HWND	getNormalWidget()

HWND	getOverlayWidget()	[See Note2]

Get the current normal and overlay GL windows, contexts and window handles, which are needed as arguments to wglMakeCurrent() when doing drawing in the normal or overlay planes.

Note1: These should not be cached by users because they will change as single/double buffering changes.

Note2: Overlay planes are supported only if the graphics board supports overlay planes.

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)	[See Note]

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()	[See Note]

Specify exactly what the pixel format descriptor should be for the normal and overlay window. This allows the user to create all possible pixel format descriptors supported by OpenGL. The PIXELFORMATDESCRIPTOR structure should be a valid OpenGL pixel format descriptor returned by ChoosePixelFormat(). (The methods for setting the pixel format descriptor are virtual so that derived classes can know when the pixel format descriptor is changing.)

Note: Overlay planes are supported only if the graphics board supports overlay planes.

void	setCursor(Cursor newCursor)

Cursor	getCursor()

Set/get the current cursor. If you are using a viewer class, the viewer will automatically change the cursor depending on the viewer mode. These changes will override the cursor set with this method unless you also call SoWinViewer::setCursorEnabled(FALSE).

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

Returns the current device context (which we need for wglMakeCurrent).

void	setStealFocus(SbBool onOrOff) [Win32 only]

By default the GLWidget "steals" focus whenever the cursor moves over it. This roughly simulates the UNIX/X "focusFollowsCursor" behavior (which has no equivalent in Win32) and allows the Ctrl and Shift keys to be detected for 1-button mouse behaviors. Sometimes you want to this off however, like when you're typing in the zoom field.

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Set/get the current pixel format. These methods allow an application to set/query a pixel format that has extended attributes that can't be specified in a PFD struct. The specified format must support OpenGL and drawing to a window. There are not separate methods for normal and overlay windows because the overlay is not a separate window on Win32 computers.

You can also use environment variable OIV_FORCE_PIXEL_FORMAT to request a pixel format.

SEE ALSO

SoWinComponent, SoWinRenderArea


SoWinKeyboard

NAME

SoWinKeyboard - translates and reports messages for the keyboard

INHERITS FROM

SoWinDevice > SoWinKeyboard

SYNOPSIS

#include <Inventor/Win/devices/SoWinKeyboard.h>

#define SO_WIN_ALL_KEYBOARD_EVENTS (KeyPressMask | KeyReleaseMask)

Methods from class SoWinKeyboard:

SoWinKeyboard(UINT mask = SO_WIN_ALL_KEYBOARD_EVENTS)

~SoWinKeyboard()

Methods from class SoWinDevice:

virtual void	enable(HWND w,
FARPROC f,
PVOID data,
HWND win = NULL)

virtual void	disable(HWND w,
FARPROC f,
PVOID data)

virtual const SoEvent *	translateEvent(MSG *xevent)

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

DESCRIPTION

This class manages messages generated by the keyboard, including key press and release messages (SoKeyboardEvent).

METHODS

SoWinKeyboard(UINT mask = SO_WIN_ALL_KEYBOARD_EVENTS)

~SoWinKeyboard()

Constructor and destructor. To the constructor, pass which keyboard messages you are interested in as a bitwise OR of the following values:

KeyPressMask - Key press messages

KeyReleaseMask - Key release messages

Or simply pass the defined value SO_WIN_ALL_KEYBOARD_EVENTS for all keyboard messages. The device will only report messages of this type for the window handle it is enabled on.

SEE ALSO

SoWinDevice, SoKeyboardEvent


SoWinMaterialEditor

NAME

SoWinMaterialEditor - component which lets you edit a material interactively

INHERITS FROM

SoWinComponent > SoWinMaterialEditor

SYNOPSIS

#include <Inventor/Win/SoWinMaterialEditor.h>

typedef void	SoWinMaterialEditorCB(void *userData,
const SoMaterial *mtl)

enum UpdateFrequency	{
SoWinMaterialEditor::CONTINUOUS
Send updates with every mouse motion
SoWinMaterialEditor::AFTER_ACCEPT
Only send updates after user hits accept button
}

Methods from class SoWinMaterialEditor:

SoWinMaterialEditor(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinMaterialEditor()

void	attach(SoMaterial *material,
int index = 0)

void	attach(SoVRMLMaterial *material)

void	detach()

SbBool	isAttached()

void	addMaterialChangedCallback(SoWinMaterialEditorCB *f,
void *userData = NULL)

void	removeMaterialChangedCallback(SoWinMaterialEditorCB *f,
void *userData = NULL)

void	setUpdateFrequency(SoWinMaterialEditor::UpdateFrequency freq)

SoWinMaterialEditor::UpdateFrequency	getUpdateFrequency()

void	setMaterial(const SoMaterial &mtl)

void	setMaterial(const SoVRMLMaterial &mtl)

const SoMaterial &	getMaterial() const

SbBool	isAttachedVRML()

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used to edit the material properties of an SoMaterial node. The editor can also directly be used using callbacks instead of attaching it to a node. The component consists of a render area displaying a test sphere, some sliders, a set of radio buttons, and a menu. The sphere displays the current material being edited. There is one slider for each material coefficient. Those fields are ambient, diffuse, specular, emissive (all of which are colors); and transparency and shininess (which are scalar values). A color editor can be opened to edit the color slider base color. A material list displays palettes of predefined materials from which to choose.

The editor can currently be attached to only one material at a time. Attaching two different materials will automatically detach the first one before attaching the second.

METHODS

SoWinMaterialEditor(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinMaterialEditor()

Constructor and destructor.

void	attach(SoMaterial *material,
int index = 0)

void	attach(SoVRMLMaterial *material)

void	detach()

Attach/detach the editor to a material node and edit the material of the given index.

SbBool	isAttached()

Returns TRUE if the editor is attached.

SbBool	isAttachedVRML()

Returns TRUE if the attached material node a VRML material. Not meaningful if the editor is not currently attached.

void	addMaterialChangedCallback(SoWinMaterialEditorCB *f,
void *userData = NULL)

void	removeMaterialChangedCallback(SoWinMaterialEditorCB *f,
void *userData = NULL)

Additional way of using the material editor, by registering a callback which will be called whenever the material changes (check the UpdateFrequency to find when the callbacks will be called).

void	setUpdateFrequency(SoWinMaterialEditor::UpdateFrequency freq)

SoWinMaterialEditor::UpdateFrequency	getUpdateFrequency()

Sets/gets the update frequency. See the UpdateFrequency enum declaration.

void	setMaterial(const SoMaterial &mtl)

void	setMaterial(const SoVRMLMaterial &mtl)

const SoMaterial &	getMaterial() const

Set a new material value, and get the current material value.

SbBool	isAttachedVRML()

Is attached material a VRML material?

SEE ALSO

SoWinComponent, SoWinDirectionalLightEditor, SoMaterial


SoWinMouse

NAME

SoWinMouse - translates and reports messages for the mouse

INHERITS FROM

SoWinDevice > SoWinMouse

SYNOPSIS

#include <Inventor/Win/devices/SoWinMouse.h>

#define SO_WIN_ALL_MOUSE_EVENTS    (ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask)

Methods from class SoWinMouse:

SoWinMouse(UINT mask = SO_WIN_ALL_MOUSE_EVENTS)

~SoWinMouse()

Methods from class SoWinDevice:

virtual void	enable(HWND w,
FARPROC f,
PVOID data,
HWND win = NULL)

virtual void	disable(HWND w,
FARPROC f,
PVOID data)

virtual const SoEvent *	translateEvent(MSG *xevent)

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

DESCRIPTION

This class manages messages generated by the mouse, including mouse motion (SoLocation2Event), and mouse button press and release messages (SoMouseButtonEvent).

METHODS

SoWinMouse(UINT mask = SO_WIN_ALL_MOUSE_EVENTS)

~SoWinMouse()

Constructor and destructor. To the constructor, pass which mouse messages you are interested in as a bitwise OR of the following values:

ButtonPressMask - Mouse down messages

ButtonReleaseMask - Mouse up messages

PointerMotionMask - Mouse motion with no buttons

ButtonMotionMask - Mouse motion with buttons pressed

Or simply pass the defined value SO_WIN_ALL_MOUSE_EVENTS for all mouse messages. The device will only report messages of this type for the window it is enabled on.

SEE ALSO

SoWinDevice, SoLocation2Event, SoMouseButtonEvent


SoWinPlaneViewer

NAME

SoWinPlaneViewer - viewer component which moves the camera in a plane

INHERITS FROM

SoWinComponent > SoWinGLWidget > SoWinRenderArea > SoWinViewer > SoWinFullViewer > SoWinPlaneViewer

SYNOPSIS

#include <Inventor/Win/viewers/SoWinPlaneViewer.h>

Methods from class SoWinPlaneViewer:

SoWinPlaneViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinPlaneViewer()

Methods from class SoWinFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

HWND	getAppPushButtonParent() const

void	addAppPushButton(HWND newButton)

void	insertAppPushButton(HWND newButton,
int index)

void	removeAppPushButton(HWND oldButton)

int	findAppPushButton(HWND oldButton)

int	lengthAppPushButton()

HWND	getRenderAreaWidget()

Methods from class SoWinViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

void	setCursorStyle( SoWinViewer::CursorStyle style )	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

Methods from class SoWinRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The Plane viewer component allows the user to translate the camera in the viewing plane, as well as dolly (move foward/backward) and zoom in and out. The viewer also allows the user to roll the camera (rotate around the forward direction) and seek to objects which will specify a new viewing plane. This viewer could be used for modeling, in drafting, and architectural work. The camera can be aligned to the X, Y or Z axes.

METHODS

SoWinPlaneViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinPlaneViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoWinViewer reference pages for a description of the viewer types.

USAGE

(For 3-button mouse only.)

Left Mouse or
Left + Middle Mouse: Dolly in and out (gets closer to and further away from the object).

Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left and right.

Ctrl + Middle Mouse: Used for roll action (rotates around the viewer forward direction).

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

Right Mouse: Open the popup menu.

ALT: (Win32) When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

Plane Viewer (illustration and additional info about mouse buttons), SoWinFullViewer, SoWinViewer, SoWinComponent, SoWinRenderArea, SoWinWalkViewer, SoWinExaminerViewer, SoWinFlyViewer


SoWinRenderArea

NAME

SoWinRenderArea - component for rendering Open Inventor scene graphs

INHERITS FROM

SoWinComponent > SoWinGLWidget > SoWinRenderArea

SYNOPSIS

#include <Inventor/Win/SoWinRenderArea.h>

typedef SbBool	SoWinRenderAreaEventCB(void *userData,
MSG *anyevent)

Methods from class SoWinRenderArea:

SoWinRenderArea(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SbBool getMouseInput = TRUE,
SbBool getKeyboardInput = TRUE)

~SoWinRenderArea()

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class provides Open Inventor rendering and message handling inside a Windows window. There is a routine to specify the scene to render. The scene is automatically rendered whenever anything under it changes (a data sensor is attached to the root of the scene), unless explicitly told not to do so (manual redraws). Users can also set Open Inventor rendering attributes such as the transparency type, antialiasing on or off, etc. This class employs an SoSceneManager to manage rendering and message handling.

Windows messages that occur in the render area can be handled by the application, by the viewer (if this is really a viewer), or by the nodes in the scene graph. When a message occurs, it is first passed to the application message callback function registered with the setEventCallback() method on SoWinRenderArea. If this function does not exist or returns FALSE, the message is either used directly by the viewer or translated to an SoEvent for further scene graph processing. If the viewer does not handle the message, and an overlay scene graph exists, the SoEvent is sent to that scene graph by way of an SoHandleEventAction. If no node in the overlay scene graph handles the message (i.e., calls setHandled() on the SoHandleEventAction), the SoEvent is passed to the normal scene graph in the same manner.

METHODS

SoWinRenderArea(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SbBool getMouseInput = TRUE,
SbBool getKeyboardInput = TRUE)

~SoWinRenderArea()

Constructor which is passed arguments which tell it whether to register the mouse and keyboard devices by default (SoWinMouse and SoWinKeyboard). NOTE: On Win32, the buildInsideParent flag must be TRUE.

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

Set/get the scene graph to be rendered in this component's window.

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

Set/get the scene graph to be rendered in the overlay plane. NOTE: This feature requires a graphics board that supports an overlay plane.

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

Register/unregister interest in devices. When a device is registered, messages from that device will be processed by the render area, and passed into the scene graph. Messages from unregistered devices will be ignored.

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

Set/get the background color for this window. Default is black (0,0,0).

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

Sets/gets the window background color when in color index mode. Default is black (index 0)).

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

Sets/gets the overlay window background color index. Default is 0 (clear color)).

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

Sets the colors to use when displaying in color index mode. This will load the color map with the given colors at the starting index.

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

Sets the colors to use for overlay bit planes.This will load the color map with the given colors at the starting index.

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Sets/gets current viewport region to use for rendering

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

Set/get the quality level for rendering transparent objects. See SoGLRenderAction for possible transparency types.

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

Set/get the antialiasing for rendering. There are two kinds of antialiasing available: smoothing and multipass antialiasing. If smoothing is set to TRUE, smoothing is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. The value of numPasses controls multipass antialiasing. Each time a render action is applied, Open Inventor renders the scene numPasses times from slightly different camera positions, averaging the results. numPasses can be from one to 255, inclusive. Setting numPasses to one disables multipass antialiasing. You can use either, both, or neither of these antialiasing techniques. By default, both smoothing and multipass antialiasing are disabled.

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

Enable/prevent window clearing from happening before a rendering starts (default is clear TRUE). This can be useful to limit flickering when doing single buffering and geometry covers the entire window (used in the material editor). Can also control whether the depth buffer (sometimes called the Z buffer) is cleared before rendering.

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

Enable/prevent overlay window clearing from happening before a rendering starts (default is clear TRUE).

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

The render area will automatically redraw whenever something in the scene graph changes. Passing FALSE will disable this feature.

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

Sets/gets the priority of the redraw sensor and get the default priority number.

void	render()

void	renderOverlay()

Calling this forces the render area to be redrawn now. It is not necessary to call this method if auto redraw is enabled (which is the default).

void	scheduleRedraw()

void	scheduleOverlayRedraw()

Schedule a redraw to happen sometime soon (as opposed to immediately). This can be used to compress multiple redraws.

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

Call this convenience method to have this render area redraw whenever the selection list changes in the passed node. This is useful if using a highlight render action like the SoBoxHighlightRenderAction to correctly render whenever the selection changes. Pass NULL to turn this off.

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

Windows messages which occur in the render area window are either directly handled by the viewer (when this is really a viewer) or automatically translated to SoEvents, then passed into the scene graph (via the SoHandleEventAction) so that live scene graph objects can handle the message (when viewers are not in viewing mode). This method allows the application to register a callback for handling messages that occur in the window, instead of sending them to the viewers or down the graph. The callback is passed the Windows message, and should return TRUE if it handled the message. If the callback returns FALSE, then the message will be handled by the render area.

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

Sets/gets the GL render action to use. This is used to set selection highlighting with the SoBoxHighlightRenderAction and SoLineHighlightRenderAction classes.

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

Sets/gets the GL render action for the overlay window.

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Sets/gets the normal and overlay plane scene managers.

Note: for convenience most of the SoSceneManager methods have already been added to this class.

SEE ALSO

SoWinGLWidget, SoWinComponent, SoWinViewer, SoSceneManager, SoBoxHighlightRenderAction, SoLineHighlightRenderAction


SoWinSpaceball

NAME

SoWinSpaceball - translates and reports events for a spaceball or SpaceMouse (Magellan) device

INHERITS FROM

SoWinDevice > SoWinSpaceball

SYNOPSIS

#include <Inventor/Win/devices/SoWinSpaceball.h>

enum Mask	{
Event mask values: Bitwise OR these to specify which events this device should queue.
SoWinSpaceball::MOTION,
Spaceball translation and rotation
SoWinSpaceball::PRESS,
Spaceball button press
SoWinSpaceball::RELEASE,
Spaceball button release
SoWinSpaceball::ALL
All spaceball events
}

SoWinSpaceball(Mask mask = ALL)

~SoWinSpaceball()

virtual void	enable(Widget w, XtEventHandler f,
XtPointer data, Window win = NULL)

virtual void	disable(Widget w, XtEventHandler f, XtPointer data)

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

void	setRotationScaleFactor(float f)

float	getRotationScaleFactor() const

void	setTranslationScaleFactor(float f)

float	getTranslationScaleFactor() const

static SbBool	exists()

void	setFocusToWindow(SbBool flag)

SbBool	isFocusToWindow() const

DESCRIPTION

This class manages events generated by the spaceball, including spaceball motion (SoMotion3Event), and spaceball button press and release events (SoSpaceballButtonEvent).

METHODS

SoWinSpaceball(Mask mask = ALL)

~SoWinSpaceball()

Constructor and destructor.

virtual void	enable(Widget w, XtEventHandler f,
XtPointer data, Window win = NULL)

virtual void	disable(Widget w, XtEventHandler f, XtPointer data)

These functions will enable/disable this device for the passed widget.The callback function f will be invoked when events occur in w. Data is the clientData which will be passed.

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

This converts a system event into an SoEvent, returning NULL if the event is not from this device.

void	setRotationScaleFactor(float f)

float	getRotationScaleFactor() const

void	setTranslationScaleFactor(float f)

float	getTranslationScaleFactor() const

The spaceball reports rotations and translations as integers. These values must be scaled to be useful. these methods allow the scale values to be set. Default values are .006 for translation and .006 for scale.

static SbBool	exists()

Return whether or not the spaceball device exists for use.

void	setFocusToWindow(SbBool flag)

SbBool	isFocusToWindow() const

Win32 does not support focus change. These methods are provided for source compatibility.


SoWinWalkViewer

NAME

SoWinWalkViewer - viewer component which moves the camera in a plane

INHERITS FROM

SoWinComponent > SoWinGLWidget > SoWinRenderArea > SoWinViewer > SoWinFullViewer > SoWinConstrainedViewer > SoWinWalkViewer

SYNOPSIS

#include <Inventor/Win/viewers/SoWinWalkViewer.h>

Methods from class SoWinWalkViewer:

SoWinWalkViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinWalkViewer()

Methods from class SoWinConstrainedViewer:

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Methods from class SoWinFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

HWND	getAppPushButtonParent() const

void	addAppPushButton(HWND newButton)

void	insertAppPushButton(HWND newButton,
int index)

void	removeAppPushButton(HWND oldButton)

int	findAppPushButton(HWND oldButton)

int	lengthAppPushButton()

HWND	getRenderAreaWidget()

Methods from class SoWinViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

void	setCursorStyle( SoWinViewer::CursorStyle style )	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

Methods from class SoWinRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The paradigm for this viewer is a walk-through of an architectural model. Its primary behavior is forward, backward, and left/right turning motion while maintaining a constant "eye level". It is also possible to stop and look around at the scene. The eye level plane can be disabled, allowing the viewer to proceed in the "look at" direction, as if on an escalator. The eye level plane can also be translated up and down - similar to an elevator.

METHODS

SoWinWalkViewer(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoWinFullViewer::BuildFlag flag = BUILD_ALL,
SoWinViewer::Type type = BROWSER)

~SoWinWalkViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoWinViewer reference pages for a description of the viewer types.

USAGE

(For 3-button mouse only.)

Left Mouse: Walk mode. Click down and move up and down for fowards and backwards motion. Move right and left for turning. Speed increases exponentially with the distance from the mouse-down origin.

Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left, and right.

Ctrl + Middle Mouse: Tilt the camera up/down and right/left. This allows you to look around while stopped.

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

<u> + Left Mouse: Press (but do not hold down) the <u> key, then click on a target object to set the "up" direction to the surface normal. By default +y is the "up" direction.

Right Mouse: Open the popup menu.

ALT: (Win32) When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

SoWinFullViewer, SoWinViewer, SoWinComponent, SoWinRenderArea, SoWinPlaneViewer, SoWinExaminerViewer, SoWinFlyViewer, Walk Viewer (illustration and additional info on mouse buttons)


SoWrapperKit

NAME

SoWrapperKit - wrapper nodekit class

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoSeparatorKit > SoWrapperKit

SYNOPSIS

#include <Inventor/nodekits/SoWrapperKit.h>

Fields from class SoSeparatorKit:

SoSFEnum	renderCaching

SoSFEnum	boundingBoxCaching

SoSFEnum	renderCulling

SoSFEnum	pickCulling

Parts from class SoWrapperKit:

(SoTransform)	localTransform

(SoSeparator)	contents

Parts from class SoSeparatorKit:

(SoPickStyle)	pickStyle

(SoAppearanceKit)	appearance

(SoUnits)	units

(SoTransform)	transform

(SoTexture2Transform)	texture2Transform

(SoNodeKitListPart)	childList

Parts from class SoBaseKit:

(SoNodeKitListPart)	callbackList

Methods from class SoWrapperKit:

SoWrapperKit()

static const SoNodekitCatalog *	getClassNodekitCatalog() const

static SoType	getClassTypeId()

Methods from class SoBaseKit:

virtual const SoNodekitCatalog *	getNodekitCatalog() const

virtual SoNode *	getPart(const SbName &partName,
SbBool makeIfNeeded)

SbString	getPartString(const SoBase *part)

virtual SoNodeKitPath *	createPathToPart(const SbName &partName,
SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)

virtual SbBool	setPart(const SbName &partName,
SoNode *newPart)

SbBool	set(char *partName,
char *parameters)

SbBool	set(char *nameValuePairs)

static SbBool	isSearchingChildren()

static void	setSearchingChildren(SbBool newVal)

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

Macros from class SoBaseKit:

SO_GET_PART(kit, partName, partClass)

SO_CHECK_PART(kit, partName, partClass)

DESCRIPTION

SoWrapperKit is derived from SoSeparatorKit. It adds the capability to wrap an arbitrary scene graph, (non-nodekit), within an SoSeparatorKit, so that it may be used along with other shape kits in a hierarchy. There are two additional parts included in SoWrapperKit: localTransform and contents.

The part contents is an SoSeparator node beneath which any arbitrary scene graph can be added. This is especially useful for importing scene graphs of unknown structure (non-nodekits) into nodekit format.

Since an SoWrapperKit is a class descended from SoSeparatorKit, it may be put into another SoSeparatorKit's childList.

PARTS

(SoTransform)	localTransform

This part is an SoTransform node that is used to affect the scene graph defined in contents part. This part is NULL by default and is automatically created if requested.

(SoSeparator)	contents

This part is an SoSeparator node that contains a user-supplied scene graph. This scene graph can contain any nodes. This part is NULL by default and an SoSeparator is automatically created if the user asks the nodekit to build the part.

METHODS

SoWrapperKit()

Constructor.

static const SoNodekitCatalog *	getClassNodekitCatalog() const

Returns an SoNodekitCatalog for the class SoWrapperKit.

static SoType	getClassTypeId()

Returns type identifier for this class.

CATALOG PARTS

All Parts

		Default	NULL
Part Name	Part Type	Type	Default
callbackList	NodeKitListPart	--	yes
pickStyle	PickStyle	--	yes
appearance	AppearanceKit	--	yes
units	Units	--	yes
transform	Transform	--	yes
texture2Transform	Texture2Transform	--	yes
childList	NodeKitListPart	--	yes
localTransform	Transform	--	yes
contents	Separator	--	yes
Extra Information for List Parts from Above Table

Part Name	Container Type	Possible Types
callbackList	Separator	Callback, EventCallback

FILE FORMAT/DEFAULT

WrapperKit {

renderCaching	AUTO

boundingBoxCaching	AUTO

renderCulling	AUTO

pickCulling	AUTO

callbackList	NULL

pickStyle	NULL

appearance	NULL

units	NULL

transform	NULL

texture2Transform	NULL

childList	NULL

localTransform	NULL

contents	NULL

}

SEE ALSO

SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit


SoWriteAction

NAME

SoWriteAction - writes a scene graph to a file

INHERITS FROM

SoAction > SoWriteAction

SYNOPSIS

#include <Inventor/actions/SoWriteAction.h>

Methods from class SoWriteAction:

SoWriteAction()

SoWriteAction(SoOutput *out)

SoOutput *	getOutput() const

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class is used for writing scene graphs to files. It contains an SoOutput instance that by default writes to the standard output. Methods on the SoOutput can be called to specify what file or memory buffer to write to.

METHODS

SoWriteAction()

Constructor.

SoWriteAction(SoOutput *out)

Constructor that takes an SoOutput to use for output.

SoOutput *	getOutput() const

Returns pointer to SoOutput instance in action.

SEE ALSO

SoOutput


Win32 Features

The TGS implementation of Open Inventor for Windows contains a number of innovations specific to the Windows environment. These are in addition to the functionality of the UNIX Open Inventor toolkit, which is provided in its entirety, to allow porting of applications from one environment to the other. Unique features of our Open Inventor for Windows include:

•	SoWin Component Classes
A "class for class" equivalent for the SoXt X Windows Component library, adapted for the unique requirements and facilities of the Windows environment. Just like SoXt, SoWin classes include an OpenGL drawing area, an Open Inventor RenderArea which manages a scene graph, and Open Inventor viewers which add lights, cameras and interactivity to a scene. SoWin classes can be used within any application framework (see IVF).

•	SoXt Wrapper Classes
A set of classes which, as much as possible, exactly mimic the SoXt classes and are based upon the SoWin Windows classes. These SoXt wrapper classes provide true portability for Open Inventor programs which do not make direct calls to Window System functions (i.e., Windows, Xlib, Xt, Motif, etc.). For example, almost all of the standard Inventor Mentor C++ example programs run with essentially no change in the Windows environment.

•	Extensions to Mouse Button Definitions for Viewers
Mouse buttons have predefined meanings in each of the standard Open Inventor viewers (Examiner, Walk, Fly, etc). The standard definitions for X Windows assume a 3-button mouse. These definitions are still supported under Windows, but have been extended to accommodate the use of a one- or two-button mouse. As a general rule, Shift-Left Button is a substitute for the middle mouse button in the standard Open Inventor viewers. (Note, however, that SoWinRenderArea does not convert Shift-Left in either the raw event callback or the SoEvent handling.).

•	IVF Classes
A set of classes which integrate Open Inventor with the Microsoft Foundation Classes (MFC) application development framework. IVF classes are based upon the SoWin component classes but shield the application from this level of detail. IVF classes also handle much of the complexity of when and where to do various operations within the MFC framework.

•	IVF AppWizard
A utility similar to the Microsoft "AppWizard", which is used within the Visual C++ environment to build an initial framework for an Open Inventor MFC application. After creating an initial application with the MFC AppWizard, the IVF AppWizard will add the necessary IVF classes. Applications can be created with a simple RenderArea or any of the standard Open Inventor viewers - walk, examiner, and fly-through - including a fully functional SceneViewer. A SceneViewer application is capable of selecting objects in the scene, attaching manipulators, editing colors and materials, and many other operations.


Technical Support

If You Have a Question...

Questions should be directed to your local site coordinator or hotline contact.

If your hotline contact needs to communicate with TGS, he or she may contact the product hotline for assistance.

Contacting the Hotline

If you are the site coordinator or hotline contact, and your site has a paid-up software support service agreement, you may contact the product hotline using the ways listed below. Please have your customer ID number ready to give the TGS hotline analyst; please include it on all correspondence.

E-mail

hotline@tgs.com (US, international other than Europe)

hotline@europe.tgs.com (Europe)

This is the preferred method of communication, especially if test programs need to be sent.

Phone

800-428-7588 (US domestic only)

(33) 5 56 13 37 70 (Europe)

858-457-5359 (International other than Europe)

Fax

858-452-2547 (US, international other than Europe)

(33) 5 56 13 02 10 (Europe)

Mail

Template Graphics Software

5330 Carroll Canyon Road

Suite 201

San Diego, CA 92121

USA

Attn: Hotline


Tools
Tools (SDK Only)

ivcat	Concatenates and converts Open Inventor files
ivfix	Restructures an Open Inventor object for improved rendering performance
ivinfo	Prints information about Open Inventor files
ivperf	Reads an Open Inventor scene graph and analyzes its rendering performance
ivtovrml	Converts a .iv file to VRML 1.0 (or 2.0) format
vrmllint	Checks a VRML 1.0 file for validity


VRML

Introduction

VRML (Virtual Reality Modeling Language) is the file format adopted by the Internet community for 3D geometry data on the World Wide Web. Both individual objects and complete scenes can be defined with VRML. Most of the VRML format is taken directly from the Open Inventor file format and Open Inventor nodes may be mixed with VRML nodes.

•	Release 2.0.2 of Open Inventor from TGS supports the unique VRML1.0 nodes as native Open Inventor nodes.

•	Release 2.4 (and higher) of Open Inventor from TGS supports the VRML 2.0 nodes as well.

This makes Open Inventor the most powerful tool available for building applications that utilize VRML and 3D on the Internet.


VRML 1.0

VRML 1.0 Nodes

The following VRML 1.0 nodes are supported:

SoAsciiText	Simple 3D text shape node
SoFontStyle	Simple 3D text style node
SoLOD	Distance-based level-of-detail switching group node
SoWWWAnchor	Separator group node with a URL hyperlink
SoWWWInLine	Node that refers to children through a URL
Reading .wrl Files

The new nodes listed above allow you to read .wrl files into Open Inventor applications.

Writing .wrl Files

To have Open Inventor write a VRML 1.0 file, set the file header to the standard VRML 1.0 header, i.e., "#VRML V1.0 ascii" using the setHeaderString method on SoOutput. NOTE: Setting the file header to the VRML 1.0 file header does not cause Open Inventor to convert non-VRML 1.0 nodes into VRML 1.0 nodes. If you need to convert nodes to VRML 1.0, use SoToVRMLAction or the utility program ivtovrml .

Tools

We provide the following tools for handling .wrl files:

vrmllint	Checks a VRML 1.0 file for validity

ivtovrml	Converts a .iv file to VRML 1.0 (or 2.0) format


VRML 2.0

VRML 2.0 Nodes

The following VRML 2.0 nodes are supported. For additional information, see the end of this topic.

Action not implemented for this node.

Action partially implemented for this node.

SoVRMLAnchor	Group node with URL hyperlink
SoVRMLAppearance	Specifies a material node and texture node
SoVRMLAudioClip	Audio data node
SoVRMLBackground	Color backdrop node
SoVRMLBillboard	Grouping node that modifies its coordinate system so that its local Z-axis always points at the viewer
SoVRMLBox	Box shape node
SoVRMLCollision	Grouping node that controls collision detection
SoVRMLColor	Specifies RGB colors to be used in the fields of another node
SoVRMLColorInterpolator	Interpolates among a set of color values
SoVRMLCone	Cone shape node
SoVRMLCoordinate	Coordinate node
SoVRMLCoordinateInterpolator	Interpolates among a set of coordinate values
SoVRMLCylinder	Cylinder shape node
SoVRMLCylinderSensor	Maps pointing device motion onto a cylinder
SoVRMLDirectionalLight	Node representing a directional light source
SoVRMLElevationGrid	Specifies a uniform rectangular grid of varying height in the XZ plane
SoVRMLExtrusion	Specifies geometric shapes based on a 2D cross section along a 3D spine
SoVRMLFog	Simulates fog
SoVRMLFontStyle	Specifies font size, family, style, etc.
SoVRMLGeometry	Abstract base class for all VRML 2.0 geometry nodes
SoVRMLGridShape	Abstract base class for the SoVRMLElevationGrid node
SoVRMLGroup	Group node
SoVRMLImageTexture	Texture map node
SoVRMLIndexedFaceSet	Indexed polygonal face shape node
SoVRMLIndexedLine	Abstract base class for the SoVRMLIndexLineSet node
SoVRMLIndexedLineSet	Indexed polyline shape node
SoVRMLIndexedShape	Abstract base class for SoVRMLIndexedFaceSet
SoVRMLInline	Grouping node that refers to children through a URL
SoVRMLInterpolator	Abstract base class for VRML interpolators
SoVRMLInterpOutput	Class for all VRML interpolator outputs
SoVRMLInterpOutputList	Maintains a list of pointers to VRML interpolator outputs
SoVRMLLight	Abstract base class for all VRML 2.0 light nodes
SoVRMLLOD	Distance-based level-of-detail switching group node
SoVRMLMaterial	Surface material definition node
SoVRMLMovieTexture	Texture and sound node
SoVRMLNavigationInfo	Describes physical characteristics of viewer and viewing model
SoVRMLNormal	Node that defines surface normals for shapes
SoVRMLNormalInterpolator	Interpolates among a set of normals
SoVRMLOrientationInterpolator	Interpolates among a set of rotation values
SoVRMLParent	Abstract base class for all VRML grouping nodes that have children
SoVRMLPixelTexture	Texture node
SoVRMLPlaneSensor	Maps pointing device motion onto a plane
SoVRMLPointLight	Node representing a point light source
SoVRMLPointSet	Point set shape node
SoVRMLPositionInterpolator	Interpolates among a set of position values
SoVRMLProximitySensor	Generates events when the user moves into, out of, or within a specified region of space
SoVRMLScalarInterpolator	Interpolates among a set of float values
SoVRMLScript	Used to program behavior in a scene
SoVRMLShape	Defines a shape by specifying its appearance and geometry
SoVRMLSound	Specifies position and spatial representation of a sound
SoVRMLSphere	Sphere shape node
SoVRMLSphereSensor	Maps pointing device motion onto a sphere
SoVRMLSpotLight	Node representing a spotlight source
SoVRMLSwitch	Group node that traverses one chosen child
SoVRMLText	Text shape node
SoVRMLTextureCoordinate	Texture coordinate node
SoVRMLTextureTransform	Defines a 2D transformation
SoVRMLTimeSensor	Generates events as time passes
SoVRMLTouchSensor	Detects when the user has pointed at a specific piece of geometry
SoVRMLTransform	Grouping node that defines a coordinate system for its children
SoVRMLVertexLine	Abstract base class for SoVRMLIndexedLineSet
SoVRMLVertexPoint	Abstract base class for the SoVRMLPointSet node
SoVRMLVertexShape	Abstract base class for the SoVRMLIndexedFaceSet node
SoVRMLViewpoint	Specifies position from which the user might view the scene
SoVRMLVisibilitySensor	Detects visibility changes of a rectangular box
SoVRMLWorldInfo	Contains information about the world

Additional VRML Classes

The following classes provide additional support for VRML.

SoVRMLEXTERNPROTODef	Contains the internal definition of an externprototype
SoVRMLEXTERNPROTOField	Contains the internal definition for one of an externprototype's fields, exposedFields, eventIns or eventOuts
SoVRMLEXTERNPROTOFieldList	Maintains a list of pointers to the field definitions of an externprototype
SoVRMLEXTERNPROTOInstance	Instance of an externprototype
SoVRMLPROTODef	Contains the internal definition of a prototype
SoVRMLPROTOField	Contains the internal definition for one of a prototype's fields, exposedFields, eventIns or eventOuts
SoVRMLPROTOFieldList	Maintains a list of pointers to the field definitions of a prototype
SoVRMLPROTOInstance	Instance of a prototype

Additional Information

Routes

Routes are Open Inventor field-to-field connections. When Open Inventor reads a VRML 2.0 file, it automatically creates the connections specified by the Route statements, if any. When Open Inventor writes a file with a VRML 2.0 header, it automatically generates Route statements for any field-to-field connections that exist. An application can create field-to-field connections in the usual way (field->connectFrom) or by using SoDB::createRoute.

Writing a VRML 2.0 File

To have Open Inventor write a VRML 2.0 file, set the file header to the standard VRML 2.0 header, i.e., "#VRML V2.0 utf8" using the setHeaderString method on SoOutput. NOTE: Setting the file header to the VRML 2.0 file header does not cause Open Inventor to convert non-VRML 2.0 nodes into VRML 2.0 nodes. If you need to convert nodes to VRML 2.0, use SoToVRML2Action or the utility program ivtovrml.

Open Inventor uses the file header to determine how node (class) names should be handled when reading or writing a file. If the file header is an Open Inventor header, e.g. "#Inventor V2.1 ascii", then all nodes will be read (and written) using their internal class names. This means that VRML 2.0 nodes will be written as (for example) "VRMLTransform", to ensure that they do not conflict with pre-existing Open Inventor node class names. It also means that "Transform" will be read as an SoTransform node, while "VRMLTransform" will be read as an SoVRMLTransform node. If the file header is "#VRML V2.0 utf8", then VRML 2.0 nodes are written without the "VRML" prefix and "Transform" will be read as an SoVRMLTransform node. An SoTransform node will be written as "SoTransform".


Viewer Examiner viewer
Examiner Viewer

The Examiner Viewer uses a virtual trackball to view the data. By default, the Scene Viewer comes up in Examiner Viewer mode.

Viewer-Specific Mouse Controls

Left	Spin (rotate the virtual trackball)
Middle or <CTRL> + Left or <SHIFT> + Left (Win32)	Pan (translate up/down/left/right)
<CTRL> + Middle or Left + Middle or <CTRL> + <SHIFT> + Left (Win32)	Dolly in and out
Common Controls

<s> + Click	Seek Mode After pressing (and releasing) the <s> key, the cursor changes to a "target" shape. Click on the desired seek point with the left mouse button. This key has the same effect as the Seek button in the viewer decoration. After clicking on the seek point, the camera will be automatically moved to view the seek point (by default it uses the surface normal at the seek point).
<ESC>	Toggle between Viewing and Selection Modes Pressing the <ESC> key toggles the viewer between Viewing mode ("hand" cursor) and Selection mode ("arrow" cursor). This key has the same effect as the Viewing and Selection buttons in the viewer decoration, as well as the Viewing item in the popup menu.
Right Mouse	Display the Viewer Popup Menu The popup menu items allow you to change most of the viewer properties, such as drawing mode ("as is", "wireframe", etc.). There are also popup menu items corresponding to most of the viewer decoration buttons (Home, Set Home, View All, etc.)
<ALT>	Switch temporarily to Viewing Mode (Win32) When the viewer is in Selection mode, pressing and holding the ALT key temporarily switches the viewer to Viewing mode. When the ALT key is released, the viewer returns to Selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.
See Also

SoWinExaminerViewer, Viewer Buttons


Viewer Fly-through Viewer
Fly-through Viewer

The Fly-through Viewer moves the camera through space, with a constant world up.

Viewer-Specific Mouse Controls

Left	Click to increase speed
Middle or <SHIFT> + Left (Win32)	Click to decrease speed
Left + Middle	Click both simultaneously to stop
<CTRL> + <SHIFT> + Left (Win32)	Click to stop
<CTRL>	Hold the key down to temporarily stop and rotate the viewpoint
<U>	Set "Up" Direction After pressing the <U> key, click on a target object with the left mouse button to set the "up" direction to the surface normal at that point. By default "up" is +Y. Press <U> again to exit this mode without changing "up".

Common Controls

<s> + Click	Seek Mode After pressing (and releasing) the <s> key, the cursor changes to a "target" shape. Click on the desired seek point with the left mouse button. This key has the same effect as the Seek button in the viewer decoration. After clicking on the seek point, the camera will be automatically moved to view the seek point (by default it uses the surface normal at the seek point).
<ESC>	Toggle between Viewing and Selection Modes Pressing the <ESC> key toggles the viewer between Viewing mode ("hand" cursor) and Selection mode ("arrow" cursor). This key has the same effect as the Viewing and Selection buttons in the viewer decoration, as well as the Viewing item in the popup menu.
Right Mouse	Display the Viewer Popup Menu The popup menu items allow you to change most of the viewer properties, such as drawing mode ("as is", "wireframe", etc.). There are also popup menu items corresponding to most of the viewer decoration buttons (Home, Set Home, View All, etc.)
<ALT>	Switch temporarily to Viewing Mode (Win32) When the viewer is in Selection mode, pressing and holding the ALT key temporarily switches the viewer to Viewing mode. When the ALT key is released, the viewer returns to Selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.
See Also

SoWinFlyViewer, Viewer Buttons


Viewer Plane Viewer
Plane Viewer

The Plane Viewer constrains the camera to move only parallel to the view plane. Convenience buttons are provided (right side of viewer decorations) to set the camera in each of the major planes (X, Y, Z).

Viewer-Specific Mouse Controls

Left or Left + Middle	Dolly in and out
Middle or <CTRL> + Left or <SHIFT> + Left (Win32)	Pan (translate up/down/left/right)
<CTRL> + Middle or <CTRL> + <SHIFT> + Left (Win32)	Roll
Common Controls

<s> + Click	Seek Mode After pressing (and releasing) the <s> key, the cursor changes to a "target" shape. Click on the desired seek point with the left mouse button. This key has the same effect as the Seek button in the viewer decoration. After clicking on the seek point, the camera will be automatically moved to view the seek point (by default it uses the surface normal at the seek point).
<ESC>	Toggle between Viewing and Selection Modes Pressing the <ESC> key toggles the viewer between Viewing mode ("hand" cursor) and Selection mode ("arrow" cursor). This key has the same effect as the Viewing and Selection buttons in the viewer decoration, as well as the Viewing item in the popup menu.
Right Mouse	Display the Viewer Popup Menu The popup menu items allow you to change most of the viewer properties, such as drawing mode ("as is", "wireframe", etc.). There are also popup menu items corresponding to most of the viewer decoration buttons (Home, Set Home, View All, etc.)
<ALT>	Switch temporarily to Viewing Mode (Win32) When the viewer is in Selection mode, pressing and holding the ALT key temporarily switches the viewer to Viewing mode. When the ALT key is released, the viewer returns to Selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.
See Also

SoWinPlaneViewer, Viewer Buttons


Viewer Walk Viewer
Walk Viewer

The Walk Viewer moves the camera in a plane.

Viewer-Specific Mouse Controls

Left	Walk Around Pressing the left mouse button causes a "box" to appear at the cursor position. Moving the cursor above or below the box moves you forward and backward. Moving the cursor to the right or left of the box makes you turn. Speed depends on the distance of the cursor from the center of the box.
Middle or <CTRL> + Left or <SHIFT> + Left (Win32)	Pan (translate up/down/left/right)
Left + Middle or <CTRL> + Middle or <CTRL> + <SHIFT> + Left (Win32)	Tilt/Rotate "look at" Direction While holding Middle Mouse down, the cursor changes to a "cross" shape and moving the mouse tilts (up/down) and rotates (left/right) the viewpoint. Note that this does not change the direction you are walking, only the direction you are looking. You can be walking in one direction and looking in a different direction (e.g., walking along looking down at the floor).
<U>	Set "Up" Direction After pressing the <U> key, click on a target object with the left mouse button to set the "up" direction to the surface normal at that point. By default "up" is +Y. Press <U> again to exit this mode without changing "up".
Common Controls

<s> + Click	Seek Mode After pressing (and releasing) the <s> key, the cursor changes to a "target" shape. Click on the desired seek point with the left mouse button. This key has the same effect as the Seek button in the viewer decoration. After clicking on the seek point, the camera will be automatically moved to view the seek point (by default it uses the surface normal at the seek point).
<ESC>	Toggle between Viewing and Selection Modes Pressing the <ESC> key toggles the viewer between Viewing mode ("hand" cursor) and Selection mode ("arrow" cursor). This key has the same effect as the Viewing and Selection buttons in the viewer decoration, as well as the Viewing item in the popup menu.
Right Mouse	Display the Viewer Popup Menu The popup menu items allow you to change most of the viewer properties, such as drawing mode ("as is", "wireframe", etc.). There are also popup menu items corresponding to most of the viewer decoration buttons (Home, Set Home, View All, etc.)
<ALT>	Switch temporarily to Viewing Mode (Win32) When the viewer is in Selection mode, pressing and holding the ALT key temporarily switches the viewer to Viewing mode. When the ALT key is released, the viewer returns to Selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.
See Also

SoWinWalkViewer, Viewer Buttons


ivcat

NAME

ivcat - concatenates and converts Open Inventor files

SYNOPSIS

ivcat [ -bfht ] [-o file] [file ...]

DESCRIPTION

ivcat reads each file in sequence and then writes each out. If no input file is given, or a filename of "-" is specified, ivcat reads from the standard input file. The input files must be valid Open Inventor 3D Interchange Format files (1.0 or 2.0).

The following command line options are allowed:

-b 	Write out the files in binary Open Inventor format. The default is to write out the files in Open Inventor's ASCII format.

-f 	Remove all SoFile nodes. This has the effect of condensing hierarchical files into a single file.

-h 	Print usage message.

-o file 	Send the output to the given file, instead of to the standard output.

-t 	Expand SoTexture2 nodes to explictly include the texture data rather than a file name.

EXAMPLES

To convert from binary to ASCII Open Inventor:

ivcat < binaryfile.iv > asciifile.iv

To convert from ASCII to binary Open Inventor:

ivcat -b < asciifile.iv > binaryfile.iv

SOURCE CODE

Note that the source code to ivcat comes with the Open Inventor 3D Toolkit.

FILES

%OIVHOME%\data\models\* - Sample Open Inventor data files
%OIVHOME%\src\tools\ivcat\* - Source to ivcat

SEE ALSO

inventor, SceneViewer


ivfix

NAME

ivfix - restructures an Open Inventor object for improved rendering performance

SYNOPSIS

ivfix [-afhmnptvV ][-d dir ] [infile] [outfile]

DESCRIPTION

ivfix reads an Open Inventor object and restructures it to improve the object's rendering performance. ivfix processes the scene graph in two phases:

Phase 1)

Analyzes the organization of the input scene graph, and tries to sort it a better way to take advantage of coherence. For example, it tries to organize subgraphs by common textures, since switching textures is expensive.Once sorted, it also tries to combine subgraphs so that the final result has fewer nodes.

Phase 2)

"Flattens" the subgraphs that result from the first phase.This tessellates all shapes into triangles that are then organized into triangle strips. For example, two spheres may be combined into one triangle strip.

Warning! ivfix does not try to preserve any non-appearance attributes, such as names. It will also remove most engines, animation nodes, and field-to-field connections. ivfix is best run on individual objects, not on entire scenes. When rendered, the output object will be equivalent to the original file, but much of the object hierarchy will be lost.

Note also that the output file may be larger than the input file. For example, a sphere node will be converted into triangle strips.

The following command line options are allowed:

-a	Write an ASCII file. The output file is binary by default.

-d dir	Add dir to the list of directories to search, e.g. for file nodes.

-f	Produce independent faces rather than triangle strips.

-h	Print the usage message.

-m	Do not try to match up index arrays. By default, ivfix will attempt to generate arrays of normals, vertices, and texture coordinates suitable for the OpenGL VertexArray primitive. This optimization was added by TGS.

-n	Do not generate any normals.

-p	Do not produce SoVertexProperty nodes for properties.

-t	Do not generate any texture coordinates.

-v	(Verbose) Display status information during processing.

-V	(Very verbose) Display more detailed status information.

SOURCE CODE

Note that the source code to ivfix comes with the Open Inventor 3D Toolkit.

FILES

%OIVHOME%\data\models\* - Sample 3D data files
%OIVHOME%\src\tools\ivfix\* - Source to ivfix

EXAMPLES

ivfix < slowObject.iv > quickObject.iv

SEE ALSO

inventor, ivview, ivcat, ivinfo, SceneViewer, drop, maze, noodle, revo, textomatic

KNOWN BUGS

Ignore flags are not properly handled.


ivinfo

NAME

ivinfo - prints information about Open Inventor files

SYNOPSIS

ivinfo [-h] [file]

DESCRIPTION

ivinfo prints (to standard output) information about the named file. (If no input file is given, ivinfo reads from the standard input.) The information includes whether the file is in ASCII or binary format, and, for each scene graph in the file, the number of nodes in the graph and the contents of any SoInfo nodes contained in it.

OPTIONS

The following command line options are allowed:

-h Prints out the usage for the command.

SOURCE CODE

Note that the source code to ivinfo comes with the Open Inventor 3D Toolkit.

FILES

%OIVHOME%\data\models\* - Sample 3D data files
%OIVHOME%\src\tools\ivinfo\* - Source to ivinfo

SEE ALSO

inventor, ivcat, maze


ivperf

NAME

ivperf - reads in an Open Inventor scene graph and analyzes its rendering performance

SYNOPSIS

ivperf [-b] [-f N] [-w X,Y] datafile

-b	display results as bar chart

-f N	render N frames for each test

-w X,Y	make window size X by Y pixels

DESCRIPTION

ivperf reads in an Open Inventor scene graph and analyzes its rendering performance. If you know that caches at certain separators will be invalidated because your application changes data under them, name these separators "NoCache" (i.e. DEF NoCache ...). ivperf will then correctly simulate the autocaching behavior on the scene graph.

Running ivperf without any arguments will list the usage message.

ivperf's output can be graphically displayed in the form of a bar chart. The first bar (red) is the total time taken to render a frame, and the other bars (yellow) are the approximate times spent in each rendering stage. They are (in order):

Clearing the graphics window
Traversing the Open Inventor scene graph
Changing material state
Changing the GL transformation matrix
Texture mapping
Texture management
Lighting
Transforming vertices in the pipeline
Filling polygons

See the "Open Inventor 2.1 Porting and Performance Tips" for more information on using ivperf.


ivtovrml

NAME

ivtovrml - converts a .iv file to VRML format (VRML 1.0 or 2.0)

SYNOPSIS

ivToVRML [-vftuh] [-o filename] [-d InlineDir] file ...

-o	Write output to [filename]

-d	A directory path. When converting SoFile to WWWInline nodes, write converted file to [InlineDir]

-v	Generate VRML 2.0 output. (If this flag is not specified, VRML 1.0 output is generated.)

-f	Expand File nodes instead of converting to WWWInline nodes

-t	Expand Texture2 nodes

-u	Write unknown nodes to output instead of removing them

-h	This message (help)

If given a filename of '-' or if not given any filenames, standard input will be read.

If the -o option is not used to specify the output filename, the converted VRML file is written to standard output


maze

NAME

maze - a nostalgic 3D game

SYNOPSIS

maze [maze file]

DESCRIPTION

maze is a fun 3D game that will test your ability to navigate a marble through a 3D maze by tilting the floor of the maze. The object of the game is to maneuver the marble through the entire maze without falling into any of the holes. There is only one path through the maze and it is NOT marked.

Use the left mouse to control the tilt of the maze floor. You can adjust the view of maze by pressing the right mouse button and choosing the on menu button. This will add some additional buttons around the window which can be used to adjust the view of the maze. Click the top right toggle button to switch into viewing mode and then adjust your view by pressing the left and/or middle mouse buttons. Click the "?" button to get help on how to use the viewer. When you are done adjusting your view, hit the toggle button again and resume play. Be careful to not disorient your play by overadjusting the view.

The game offers 3 levels of difficulty; press the "1" key to play the starter maze,the "2" key for the difficult maze, and the "3" key for the masochist maze. Pressing these keys at ANY TIME will restart the game at that level. Pressing the "r" key will restart the game at the current level.

If the marble falls in a hole, press the "r", "1", "2", or "3" key to restart the game.

maze was written using the Inventor 3D Toolkit.

BUILDING YOUR OWN MAZE

You can build your own mazes by creating maze files and then running maze with the maze file as an argument. The top array specifies the location of horizontal walls, the middle array specifies the location of vertical walls, and the bottom array specifies locations of holes. In the first two arrays, a 1 means a wall is present, and a 0 means no wall is present. In the third array, a 1 means a hole is present. A value of 2 in the hole array signifies the starting point, and a value of 3 signifies the ending (winning) point in the maze.

Here's the starter (level 1) maze file:

1 1 1 1 1 1 1 1 1 1 1 1

0 0 1 1 0 0 1 1 0 0 0 1

0 1 0 0 1 1 0 0 0 0 0 1

1 0 0 1 1 0 1 1 0 0 1 1

0 0 1 0 0 0 0 0 0 1 0 1

0 0 0 0 1 0 0 1 0 0 0 1

0 1 0 1 0 0 0 0 0 0 0 1

0 0 0 0 0 1 1 0 0 0 0 1

1 1 0 0 1 0 0 0 0 0 0 1

0 1 1 1 0 0 1 0 0 0 0 1

0 0 0 0 0 0 0 1 0 0 0 1

1 1 1 1 1 1 1 1 1 1 1 1

1 1 0 0 0 1 0 0 1 0 0 1

1 0 0 0 1 0 0 0 0 1 0 1

1 0 1 0 0 0 0 0 0 0 0 1

1 0 1 0 0 0 0 1 0 0 1 1

1 0 1 0 0 1 0 0 1 0 0 1

1 0 1 0 0 0 0 0 1 0 0 1

1 0 0 0 1 1 0 0 1 0 0 1

1 0 1 0 1 0 0 1 1 0 1 1

1 0 0 0 0 0 0 1 0 0 1 1

1 0 0 0 0 1 0 0 1 0 1 1

1 0 0 0 1 0 0 0 0 0 1 1

1 1 1 1 1 1 1 1 1 1 1 1

1 0 0 0 0 0 0 2 0 0 0

0 0 1 0 0 0 1 0 0 1 0

0 0 0 0 0 0 0 0 1 0 0

0 0 0 0 0 1 0 0 0 0 1

0 0 0 0 0 0 0 0 1 0 0

0 1 1 0 0 1 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 1 0 0

0 0 1 0 0 1 0 0 0 0 0

0 0 0 0 1 0 0 0 0 0 3

SOURCE CODE

Note that the source code to maze comes with the Open Inventor 3D Toolkit.

FILES

%OIVHOME%\src\demos\maze\* - Source to maze

SEE ALSO

SceneViewer, inventor


slotcar

NAME

slotcar - a networked slot car racing game for any number of players

SYNOPSIS

slotcar [-c 1-8] [-g 1-100] [-h] [-n name] [-q] [-s] [-r 1-8]

[-r 1-8]: Number of robot cars (default 0)

[-n name]: Your name (maximum 15 characters, default is login).

[-c 1-8]: Desired car number (chosen randomly by default)

[-g 1-100]: Private game from 1 to 100.

[-s]: Single-player mode (no network stuff).

[-q]: Play the game quietly (no sound).

[-h]: Print out this message.

NOTE: The Windows version of slotcar displays an "Options" button on the startup screen. Clicking this button brings up a dialog box that allows you to modify most of the above options.

DESCRIPTION

Slotcar is a networked slot car racing game for any number of players.

slotcar -h will print out a usage message explaining all of the options. A Startup screen explains a little bit about the game. A couple of features that are not yet explained in the Startup screen are:

Pressing the 'A' key while playing will toggle on and off the annotation above each of the other cars saying who they are.

Using the -g command line option with an odd-numbered game number will give a short race course.

Using an even-numbered game number will give a longer race course.

Omitting the -g option will default to game 0 with the longer race course.

SOURCE CODE

This game was written using the Open Inventor 3D Toolkit.


vrmllint

NAME

vrmllint - Checks a VRML file for validity

SYNOPSIS

vrmllint [options] [infiles]

-h	Print this message (help)

<filename>	List the lint in the given file


Classes (Alphabetic)

Classes marked with [image] were added by TGS and will not be found in the last SGI release of Open Inventor (version 2.1.x).

SbBool

SbBox2f

SbBox2s

SbBox3f

SbColor

SbCylinder

SbCylinderPlaneProjector

SbCylinderProjector

SbCylinderSectionProjector

SbCylinderSheetProjector

SbLine

SbLineProjector

SbMatrix

SbMatrixd

SbName

SbPlane

SbPlaneProjector

SbPList

SbProjector

SbRotation

SbRotationd

SbSphere

SbSpherePlaneProjector

SbSphereProjector

SbSphereSectionProjector

SbSphereSheetProjector

SbString

SbTime

SbVec2d

SbVec2f

SbVec2s

SbVec3d

SbVec3f

SbVec3s

SbVec4d

SbVec4f

SbViewportRegion

SbViewVolume

SbXfBox3f

SoAction

SoAlarmSensor

SoAnnotation

SoAnnoText3

SoAnnoText3Property

SoAntiSquish

SoAppearanceKit

SoArray

SoAsciiText

SoBase

SoBaseColor

SoBaseKit

SoBaseList

SoBevelAction

SoBevelProperty

SoBlinker

SoBoolOperation

SoBoxHighlightRenderAction

SoButtonEvent

SoByteStream

SoCalculator

SoCallback

SoCallbackAction

SoCallbackList

SoCamera

SoCameraKit

SoCenterballDragger

SoCenterballManip

SoClipPlane

SoClipPlaneManip

SoCollisionManager

SoColorIndex

SoComplexity

SoComposeMatrix

SoComposeRotation

SoComposeRotationFromTo

SoComposeVec2f

SoComposeVec3f

SoComposeVec4f

SoComputeBoundingBox

SoConcatenate

SoCone

SoConeDetail

SoCoordinate3

SoCoordinate4

SoCounter

SoCube

SoCubeDetail

SoCylinder

SoCylinderDetail

SoDataSensor

SoDB

SoDebugError

SoDecimator

SoDecomposeMatrix

SoDecomposeRotation

SoDecomposeVec2f

SoDecomposeVec3f

SoDecomposeVec4f

SoDelayQueueSensor

SoDetail

SoDetailList

SoDirectionalLight

SoDirectionalLightDragger

SoDirectionalLightManip

SoDragger

SoDragPointDragger

SoDrawStyle

SoEdgeFlag

SoElapsedTime

SoEngine

SoEngineList

SoEngineOutput

SoEngineOutputList

SoEnvironment

SoError

SoEvent

SoEventCallback

SoExtSelection

SoFaceDetail

SoFaceSet

SoField

SoFieldContainer

SoFieldList

SoFieldSensor

SoFile

SoFont

SoFontStyle

SoGate

SoGetBoundingBoxAction

SoGetMatrixAction

SoGetPrimitiveCountAction

SoGlobalSimplifyAction

SoGLRenderAction

SoGroup

SoHandleBoxDragger

SoHandleBoxManip

SoHandleEventAction

SoIdleSensor

SoImage

SoIndexedFaceSet

SoIndexedLineSet

SoIndexedNurbsCurve

SoIndexedNurbsSurface

SoIndexedShape

SoIndexedTriangleStripSet

SoInfo

SoInput

SoInteraction

SoInteractionKit

SoInterpolate

SoInterpolateFloat

SoInterpolateRotation

SoInterpolateVec2f

SoInterpolateVec3f

SoInterpolateVec4f

SoIntersectionDetectionAction

SoJackDragger

SoJackManip

SoKeyboardEvent

SoLabel

SoLevelOfDetail

SoLevelOfSimplification

SoLight

SoLightKit

SoLightModel

SoLinearProfile

SoLineDetail

SoLineHighlightRenderAction

SoLineSet

SoLocateHighlight

SoLocation2Event

SoLOD

SoMarkerSet

SoMaterial

SoMaterialBinding

SoMatrixTransform

SoMemoryError

SoMFBitMask

SoMFBool

SoMFColor

SoMFEngine

SoMFEnum

SoMFFloat

SoMField

SoMFInt32

SoMFLong

SoMFMatrix

SoMFName

SoMFNode

SoMFPath

SoMFPlane

SoMFRotation

SoMFShort

SoMFString

SoMFTime

SoMFUInt32

SoMFULong

SoMFUShort

SoMFVec2f

SoMFVec3f

SoMFVec4f

SoMotion3Event

SoMouseButtonEvent

SoMultipleCopy

SoNode

SoNodeKit

SoNodekitCatalog

SoNodeKitDetail

SoNodeKitListPart

SoNodeKitPath

SoNodeList

SoNodeSensor

SoNonIndexedShape

SoNormal

SoNormalBinding

SoNurbsCurve

SoNurbsProfile

SoNurbsProperty

SoNurbsSurface

SoOctreeOrdering

SoOffscreenRenderer

SoOneShot

SoOneShotSensor

SoOnOff

SoOrthographicCamera

SoOutput

SoPackedColor

SoPath

SoPathList

SoPathSensor

SoPathSwitch

SoPattern

SoPendulum

SoPerspectiveCamera

SoPickAction

SoPickedPoint

SoPickedPointList

SoPickStyle

SoPointDetail

SoPointLight

SoPointLightDragger

SoPointLightManip

SoPointSet

SoPolygonOffset

SoPrimitiveVertex

SoProfile

SoProfileCoordinate2

SoProfileCoordinate3

SoQuadMesh

SoRayPickAction

SoReadError

SoRenderList

SoReorganizeAction

SoResetTransform

SoRotateCylindricalDragger

SoRotateDiscDragger

SoRotateSphericalDragger

SoRotation

SoRotationXYZ

SoRotor

SoScale

SoScale1Dragger

SoScale2Dragger

SoScale2UniformDragger

SoScaleUniformDragger

SoSceneKit

SoSceneManager

SoSearchAction

SoSearchPathAction

SoSelection

SoSelectOne

SoSensor

SoSeparator

SoSeparatorKit

SoSFBitMask

SoSFBool

SoSFBox3s

SoSFColor

SoSFEngine

SoSFEnum

SoSFFloat

SoSField

SoSFImage

SoSFImage3

SoSFInt32

SoSFLong

SoSFMatrix

SoSFName

SoSFNode

SoSFPath

SoSFPlane

SoSFRotation

SoSFShort

SoSFString

SoSFTime

SoSFTrigger

SoSFUInt32

SoSFULong

SoSFUShort

SoSFVec2f

SoSFVec3f

SoSFVec4f

SoShape

SoShapeHints

SoShapeKit

SoShapeSimplifyAction

SoShuttle

SoSimplifier

SoSimplifyAction

SoSpaceballButtonEvent

SoSphere

SoSpotLight

SoSpotLightDragger

SoSpotLightManip

SoSurroundScale

SoSwitch

SoTabBoxDragger

SoTabBoxManip

SoTabPlaneDragger

SoText2

SoText3

SoTextDetail

SoTexture2

SoTexture2Transform

SoTexture3

SoTexture3Transform

SoTextureCoordinate2

SoTextureCoordinate3

SoTextureCoordinateBinding

SoTextureCoordinateDefault

SoTextureCoordinateEnvironment

SoTextureCoordinateFunction

SoTextureCoordinatePlane

SoTimeCounter

SoTimerQueueSensor

SoTimerSensor

SoToHTMLAction

SoToVRML2Action

SoToVRMLAction

SoToZ3DAction

SoTrackballDragger

SoTrackballManip

SoTranReceiver

SoTranSender

SoTransform

SoTransformation

SoTransformBoxDragger

SoTransformBoxManip

SoTransformerDragger

SoTransformerManip

SoTransformManip

SoTransformSeparator

SoTransformVec3f

SoTranslate1Dragger

SoTranslate2Dragger

SoTranslation

SoTriangleStripSet

SoTriggerAny

SoType

SoTypeList

SoUnits

SoValueOrdering

SoVertexFlag

SoVertexProperty

SoVertexShape

SoVRMLAnchor

SoVRMLAppearance

SoVRMLAudioClip

SoVRMLBackground

SoVRMLBillboard

SoVRMLBox

SoVRMLCollision

SoVRMLColor

SoVRMLColorInterpolator

SoVRMLCone

SoVRMLCoordinate

SoVRMLCoordinateInterpolator

SoVRMLCylinder

SoVRMLCylinderSensor

SoVRMLDirectionalLight

SoVRMLElevationGrid

SoVRMLEXTERNPROTODef

SoVRMLEXTERNPROTOField

SoVRMLEXTERNPROTOFieldList

SoVRMLEXTERNPROTOInstance

SoVRMLExtrusion

SoVRMLFog

SoVRMLFontStyle

SoVRMLGeometry

SoVRMLGridShape

SoVRMLGroup

SoVRMLImageTexture

SoVRMLIndexedFaceSet

SoVRMLIndexedLine

SoVRMLIndexedLineSet

SoVRMLIndexedShape

SoVRMLInline

SoVRMLInterpolator

SoVRMLInterpOutput

SoVRMLInterpOutputList

SoVRMLLight

SoVRMLLOD

SoVRMLMaterial

SoVRMLMovieTexture

SoVRMLNavigationInfo

SoVRMLNormal

SoVRMLNormalInterpolator

SoVRMLOrientationInterpolator

SoVRMLParent

SoVRMLPixelTexture

SoVRMLPlaneSensor

SoVRMLPointLight

SoVRMLPointSet

SoVRMLPositionInterpolator

SoVRMLPROTODef

SoVRMLPROTOField

SoVRMLPROTOFieldList

SoVRMLPROTOInstance

SoVRMLProximitySensor

SoVRMLScalarInterpolator

SoVRMLScript

SoVRMLShape

SoVRMLSound

SoVRMLSphere

SoVRMLSphereSensor

SoVRMLSpotLight

SoVRMLSwitch

SoVRMLText

SoVRMLTexture

SoVRMLTextureCoordinate

SoVRMLTextureTransform

SoVRMLTimeSensor

SoVRMLTouchSensor

SoVRMLTransform

SoVRMLVertexLine

SoVRMLVertexPoint

SoVRMLVertexShape

SoVRMLViewpoint

SoVRMLVisibilitySensor

SoVRMLWorldInfo

SoWin

SoWinAnaglyphStereo

SoWinClipboard

SoWinCollisionViewer

SoWinColorEditor

SoWinComponent

SoWinConstrainedViewer

SoWinDevice

SoWinDirectionalLightEditor

SoWinExaminerViewer

SoWinFlyViewer

SoWinFullViewer

SoWinGLWidget

SoWinHalfScreenStereo

SoWinInterlacedStereo

SoWinKeyboard

SoWinMaterialEditor

SoWinMouse

SoWinNoStereoView

SoWinPlaneViewer

SoWinRawStereo

SoWinRenderArea

SoWinSpaceball

SoWinSSDIStereo

SoWinStereoDialog

SoWinStereoViewer

SoWinStereoViewType

SoWinViewer

SoWinWalkViewer

SoWrapperKit

SoWriteAction

SoWWWAnchor

SoWWWInline

SoXt

SoXtClipboard

SoXtCollisionViewer

SoXtColorEditor

SoXtComponent

SoXtConstrainedViewer

SoXtDevice

SoXtDirectionalLightEditor

SoXtExaminerViewer

SoXtFileSelectionDialog

SoXtFlyViewer

SoXtFullViewer

SoXtGLWidget

SoXtInputFocus

SoXtKeyboard

SoXtLightSliderSet

SoXtMaterialEditor

SoXtMaterialList

SoXtMaterialSliderSet

SoXtMouse

SoXtPlaneViewer

SoXtPrintDialog

SoXtRenderArea

SoXtResource

SoXtSliderSet

SoXtSliderSetBase

SoXtSpaceball

SoXtTransformSliderSet

SoXtViewer

SoXtWalkViewer


SbViewVolume

NAME

SbViewVolume - 3D viewing volume class

INHERITS FROM

SbViewVolume

SYNOPSIS

#include <Inventor/SbLinear.h>

enum ProjectionType	{
SbViewVolume::ORTHOGRAPHIC
Orthographic projection
SbViewVolume::PERSPECTIVE
Perspective projection
}

enum StereoMode	{
SbViewVolume::MONOSCOPIC
Monoscopic (i.e., non-stereo) viewing
SbViewVolume::LEFT_VIEW
Left eye view
SbViewVolume::RIGHT_VIEW
Right eye view
}

Methods from class SbViewVolume:

SbViewVolume()

~SbViewVolume()

float	getMatrices(SbMatrix &affine,
SbMatrix &proj) const

SbMatrix	getMatrix() const

SbMatrix	getCameraSpaceMatrix() const

void	projectPointToLine(const SbVec2f &pt,
SbLine &line) const

void	projectPointToLine(const SbVec2f &pt,
SbVec3f &line0,
SbVec3f &line1) const

void	projectToScreen(const SbVec3f &src,
SbVec3f &dst) const

SbPlane	getPlane(float distFromEye) const

SbVec3f	getSightPoint(float distFromEye) const

SbVec3f	getPlanePoint(float distFromEye,
const SbVec2f &normPoint) const

SbRotation	getAlignRotation(SbBool rightAngleOnly = FALSE) const

float	getWorldToScreenScale(const SbVec3f &worldCenter,
float normRadius) const

SbVec2f	projectBox(const SbBox3f &box) const

SbViewVolume	narrow(float left,
float bottom,
float right,
float top) const

SbViewVolume	narrow(const SbBox3f &box) const

void	ortho(float left,
float right,
float bottom,
float top,
float near,
float far)

void	perspective(float fovy,
float aspect,
float near,
float far)

void	rotateCamera(const SbRotation &q)

void	translateCamera(const SbVec3f &v)

SbVec3f	zVector() const

SbViewVolume	zNarrow(float near,
float far) const

void	scale(float factor)

void	scaleWidth(float ratio)

void	scaleHeight(float ratio)

ProjectionType	getProjectionType() const

const SbVec3f &	getProjectionPoint() const

const SbVec3f &	getProjectionDirection() const

float	getNearDist() const

float	getWidth() const

float	getHeight() const

float	getDepth() const

void	setStereoAdjustment(float adjustment)

float	getStereoAdjustment() const

void	setBalanceAdjustment(float adjustment)

float	getBalanceAdjustment() const

void	setStereoMode(StereoMode mode)

StereoMode	getStereoMode() const

DESCRIPTION

Class used to represent a 3D viewing volume. This class is used to represent viewing frusta and picking volumes. For perspective projection, the view volume is a frustum. For orthographic (parallel) projection, the view volume is a rectangular prism.

METHODS

SbViewVolume()

~SbViewVolume()

Constructor and destructor.

float	getMatrices(SbMatrix &affine,
SbMatrix &proj) const

Returns two matrices corresponding to the view volume. The first is a viewing matrix, which is guaranteed to be an affine transformation. The second is suitable for use as a projection matrix in OpenGL. The return value is the stereo offset for a camera.

Prior to release 2.6, the return value was a void, not a float.

SbMatrix	getMatrix() const

Like the method above, but returns the affine and projection parts together in one matrix (i.e., affine.multRight( proj ) ).

SbMatrix	getCameraSpaceMatrix() const

Returns a matrix that transforms the view volume into camera space: it translates the view volume so the viewpoint is at the origin, and rotates it so the view direction is along the negative z axis.

void	projectPointToLine(const SbVec2f &pt,
SbLine &line) const

void	projectPointToLine(const SbVec2f &pt,
SbVec3f &line0,
SbVec3f &line1) const

Maps a 2D point (in 0 <= x,y <= 1) to a 3D line.

void	projectToScreen(const SbVec3f &src,
SbVec3f &dst) const

Maps the 3D point in world coordinates to a 2D point in normalized screen coordinates (0 <= x,y,z <= 1). The z-screen coordinate represents the homogeneous z coordinate which goes (nonlinearly) from 0 at the near clipping plane to 1 at the far clipping plane.

SbPlane	getPlane(float distFromEye) const

Returns a plane parallel to the near (or far) plane of the view volume at a given distance from the projection point (eye).

SbVec3f	getSightPoint(float distFromEye) const

Returns the point along the line of sight at the given distance from the projection point (eye).

SbVec3f	getPlanePoint(float distFromEye,
const SbVec2f &normPoint) const

Returns the projection of a given point in normalized screen coordinates (see projectToScreen()) onto the plane parallel to the near plane that is at distFromEye units from the eye.

SbRotation	getAlignRotation(SbBool rightAngleOnly = FALSE) const

Returns a rotation that would align a viewed object so that its positive x-axis (of its object space) is to the right in the view and its positive y-axis is up. If rightAngleOnly is TRUE, it will come as close as it can to this goal by using only 90 degree rotations.

float	getWorldToScreenScale(const SbVec3f &worldCenter,
float normRadius) const

Returns a scale factor that would scale a unit sphere centered at worldCenter so that it would appear to have the given radius in normalized screen coordinates when projected onto the near plane.

SbVec2f	projectBox(const SbBox3f &box) const

Projects the given 3D bounding box onto the near plane and returns the size (in normalized screen coordinates) of the rectangular region that encloses it.

SbViewVolume	narrow(float left,
float bottom,
float right,
float top) const

Given a view volume, narrows the view to the given sub-rectangle of the near plane. The coordinates of the rectangle are between 0 and 1, where (0,0) is the lower-left corner of the near plane and (1,1) is the upper-right corner.

SbViewVolume	narrow(const SbBox3f &box) const

Narrows a view volume by the given box. The box must lie inside the unit cube, and the view will be shrunk according to the size of the box.

void	ortho(float left,
float right,
float bottom,
float top,
float near,
float far)

Sets up an orthographic view volume with the given sides. The parameters are the same as for the OpenGL glOrtho() routine.

void	perspective(float fovy,
float aspect,
float near,
float far)

Sets up a perspective view volume with the given field of view and aspect ratio. The parameters are the same as for the OpenGL gluPerspective() routine, except that the field of view angle is specified in radians.

void	rotateCamera(const SbRotation &q)

Rotate the camera view direction. Note that this accomplishes the reverse of doing an OpenGL glRotate() command after defining a camera, which rotates the scene viewed by the camera.

void	translateCamera(const SbVec3f &v)

Translate the camera viewpoint. Note that this accomplishes the reverse of doing an OpenGL glTranslate() command after defining a camera, which translates the scene viewed by the camera.

SbVec3f	zVector() const

Returns the positive z axis in eye space. In this coordinate system, the z value of the near plane should be GREATER than the z value of the far plane.

SbViewVolume	zNarrow(float near,
float far) const

Returns a narrowed view volume which contains as tightly as possible the given interval on the z axis (in eye space). The returned view volume will never be larger than the current volume, however. near and far are given in terms of zVector(): this means that near > far must hold.

void	scale(float factor)

Scales width and height of view volume by given factor.

void	scaleWidth(float ratio)

void	scaleHeight(float ratio)

Scales view volume to be the given ratio of its current width or height, leaving the resulting view volume centered about the same point (in the near plane) as the current one.

ProjectionType	getProjectionType() const

const SbVec3f &	getProjectionPoint() const

const SbVec3f &	getProjectionDirection() const

Returns projection information.

float	getNearDist() const

Returns distance from projection point to near plane.

float	getWidth() const

float	getHeight() const

float	getDepth() const

Returns bounds of viewing frustum.

void	setStereoAdjustment(float adjustment)

float	getStereoAdjustment() const

Sets/queries the stereo offset.

void	setBalanceAdjustment(float adjustment)

float	getBalanceAdjustment() const

Sets/queries the parallax balance.

void	setStereoMode(StereoMode mode)

StereoMode	getStereoMode() const

Sets/queries the stereo mode.

SEE ALSO

SbVec3f, SbVec2f, SbBox3f, SbMatrix, SbRotation


SoCamera

NAME

SoCamera - abstract base class for camera nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoCamera

SYNOPSIS

#include <Inventor/nodes/SoCamera.h>

#define SO_ASPECT_SQUARE	1.00

#define SO_ASPECT_VIDEO	1.333333333

#define SO_ASPECT_35mm_ACADEMY	1.371

#define SO_ASPECT_16mm	1.369

#define SO_ASPECT_35mm_FULL	1.33333

#define SO_ASPECT_70mm	2.287

#define SO_ASPECT_CINEMASCOPE	2.35

#define SO_ASPECT_HDTV	1.777777777

#define SO_ASPECT_PANAVISION	2.361

#define SO_ASPECT_35mm	1.5

#define SO_ASPECT_VISTAVISION	2.301

enum ViewportMapping	{
SoCamera::CROP_VIEWPORT_FILL_FRAME
Crops the viewport within the current window, so that the aspect ratio matches that of the camera. As the window size changes, the aspect ratio remains unchanged. The cropped region is drawn as a filled gray area.
SoCamera::CROP_VIEWPORT_LINE_FRAME
Crops the viewport, but draws a thin frame around the viewport
SoCamera::CROP_VIEWPORT_NO_FRAME
Crops the viewport, but gives no visual feedback as to the viewport dimensions within the window
SoCamera::ADJUST_CAMERA
Adjusts the camera aspect ratio and height to make it fit within the given window. (The camera's fields are not affected, just the values sent to the graphics library.)
SoCamera::LEAVE_ALONE
Do nothing. Camera image may become stretched out of proportion
}

enum StereoMode	{
SoCamera::MONOSCOPIC
Monoscopic (i.e., non-stereo) viewing
SoCamera::LEFT_VIEW
Left eye view
SoCamera::RIGHT_VIEW
Right eye view
}

Fields from class SoCamera:

SoSFEnum	viewportMapping

SoSFVec3f	position

SoSFRotation	orientation

SoSFFloat	aspectRatio

SoSFFloat	nearDistance

SoSFFloat	farDistance

SoSFFloat	focalDistance

Methods from class SoCamera:

void	pointAt(const SbVec3f &targetPoint)

virtual void	scaleHeight(float scaleFactor)

virtual SbViewVolume	getViewVolume(float useAspectRatio = 0.0) const

void	viewAll(SoNode *sceneRoot,
const SbViewportRegion &vpRegion,
float slack = 1.0)

void	viewAll(SoPath *path,
const SbViewportRegion &vpRegion,
float slack = 1.0)

SbViewportRegion	getViewportBounds(const SbViewportRegion &region) const

void	setStereoAdjustment(float adjustment)

float	getStereoAdjustment() const

void	setBalanceAdjustment(float adjustment)

float	getBalanceAdjustment() const

void	setStereoMode(StereoMode mode)

StereoMode	getStereoMode() const

static SoType	getClassTypeId()

Methods from class SoNode:

void	setOverride(SbBool state)

SbBool	isOverride() const

SoNode *	copy(SbBool copyConnections = FALSE) const

virtual SbBool	affectsState() const

static SoNode *	getByName(const SbName &name)

static int	getByName(const SbName &name,
SoNodeList &list)

Methods from class SoFieldContainer:

void	setToDefaults()

SbBool	hasDefaultValues() const

SbBool	fieldsAreEqual(const SoFieldContainer *fc) const

void	copyFieldValues(const SoFieldContainer *fc,
SbBool copyConnections = FALSE)

SbBool	set(const char *fieldDataString)

void	get(SbString &fieldDataString)

virtual int	getFields(SoFieldList &resultList) const

virtual SoField *	getField(const SbName &fieldName) const

SbBool	getFieldName(const SoField *field,
SbName &fieldName) const

SbBool	isNotifyEnabled() const

SbBool	enableNotify(SbBool flag)

Methods from class SoBase:

void	ref()

void	unref() const

void	unrefNoDelete() const

void	touch()

virtual SoType	getTypeId() const

SbBool	isOfType(SoType type) const

virtual void	setName(const SbName &name)

virtual SbName	getName() const

DESCRIPTION

This is the abstract base class for all camera nodes. It defines the common methods and fields that all cameras have. Cameras are used to view a scene. When a camera is encountered during rendering, it sets the projection and viewing matrices and viewport appropriately; it does not draw geometry. Cameras should be placed before any shape nodes or light nodes in a scene graph; otherwise, those shapes or lights cannot be rendered properly. Cameras are affected by the current transformation, so you can position a camera by placing a transformation node before it in the scene graph. The default position and orientation of a camera is at (0,0,1) looking along the negative z-axis.

You can also use a node kit to create a camera; see the reference page for SoCameraKit.

FIELDS

SoSFEnum	viewportMapping

Defines how to map the rendered image into the current viewport, when the aspect ratio of the camera differs from that of the viewport.

SoSFVec3f	position

The location of the camera viewpoint.

SoSFRotation	orientation

The orientation of the camera viewpoint, defined as a rotation of the viewing direction from its default (0,0,-1) vector.

SoSFFloat	aspectRatio

The ratio of camera viewing width to height. This value must be greater than 0.0. There are several standard camera aspect ratios defined in SoCamera.h.

SoSFFloat	nearDistance

SoSFFloat	farDistance

The distance from the camera viewpoint to the near and far clipping planes.

SoSFFloat	focalDistance

The distance from the viewpoint to the point of focus. This is typically ignored during rendering, but may be used by some viewers to define a point of interest.

METHODS

void	pointAt(const SbVec3f &targetPoint)

Sets the orientation of the camera so that it points toward the given target point while keeping the "up" direction of the camera parallel to the positive y-axis. If this is not possible, it uses the positive z-axis as "up."

virtual void	scaleHeight(float scaleFactor)

Scales the height of the camera. Perspective cameras scale their heightAngle fields, and orthographic cameras scale their height fields.

virtual SbViewVolume	getViewVolume(float useAspectRatio = 0.0) const

Returns a view volume structure, based on the camera's viewing parameters. If the useAspectRatio argument is not 0.0 (the default), the camera uses that ratio instead of the one it has.

void	viewAll(SoNode *sceneRoot,
const SbViewportRegion &vpRegion,
float slack = 1.0)

void	viewAll(SoPath *path,
const SbViewportRegion &vpRegion,
float slack = 1.0)

Sets the camera to view the scene rooted by the given node or defined by the given path. The near and far clipping planes will be positioned slack bounding sphere radii away from the bounding box's center. A value of 1.0 will make the near and far clipping planes the tightest around the bounding sphere.

SbViewportRegion	getViewportBounds(const SbViewportRegion &region) const

Returns the viewport region this camera would use to render into the given viewport region, accounting for cropping.

void	setStereoAdjustment(float adjustment)

float	getStereoAdjustment() const

Sets/queries the stereo offset.

void	setBalanceAdjustment(float adjustment)

float	getBalanceAdjustment() const

Sets/queries the parallax balance.

void	setStereoMode(StereoMode mode)

StereoMode	getStereoMode() const

Sets/queries the stereo mode. If the previous mode was MONOSCOPIC, the current position is saved. If the parameter mode is MONOSCOPIC, the saved value is restored in position. When rendering in stereo mode, set left view, render, set right view, render and then restore to monoscopic mode.

static SoType	getClassTypeId()

Returns type identifier for this class.

FILE FORMAT/DEFAULT

This is an abstract class. See the reference page of a derived class for the format and default values.

SEE ALSO

SoOrthographicCamera, SoPerspectiveCamera, SoCameraKit


SoWinViewer

NAME

SoWinViewer - viewer component lowest base class

INHERITS FROM

(Note multiple inheritance!)

1. SoWinComponent > SoWinGLWidget > SoWinRenderArea > SoWinViewer

2. SoWinStereoViewer > SoWinViewer

SYNOPSIS

#include <Inventor/Win/viewers/SoWinViewer.h>

typedef void	SoWinViewerCB(void *userData,
SoWinViewer *viewer)

Callback.

typedef void	SoXtViewerFPSCB(float fps,
void *userData,
SoXtViewer *viewer)

typedef void	SoXtViewerDecimationPercentageCB
(float percentage,
void *userData,
SoXtViewer *viewer)

Large Model Viewing notification callbacks for frames per second, and decimation percentage.

enum Type	{
SoWinViewer::BROWSER
Camera views scene, but is not added to scene
SoWinViewer::EDITOR
Camera is added to user's scene
}

enum DecimationStrategy	{
SoWinViewer::NORMAL
Decimation is not changed
SoWinViewer::FIXED_NUM_TRIANGLES
Try to fix number of triangles drawn
SoWinViewer::FRAMES_PER_SECOND
Try to fix frames per second
SoWinViewer::FIXED_PERCENTAGE
Use given decimation percentage
}

enum DrawStyle	{
SoWinViewer::VIEW_AS_IS
Unchanged
SoWinViewer::VIEW_HIDDEN_LINE
Render only the frontmost lines
SoWinViewer::VIEW_NO_TEXTURE
Render without textures
SoWinViewer::VIEW_LOW_COMPLEXITY
Render low complexity and no texture
SoWinViewer::VIEW_LINE
Wireframe draw style
SoWinViewer::VIEW_POINT
Point draw style
SoWinViewer::VIEW_BOX
Bounding box draw style
}

enum DrawType	{
SoWinViewer::STILL
Applies to static rendering
SoWinViewer::INTERACTIVE
Applies to rendering while interactive viewing
}

enum BufferType	{
SoWinViewer::BUFFER_SINGLE
Single buffer
SoWinViewer::BUFFER_DOUBLE
Double buffer
SoWinViewer:BUFFER_INTERACTIVE
Double buffer while interactive viewing
}

enum CursorStyle	{
SoWinViewer::CLASSIC,
Standard Open Inventor cursors
SoWinViewer::XOR,
Improved cursors using XOR
SoWinViewer::SHADOW
Improved cursors using "shadow"
}	[Win32 only]

Methods from class SoWinViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

void	setCursorStyle( SoWinViewer::CursorStyle style )	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

Methods from class SoWinRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoWinDevice *)

void	unregisterDevice(SoWinDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoWinRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoWinGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

HWND	getNormalWindow()

HWND	getOverlayWindow()

HGLRC	getNormalContext()

HGLRC	getOverlayContext()

HWND	getNormalWidget()

HWND	getOverlayWidget()

virtual void	setNormalVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getNormalVisual()

virtual void	setOverlayVisual(PIXELFORMATDESCRIPTOR *vis)

PIXELFORMATDESCRIPTOR *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

void	setCursor(Cursor newCursor) [Win32 only]

Cursor	getCursor() [Win32 only]

HDC	getNormalDC() [Win32 only]

HDC	getOverlayDC() [Win32 only]

void	setStealFocus(SbBool onOrOff) [Win32 only]

virtual void	setPixelFormat(int format) [Win32 only]

int	getPixelFormat() [Win32 only]

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

Methods from class SoWinStereoViewer:

virtual void	setStereoActive(SbBool activate)

virtual SbBool	isStereoActive()

virtual void	actualRendering()

virtual SoCamera *	getViewerCamera()

virtual void	adjustClippingPlanes()

virtual const SbVec2s&	getSize()

virtual const SbVec2s&	getTopLeft()

virtual const SbVec2s&	getBottomRight()

virtual SbBool	isViewerDoubleBuffer()

virtual void	setStereoViewType(SoWinStereoViewType * stereo)

virtual SoWinStereoViewType *	getStereoViewType()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

virtual void	setStereoOffset(float offset)

virtual float	getStereoOffset()

virtual void	setStereoBalance(float balance)

virtual float	getStereoBalance()

virtual void	setViewport(short left,
short bottom,
short width,
short height)

virtual void	getViewport(short &left,
short &bottom,
short &width,
short &height)

virtual HDC	getCurrentDC()	[Win32 only]

DESCRIPTION

This is the lowest base class for viewer components. This class adds the notion of a camera to the SoWinRenderArea class. Whenever a new scene is specified with setSceneGraph(), the first camera encountered will be by default used as the edited camera. If no camera is found in the scene, the viewer will automatically create one. The viewer will use the first SoVRMLViewpoint encountered (if any) to define the parameters of the created camera. If the viewer type is SoWinViewer::BROWSER then the camera is told to view the supplied scene graph but is not added beneath that scene graph root. If the viewer type is SoWinViewer::EDITOR then the camera is added beneath the supplied scene graph root.

In addition to automatically creating a camera if needed, this base class also creates a headlight (directional light which is made to follow the camera), enables the user to change drawing styles (like wireframe or move wireframe), and buffering types. This base class also provides a convenient way to have the camera near and far clipping planes be automatically adjusted to minimize the clipping of objects in the scene.

Viewers allow the application to shadow message processing. When the application registers a message processing callback by calling setEventCallback() the viewer will invoke this callback for every Windows message it receives. However, unlike the render area, the viewer ignores the return value of this callback, and processes the message as usual. This allows the application to expand viewing capabilities without breaking the viewing paradigm. It is an easy way to hook up other devices, like the spaceball, to an existing viewer.

Depending on the DecimationStrategy, a viewer can control the complexity of a scene by adjusting the Decimation elements to reach certain goals. The viewer can attempt to keep a constant frame rate or a constant number of triangles rendered. The viewer can be set to switch to full detail when the scene is not moving.

In order to set the frame rate, the viewer times each render action traversal, and then adjusts the Decimation percentage to keep the time within a range depending on the goal frames per second. To fix the number of triangles, the viewer applies a GetPrimitiveCountAction before each traversal and sets the DecimationPercentage to the desired percentage of the resulting count.

If the DecimationStrategy is NORMAL (the default) then nothing special is done. If the strategy is FIXED_PERCENTAGE, then the same percentage is used for every render. Also note that FIXED_PERCENTAGE sets the DecimationType to be PERCENTAGE (all others use AUTOMATIC), which means that SoLODs will not use the camera position in their calculations, and can therefore be cached.

The application can add callbacks from the viewer to get the current decimation level, the current primitive count and the current frames per second. The decimation level and primitive count callbacks are called every frame. The frames per second callback is called after a certain number of samples have been averaged together.

METHODS

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

Set and get the edited camera. Setting the camera is only needed if the first camera found in the scene when setting the scene graph isn't the one the user really wants to edit.

virtual void	setCameraType(SoType type)

SoType	getCameraType()

Set and get the camera type that will be created by the viewer if no cameras are found in the scene graph (see SoPerspectiveCamera and SoOrthographicCamera). By default an SoPerspectiveCamera will be created if no camera are found.

Note: the set method will only take effect the next time a scene graph is specified (and if no cameras are found).

virtual void	viewAll()

Changes the camera position to view the entire scene (the camera zoom or orientation isn't changed).

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

Saves and restores the camera values.

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

Turns the headlight on/off (default on) and returns the headlight node.

void	setDrawStyle(SoWinViewer::DrawType type,
SoWinViewer::DrawStyle style)

SoWinViewer::DrawStyle	getDrawStyle(SoWinViewer::DrawType type)

Sets/gets the current drawing style in the main view. The user can specify the INTERACTIVE draw style (draw style used when the scene changes) independently from the STILL style. Default is VIEW_AS_IS draw style for STILL and VIEW_SAME_AS_STILL for INTERACTIVE. Possible draw styles are:

VIEW_AS_IS - Leaves the objects unchanged.

VIEW_HIDDEN_LINE - Renders the object as wireframe, but only shows the object front faces. This is accomplished using a two-pass rendering. In the first pass, the objects are rendered as FILLED using the background BASE_COLOR (this sets up the wanted z-buffer values). The second pass then renders the objects as LINES, while adjusting the z-buffer range to limit overlapping polygons problems.

VIEW_NO_TEXTURE - Renders the objects without any textures. This is done by setting the override flag on an empty SoTexture2 node.

VIEW_LOW_COMPLEXITY - Renders the objects without any textures and with a low complexity. This is done by setting the override flag on an empty SoTexture2 node, and by setting a low complexity value on an SoComplexity node with override set to TRUE.

VIEW_LINE - Renders the objects as LINES (no texture) with lighting model set to BASE_COLOR.

VIEW_LOW_RES_LINE - Renders the objects as LINES (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.

VIEW_POINT - Renders the objects as POINTS (no texture) with lighting model set to BASE_COLOR.

VIEW_LOW_RES_POINT - Renders the objects as POINTS (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.

VIEW_BBOX - Renders the objects with complexity BOUNDING_BOX, lighting model set to BASE_COLOR and drawing style LINES (no texture) with no depth comparison.

VIEW_SAME_AS_STILL - This only applies to INTERACTIVE draw type. It enables the interactive draw style mode to match the regular draw style mode without having to set it explicitly.

void	setBufferingType(SoWinViewer::BufferType type)

SoWinViewer::BufferType	getBufferingType()

Sets/gets the current buffering type in the main view (default SoWinViewer::BUFFER_DOUBLE).

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

Set/get whether the viewer is turned on or off. When turned on, messages are consumed by the viewer. When viewing is off, messages are processed by the viewer's render area. This means messages will be sent down to the scene graph for processing (i.e. picking can occur). Note that if the application has registered a message callback, it will be invoked on every message, whether viewing is turned on or not. However, the return value of this callback (which specifies whether the callback handled the message or not) is ignored when viewing is on. That is, the viewer will process the message even if the callback already did. This is to ensure that the viewing paradigm is not broken (default viewing is on).

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

Set/get whether the viewer is allowed to change the cursor over the renderArea window. When disabled, the cursor is undefined by the viewer and will not change as the mode of the viewer changes. When re-enabled, the viewer will reset it to the appropriate icon.

Disabling the cursor enables the application to set the cursor directly on the viewer window or on any parent widget of the viewer. This can be used when setting a busy cursor on the application shell.

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

Set and get the auto clipping plane. When auto clipping is ON, the camera near and far planes are dynamically adjusted to be as tight as possible around the objects being viewed.

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

Turns stereo viewing on/off on the viewer (default off).

To insure backward compatibility with older Open Inventor versions, and specifically with the old stereo model, the above methods still apply to stereo. Like the current stereo model, the old model makes use of an offset to represent the eye separation. However, instead of adapting the view volume, the cameras were rotated toward the default point of focus, creating the stereo viewing angle.

If no type of stereo (from the current stereo model) is set on the viewer and setStereoViewing is called, then the old stereo model is in effect. Note that setStereoViewing is the method that actually sets OpenGL in stereo mode. If the old stereo model is in effect, then the offset passed to setStereoOffset is no longer a factor but the actual value used to separate the cameras. In that case, the default value for the offset is 3.

When in stereo mode, which may not work on all machines, the scene is rendered twice (in the left and right buffers) with an offset between the two views to simulate stereo viewing. Stereo glasses may be needed to see the effect. Old style stereo viewing is only possible with a graphics board that has support for stereo.

See SoWinStereoViewer for information on the current stereo model.

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

When the viewer is in seek mode, left mouse clicks initiate a pick, and the viewer changes its orientation and position to look at the picked object. This routine tells the seeking viewer whether to orient the camera towards the picked point (detail on), or the center of the object's bounding box (detail off). Default is detail on.

void	setSeekTime(float seconds)

float	getSeekTime()

Set the time a seek takes to change to the new camera location. A value of zero seeks directly to the point without any animation. Default value is 2 seconds.

void	addStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoWinViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoWinViewerCB *f,
void *userData = NULL)

Add/remove start and finish callback routines on the viewer. Start callbacks are called whenever the user starts doing interactive viewing (for example, mouse down), and finish callbacks are called when user is done doing interactive work (for example, mouse up).

Note: The viewer "this" pointer is passed as callback data.

void	copyView(time_t eventTime)

void	pasteView(time_t eventTime)

Copy/paste the view. eventTime should be the time of the Windows message which initiated the copy or paste (e.g. if copy/paste is initiated from a keystroke, eventTime should be the time in the key down message.)

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

Set/get strategy to use to decide on decimation value.

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

Set/get goal number of triangles for the viewer to try to render.

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

Set/get goal frames per second for the viewer to try to render.

void	setFixedPercentage(float percent)

float	getFixedPercentage()

Set/get fixed percentage for the viewer to render (0.0 to 1.0)

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

If this flag is set, the viewer will render at full resolution when it sits still for a certain period of time.

SbBool	isStillNow()

Returns whether the viewer is currently still.

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

Register frames per second callback.

void	setNumSamples(int numFrames)

int	getNumSamples()

Set/get how many frames should be timed before frames per second callback is called, default is 10.

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

Register decimation percentage callback.

float 	getCurrentDecimationPercentage()

Return the Decimation Percentage the viewer used in its last render.

void	setCursorStyle(SoWinViewer::CursorStyle style)	[Win32 only]

SoWinViewer::CursorStyle	getCursorStyle()	[Win32 only]

The standard Open Inventor (CLASSIC) cursors use all white pixels, which can be difficult to see over light colored geometry or background. The XOR and SHADOW style cursors are much easier to see. The XOR style cursors that have a "hand" shape differ from the other styles in that the cursor hotspot is at the tip of the index finger. This generally works better for picking.

The cursor can also be specified using environment variable OIV_CURSOR_STYLE, where the values 0, 1, and 2 specify Classic, XOR, and Shadow cursors respectively.

SEE ALSO

SoWinComponent, SoWinRenderArea, SoWinExaminerViewer, SoWinWalkViewer, SoWinFlyViewer, SoWinPlaneViewer


SoWinStereoViewer

NAME

SoWinStereoViewer - pure virtual class for stereo support

INHERITS FROM

SoWinStereoViewer

SYNOPSIS

#include <Inventor/Win/stereo/SoWinStereoViewer.h>

Methods from class SoWinStereoViewer:

virtual void	setStereoActive(SbBool activate)

virtual SbBool	isStereoActive()

virtual void	actualRendering()

virtual SoCamera *	getViewerCamera()

virtual void	adjustClippingPlanes()

virtual const SbVec2s&	getSize()

virtual const SbVec2s&	getTopLeft()

virtual const SbVec2s&	getBottomRight()

virtual SbBool	isViewerDoubleBuffer()

virtual void	setStereoViewType(SoWinStereoViewType * stereo)

virtual SoWinStereoViewType *	getStereoViewType()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

virtual void	setStereoOffset(float offset)

virtual float	getStereoOffset()

virtual void	setStereoBalance(float balance)

virtual float	getStereoBalance()

virtual void	setViewport(short left,
short bottom,
short width,
short height)

virtual void	getViewport(short &left,
short &bottom,
short &width,
short &height)

virtual HDC	getCurrentDC()	[Win32 only]

DESCRIPTION

This pure virtual class is the class that should be extended by viewer classes that will do stereo rendering.

METHODS

virtual void	setStereoActive(SbBool activate)

virtual SbBool	isStereoActive()

Sets/queries stereo activation.

virtual void 	actualRendering()

This method is called automatically when the viewer requests that its SoWinStereoViewType object perform stereo rendering. actualRendering may then be called twice (once for each eye view) and therefore must not take into account any stereo-specific settings. It should behave as if it were a rendering method for a monoscopic view.

virtual SoCamera *	getViewerCamera()

Returning the camera allows the SoWinStereoViewType to manipulate it to achieve the stereo effect.

virtual void	adjustClippingPlanes()

Along with the manipulation of the camera, SoWinStereoViewType needs to set the scene appropriately when changing the camera settings.

virtual const SbVec2s&	getSize()

virtual const SbVec2s&	getTopLeft()

virtual const SbVec2s&	getBottomRight()

Return the size and position of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system (typically Y increasing downward). Also note that getTopLeft() literally returns "Top" in the first value of the vector and "Left" in the second value (reverse of the usual X,Y ordering). Same for getBottomRight().

virtual SbBool	isViewerDoubleBuffer()

Queries if viewer is double buffered.

virtual void	setStereoViewType(SoWinStereoViewType * stereo)

virtual SoWinStereoViewType *	getStereoViewType()

If SoWinStereoViewType is NULL, the default type (NoStereoViewType) is applied. The stereo viewer will behave like a monoscopic viewer.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

Sets/queries reversal of the left and right views.

virtual void	setStereoOffset(float offset)

virtual float	getStereoOffset()

Sets/queries the offset between each view.

virtual void	setStereoBalance(float balance)

virtual float	getStereoBalance()

Sets/queries the stereo balance (the position of the zero parallax plane).

virtual void	setViewport(short left,
short bottom,
short width,
short height)

virtual void	getViewport(short &left,
short &bottom,
short &width,
short &height)

Sets/queries viewport region with given origin (lower-left corner) and size, given as pixel coordinates.

virtual HDC	getCurrentDC()	[Win32 only]

Get the current device context for wglMakeCurrent.

SEE ALSO

SoWinViewer


SoWinAnaglyphStereo

NAME

SoWinAnaglyphStereo - class for anaglyph stereo support

INHERITS FROM

SoWinStereoViewType > SoWinAnaglyphStereo

SYNOPSIS

#include <Inventor/Win/stereo/SoWinAnaglyphStereo.h>

enum ColorFilter	{
SoWinAnaglyphStereo::RED_CYAN
SoWinAnaglyphStereo::GREEN_MAGENTA
SoWinAnaglyphStereo::BLUE_YELLOW
}

Methods from class SoWinAnaglyphStereo:

SoWinAnaglyphStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinAnaglyphStereo()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

virtual void	renderStereoView()

virtual SbBool	canClearBeforeRender()

SbBool	requireHardware()

StereoViewType	getStereoViewType()

void	setColorFilter(ColorFilter filter)

ColorFilter	getColorFilter()

void	clearStereo()

DESCRIPTION

There are three kinds of filters. You can reverse the left and rights views, making three new kinds of filters (CYAN_RED, etc.). The Alpha channel is used in both views.

METHODS

SoWinAnaglyphStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinAnaglyphStereo()

Constructor and destructor.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

Sets/queries stereo reversal.

virtual void	renderStereoView()

Renders the stereo view.

virtual SbBool	canClearBeforeRender()

Queries ability to clear before rendering.

SbBool	requireHardware()

Always returns FALSE.

StereoViewType	getStereoViewType()

Always returns ANAGLYPH_STEREO.

void	setColorFilter(ColorFilter filter)

ColorFilter	getColorFilter()

Sets/queries the filter type.

void	clearStereo()

Clears stereo.

SEE ALSO

SoWinStereoViewer, SoWinStereoViewType, SoWinViewer


SoWinHalfScreenStereo

NAME

SoWinHalfScreenStereo - class for half-screen stereo support

INHERITS FROM

SoWinStereoViewType > SoWinHalfScreenStereo

SYNOPSIS

#include <Inventor/Win/stereo/SoWinHalfScreenStereo.h>

enum HalfScreenMode	{
SoWinHalfScreenStereo::OVERUNDER_FILL
SoWinHalfScreenStereo::OVERUNDER
SoWinHalfScreenStereo::SIDEBYSIDE_FILL
SoWinHalfScreenStereo::SIDEBYSIDE
}

Methods from class SoWinHalfScreenStereo:

SoWinHalfScreenStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinHalfScreenStereo()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

void	setHalfScreenMode(HalfScreenMode mode)

HalfScreenMode	getHalfScreenMode()

virtual void	renderStereoView()

virtual SbBool	canClearBeforeRender()

SbBool	requireHardware()

StereoViewType	getStereoViewType()

void	clearStereo()

DESCRIPTION

This class implements the half-screen stereo type. The display area is divided into two parts, one for displaying the left eye view and one for displaying the right eye view.

METHODS

SoWinHalfScreenStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinHalfScreenStereo()

Constructor and destructor.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

Sets/queries stereo reversal.

void	setHalfScreenMode(HalfScreenMode mode)

HalfScreenMode	getHalfScreenMode()

Sets/queries half-screen mode.

virtual void	renderStereoView()

Renders the stereo view.

virtual SbBool	canClearBeforeRender()

Queries ability to clear before rendering.

SbBool	requireHardware()

Always returns FALSE.

StereoViewType	getStereoViewType()

Always returns HALF_SCREEN_STEREO.

void	clearStereo()

Clears stereo.

SEE ALSO

SoWinStereoViewer, SoWinStereoViewType, SoWinViewer


SoWinInterlacedStereo

NAME

SoWinInterlacedStereo - class for interlaced stereo support

INHERITS FROM

SoWinStereoViewType > SoWinInterlacedStereo

SYNOPSIS

#include <Inventor/Win/stereo/SoWinInterlacedStereo.h>

enum InterlacedMode	{
SoWinInterlacedStereo::HORIZONTAL
SoWinInterlacedStereo::VERTICAL
}

Methods from class SoWinInterlacedStereo:

SoWinInterlacedStereo(SoWinStereoViewer * stereoViewer = NULL)

~ SoWinInterlacedStereo()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

void	setInterlacedMode(InterlacedMode mode)

InterlacedMode	getInterlacedMode()

void	setScreenInterlacing(SbBool screen)

SbBool	isScreenInterlacing()

void	setFastInterlacing(SbBool fast=TRUE)

SbBool	isFastInterlacing()

virtual void	renderStereoView()

virtual SbBool	canClearBeforeRender()

SbBool	requireHardware()

StereoViewType	getStereoViewType()

void	clearStereo()

DESCRIPTION

This class implements the interlaced stereo type. Using the interlaced mode, the stereo effect is achieved using special devices (projectors,...) that translate an interlaced image into a stereoscopic view. Alternating scan lines display images for the left and right eyes.

The interlaced mode can work in two modes: fast or best. This is simply a matter of quality. Due to the interlacing, lines close to horizontal can appear as dotted lines. In best mode, those parts of the model are drawn as if they were thicker. By default, the mode is fast.

METHODS

SoWinInterlacedStereo(SoWinStereoViewer * stereoViewer = NULL)

~ SoWinInterlacedStereo()

Constructor and destructor.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

Sets/queries stereo reversal.

void	setInterlacedMode(InterlacedMode mode)

InterlacedMode	getInterlacedMode()

Sets/queries interlaced mode.

void	setScreenInterlacing(SbBool screen)

SbBool	isScreenInterlacing()

If screen is TRUE (default), the line interlacing is done according to the screen (if the window is moving, the first line might be either an even or an odd line). Otherwise, do the interlacing according to the window itself (first line is always even).

void	setFastInterlacing(SbBool fast=TRUE)

SbBool	isFastInterlacing()

Sets/queries fast interlacing mode.

virtual void	renderStereoView()

Renders the stereo view.

virtual SbBool	canClearBeforeRender()

Queries ability to clear before rendering.

SbBool	requireHardware()

Always returns FALSE. (Although special hardware may be required, this flag only indicates if a special graphics board is required. It's not, hence the return value of FALSE.)

StereoViewType	getStereoViewType()

Always returns INTERLACED_STEREO.

void	clearStereo()

Clears stereo.

SEE ALSO

SoWinStereoViewer, SoWinStereoViewType, SoWinViewer


SoWinNoStereoView

NAME

SoWinNoStereoView - makes a stereo viewer behave like a monoscopic (non-stereo) viewer

INHERITS FROM

SoWinStereoViewType > SoWinNoStereoView

SYNOPSIS

#include <Inventor/Win/stereo/SoWinNoStereoView.h>

Methods from class SoWinNoStereoView:

SoWinNoStereoView(SoWinStereoViewer * stereoViewer = NULL)

~SoWinNoStereoView()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

virtual void	renderStereoView()

virtual SbBool	canClearBeforeRender()

SbBool	requireHardware()

StereoViewType	getStereoViewType()

void	clearStereo()

DESCRIPTION

SoWinNoStereoView makes a stereo viewer behave as if it were a monoscopic viewer. Modifying the stereo view technique has no effect.

METHODS

SoWinNoStereoView(SoWinStereoViewer * stereoViewer = NULL)

~SoWinNoStereoView()

Constructor and destructor.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

reverseStereoView does nothing. The query always returns FALSE.

virtual void	renderStereoView()

Renders the stereo view. It calls the actualRendering method of the SoWinStereoViewer only once, without modifying any parameters, such as the camera.

virtual SbBool	canClearBeforeRender()

Always returns TRUE.

SbBool	requireHardware()

Always returns FALSE.

StereoViewType	getStereoViewType()

Always returns NO_STEREO_VIEW.

void	clearStereo()

This does nothing.

SEE ALSO

SoWinStereoViewer, SoWinStereoViewType, SoWinViewer


SoWinRawStereo

NAME

SoWinRawStereo - class for OpenGL stereo support

INHERITS FROM

SoWinStereoViewType > SoWinRawStereo

SYNOPSIS

#include <Inventor/Win/stereo/SoWinRawStereo.h>

Methods from class SoWinRawStereo:

SoWinRawStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinRawStereo()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

virtual void	renderStereoView()

virtual SbBool	canClearBeforeRender()

SbBool	requireHardware()

StereoViewType	getStereoViewType()

void	clearStereo()

DESCRIPTION

This class implements the OpenGL "quad buffered" stereo type. This requires a stereo accelerated graphics board.

METHODS

SoWinRawStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinRawStereo()

Constructor and destructor.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

Sets/queries stereo reversal.

virtual void	renderStereoView()

Renders the stereo view.

virtual SbBool	canClearBeforeRender()

Queries ability to clear before rendering.

SbBool	requireHardware()

Always returns TRUE.

StereoViewType	getStereoViewType()

Always returns RAW_STEREO.

void	clearStereo()

Clears stereo.

SEE ALSO

SoWinStereoViewer, SoWinStereoViewType, SoWinViewer


SoWinSSDIStereo

NAME

SoWinSSDIStereo - class for SSDI stereo support

INHERITS FROM

SoWinStereoViewType > SoWinSSDIStereo

SYNOPSIS

#include <Inventor/Win/stereo/SoWinSSDIStereo.h>

Methods from class SoWinSSDIStereo:

SoWinSSDIStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinSSDIStereo()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

virtual void	renderStereoView()

virtual SbBool	canClearBeforeRender()

SbBool	requireHardware()

StereoViewType	getStereoViewType()

void	clearStereo()

DESCRIPTION

This class implements the SSDI stereo type. [Win32 only]

This type of stereo relies on the SSDI library. This library, which is provided by VRex Systems (http://www.vrex.com), is capable of supporting a large variety of stereo systems (shutter glasses, polarized projectors, etc.). Once the library is installed on the system, choose which driver the library will make use of (according to the hardware connected to your system), and activate the SSDI stereo.

METHODS

SoWinSSDIStereo(SoWinStereoViewer * stereoViewer = NULL)

~SoWinSSDIStereo()

Constructor and destructor.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

Sets/queries stereo reversal.

virtual void	renderStereoView()

Renders the stereo view.

virtual SbBool	canClearBeforeRender()

Queries ability to clear before rendering.

SbBool	requireHardware()

Always returns FALSE.

StereoViewType	getStereoViewType()

Always returns SSDI_STEREO.

void	clearStereo()

Clears stereo.

SEE ALSO

SoWinStereoViewer, SoWinStereoViewType, SoWinViewer


SoWinStereoDialog

NAME

SoWinStereoDialog - component that lets you modify stereo attributes interactively

INHERITS FROM

SoWinComponent > SoWinStereoDialog

SYNOPSIS

#include <Inventor/Win/stereo/SoStereoDialog.h>

Methods from class SoWinStereoDialog:

SoWinStereoDialog(Widget parent = NULL,
SoWinStereoViewer * viewer = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinStereoDialog()

virtual void	update()

DESCRIPTION

This component displays a dialog box for modifying stereo attributes interactively.

METHODS

SoWinStereoDialog(Widget parent = NULL,
SoWinStereoViewer * viewer = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinStereoDialog()

Constructor and destructor.

virtual void	update()

Notify the stereo dialog that the viewer state may have changed.

SEE ALSO

SoWinStereoViewer, SoWinStereoViewType, SoWinViewer


SoWinStereoViewType

NAME

SoWinStereoViewType - class for stereo management

INHERITS FROM

SoWinStereoViewType

SYNOPSIS

#include <Inventor/Win/stereo/SoWinStereoViewType.h>

enum StereoViewType	{
SoWinStereoViewType::NO_STEREO_VIEW
Monoscopic viewing
SoWinStereoViewType::INTERLACED_STEREO
Two views interlaced in a single image
SoWinStereoViewType::HALF_SCREEN_STEREO
Each view displayed in a half screen
SoWinStereoViewType::RAW_STEREO
Two views superimposed on a single image
SoWinStereoViewType::ANAGLYPH_STEREO
Each view is displayed through a color filter
SoWinStereoViewType::SSDI_STEREO
Uses the SSDI library to set the stereo
}

Methods from class SoWinStereoViewType:

SoWinStereoViewType(SoWinStereoViewer * stereoViewer=NULL)

~SoWinStereoViewType()

void	setStereoViewer(SoWinStereoViewer *viewer=NULL)

SoWinStereoViewer*	getStereoViewer()

virtual StereoViewType	getStereoViewType()

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

virtual void	renderStereoView()

virtual SbBool	canClearBeforeRender()

virtual SbBool	requireHardware()

virtual void	clearStereo()

DESCRIPTION

This class defines a strategy of stereo management. Using a subclass of SoWinStereoViewType allows an SoWinViewer object to use a stereoscopic rendering mode.

METHODS

SoWinStereoViewType(SoWinStereoViewer * stereoViewer=NULL)

~SoWinStereoViewType()

Constructor and destructor. The destructor calls clearStereo.

void	setStereoViewer(SoWinStereoViewer *viewer=NULL)

SoWinStereoViewer*	getStereoViewer()

Sets/queries the stereo viewer.

virtual StereoViewType	getStereoViewType()

Queries the stereo view type.

virtual void	reverseStereoView(SbBool reverse)

virtual SbBool	isStereoViewReversed()

Sets/queries stereo reversal. The left view becomes the right view, and the right view becomes the left view.

virtual void	renderStereoView()

Renders the stereo view. You can use the SoWinNoStereoView subclass to render the view without any stereo effect.

virtual SbBool	canClearBeforeRender()

Queries ability to clear before rendering. This allows a subclass to forbid the color buffer from being cleared before any rendering. Typically, this takes place after rendering the first view. Then, if canClearBeforeRender returns FALSE, the color buffer can keep previous modifications, such as for the stencil buffer, etc.

virtual SbBool	requireHardware()

Returns true or false depending on the type of stereo buffering.

virtual void	clearStereo()

A stereo view type may need to restore a state when it is no longer used by a stereo viewer.

SEE ALSO

SoWinStereoViewer, SoWinViewer


SbVec2d

NAME

SbVec2d - 2D vector class (double precision)

INHERITS FROM

SbVec2d

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec2d:

SbVec2d()

SbVec2d(const double v[2])

SbVec2d(double x,
double y)

double	dot(const SbVec2d &v) const

SbBool	equals(const SbVec2d v,
double tolerance) const

const double *	getValue() const

void	getValue(double &x,
double &y) const

double	length() const

void	negate()

double	normalize()

SbVec2d &	setValue(const double v[2])

SbVec2d &	setValue(double x,
double y)

SbVec2d &	setValue(const SbVec2f &vec2f)

double &	operator [](int i)

const double &	operator [](int i)

SbVec2d &	operator *=(double d)

SbVec2d &	operator /=(double d)

SbVec2d &	operator +=(const SbVec2d &u)

SbVec2d &	operator -=(const SbVec2d &u)

SbVec2d	operator -() const

SbVec2d	operator *(const SbVec2d &v,
double d)

SbVec2d	operator *(double d,
const SbVec2d &v)

SbVec2d	operator /(const SbVec2d &v,
double d)

SbVec2d	operator +(const SbVec2d &v1,
const SbVec2d &v2)

SbVec2d	operator -(const SbVec2d &v1,
const SbVec2d &v2)

int	operator ==(const SbVec2d &v1,
const SbVec2d &v2)

int	operator !=(const SbVec2d &v1,
const SbVec2d &v2)

DESCRIPTION

2D vector class used to store 2D vectors and points using double precision values. Although Open Inventor fields still store only single precision values, for certain applications it is useful and convenient to be able to store and manipulate double precision values, for example, double precision coordinate data or values that will be used for further computation.

METHODS

SbVec2d()

Default constructor.

SbVec2d(const double v[2])

SbVec2d(double x,
double y)

Constructor given vector components.

double	dot(const SbVec2d &v) const

Returns dot (inner) product of vector and another vector.

SbBool	equals(const SbVec2d v,
double tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.

const double *	getValue() const

void	getValue(double &x,
double &y) const

Returns vector components.

double	length() const

Returns geometric length of vector.

void	negate()

Negates each component of vector in place.

double	normalize()

Changes vector to be unit length.

SbVec2d &	setValue(const double v[2])

SbVec2d &	setValue(double x,
double y)

Sets the vector components.

SbVec2d &	setValue(const SbVec2f &vec2f)

Sets value of vector from a single precision vector.

double &	operator [](int i)

const double &	operator [](int i)

Accesses indexed component of vector.

SbVec2d &	operator *=(double d)

SbVec2d &	operator /=(double d)

Component-wise scalar multiplication and division operators.

SbVec2d &	operator +=(const SbVec2d &u)

SbVec2d &	operator -=(const SbVec2d &u)

Component-wise vector addition and subtraction operators.

SbVec2d	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec2d	operator *(const SbVec2d &v,
double d)

SbVec2d	operator *(double d,
const SbVec2d &v)

SbVec2d	operator /(const SbVec2d &v,
double d)

Component-wise binary scalar multiplication and division operators.

SbVec2d	operator +(const SbVec2d &v1,
const SbVec2d &v2)

SbVec2d	operator -(const SbVec2d &v1,
const SbVec2d &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec2d &v1,
const SbVec2d &v2)

int	operator !=(const SbVec2d &v1,
const SbVec2d &v2)

Equality comparison operators.

SEE ALSO

SbVec2f, SbVec3d, SbVec3f, SbVec4d, SbVec4f, SbVec2s, SbVec3s, SbRotation, SbRotationd


SbVec3d

NAME

SbVec3d - 3D vector class (double precision)

INHERITS FROM

SbVec3d

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec3d:

SbVec3d()

SbVec3d(const double v[3])

SbVec3d(double x,
double y,
double z)

SbVec3d(SbPlane &p0,
SbPlane &p1,
SbPlane &p2)

SbVec3d	cross(const SbVec3d &v) const

double	dot(const SbVec3d &v) const

SbBool	equals(const SbVec3d v,
double tolerance) const

SbVec3d	getClosestAxis() const

const double *	getValue() const

void	getValue(double &x,
double &y,
double &z) const

double	length() const

void	negate()

double	normalize()

SbVec3d &	setValue(const double v[3])

SbVec3d &	setValue(double x,
double y,
double z)

SbVec3d &	setValue(const SbVec3d &barycentric,
const SbVec3d &v0,
const SbVec3d &v1,
const SbVec3d &v2)

SbVec3d &	setValue(const SbVec3f &vec3)

double &	operator [](int i)

const double &	operator [](int i)

SbVec3d &	operator *=(double d)

SbVec3d &	operator /=(double d)

SbVec3d &	operator +=(const SbVec3d &u)

SbVec3d &	operator -=(const SbVec3d &u)

SbVec3d	operator -() const

SbVec3d	operator *(const SbVec3d &v,
double d)

SbVec3d	operator *(double d,
const SbVec3d &v)

SbVec3d	operator /(const SbVec3d &v,
double d)

SbVec3d	operator +(const SbVec3d &v1,
const SbVec3d &v2)

SbVec3d	operator -(const SbVec3d &v1,
const SbVec3d &v2)

int	operator ==(const SbVec3d &v1,
const SbVec3d &v2)

int	operator !=(const SbVec3d &v1,
const SbVec3d &v2)

DESCRIPTION

3D vector class used to store 3D vectors and points. Although Open Inventor fields still store only single precision values, for certain applications it is useful and convenient to be able to store and manipulate double precision values, for example, double precision coordinate data or values that will be used for further computation.

METHODS

SbVec3d()

Default constructor.

SbVec3d(const double v[3])

SbVec3d(double x,
double y,
double z)

Constructor given vector components.

SbVec3d(SbPlane &p0,
SbPlane &p1,
SbPlane &p2)

Constructor given 3 planes.

SbVec3d	cross(const SbVec3d &v) const

Returns right-handed cross product of vector and another vector.

double	dot(const SbVec3d &v) const

Returns dot (inner) product of vector and another vector.

SbBool	equals(const SbVec3d v,
double tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.

SbVec3d	getClosestAxis() const

Returns principal axis that is closest (based on maximum dot product) to this vector.

const double *	getValue() const

void	getValue(double &x,
double &y,
double &z) const

Returns vector components.

double	length() const

Returns geometric length of vector.

void	negate()

Negates each component of vector in place.

double	normalize()

Changes vector to be unit length, returning the length before normalization.

SbVec3d &	setValue(const double v[3])

SbVec3d &	setValue(double x,
double y,
double z)

Sets the vector components.

SbVec3d &	setValue(const SbVec3d &barycentric,
const SbVec3d &v0,
const SbVec3d &v1,
const SbVec3d &v2)

Sets value of vector as the weighted average of 3 other vectors.

SbVec3d &	setValue(const SbVec3f &vec3)

Sets value of vector from a single precision vector.

double &	operator [](int i)

const double &	operator [](int i)

Accesses indexed component of vector.

SbVec3d &	operator *=(double d)

SbVec3d &	operator /=(double d)

Component-wise scalar multiplication and division operators.

SbVec3d &	operator +=(const SbVec3d &u)

SbVec3d &	operator -=(const SbVec3d &u)

Component-wise vector addition and subtraction operators.

SbVec3d	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec3d	operator *(const SbVec3d &v,
double d)

SbVec3d	operator *(double d,
const SbVec3d &v)

SbVec3d	operator /(const SbVec3d &v,
double d)

Component-wise binary scalar multiplication and division operators.

SbVec3d	operator +(const SbVec3d &v1,
const SbVec3d &v2)

SbVec3d	operator -(const SbVec3d &v1,
const SbVec3d &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec3d &v1,
const SbVec3d &v2)

int	operator !=(const SbVec3d &v1,
const SbVec3d &v2)

Equality comparison operators.

SEE ALSO

SbVec2d, SbVec2f, SbVec3f, SbVec4d, SbVec4f, SbVec2s, SbVec3s, SbRotation, SbRotationd


SbVec4d

NAME

SbVec4d - 4D vector class (double precision)

INHERITS FROM

SbVec4d

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbVec4d:

SbVec4d()

SbVec4d(const double v[4])

SbVec4d(double x,
double y,
double z,
double w)

double	dot(const SbVec4d &v) const

SbBool	equals(const SbVec4d v,
double tolerance) const

void	getReal(SbVec3f &v) const

const double *	getValue() const

void	getValue(double &x,
double &y,
double &z,
double &w) const

double	length() const

void	negate()

normalize()

SbVec4d &	setValue(const double v[4])

SbVec4d &	setValue(double x,
double y,
double z,
double w)

SbVec4d &	setValue(const SbVec4f &vec4)

double &	operator [](int i)

const double &	operator [](int i)

SbVec4d &	operator *=(double d)

SbVec4d &	operator /=(double d)

SbVec4d &	operator +=(const SbVec4d &u)

SbVec4d &	operator -=(const SbVec4d &u)

SbVec4d	operator -() const

SbVec4d	operator *(const SbVec4d &v,
double d)

SbVec4d	operator *(double d,
const SbVec4d &v)

SbVec4d	operator /(const SbVec4d &v,
double d)

SbVec4d	operator +(const SbVec4d &v1,
const SbVec4d &v2)

SbVec4d	operator -(const SbVec4d &v1,
const SbVec4d &v2)

int	operator ==(const SbVec4d &v1,
const SbVec4d &v2)

int	operator !=(const SbVec4d &v1,
const SbVec4d &v2)

DESCRIPTION

4D vector class used to store homogeneous coordinates. Although Open Inventor fields still store only single precision values, for certain applications it is useful and convenient to be able to store and manipulate double precision values, for example, double precision coordinate data or values that will be used for further computation.

METHODS

SbVec4d()

Default constructor.

SbVec4d(const double v[4])

SbVec4d(double x,
double y,
double z,
double w)

Constructor given vector components.

double	dot(const SbVec4d &v) const

Returns dot (inner) product of vector and another vector.

SbBool	equals(const SbVec4d v,
double tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two vectors.

void	getReal(SbVec3f &v) const

Returns the real portion of the vector by dividing by the fourth value.

const double *	getValue() const

void	getValue(double &x,
double &y,
double &z,
double &w) const

Returns vector components.

double	length() const

Returns geometric length of vector.

void	negate()

Negates each component of vector in place.

normalize()

Changes vector to be unit length.

SbVec4d &	setValue(const double v[4])

SbVec4d &	setValue(double x,
double y,
double z,
double w)

Sets the vector components.

SbVec4d &	setValue(const SbVec4f &vec4)

Sets value of vector from a single precision vector.

double &	operator [](int i)

const double &	operator [](int i)

Accesses indexed component of vector.

SbVec4d &	operator *=(double d)

SbVec4d &	operator /=(double d)

Component-wise scalar multiplication and division operators.

SbVec4d &	operator +=(const SbVec4d &u)

SbVec4d &	operator -=(const SbVec4d &u)

Component-wise vector addition and subtraction operators.

SbVec4d	operator -() const

Nondestructive unary negation - returns a new vector.

SbVec4d	operator *(const SbVec4d &v,
double d)

SbVec4d	operator *(double d,
const SbVec4d &v)

SbVec4d	operator /(const SbVec4d &v,
double d)

Component-wise binary scalar multiplication and division operators.

SbVec4d	operator +(const SbVec4d &v1,
const SbVec4d &v2)

SbVec4d	operator -(const SbVec4d &v1,
const SbVec4d &v2)

Component-wise binary vector addition and subtraction operators.

int	operator ==(const SbVec4d &v1,
const SbVec4d &v2)

int	operator !=(const SbVec4d &v1,
const SbVec4d &v2)

Equality comparison operators.

SEE ALSO

SbVec2d, SbVec2f, SbVec3d, SbVec3f, SbVec4f, SbVec2s, SbVec3s, SbRotation, SbRotationd


SbRotationd

NAME

SbRotationd - class for representing a rotation (double precision)

INHERITS FROM

SbRotationd

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbRotationd:

SbRotationd()

SbRotationd(const SbVec3d &axis,
double radians)

SbRotationd(const double v[4])

SbRotationd(double q0,
double q1,
double q2,
double q3)

SbRotationd(const SbMatrixd &m)

SbRotationd(const SbVec3d &rotateFrom,
const SbVec3d &rotateTo)

const double *	getValue() const

void	getValue(double &q0,
double &q1,
double &q2,
double &q3) const

SbRotationd &	setValue(double q0,
double q1,
double q2,
double q3)

void	getValue(SbVec3d &axis,
double &radians) const

void	getValue(SbMatrixd &matrix) const

void	getValue(SbMatrix &matrix) const

SbRotationd &	invert()

SbRotationd	inverse() const

SbRotationd &	setValue(const double q[4])

SbRotationd &	setValue(const SbMatrixd &m)

SbRotationd &	setValue(const SbVec3d &axis,
double radians)

SbRotationd &	setValue(const SbVec3d &rotateFrom,
const SbVec3d &rotateTo)

SbRotationd &	setValue(const SbRotation &rotate)

SbRotationd &	setValue(const SbMatrix &matrix)

SbRotationd &	operator *=(const SbRotationd &q)

int	operator ==(const SbRotationd &q1,
const SbRotationd &q2)

int	operator !=(const SbRotationd &q1,
const SbRotationd &q2)

SbBool	equals(const SbRotationd &r,
double tolerance) const

SbRotationd	operator *(const SbRotationd &q1,
const SbRotationd &q2)

void	multVec(const SbVec3d &src,
SbVec3d &dst) const

void	scaleAngle(double scaleFactor )

static SbRotationd	slerp(const SbRotationd &rot0,
const SbRotationd &rot1,
double t)

static SbRotationd	identity()

DESCRIPTION

Object that stores a rotation using double precision values. Although Open Inventor fields still store only single precision values, for certain applications it is useful and convenient to be able to store and manipulate double precision values, for example, double precision coordinate data or values that will be used for further computation.

There are several ways to specify a rotation: quaternion (4 doubles, in the order x, y, z, w)), 4x4 rotation matrix, or axis and angle. All angles are in radians and all rotations are right-handed.

METHODS

SbRotationd()

SbRotationd(const SbVec3d &axis,
double radians)

SbRotationd(const double v[4])

SbRotationd(double q0,
double q1,
double q2,
double q3)

SbRotationd(const SbMatrixd &m)

SbRotationd(const SbVec3d &rotateFrom,
const SbVec3d &rotateTo)

Constructors for rotation. The axis/radians constructor creates a rotation of angle radians about the given axis. The constructors that take four doubles create a quaternion from those doubles (careful, this differs from the four numbers in an axis/radian definition). Matrix constructor requires a valid rotation matrix. The rotateFrom/To constructor defines rotation that rotates from one vector into another. The rotateFrom and rotateTo vectors are normalized by the constructor before calculating the rotation.

const double *	getValue() const

Returns pointer to array of 4 components defining quaternion.

void	getValue(double &q0,
double &q1,
double &q2,
double &q3) const

Returns 4 individual components of rotation quaternion.

SbRotationd &	setValue(double q0,
double q1,
double q2,
double q3)

Sets value of rotation from 4 individual components of a quaternion.

void	getValue(SbVec3d &axis,
double &radians) const

Returns corresponding 3D rotation axis vector and angle in radians.

void	getValue(SbMatrixd &matrix) const

Returns corresponding 4x4 rotation matrix.

void	getValue(SbMatrix &matrix) const

Returns corresponding 4x4 rotation matrix.

SbRotationd &	invert()

Changes a rotation to be its inverse.

SbRotationd	inverse() const

Returns the inverse of a rotation.

SbRotationd &	setValue(const double q[4])

Sets value of rotation from array of 4 components of a quaternion.

SbRotationd &	setValue(const SbMatrixd &m)

Sets value of rotation from a rotation matrix.

SbRotationd &	setValue(const SbVec3d &axis,
double radians)

Sets value of vector from 3D rotation axis vector and angle in radians.

SbRotationd &	setValue(const SbVec3d &rotateFrom,
const SbVec3d &rotateTo)

Sets rotation to rotate one direction vector to another. The rotateFrom and rotateTo arguments are normalized before the rotation is calculated.

SbRotationd &	setValue(const SbRotation &rotate)

Sets rotation from a single precision rotation.

SbRotationd &	setValue(const SbMatrix &matrix)

Sets rotation from a single precision rotation matrix.

SbRotationd &	operator *=(const SbRotationd &q)

Multiplies by another rotation; results in product of rotations.

int	operator ==(const SbRotationd &q1,
const SbRotationd &q2)

int	operator !=(const SbRotationd &q1,
const SbRotationd &q2)

Equality comparison operators.

SbBool	equals(const SbRotationd &r,
double tolerance) const

Equality comparison within given tolerance - the square of the length of the maximum distance between the two quaternion vectors.

SbRotationd	operator *(const SbRotationd &q1,
const SbRotationd &q2)

Multiplication of two rotations; results in product of rotations.

void	multVec(const SbVec3d &src,
SbVec3f &dst) const

Multiplies the given vector by the matrix of this rotation.

void	scaleAngle(double scaleFactor )

Keep the axis the same. Multiply the angle of rotation by the amount scaleFactor.

static SbRotationd	slerp(const SbRotationd &rot0,
const SbRotationd &rot1,
double t)

Spherical linear interpolation: as t goes from 0 to 1, returned value goes from rot0 to rot1.

static SbRotationd	identity()

Returns a null rotation.

NOTES

Rotations are stored internally as quaternions.

SEE ALSO

SbVec3d, SbVec3f, SbMatrix, SbMatrixd, SbRotation


SbMatrixd

NAME

SbMatrixd - 4x4 matrix class (double precision)

INHERITS FROM

SbMatrixd

SYNOPSIS

#include <Inventor/SbLinear.h>

Methods from class SbMatrixd:

SbMatrixd()

SbMatrixd(double a11,
double a12,
double a13,
double a14,
double a21,
double a22,
double a23,
double a24,
double a31,
double a32,
double a33,
double a34,
double a41,
double a42,
double a43,
double a44)

SbMatrixd(const SbMatd &md)

void	setValue(const SbMatd &md)

void	setValue(const SbMatrix &m)

void	getValue(SbMatd &md) const

const SbMatd &	getValue() const

void	makeIdentity()

static SbMatrixd	identity()

void	setRotate(const SbRotationd &q)

void	setScale(double s)

void	setScale(const SbVec3d &s)

void	setTranslate(const SbVec3d &t)

void	setTransform(const SbVec3d &t,
const SbRotationd &r,
const SbVec3d &s)

void	setTransform(const SbVec3d &t,
const SbRotationd &r,
const SbVec3d &s,
const SbRotationd &so)

void	setTransform(const SbVec3d &translation,
const SbRotationd &rotation,
const SbVec3d &scaleFactor,
const SbRotationd &scaleOrientation,
const SbVec3d &center)

void	getTransform(SbVec3d &t,
SbRotationd &r,
SbVec3d &s,
SbRotationd &so) const

void	getTransform(SbVec3d &translation,
SbRotationd &rotation,
SbVec3d &scaleFactor,
SbRotationd &scaleOrientation,
const SbVec3d &center) const

double	det3(int r1,
int r2,
int r3,
int c1,
int c2,
int c3) const

double	det3() const

double	det4() const

SbBool	factor(SbMatrixd &r,
SbVec3d &s,
SbMatrixd &u,
SbVec3d &t,
SbMatrixd &proj) const

SbMatrixd	inverse() const

SbBool	LUDecomposition(int index[4],
double &d)

void	LUBackSubstitution(int index[4],
double b[4]) const

SbMatrixd	transpose() const

SbMatrixd &	multRight(const SbMatrixd &m)

SbMatrixd &	multLeft(const SbMatrixd &m)

void	multMatrixVec(const SbVec3d &src,
SbVec3d &dst) const

void	multVecMatrix(const SbVec3d &src,
SbVec3d &dst) const

void	multDirMatrix(const SbVec3d &src,
SbVec3d &dst) const

void	multLineMatrix(const SbLine &src,
SbLine &dst) const

void	print(FILE *fp) const

double *	operator double*()

SbMatd	operator SbMatd&()

double *	operator [](int i)

const double *	operator [](int i) const

SbMatrixd &	operator =(const SbMatd &md)

SbMatrixd &	operator =(const SbMatrixd &md)

SbMatrixd &	operator =(const SbRotationd &q)

SbMatrixd &	operator *=(const SbMatrixd &md)

SbMatrixd	operator *(const SbMatrixd &md1,
const SbMatrixd &md2)

int	operator ==(const SbMatrixd &md1,
const SbMatrixd &md2)

int	operator !=(const SbMatrixd &md1,
const SbMatrixd &md2)

SbBool	equals(const SbMatrixd &md,
double tolerance) const

DESCRIPTION

4x4 double precision matrix class/datatype. Although Open Inventor fields still store only single precision values, for certain applications it is useful and convenient to be able to store and manipulate double precision values, for example, double precision coordinate data or values that will be used for further computation.

The matrices are stored in row-major order.

METHODS

SbMatrixd()

SbMatrixd(double a11,
double a12,
double a13,
double a14,
double a21,
double a22,
double a23,
double a24,
double a31,
double a32,
double a33,
double a34,
double a41,
double a42,
double a43,
double a44)

SbMatrixd(const SbMatd &md)

Constructors.

void	setValue(const SbMatd &md)

Sets value from 4x4 array of elements.

void	setValue(const SbMatrix &m)

Sets values from a single precision matrix.

void	getValue(SbMatd &md) const

const SbMatd &	getValue() const

Returns 4x4 array of elements.

void	makeIdentity()

Sets matrix to be identity.

static SbMatrixd	identity()

Returns an identity matrix.

void	setRotate(const SbRotationd &q)

Sets matrix to rotate by given rotation.

void	setScale(double s)

Sets matrix to scale by given uniform factor.

void	setScale(const SbVec3d &s)

Sets matrix to scale by given vector.

void	setTranslate(const SbVec3d &t)

Sets matrix to translate by given vector.

void	setTransform(const SbVec3d &t,
const SbRotationd &r,
const SbVec3d &s)

void	setTransform(const SbVec3d &t,
const SbRotationd &r,
const SbVec3d &s,
const SbRotationd &so)

void	setTransform(const SbVec3d &translation,
const SbRotationd &rotation,
const SbVec3d &scaleFactor,
const SbRotationd &scaleOrientation,
const SbVec3d &center)

Composes the matrix based on a translation, rotation, scale, orientation for scale, and center. The center is the center point for scaling and rotation. The scaleOrientation chooses the primary axes for the scale.

void	getTransform(SbVec3d &t,
SbRotationd &r,
SbVec3d &s,
SbRotationd &so) const

Return translation, rotation, scale, and scale orientation components of the matrix.

void	getTransform(SbVec3d &translation,
SbRotationd &rotation,
SbVec3d &scaleFactor,
SbRotationd &scaleOrientation,
const SbVec3d &center) const

Decomposes the matrix into a translation, rotation, scale, and scale orientation. Any projection information is discarded. The decomposition depends upon choice of center point for rotation and scaling, which is optional as the last parameter. Note that if the center is 0, decompose() is the same as factor() where t is translation, u is rotation, s is scaleFactor, and r is ScaleOrientation.

double	det3(int r1,
int r2,
int r3,
int c1,
int c2,
int c3) const

Returns determinant of 3x3 submatrix composed of given row and column indices (0-3 for each).

double	det3() const

Returns determinant of upper-left 3x3 submatrix.

double	det4() const

Returns determinant of entire matrix.

SbBool	factor(SbMatrixd &r,
SbVec3d &s,
SbMatrixd &u,
SbVec3d &t,
SbMatrixd &proj) const

Factors a matrix m into 5 pieces: m = r s r^ u t, where r^ means transpose of r, and r and u are rotations, s is a scale, and t is a translation. Any projection information is returned in proj.

SbMatrixd	inverse() const

Returns inverse of matrix. Results are undefined for singular matrices. Uses LU decomposition.

SbBool	LUDecomposition(int index[4],
double &d)

Perform in-place LU decomposition of matrix. index is index of rows in matrix. d is the parity of row swaps. Returns FALSE if singular.

void	LUBackSubstitution(int index[4],
double b[4]) const

Perform back-substitution on LU-decomposed matrix. Index is permutation of rows from original matrix.

SbMatrixd	transpose() const

Returns transpose of matrix.

SbMatrixd &	multRight(const SbMatrixd &md)

SbMatrixd &	multLeft(const SbMatrixd &md)

Multiplies matrix by given matrix on right or left.

void	multMatrixVec(const SbVec3d &src,
SbVec3d &dst) const

Multiplies matrix by given column vector, giving vector result.

void	multVecMatrix(const SbVec3d &src,
SbVec3d &dst) const

Multiplies given row vector by matrix, giving vector result.

void	multDirMatrix(const SbVec3d &src,
SbVec3d &dst) const

Multiplies given row vector by matrix, giving vector result. src is assumed to be a direction vector, so translation part of matrix is ignored. Note: if you wish to transform surface points and normals by a matrix, call multVecMatrix() for the points and call multDirMatrix() on the inverse transpose of the matrix for the normals.

void	multLineMatrix(const SbLine &src,
SbLine &dst) const

Multiplies the given line's origin by the matrix, and the line's direction by the rotation portion of the matrix.

void	print(FILE *fp) const

Prints a formatted version of the matrix to the given file pointer.

double *	operator double*()

Cast: returns pointer to storage of first element.

SbMatd	operator SbMatd&()

Cast: returns reference to 4x4 array.

double *	operator [](int i)

const double *	operator [](int i) const

Make it look like a usual matrix (so you can do m[3][2]).

SbMatrixd &	operator =(const SbMatd &md)

Sets value from 4x4 array of elements.

SbMatrixd &	operator =(const SbMatrixd &md)

Set the matrix from another SbMatrixd.

SbMatrixd &	operator =(const SbRotationd &q)

Set the matrix from an SbRotationd.

SbMatrixd &	operator *=(const SbMatrixd &md)

Performs right multiplication with another matrix.

SbMatrixd	operator *(const SbMatrixd &md1,
const SbMatrixd &md2)

Binary multiplication of matrices.

int	operator ==(const SbMatrixd &md1,
const SbMatrixd &md2)

int	operator !=(const SbMatrixd &m1,
const SbMatrixd &m2)

Equality comparison operators.

SbBool	equals(const SbMatrixd &md,
double tolerance) const

Equality comparison within given tolerance, for each component.

SEE ALSO

SbVec3d, SbVec3f, SbRotation, SbRotationd


SoWinColorEditor

NAME

SoWinColorEditor - component that lets you edit a color interactively

INHERITS FROM

SoWinComponent > SoWinColorEditor

SYNOPSIS

#include <Inventor/Win/SoWinColorEditor.h>

typedef void	SoWinColorEditorCB(void *userData,
const SbColor *color)

enum Sliders	{
SoWinColorEditor::NONE
Display no sliders
SoWinColorEditor::INTENSITY
Display intensity slider (default)
SoWinColorEditor::RGB
Display RGB sliders
SoWinColorEditor::HSV
Display HSV sliders
SoWinColorEditor::RGB_V
Display RGB and value sliders
SoWinColorEditor::RGB_HSV
Display RGB and HSV sliders
}

enum UpdateFrequency	{
SoWinColorEditor::CONTINUOUS
Send updates with every mouse motion
SoWinColorEditor::AFTER_ACCEPT
Only send updates after user hits accept button
}

Methods from class SoWinColorEditor:

SoWinColorEditor(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinColorEditor()

void	attach(SoSFColor *color,
SoBase *node)

void	attach(SoMFColor *color,
int index,
SoBase *node)

void	attach(SoMFUInt32 *color,
int index,
SoBase *node)

void	detach()

SbBool	isAttached()

void	addColChangedCallback(SoWinColorEditorCB *f,
void *userData = NULL)

void	removeColChangedCallback(SoWinColorEditorCB *f,
void *userData = NULL)

void	setUpdateFrequency(SoWinColorEditor::UpdateFrequency freq)

SoWinColorEditor::UpdateFrequency	getUpdateFrequency()

void	setColor(const SbColor &color)

const SbColor &	getColor()

void	setWYSIWYG(SbBool trueOrFalse)

SbBool	isWYSIWYG()

void	setCurrentSliders(SoWinColorEditor::Sliders whichSliders)

SoWinColorEditor::Sliders	getCurrentSliders()

Methods from class SoWinComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

HWND	getWidget() const

SbBool	isTopLevelShell() const

HWND	getShellWidget() const

HWND	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

UINT *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoWinComponentCB *func,
void *data = NULL)

static SoWinComponent *	getComponent(HWND w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The SoWinColorEditor class lets you interactively edit colors using color sliders and a color wheel. You can either use it directly to edit a color field in the database by using the attach()/detach() routines, or use it by registering a callback routine which will get called whenever the color changes (passing an SbColor to that routine).

The editor can currently be attached to only one color at a time. Attaching two different colors will automatically detach the first one before attaching the second.

METHODS

SoWinColorEditor(HWND parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoWinColorEditor()

Constructor and destructor.

void	attach(SoSFColor *color,
SoBase *node)

void	attach(SoMFColor *color,
int index,
SoBase *node)

void	attach(SoMFUInt32 *color,
int index,
SoBase *node)

void	detach()

Attach/detach the editor to a color node and edit the color of the given index. Attaching to the color node increments the reference count of the color node; detaching from the color node decrements the reference count of the color node.

The color editor uses a sensor on the color field to automatically update itself when the color is changed externally.

NOTE: The node containing the field needs to also be passed to attach the sensor to it (since field sensors are not yet suported).

NOTE: The color editor can only be attached to either a single field or a multiple field at any given time. Even when attached to a multiple field, only a single color from that field is edited, as specified by index.

SbBool	isAttached()

Returns TRUE if the editor is attached.

void	addColChangedCallback(SoWinColorEditorCB *f,
void *userData = NULL)

void	removeColChangedCallback(SoWinColorEditorCB *f,
void *userData = NULL)

Additional way of using the color editor, by registering a callback which will be called whenever the color changes (check the UpdateFrequency to find when the callbacks will be called).

void	setUpdateFrequency(SoWinColorEditor::UpdateFrequency freq)

SoWinColorEditor::UpdateFrequency	getUpdateFrequency()

Sets/gets the update frequency. See the UpdateFrequency enum declaration.

void	setColor(const SbColor &color)

const SbColor &	getColor()

Set a new color value, and get the current color value. NOTE: setColor() will call colorChanged callbacks if the color differs.

void	setWYSIWYG(SbBool trueOrFalse)

SbBool	isWYSIWYG()

Sets/gets the WYSIWYG mode.

void	setCurrentSliders(SoWinColorEditor::Sliders whichSliders)

SoWinColorEditor::Sliders	getCurrentSliders()

Sets/gets which slider(s) should be displayed.

SEE ALSO

SoWinComponent


SoToZ3DAction

NAME

SoToZ3DAction - generates a Z3D file from a scene graph

INHERITS FROM

SoAction > SoToZ3DAction

SYNOPSIS

#include <Inventor/actions/SoToZ3DAction.h>

Methods from class SoToZ3DAction:

SoToZ3DAction(int quality=100)

~SoToZ3DAction()

SbBool	openFile(const char *fileName)

void	closeFile(void)

void	setTextureQuality(int quality)

int	getTextureQuality() const

Methods from class SoAction:

virtual	~SoAction()

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This action generates a Z3D file from a scene graph. The Z3D file format is a "bandwidth-friendly" 3D protocol developed by TGS for media on the web. By convention, Z3D files have the file extension .z3d.

Z3D output contains only those items from the scene graph that can be converted to Z3D format, i.e., surfaces and surface textures. Surfaces may be defined with polygons (e.g. indexed face sets) or NURBS. 3D text is polygonal data and will be included in the output file. Surface textures are stored as JPEG images.

Z3D format (as of this writing) does not support:

•	Lines (SoLineSet, SoNurbsCurve, etc.)

•	Points (SoPointSet, SoMarkerSet, etc.)

•	Bitmaps (SoText2, SoImage, etc.)

•	SoVRMLElevationGrid

•	Lights (SoDirectionalLight, SoPointLight, etc.)

•	Per-vertex material binding (only per-face)

•	Explicit texture coordinates
Also note that the default texture mapping in the Z3D player is not the same as Open Inventor. In general textured objects will not appear the same in the Z3D player.

•	Explicit normals
Also note that the default normal calculation in the Z3D player is not the same as Open Inventor. In some cases, objects will not appear the same in the Z3D player.

•	Background color

The camera properties will be included in the Z3D file if there is a camera in the specified scene graph.

If the camera was created automatically by a viewer, then typically it will not be part of the application scene graph. To get the complete viewer scene graph:

SoNode *p = pViewer->getSceneManager()->getSceneGraph();

Z3D format is currently intended to be a highly compressed delivery mechanism for polygonal geometry. Additional features are planned and will be incorporated into the SoToZ3DAction in the future.

Because the Z3D format is optimized specifically for display, Z3D files will typically be much smaller than the corresponding Open Inventor or VRML file. However in a few cases the Z3D file may be the same size or larger, particularly if SoIndexedTriangleStripSet is the primary primitive in the scene graph.

One or more temporary files may be opened by Open Inventor while creating the Z3D file.

METHODS

SoToZ3DAction(int quality=100)

~SoToZ3DAction()

Constructor and destructor.

SbBool	openFile(const char *fileName)

void	closeFile(void)

Open and close the output file.

void	setTextureQuality(int quality)

int	getTextureQuality() const

Sets/queries the quality of the JPEG image file(s) used for storing texture image(s). Texture quality ranges from 0 (highest compression, lowest quality) to 100 (lowest compression, highest quality). The default is 100.

SEE ALSO

SoAction


SoXt

NAME

SoXt - routines for Open Inventor/Xt compatibility.

INHERITS FROM

SoXt

SYNOPSIS

#include <Inventor/Xt/SoXt.h>

Methods from class SoXt:

static Widget	init(const char *appName,
const char *className = "Inventor")

static void	init(Widget topLevelWidget)

static void	mainLoop()

static void	nextEvent(XtAppContext appContext,
XEvent *event)

static Boolean	dispatchEvent(XEvent *event)

static XtAppContext	getAppContext()

static Display *	getDisplay()

static Widget	getTopLevelWidget()

static void	show(Widget widget)

static void	hide(Widget widget)

static XmString *	encodeString(char *s)

static char *	decodeString(XmString * xs)

static void	setWidgetSize(Widget w,
const SbVec2s &size)

static SbVec2s	getWidgetSize(Widget w)

static Widget	getShellWidget(Widget w)

static void	createSimpleErrorDialog(Widget widget,
char *dialogTitle,
char *errorStr1,
char *errorStr2 = NULL)

static void	getPopupArgs(Display *d,
int scr,
ArgList args,
int *n)

static void	registerColormapLoad(Widget widget,
Widget shell)

static void	addColormapToShell(Widget widget,
Widget shell)

static void	removeColormapFromShell(Widget widget,
Widget shell)

DESCRIPTION

The SoXt class initializes Open Inventor for use with the Xt toolkit and Motif. SoXt::init() must be called in order for Open Inventor to work properly with Xt. SoXt::mainLoop() must be called in order for extension device events to be passed to Open Inventor render areas. The other methods are convenience functions.

Refer to the SoXtComponent reference pages for examples on how this class should be used when using Open Inventor Xt components.

METHODS

static Widget	init(const char *appName,
const char *className = "Inventor")

This is called to initialize Open Inventor and Xt, and bind Open Inventor with X events handling so that Open Inventor sensors will work correctly. This returns the top level shell widget. This method will call SoDB::init(), SoNodeKit::init(), and SoInteraction::init() and will create an initial window.

static void	init(Widget topLevelWidget)

This alternate form of init allows the application to initialize Xt. The passed widget should be the top level widget returned from the Xt initialization. This method will call SoDB::init(), SoNodeKit::init(), and SoInteraction::init().

static void	mainLoop()

This retrieves and dispatches events (loops forever). It calls SoXt::nextEvent() and SoXt::dispatchEvent() to do this.

static void	nextEvent(XtAppContext appContext,
XEvent *event)

Get the nextEvent by callingGetEvent. The appContext can be had by calling SoXt::getAppContext().

static Boolean	dispatchEvent(XEvent *event)

Dispatch the passed event to a handler. This returns TRUE if a handler was found, else it returns FALSE.

static XtAppContext	getAppContext()

static Display *	getDisplay()

These methods are included for portability only.

static Widget	getTopLevelWidget()

Return information based on the initial widget returned by or passed to init.

static void	show(Widget widget)

static void	hide(Widget widget)

Convenience routines to show and hide the passed widget.

This includes any children the window may have.

static XmString *	encodeString(char *s)

static char *	decodeString(XmString * xs)

These are convenience routines for encoding a character string as an XmString, and decoding an XmString back to a character string. (XmString is a Motif string). The application is responsible for freeing up the memory pointed to by these return values. Use XmStringFree() to free an XmString, and free() to free a character pointer.

static void	setWidgetSize(Widget w,
const SbVec2s &size)

static SbVec2s	getWidgetSize(Widget w)

Convenience routines to set/get the size of the given window.

static Widget	getShellWidget(Widget w)

Convenience routine which will return the topmost window containing the given widget. The widget tree is traversed up until the last widget is found using GetParent.

static void	createSimpleErrorDialog(Widget widget,
char *dialogTitle,
char *errorStr1,
char *errorStr2 = NULL)

Convenience routine which brings a simple Xt error dialog box displaying the given error string(s) and window title. The OK button, which destroys the dialog, is the only button displayed.

static void	getPopupArgs(Display d,
int scr,
ArgList args,
int *n)

Convenience routine which gets visual args for the popup planes. These args can then be passed in to XmCreatePulldownMenu() or XmCreatePopupMenu() to create menus in the popup planes. addColormapToShell() has to be called on the main popup window to set the proper color map.

static void	registerColormapLoad(Widget widget,
Widget shell)

Convenience routine which will register map/unmap callbacks to load and unload the pulldown menu color map right before the menu is about to be posted. This should be called when creating pulldown or popup menus in the overlays. This will make sure that the right color map is loaded into the shell widget (to make the pulldown/popup look right) and remove it when no longer needed (to make sure the OpenGL overlay widget color map is correctly loaded for 8 bit machines).

static void	addColormapToShell(Widget widget,
Widget shell)

static void	removeColormapFromShell(Widget widget,
Widget shell)

Convenience routine to insert/remove the given widget colormap onto the supplied shell widget. This will not replace the existing installed colormaps (or list of windows), but instead insert the new colormap first into the existing list using XGetWMColormapWindows() and XSetWMColormapWindows().

SEE ALSO

SoXtComponent


SoXtClipboard

NAME

SoXtClipboard - supports copy/paste for Open Inventor using the Xt clipboard

INHERITS FROM

SoXtClipboard

SYNOPSIS

#include <Inventor/Xt/SoXtClipboard.h>

typedef void	SoXtClipboardPasteCB(void *userData,
SoPathList *pathList)

typedef void	SoXtClipboardImportCB(void *userData,
Atom dataType,
void *data,
uint32_t numBytes)

#define _XA_CLIPBOARD_ ((Atom) 0)

Methods from class SoXtClipboard:

SoXtClipboard(Widget w,
Atom selectionAtom = _XA_CLIPBOARD_)

~SoXtClipboard()

void	copy(SoNode *node,
Time eventTime)

void	copy(SoPath *path,
Time eventTime)

void	copy(SoPathList *pathList,
Time eventTime)

void	paste(Time eventTime,
SoXtClipboardPasteCB *pasteDoneFunc,
void *userData = NULL)

void	addPasteInterest(Atom dataType,
SoXtClipboardImportCB *pasteImportFunc,
void *userData = NULL)

DESCRIPTION

This class manages data transfers for copy and paste. Transfers may occur within the same process, or between different processes. This uses the Xt selection mechanism to implement the ICCCM protocol for the transfer of data.

METHODS

SoXtClipboard(Widget w,
Atom selectionAtom = _XA_CLIPBOARD_)

~SoXtClipboard()

Constructor and destructor. w is the Xt widget that will be used for the clipboard operations. selectionAtom is the X selection through which data should be transferred. For quick data transfers, this should be XA_PRIMARY. The default is _XA_CLIPBOARD_ which uses the X clipboard selection.

void	copy(SoNode *node,
Time eventTime)

void	copy(SoPath *path,
Time eventTime)

void	copy(SoPathList *pathList,
Time eventTime)

This copies the passed scene graph object, and tells the X server that the clipboard now owns the selection which was specified by selectionAtom in the constructor. When a paste happens (in this window, another window, or another process), the X server will ask this clipboard for the data it copied here. The eventTime should be the time found in the X event structure which triggered the copy operation, and is used to ensure synchronization of copy and paste requests. Data targets supported for export are INVENTOR_2_1, INVENTOR_2_1_FILE, INVENTOR_2_0, INVENTOR_2_0_FILE, VRML_1_0, VRML_1_0_FILE. Also exported for backwards compatibility are INVENTOR and INVENTOR_FILE, which are equivalent to INVENTOR_2_0 and INVENTOR_2_0_FILE.

void	paste(Time eventTime,
SoXtClipboardPasteCB *pasteDoneFunc,
void *userData = NULL)

This makes a request to the X server for data to paste from the selection atom specified in the constructor (selectionAtom), then returns. When the data is retrieved from the selection owner, the pasteDoneFunc callback is invoked. The newly pasted data is passed as the callback function's pathList argument (an SoPathList). Data targets supported for import are INVENTOR_2_1, INVENTOR_2_1_FILE, INVENTOR_2_0, INVENTOR_2_0_FILE, VRML_1_0, VRML_1_0_FILE. Also imported for backwards compatibility are INVENTOR and INVENTOR_FILE, which are equivalent to INVENTOR_2_0 and INVENTOR_2_0_FILE.

void	addPasteInterest(Atom dataType,
SoXtClipboardImportCB *pasteImportFunc,
void *userData = NULL)

This extends the paste interest to recognize an additional target as specified by dataType. It can be called multiple times to register interest in more than one extension. The pasteImportFunc will be called when data of the registered type is pasted. Passing NULL as the pasteImportFunc will remove paste interest for that data type (even if the data type is one of the defaults). This should be called before paste() so that paste() will accept pastes of data types that have been registered here.

A dataType atom can be created with XmInternAtom, e.g.:

XmInternAtom(XtDisplay(widget),"INVENTOR",False);

SEE ALSO

SoSelection, SoXt


SoXtCollisionViewer

NAME

SoXtCollisionViewer - class to manage collisions between the camera and the scene

INHERITS FROM

SoXtCollisionViewer

SYNOPSIS

#include <Inventor/collision/SoXtCollisionViewer.h>

typedef void	SoXtCollisionViewerCB(void* userData,
SoXtCollisionViewer* viewer)

Methods from class SoXtCollisionViewer

SoXtCollisionViewer(SoXtViewer* viewer)

~SoXtCollisionViewer()

SoXtViewer*	getViewer() const

void	setDistance(float distance)

float	getDistance() const

void 	setCollisionDetection(SbBool value = TRUE)

SbBool	getCollisionDetection() const

void 	setZBufferOptimization(SbBool value = TRUE)

SbBool	getZBufferOptimization() const

void	addCallback(SoXtCollisionViewerCB* cbk,
void* ud = NULL)

void	removeCallback(SoXtCollisionViewerCB* cbk,
void* ud = NULL)

DESCRIPTION

This class is used to constrain a viewer, preventing the viewer's camera from colliding with the objects in the scene. It overrides the RenderCallback on the viewer that it's attached to.

The programmer can define the maximum distance between the camera and the objects.

When Z-buffer optimization is enabled, the algorithm looks at the Z-buffer to see if there is an object in front of the camera when the user moves forward, and an SoIntersectionDetectionAction when the user moves backward.

NOTE: This class is not a viewer.

METHODS

SoXtCollisionViewer(SoXtViewer* viewer)

Constructor.

~SoXtCollisionViewer()

Destructor.

SoXtViewer*	getViewer() const

Gets the original viewer.

void	setDistance(float distance)

float	getDistance() const

Sets/gets the distance between the camera and the objects.

void	setCollisionDetection(SbBool value = TRUE)

SbBool	getCollisionDetection() const

Sets/gets the collision detection active. The default value is TRUE.

void	setZBufferOptimization(SbBool value = TRUE)

SbBool	getZBufferOptimization() const

Sets/gets the Z buffer optimization active. The default value is TRUE.

void	setNumSteps(int num_steps)

int	getNumSteps() const

Sets/gets the number of steps to be used in the collision computation. The default number of steps is 4. The minimum value is 2.

void	addCallback(SoXtCollisionViewerCB* cbk,
void* ud = NULL)

void	removeCallback(SoXtCollisionViewerCB* cbk,
void* ud = NULL)

Adds/removes callbacks. These callbacks are called when a collision occurs between the camera and the scene.

SEE ALSO

SoCollisionManager, SoIntersectionDetectionAction


SoXtColorEditor

NAME

SoXtColorEditor - component that lets you edit a color interactively

INHERITS FROM

SoXtComponent > SoXtColorEditor

SYNOPSIS

#include <Inventor/Xt/SoXtColorEditor.h>

typedef void	SoXtColorEditorCB(void *userData,
const SbColor *color)

enum Sliders	{
SoXtColorEditor::NONE
Display no sliders
SoXtColorEditor::INTENSITY
Display intensity slider (default)
SoXtColorEditor::RGB
Display RGB sliders
SoXtColorEditor::HSV
Display HSV sliders
SoXtColorEditor::RGB_V
Display RGB and value sliders
SoXtColorEditor::RGB_HSV
Display RGB and HSV sliders
}

enum UpdateFrequency	{
SoXtColorEditor::CONTINUOUS
Send updates with every mouse motion
SoXtColorEditor::AFTER_ACCEPT
Only send updates after user hits accept button
}

Methods from class SoXtColorEditor:

SoXtColorEditor(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtColorEditor()

void	attach(SoSFColor *color,
SoBase *node)

void	attach(SoMFColor *color,
int index,
SoBase *node)

void	attach(SoMFUInt32 *color,
int index,
SoBase *node)

void	detach()

SbBool	isAttached()

void	addColChangedCallback(SoXtColorEditorCB *f,
void *userData = NULL)

void	removeColChangedCallback(SoXtColorEditorCB *f,
void *userData = NULL)

void	setUpdateFrequency(SoXtColorEditor::UpdateFrequency freq)

SoXtColorEditor::UpdateFrequency	getUpdateFrequency()

void	setColor(const SbColor &color)

const SbColor &	getColor()

void	setWYSIWYG(SbBool trueOrFalse)

SbBool	isWYSIWYG()

void	setCurrentSliders(SoXtColorEditor::Sliders whichSliders)

SoXtColorEditor::Sliders	getCurrentSliders()

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The SoXtColorEditor class lets you interactively edit colors using color sliders and a color wheel. You can either use it directly to edit a color field in the database by using the attach()/detach() routines, or use it by registering a callback routine which will get called whenever the color changes (passing an SbColor to that routine).

The editor can currently be attached to only one color at a time. Attaching two different colors will automatically detach the first one before attaching the second.

METHODS

SoXtColorEditor(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtColorEditor()

Constructor and destructor.

void	attach(SoSFColor *color,
SoBase *node)

void	attach(SoMFColor *color,
int index,
SoBase *node)

void	attach(SoMFUInt32 *color,
int index,
SoBase *node)

void	detach()

Attach/detach the editor to a color node and edit the color of the given index. Attaching to the color node increments the reference count of the color node; detaching from the color node decrements the reference count of the color node.

The color editor uses a sensor on the color field to automatically update itself when the color is changed externally.

NOTE: The node containing the field needs to also be passed to attach the sensor to it (since field sensors are not yet suported).

NOTE: The color editor can only be attached to either a single field or a multiple field at any given time. Even when attached to a multiple field, only a single color from that field is edited, as specified by index.

SbBool	isAttached()

Returns TRUE if the editor is attached.

void	addColChangedCallback(SoXtColorEditorCB *f,
void *userData = NULL)

void	removeColChangedCallback(SoXtColorEditorCB *f,
void *userData = NULL)

Additional way of using the color editor, by registering a callback which will be called whenever the color changes (check the UpdateFrequency to find when the callbacks will be called).

void	setUpdateFrequency(SoXtColorEditor::UpdateFrequency freq)

SoXtColorEditor::UpdateFrequency	getUpdateFrequency()

Sets/gets the update frequency. See the UpdateFrequency enum declaration.

void	setColor(const SbColor &color)

const SbColor &	getColor()

Set a new color value, and get the current color value. NOTE: setColor() will call colorChanged callbacks if the color differs.

void	setWYSIWYG(SbBool trueOrFalse)

SbBool	isWYSIWYG()

Sets/gets the WYSIWYG mode.

void	setCurrentSliders(SoXtColorEditor::Sliders whichSliders)

SoXtColorEditor::Sliders	getCurrentSliders()

Sets/gets which slider(s) should be displayed.

SEE ALSO

SoXtComponent


SoXtComponent

NAME

SoXtComponent - abstract base class for all Open Inventor components

INHERITS FROM

SoXtComponent

SYNOPSIS

#include <Inventor/Xt/SoXtComponent.h>

typedef void	SoXtComponentCB(void *userData,
SoXtComponent *comp)

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

Abstract base class from which all Open Inventor Xt components are derived. This class provides a basic C++ protocol for building and displaying Motif components. Components are used to encapsulate some function or task into a reusable package in the form of a Motif widget that can be used in any Open Inventor Xt program. See the Example section on how to build and use SoXtComponents.

METHODS

virtual void	show()

virtual void	hide()

This shows and hides the component.

SbBool	isVisible()

Returns TRUE if this component is mapped onto the screen. For a component to be visible, its widget and the shell containing this widget must be mapped (which is FALSE when the component is iconified).

Subclasses should call this routine before redrawing anything and in any sensor trigger methods. Calling this will check the current visibility (which is really cheap) and invoke the visibility changed callbacks if the state changes (see addVisibilityChangeCallback()).

Widget	getWidget() const

This returns the base widget for this component. If the component created its own shell, this returns the topmost widget beneath the shell. Call getShellWidget() to obtain the shell.

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Returns TRUE if this component is a top level shell component (has its own window). Subclasses may use this to decide if they are allowed to resize themselves. Also method to return the shell widget (NULL if the shell hasn't been created by this component).

Widget	getParentWidget() const

Return the parent widget, be it a shell or not.

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Convenience routines on the widget.

Display *	getDisplay()

Returns the X display associated with this components widget.

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

The window and icon tititle can be set for topLevelShell components or components which are directly under a shell widget (i.e. components which have their own window).

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL. A pointer to this class will be passed as the callback data.

Note: this callback is supplied because the user may wish to delete this component when it is closed.

static SoXtComponent *	getComponent(Widget w)

This returns the SoXtComponent for this widget. If the widget does not match that of any Open Inventor component, then NULL is returned.

const char *	getWidgetName() const

const char *	getClassName() const

Routines which return the widget name and the class name. The widget name is passed to the build method. The class name is predefined by each component.

EXAMPLE

This example shows how an Open Inventor component can be built inside a program using the Xt widget set. The example uses the SoXtExaminerViewer widget to view some simple geometry.

#include <Inventor/Xt/SoXt.h>

#include <Inventor/nodes/SoCone.h>

#include <Inventor/Xt/viewers/SoXtExaminerViewer.h>

void main(int, char **argv)

// Initialize Inventor and Xt, which must be done

// before any Inventor calls are made.

Widget myWindow = SoXt::init(argv[0]);

// create the viewer in the toplevel window

// and set some scene to display

SoXtExaminerViewer *myViewer = new SoXtExaminerViewer(myWindow);

myViewer->setSceneGraph( new SoCone() );

// manage and map window on screen

myViewer->show();

SoXt::show(myWindow); // calls Show()

// Loop forever

SoXt::mainLoop();

RESOURCES

!!------------------------------------------------
!! Xt Component ( For Light and Material Sliders Set )
!!------------------------------------------------
*IvXtComponentTitle.labelString: Xt Component
*IvTGSXtComponentTitle.labelString: TGS: Xt Component

SEE ALSO

SoXt, SoXtRenderArea, SoXtViewer, SoXtMaterialEditor


SoXtConstrainedViewer

NAME

SoXtConstrainedViewer - base viewer class which adds camera constraints given a world up direction

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer > SoXtFullViewer > SoXtConstrainedViewer

SYNOPSIS

#include <Inventor/Xt/viewers/SoXtConstrainedViewer.h>

Methods from class SoXtConstrainedViewer:

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Methods from class SoXtFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Widget	getAppPushButtonParent() const

void	addAppPushButton(Widget newButton)

void	insertAppPushButton(Widget newButton,
int index)

void	removeAppPushButton(Widget oldButton)

int	findAppPushButton(Widget oldButton)

int	lengthAppPushButton()

Widget	getRenderAreaWidget()

Methods from class SoXtViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

virtual void	recomputeSceneSize()

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void	setDecimationPercentageCallback(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float	getCurrentDecimationPercentage()

Methods from class SoXtRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo*vis)

XVisualInfo*	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo*vis)

XVisualInfo*	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This is a base class for the SoXtWalkViewer and SoXtFlyViewer component viewers. This class adds methods and convenience routines available to subclasses to constrain the camera given a world up direction. This prevents the camera from looking upside down. By default the +Y direction is used.

METHODS

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Specifies the upward direction of the viewer. This up direction is used by the viewers to constrain the camera when tilting up/down, and also used when rotating the camera right/left. The default is the +Y (0,1,0) direction.

SEE ALSO

SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtWalkViewer, SoXtFlyViewer


SoXtDevice

NAME

SoXtDevice - abstract base class device for use with the SoXtRenderArea

INHERITS FROM

SoXtDevice

SYNOPSIS

#include <Inventor/Xt/devices/SoXtDevice.h>

Methods from class SoXtDevice:

virtual void	enable(Widget w,
XtEventHandler f,
XtPointer data,
Widget win = NULL)

virtual void	disable(Widget w,
XtEventHandler f,
XtPointer data)

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

DESCRIPTION

This is the abstract base class for devices in the Open Inventor Xt component and utility library. When a device is registered with an SoXtRenderArea, the device is able to generate messages in the render area window.

METHODS

virtual void	enable(Widget w,
XtEventHandler f,
XtPointer data,
Widget win = NULL)

virtual void	disable(Widget w,
XtEventHandler f,
XtPointer data)

Enable and disable the device for the passed widget. When enabled, the callback function f will be invoked when events occur in the window. data is the clientData which will be passed.

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

This attempts to convert the passed event into an SoEvent. If the message was not generated by this device, then NULL is returned.

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

Set and get the size of the window this device is registered for. This allows the device to correctly convert position information from X window coordinates (origin at top left) to Open Inventor window coordinates (origin at bottom left). (SoXtRenderArea will automatically call this method for each device registered on it whenever the window size changes.) Note: Setting the window size only affects the size as perceived by the device and not the actual window size.

SEE ALSO

SoXtMouse, SoXtKeyboard, SoXtSpaceBall, SoXtInputFocus, SoXtRenderArea


SoXtDirectionalLightEditor

NAME

SoXtDirectionalLightEditor - component for editing directional lights

INHERITS FROM

SoXtComponent > SoXtDirectionalLightEditor

SYNOPSIS

#include <Inventor/Xt/SoXtDirectionalLightEditor.h>

typedef void	SoXtDirectionalLightEditorCB(void *userData,
const SoDirectionalLight *light)

Methods from class SoXtDirectionalLightEditor:

SoXtDirectionalLightEditor(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtDirectionalLightEditor()

void	attach(SoPath *pathToLight)

void	detach()

SbBool	isAttached()

void	addLightChangedCallback(SoXtDirectionalLightEditorCB *f,
void *userData = NULL)

void	removeLightChangedCallback(SoXtDirectionalLightEditorCB *f,
void *userData = NULL)

void	setLight(const SoDirectionalLight &newLight)

const SoDirectionalLight &	getLight() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used to edit an SoDirectionalLight node (color, intensity, and direction are changed). In addition to directly editing directional light nodes, the editor can also be used with callbacks which will be called whenever the light is changed. The component consists of a render area and a value slider in the main window, with controls to display a color picker. In the render area there appears a sphere representing the world, and a directional light manipulator representing the direction of the light. Picking on the manipulator and moving the mouse provides direct manipulation of the light direction. The color picker is used to edit the color, and the value slider edits the intensity.

The editor can currently be attached to only one light at a time. Attaching to two different lights will automatically detach the first one before attaching the second.

METHODS

SoXtDirectionalLightEditor(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtDirectionalLightEditor()

Constructor and destructor.

void	attach(SoPath *pathToLight)

void	detach()

Attach/detach the editor to/from a directional light. When attached, changes made in the editor directly affect the attached light.

SbBool	isAttached()

Returns TRUE if the editor is attached.

void	addLightChangedCallback(SoXtDirectionalLightEditorCB *f,
void *userData = NULL)

void	removeLightChangedCallback(SoXtDirectionalLightEditorCB *f,
void *userData = NULL)

Additional way of using the directional light editor, by registering a callback and setting the light.

void	setLight(const SoDirectionalLight &newLight)

const SoDirectionalLight &	getLight() const

Set new light values, and get the current light values.

RESOURCES

!!------------------------------------------------
!! Drectional Light Editor !!
!!------------------------------------------------
*IvDirectLightTitle.labelString: Dir Light Editor
*IvDirectLightIconTitle.labelString: Dir Light Ed
*IvDirectLightInten.labelString: Inten
*IvDirectLightColorEditor.labelString: Directional Light Color
*IvDLMenuBar.IvEdit.labelString: Edit
*IvDLMenuBar*IvControlPullDown*IvColorEditor.labelString: Color Editor
*IvDLMenuBar*IvControlPullDown*IvCopy.labelString: Copy
*IvDLMenuBar*IvControlPullDown*IvPaste.labelString: Paste
*IvDLMenuBar*IvControlPullDown*IvHelp.labelString: Help

SEE ALSO

SoXtComponent, SoDirectionalLight


SoXtExaminerViewer

NAME

SoXtExaminerViewer - viewer component which uses a virtual trackball to view the data

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer > SoXtFullViewer > SoXtExaminerViewer

SYNOPSIS

#include <Inventor/Xt/viewers/SoXtExaminerViewer.h>

Methods from class SoXtExaminerViewer:

SoXtExaminerViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtExaminerViewer()

void	setFeedbackVisibility(SbBool onOrOff)

SbBool	isFeedbackVisible() const

void	setFeedbackSize(int newSize)

int	getFeedbackSize() const

void	setAnimationEnabled(SbBool onOrOff)

SbBool	isAnimationEnabled()

void	stopAnimating()

SbBool	isAnimating()

Methods from class SoXtFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Widget	getAppPushButtonParent() const

void	addAppPushButton(Widget newButton)

void	insertAppPushButton(Widget newButton,
int index)

void	removeAppPushButton(Widget oldButton)

int	findAppPushButton(Widget oldButton)

int	lengthAppPushButton()

Widget	getRenderAreaWidget()

Methods from class SoXtViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void 	setCursorEnabled(SbBool onOrOff)

SbBool 	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

virtual void	recomputeSceneSize()

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float	getCurrentDecimationPercentage()

Methods from class SoXtRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The Examiner viewer component allows you to rotate the view around a point of interest using a virtual trackball. The viewer uses the camera focalDistance field to figure out the point of rotation, which is usually set to be at the center of the scene. In addition to allowing you to rotate the camera around the point of interest, this viewer also allows you to translate the camera in the viewer plane, as well as dolly (move forward and backward) to get closer to or further away from the point of interest. The viewer also supports seek to quickly move the camera to a desired object or point.

METHODS

SoXtExaminerViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtExaminerViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoXtViewer reference page for a description of the viewer types.

void	setFeedbackVisibility(SbBool onOrOff)

SbBool	isFeedbackVisible() const

Show/hide the point of rotation feedback, which only appears while in viewing mode (default is off).

void	setFeedbackSize(int newSize)

int	getFeedbackSize() const

Set/get the point of rotation feedback size in pixels (default 20 pix).

void	setAnimationEnabled(SbBool onOrOff)

SbBool	isAnimationEnabled()

Enable/disable the spinning animation feature of the viewer (enabled by default).

void	stopAnimating()

SbBool	isAnimating()

Stop animation, if it is occurring, and query if the viewer is currently animating.

RESOURCES

!!------------------------------------------------
!! Preferences for Examiner Viewer
!!------------------------------------------------
*IvFormExaminer1.IvEnableSpinAnimation.labelString: Enable spin animation
*IvFormExaminer1.IvShowPointOfRotationAxes.labelString: Show point of rotation axes
*IvFormExaminer1.IvAxesSize.labelString: axes size
*IvFormExaminer1.IvPixels.labelString: pixels
!!------------------------------------------------
!! Decorations for Examiner Viewer !!
!!------------------------------------------------
*IvExamTitle.labelString: Examiner Viewer
*IvExamPrefTitle.labelString: Examiner Viewer Preference Sheet
*IvExamPopupTitle.labelString: Examiner Viewer
*IvExamIconTitle.labelString: Examiner Viewer
*IvExamRotx.labelString: Rotx
*IvExamRoty.labelString: Roty
*IvExamZoom.labelString: Zoom
*IvExamDolly.labelString: Dolly

USAGE

(For 3-button mouse only.)

Left Mouse: Rotate the virtual trackball.

Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left, right.

Ctrl + Middle Mouse or
Left + Middle Mouse: Dolly in and out (gets closer to and further away from the object).

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

Right Mouse: Open the popup menu.

ALT: When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

Examiner Viewer (illustration and additional info on mouse buttons), SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtWalkViewer, SoXtFlyViewer, SoXtPlaneViewer


SoXtFlyViewer

NAME

SoXtFlyViewer - viewer component for flying through space, with a constant world up

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer > SoXtFullViewer > SoXtConstrainedViewer > SoXtFlyViewer

SYNOPSIS

#include <Inventor/Xt/viewers/SoXtFlyViewer.h>

Methods from class SoXtFlyViewer:

SoXtFlyViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtFlyViewer()

Methods from class SoXtConstrainedViewer:

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Methods from class SoXtFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Widget	getAppPushButtonParent() const

void	addAppPushButton(Widget newButton)

void	insertAppPushButton(Widget newButton,
int index)

void	removeAppPushButton(Widget oldButton)

int	findAppPushButton(Widget oldButton)

int	lengthAppPushButton()

Widget	getRenderAreaWidget()

Methods from class SoXtViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void 	setCursorEnabled(SbBool onOrOff)

SbBool 	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

virtual void	recomputeSceneSize()

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float	getCurrentDecimationPercentage()

Methods from class SoXtRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

Fly Viewer - this viewer is intended to simulate flight through space, with a constant world up direction. The viewer only constrains the camera to keep the user from flying upside down. No mouse buttons need to be pressed in order to fly. The mouse position is used only for steering, while mouse clicks are used to increase or decrease the viewer speed.

The viewer allows you to tilt your head up/down/right/left and move in the direction you are looking (forward or backward). The viewer also supports seek to quickly move the camera to a desired object or point.

METHODS

SoXtFlyViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtFlyViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoXtViewer reference page for a description of the viewer types.

RESOURCES

!!------------------------------------------------
!! Decorations for Fly Viewer !!
!!------------------------------------------------
*IvFlyTitle.labelString: Fly Viewer
*IvFlyPrefTitle.labelString: Fly Viewer Preference Sheet
*IvFlyPopupTitle.labelString: Fly Viewer
*IvFlyIconTitle.labelString: Fly Viewer
!! Same for Walk Viewer !!
*IvFlyWalkRotate.labelString: Rotate
!! Same for Walk Viewer !!
*IvFlyWalkTilt.labelString: Tilt
!! Same for Walk Viewer !!
*IvFlyWalkDolly.labelString: Dolly
!!------------------------------------------------
!! Preferences for Fly Viewer !!
!!------------------------------------------------
*FlyPreference.FlyingSpeed.labelString: Flying speed:
*FlyPreference.Increase.labelString: increase
*FlyPreference.Decrease.labelString: decrease

USAGE

(For 3-button mouse only.)

Left Mouse: Click to increase speed.

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

<u> + Left Mouse: Press (but do not hold down) the <u> key, then click on a target object to set the "up" direction to the surface normal. By default +y is the "up" direction.

Middle Mouse: Click to decrease speed.

Left and Middle Mouse: Click both simultaneously to stop.

Ctrl: Hold the key down to temporarily stop and rotate the viewpoint.

Right Mouse: Open the popup menu.

ALT: When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

Fly Viewer (illustration and additional info on mouse buttons), SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtWalkViewer, SoXtExaminerViewer, SoXtPlaneViewer


SoXtFullViewer

NAME

SoXtFullViewer - base viewer class which adds a decoration around the rendering area

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer > SoXtFullViewer

SYNOPSIS

#include <Inventor/Xt/viewers/SoXtFullViewer.h>

enum BuildFlag	{
SoXtFullViewer::BUILD_NONE
Doesn't build anything extra
SoXtFullViewer::BUILD_DECORATION
Build the decoration only
SoXtFullViewer::BUILD_POPUP
Build the popup menu only
SoXtFullViewer::BUILD_ALL
Build everything by default
}

Methods from class SoXtFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Widget	getAppPushButtonParent() const

void	addAppPushButton(Widget newButton)

void	insertAppPushButton(Widget newButton,
int index)

void	removeAppPushButton(Widget oldButton)

int	findAppPushButton(Widget oldButton)

int	lengthAppPushButton()

Widget	getRenderAreaWidget()

Methods from class SoXtViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void 	setCursorEnabled(SbBool onOrOff)

SbBool 	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

virtual void	recomputeSceneSize()

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void	setDecimationPercentageCallback(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float	getCurrentDecimationPercentage()

Methods from class SoXtRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This is a base class used by all viewer components. The class adds a decoration around the rendering area that includes thumb wheels, a zoom slider and push buttons. This base class also includes a viewer popup menu and a preference sheet with generic viewing functions. The constructors for the various subclasses of SoXtFullViewer provide a flag for specifying whether the decoration and popup menus should be built.

METHODS

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

Show/hide the viewer component trim (default on). See the viewer constructor to prevent the decoration from being built.

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Enable/disable the viewer popup menu (default enabled). See the viewer constructor to prevent the popup menu from being built.

Widget	getAppPushButtonParent() const

Returns the parent widget, which is needed when creating new buttons.
Note: that if the decoration is not created in the constructor, this will be NULL until the decoration is shown.

void	addAppPushButton(Widget newButton)

void	insertAppPushButton(Widget newButton,
int index)

void	removeAppPushButton(Widget oldButton)

int	findAppPushButton(Widget oldButton)

int	lengthAppPushButton()

Add/remove push buttons for the application, which will be placed in the left hand side decoration trim. Adding buttons appends them to the end of the list, while inserting them places them at the desired index.
Note: the button pixmaps should be 24-by-24 pixels size to nicely fit into the decoration trim like the other viewer buttons.

 Widget	getRenderAreaWidget()

Returns the render area widget.

RESOURCES

!!------------------------------------------------
!! FUNCTIONS MENU
!!------------------------------------------------
*IvMenu.IvFunctions1.labelString: Functions
*IvFunctions2.IvHelp.labelString: Help
*IvFunctions2.IvHome.labelString: Home
*IvFunctions2.IvSetHome.labelString: Set Home
*IvFunctions2.IvViewAll.labelString: View All
*IvFunctions2.IvSeek.labelString: Seek
*IvFunctions2.IvCopyView.labelString: Copy View
*IvFunctions2.IvPasteView.labelString: Paste View
!!------------------------------------------------
!! DRAW STYLE MENU
!!------------------------------------------------
*IvMenu.IvDrawStyle1.labelString: Draw Style
*IvDrawStyle2.IvAsIs.labelString: as is
*IvDrawStyle2.IvHiddenLine.labelString: hidden line
*IvDrawStyle2.IvNoTexture.labelString: no texture
*IvDrawStyle2.IvLowResolution.labelString: low resolution
*IvDrawStyle2.IvWireFrame.labelString: wireframe
*IvDrawStyle2.IvPoints.labelString: points
*IvDrawStyle2.IvBoundingBoxNoDepth.labelString: bounding box ( no depth )
*IvDrawStyle2.IvMoveSameAsStill.labelString: move same as still
*IvDrawStyle2.IvMoveNoTexture.labelString: move no texture.
*IvDrawStyle2.IvMoveLowRes.labelString: move low res
*IvDrawStyle2.IvMoveWireFrame.labelString: move wireframe
*IvDrawStyle2.IvMoveLowResWireFrameNoDepth.labelString: move low res wire frame ( no depth )
*IvDrawStyle2.IvMovePoints.labelString: move points
*IvDrawStyle2.IvMoveLowResPointsNoDepth.labelString: move low res points ( no depth )
*IvDrawStyle2.IvMoveBoundingBoxNoDepth.labelString: move bounding box ( no depth )
*IvDrawStyle2.IvSingleBuffer.labelString: single buffer
*IvDrawStyle2.IvDoubleBuffer.labelString: Double buffer
*IvDrawStyle2.IvInteractiveBuffer.labelString: interactive buffer
!!------------------------------------------------
*IvMenu.IvViewing.labelString: Viewing
!!------------------------------------------------
*IvMenu.IvDecoration.labelString: Decoration
!!------------------------------------------------
*IvMenu.IvHeadlight.labelString: Headlight
!!------------------------------------------------
*IvMenu.IvPreferences.labelString: Preferences ...

!!------------------------------------------------
!! PREFERENCES
!!------------------------------------------------
*IvFormPreference1.IvSeekAnimationTime.labelString: Seek animation time
*IvFormPreference1.IvSeconds.labelString: seconds
*IvFormPreference1.IvSeekTo.labelString: Seek to:
*IvFormPreference1.IvPoint.labelString: point
*IvFormPreference1.IvObject.labelString: object
*IvFormPreference2.IvSeekDistance.labelString: Seek distance:
*IvFormPreference2.IvPercentage.labelString: percentage
*IvFormPreference2.IvAbsolute.labelString: absolute
*IvZoomForm.IvCameraZoom.labelString: Camera zoom
*IvZoomForm.IvZoomSliderRangesFrom.labelString: Zoom slider ranges from:
*IvZoomForm.IvTo.labelString: to:
*IvZoomForm.IvZoomSlider.labelString: Zoom slider
*IvZoomForm.IvZoomField.labelString: Zoom field
*IvZoomForm.IvZoomFrom.labelString: Zoom from
*IvZoomForm.IvZoomTo.labelString: Zoom to
*IvFormPreference3.IvAutoClippingPlanes.labelString: Auto clipping planes
*IvFormPreference4.IvStereoViewing.labelString: Stereo Viewing
*IvFormPreference6.IvNearPlane.labelString: near plane
*IvFormPreference6.IvFarPlane.labelString: far plane
*IvStereoThumbForm.IvCameraRotation.labelString: Camera rotation

SEE ALSO

SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtExaminerViewer, SoXtWalkViewer, SoXtFlyViewer, SoXtPlaneViewer


SoXtGLWidget

NAME

SoXtGLWidget -component for OpenGL rendering

INHERITS FROM

SoXtComponent > SoXtGLWidget

SYNOPSIS

#include <Inventor/Xt/SoXtGLWidget.h>

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This abstract base class provides a C++ wrapper around the GLwMDraw window object. It allows OpenGL rendering to be performed within a Motif window and is used by the SoXtRenderArea. SoXtGLWidget uses a parent window with two separate GLwMDraw window objects (one for single and one for double buffering), with routines to return the appropriate windows.

Subclasses only need to redefine the redraw() routine for rendering and processEvent() routine if they are interested in receiving X events.

METHODS

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

Show and hide the border around the OpenGL windows (thickness 3). Default is no border (FALSE). (The SoXtRenderArea subclass defaults turns the border on by default.)

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Routine which dynamically changes between single and double buffering. Default is double buffer off. (The SoXtRenderArea subclass makes it double buffer by default.)

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Set/query drawing to the front buffer. Controls drawing to the front buffer when an obscured portion of the window is exposed. Default: TRUE.

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

Get the current normal and overlay GL windows, contexts and widgets, which are needed as arguments to glXMakeCurrent() when doing drawing in the normal or overlay planes.

Note1: These should not be cached by users because they will change as single/double buffering changes.

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

Specify exactly what the visual should be for the normal and overlay window. This allows the user to create all possible visual supported by OpenGL. The XVisualInfo structure should be a valid OpenGL visual returned by glXChooseVisual(). This structure will be copied by the SoXtGLWidget; the application is responsible for freeing the visual info with XFree() when done. (The methods for setting the visual are virtual so that derived classes can know when the visual is changing.)

SEE ALSO

SoXtComponent, SoXtRenderArea


SoXtInputFocus

NAME

SoXtInputFocus - reports input focus change events

INHERITS FROM

SoXtDevice > SoXtInputFocus

SYNOPSIS

#include <Inventor/Xt/devices/SoXtInputFocus.h>

Methods from class SoXtInputFocus:

SoXtInputFocus(EventMask mask = SO_XT_ALL_FOCUS_EVENTS)

~SoXtInputFocus()

Methods from class SoXtDevice:

virtual void	enable(Widget w,
XtEventHandler f,
XtPointer data,
Widget win = NULL)

virtual void	disable(Widget w,
XtEventHandler f,
XtPointer data)

virtual const SoEvent *	translateEvent(XEvent *xevent)

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

DESCRIPTION

This class reports input focus change events (i.e. when the cursor crosses into or out of the window). There are no input focus event in Open Inventor, so this always returns NULL when asked to translate events. When this class is registered on a render area, the render area will receive X input focus change events. (This class is extensively employed by the viewer classes.)

METHODS

SoXtInputFocus(EventMask mask = SO_XT_ALL_FOCUS_EVENTS)

~SoXtInputFocus()

Constructor and destructor. To the constructor, pass which input focus events you are interested in as a bitwise OR of the following values:

EnterWindowMask - Input focus entered the window.

LeaveWindowMask - Input focus left the window

Or simply pass the defined value SO_XT_ALL_FOCUS_EVENTS for all input focus events.

SEE ALSO

SoXtDevice


SoXtKeyboard

NAME

SoXtKeyboard - translates and reports events for the keyboard

INHERITS FROM

SoXtDevice > SoXtKeyboard

SYNOPSIS

#include <Inventor/Xt/devices/SoXtKeyboard.h>

#define SO_XT_ALL_KEYBOARD_EVENTS (KeyPressMask | KeyReleaseMask)

Methods from class SoXtKeyboard:

SoXtKeyboard(EventMask mask = SO_XT_ALL_KEYBOARD_EVENTS)

~SoXtKeyboard()

Methods from class SoXtDevice:

virtual void	enable(Widget w,
XtEventHandler f,
XtPointer data,
Widget win = NULL)

virtual void	disable(Widget w,
XtEventHandler f,
XtPointer data)

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

DESCRIPTION

This class manages events generated by the keyboard, including key press and release events (SoKeyboardEvent).

METHODS

SoXtKeyboard(EventMask mask = SO_XT_ALL_KEYBOARD_EVENTS)

~SoXtKeyboard()

Constructor and destructor. To the constructor, pass which keyboard events you are interested in as a bitwise OR of the following values:

KeyPressMask - Key press messages

KeyReleaseMask - Key release messages

Or simply pass the defined value SO_XT_ALL_KEYBOARD_EVENTS for all keyboard events. The device will only report events of this type for the widget it is enabled on.

SEE ALSO

SoXtDevice, SoKeyboardEvent


SoXtLightSliderSet

NAME

SoXtLightSliderSet - component with Motif sliders for editing SoLight nodes

INHERITS FROM

SoXtComponent > SoXtSliderBase > SoXtSliderSet > SoXtLightSliderSet

SYNOPSIS

#include <Inventor/Xt/SoXtLightSliderSet.h>

Methods from class SoXtLightSliderSet:

SoXtLightSliderSet(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoNode *newEditNode = NULL)

~SoXtLightSliderSet()

Methods from class SoXtSliderSetBase:

virtual void	setNode(SoNode *newNode)

SoNode *	getNode() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const	char * getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used to manipulate the intensity and color of an SoLight node using an arrangement of Motif sliders and buttons.

METHODS

SoXtLightSliderSet(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoNode *newEditNode = NULL)

~SoXtLightSliderSet()

Constructor and destructor. At construction time the light node to edit can be supplied.

RESOURCES

!!------------------------------------------------
!! Light Slider Set
!!------------------------------------------------
*IvLightSliderColor.labelString: COLOR
*IvLightSliderRed.labelString: Red
*IvLightSliderGreen.labelString: Green
*IvLightSliderBlue.labelString: Blue
*IvLightSliderIntensity1.labelString: INTENSITY
*IvLightSliderIntensity2.labelString: Intensity

SEE ALSO

SoXtSliderSet, SoXtSliderSetBase, SoXtComponent, SoLight, SoNode


SoXtMaterialEditor

NAME

SoXtMaterialEditor - component which lets you edit a material interactively

INHERITS FROM

SoXtComponent > SoXtMaterialEditor

SYNOPSIS

#include <Inventor/Xt/SoXtMaterialEditor.h>

typedef void	SoXtMaterialEditorCB(void *userData,
const SoMaterial *mtl)

enum UpdateFrequency	{
SoXtMaterialEditor::CONTINUOUS
Send updates with every mouse motion
SoXtMaterialEditor::AFTER_ACCEPT
Only send updates after user hits accept button
}

Methods from class SoXtMaterialEditor:

SoXtMaterialEditor(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtMaterialEditor()

void	attach(SoMaterial *material,
int index = 0)

void	attach(SoVRMLMaterial *material)

void	detach()

SbBool	isAttached()

void	addMaterialChangedCallback(SoXtMaterialEditorCB *f,
void *userData = NULL)

void	removeMaterialChangedCallback(SoXtMaterialEditorCB *f,
void *userData = NULL)

void	setUpdateFrequency(SoXtMaterialEditor::UpdateFrequency freq)

SoXtMaterialEditor::UpdateFrequency	getUpdateFrequency()

void	setMaterial(const SoMaterial &mtl)

void	setMaterial(const SoVRMLMaterial &mtl)

const SoMaterial &	getMaterial() const

SbBool	isAttachedVRML()

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used to edit the material properties of an SoMaterial node. The editor can also directly be used using callbacks instead of attaching it to a node. The component consists of a render area displaying a test sphere, some sliders, a set of radio buttons, and a menu. The sphere displays the current material being edited. There is one slider for each material coefficient. Those fields are ambient, diffuse, specular, emissive (all of which are colors); and transparency and shininess (which are scalar values). A color editor can be opened to edit the color slider base color. A material list displays palettes of predefined materials from which to choose.

The editor can currently be attached to only one material at a time. Attaching two different materials will automatically detach the first one before attaching the second.

METHODS

SoXtMaterialEditor(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtMaterialEditor()

Constructor and destructor.

void	attach(SoMaterial *material,
int index = 0)

void	attach(SoVRMLMaterial *material)

void	detach()

Attach/detach the editor to a material node and edit the material of the given index.

SbBool	isAttached()

Returns TRUE if the editor is attached.

SbBool	isAttachedVRML()

Returns TRUE if the attached material node is a VRML material. Not meaningful if the editor is not currently attached.

void	addMaterialChangedCallback(SoXtMaterialEditorCB *f,
void *userData = NULL)

void	removeMaterialChangedCallback(SoXtMaterialEditorCB *f,
void *userData = NULL)

Additional way of using the material editor, by registering a callback which will be called whenever the material changes (check the UpdateFrequency to find when the callbacks will be called).

void	setUpdateFrequency(SoXtMaterialEditor::UpdateFrequency freq)

SoXtMaterialEditor::UpdateFrequency	getUpdateFrequency()

Sets/gets the update frequency. See the UpdateFrequency enum declaration.

void	setMaterial(const SoMaterial &mtl)

void	setMaterial(const SoVRMLMaterial &mtl)

const SoMaterial &	getMaterial() const

Set a new material value, and get the current material value.

SbBool	isAttachedVRML()

Is attached material a VRML material?

RESOURCES

!!------------------------------------------------
!! Material Editor !!
!!------------------------------------------------
*IvMaterialEditorTitle.labelString: Material Editor
*IvMaterialEditorIconTitle.labelString: Mat Editor
*IvMaterialAmbientTitle.labelString: Material Ambient Color
*IvMaterialDiffuseTitle.labelString: Material Diffuse Color
*IvMaterialSpecularTitle.labelString: Material Specular Color
*IvMaterialEmissiveTitle.labelString: -Material Emissive Color
*IvMaterialEditorMaterial.labelString: Material /
*IvMaterialEditorAmb.labelString: Amb /
*IvMaterialEditorDiff.labelString: Diff /
*IvMaterialEditorSpec.labelString: Spec /
*IvMaterialEditorEmis.labelString: Emis /
*IvMaterialEditorColor.labelString: Color
*IvMEMenuBar.IvEdit.labelString: Edit
*IvMEMenuBar*IvEditPullDown.IvMaterialList.labelString: Material List
*IvMEMenuBar*IvEditPullDown.IvContinuous.labelString: Continuous
*IvMEMenuBar*IvEditPullDown.IvManual.labelString: Manual
*IvMEMenuBar*IvEditPullDown.IvCopy.labelString: Copy
*IvMEMenuBar*IvEditPullDown.IvPaste.labelString: Paste
*IvMEMenuBar*IvEditPullDown.IvHelp.labelString: Help
*IvControls.IvEditColor.labelString: Edit Color
*IvsliderForm.IvtextForm.IvAmb.labelString: Amb:
*IvsliderForm.IvtextForm.IvDiff.labelString: Diff
*IvsliderForm.IvtextForm.IvSpec.labelString: Spec
*IvsliderForm.IvtextForm.IvEmis.labelString: Emis
*IvsliderForm.IvtextForm.IvShininess.labelString: Shininess
*IvsliderForm.IvtextForm.IvTransp.labelString: Transp:
*IvMETop.IvAccept.labelString: Accept

SEE ALSO

SoXtComponent, SoXtMaterialList, SoXtDirectionalLightEditor, SoMaterial


SoXtMaterialList

NAME

SoXtMaterialList - component which lets you edit a material interactively

INHERITS FROM

SoXtComponent > SoXtMaterialList

SYNOPSIS

#include <Inventor/Xt/SoXtMaterialList.h>

typedef void	SoXtMaterialListCB(void *userData,
const SoMaterial *mtl)

Methods from class SoXtMaterialList:

SoXtMaterialList(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
const char *dir = NULL)

~SoXtMaterialList()

addCallback(SoXtMaterialListCB *f,
void *userData = NULL)

removeCallback(SoXtMaterialListCB *f,
void *userData = NULL)

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used to choose an SoMaterial from palettes of predefined materials (for example, gold, silver, or bronze from the metal palette; emerald, pearl, or ruby from the stones palette). The chosen material is passed to callback functions registered with this component.

METHODS

SoXtMaterialList(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
const char *dir = NULL)

~SoXtMaterialList()

The constructor is passed a directory name which serves as the home directory for the material palettes. You can have any number of palettes in this directory. A palette is a subdirectory that contains Open Inventor data files, where each file describes one material. Predefined Open Inventor materials are found in $OIVHOME/data/materials.

addCallback(SoXtMaterialListCB *f,
void *userData = NULL)

removeCallback(SoXtMaterialListCB *f,
void *userData = NULL)

Register functions that will be called whenever the user chooses a new material from the list. Each callback when invoked will be passed the userData pointer, along with a pointer to the newly selected material.

RESOURCES

!!------------------------------------------------
!! Material List !!
!!------------------------------------------------
*IvMaterialListTitle.labelString: Material List
*IvMaterialListeIconTitle.labelString: Mat List
*IvMLMenuBar*IvPalettes.labelString: Palettes

SEE ALSO

SoXtComponent, SoCallbackList, SoMaterial, SoXtMaterialEditor


SoXtMaterialSliderSet

NAME

SoXtMaterialSliderSet - component with Motif sliders for editing SoMaterial nodes

INHERITS FROM

SoXtComponent > SoXtSliderSetBase > SoXtSliderSet > SoXtMaterialSliderSet

SYNOPSIS

#include <Inventor/Xt /SoXtMaterialSliderSet.h>

Methods from class SoXtMaterialSliderSet:

SoXtMaterialSliderSet(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoNode *newEditNode = NULL)

~SoXtMaterialSliderSet()

Methods from class SoXtSliderSetBase:

virtual void	setNode(SoNode *newNode)

SoNode *	getNode() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class defines an editor that uses Motif Sliders to edit the fields in an SoMaterial node. There are sliders for editing the RGB values of ambientColor, diffuseColor, specularColor and emissiveColor, as well as for editing the transparency and shininess values.

METHODS

SoXtMaterialSliderSet(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoNode *newEditNode = NULL)

~SoXtMaterialSliderSet()

Constructor and destructor. At construction time the material node to edit can be supplied.

RESOURCES

!!------------------------------------------------
!! Material Slider Set
!!------------------------------------------------
*IvMaterialSliderAmbient.labelString: AMBIENT
*IvMaterialSliderAmbientRed.labelString: Ambient Red
*IvMaterialSliderAmbientGreen.labelString: Ambient Green
*IvMaterialSliderAmbientBleu.labelString: Ambient Blue
*IvMaterialSliderDiffuse.labelString: DIFFUSE
*IvMaterialSliderDiffuseRed.labelString: Diffuse Red
*IvMaterialSliderDiffuseGreen.labelString: Diffuse Green
*IvMaterialSliderDiffuseBleu.labelString: Diffuse Blue
*IvMaterialSliderSpecular.labelString: SPECULAR
*IvMaterialSliderSpecularRed.labelString: Specular Red
*IvMaterialSliderSpecularGreen.labelString: Specular Green
*IvMaterialSliderSpecularBleu.labelString: Specular Blue
*IvMaterialSliderEmissive.labelString: EMISSIVE
*IvMaterialSliderEmissiveRed.labelString: Emissive Red
*IvMaterialSliderEmissiveGreen.labelString: Emissive Green
*IvMaterialSliderEmissiveBlue.labelString: Emissive Blue
*IvMaterialSliderShininess.labelString: SHININESS
*IvMaterialSliderShininessShininess.labelString: shininess
*IvMaterialSliderTransparency.labelString: TRANSPARENCY
*IvMaterialSliderTransparencyTransparency.labelString: transparency

SEE ALSO

SoXtMaterialEditor, SoXtSliderSet, SoXtSliderSetBase, SoXtComponent, SoMaterial, SoNode


SoXtMouse

NAME

SoXtMouse - translates and reports events for the mouse

INHERITS FROM

SoXtDevice > SoXtMouse

SYNOPSIS

#include <Inventor/Xt/devices/SoXtMouse.h>

#define SO_XT_ALL_MOUSE_EVENTS (ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask)

Methods from class SoXtMouse:

SoXtMouse(EventMask mask = SO_XT_ALL_MOUSE_EVENTS)

~SoXtMouse()

Methods from class SoXtDevice:

virtual void	enable(Widget w,
XtEventHandler f,
XtPointer data,
Widget win = NULL)

virtual void	disable(Widget w,
XtEventHandler f,
XtPointer data)

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

void	setWindowSize(const SbVec2s &size)

const SbVec2s &	getWindowSize() const

DESCRIPTION

This class manages events generated by the mouse, including mouse motion (SoLocation2Event), and mouse button press and release events (SoMouseButtonEvent).

METHODS

SoXtMouse(EventMask mask = SO_XT_ALL_MOUSE_EVENTS)

~SoXtMouse()

Constructor and destructor. To the constructor, pass which mouse messages you are interested in as a bitwise OR of the following values:

ButtonPressMask - Mouse down events

ButtonReleaseMask - Mouse up events

PointerMotionMask - Mouse motion with no buttons

ButtonMotionMask - Mouse motion with buttons pressed

Or simply pass the defined value SO_XT_ALL_MOUSE_EVENTS for all mouse events. The device will only report events of this type for the window it is enabled on.

SEE ALSO

SoXtDevice, SoLocation2Event, SoMouseButtonEvent


SoXtPlaneViewer

NAME

SoXtPlaneViewer - viewer component which moves the camera in a plane

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer > SoXtFullViewer > SoXtPlaneViewer

SYNOPSIS

#include <Inventor/Xt/viewers/SoXtPlaneViewer.h>

Methods from class SoXtPlaneViewer:

SoXtPlaneViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtPlaneViewer()

Methods from class SoXtFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Widget	getAppPushButtonParent() const

void	addAppPushButton(Widget newButton)

void	insertAppPushButton(Widget newButton,
int index)

void	removeAppPushButton(Widget oldButton)

int	findAppPushButton(Widget oldButton)

int	lengthAppPushButton()

Widget	getRenderAreaWidget()

Methods from class SoXtViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void 	setCursorEnabled(SbBool onOrOff)

SbBool 	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

virtual void	recomputeSceneSize()

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float	getCurrentDecimationPercentage()

Methods from class SoXtRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The Plane viewer component allows the user to translate the camera in the viewing plane, as well as dolly (move foward/backward) and zoom in and out. The viewer also allows the user to roll the camera (rotate around the forward direction) and seek to objects which will specify a new viewing plane. This viewer could be used for modeling, in drafting, and architectural work. The camera can be aligned to the X, Y or Z axes.

METHODS

SoXtPlaneViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtPlaneViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoXtViewer reference pages for a description of the viewer types.

RESOURCES

!!------------------------------------------------
!! Decorations for Plane Viewer !!
!!------------------------------------------------
*IvPlaneTitle.labelString: Plane Viewer
*IvPlanePrefTitle.labelString: Plane Viewer Preference Sheet
*IvPlanePopupTitle.labelString: Plane Viewer
*IvPlaneIconTitle.labelString: Plane Viewer
*IvPlaneTransx.labelString: transX
*IvPlaneTransy.labelString: transY
*IvPlaneZoom.labelString: Zoom
*IvPlaneDolly.labelString: Dolly

USAGE

(For 3-button mouse only.)

Left Mouse or
Left + Middle Mouse: Dolly in and out (gets closer to and further away from the object).

Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left and right.

Ctrl + Middle Mouse: Used for roll action (rotates around the viewer forward direction).

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

Right Mouse: Open the popup menu.

ALT: When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

Plane Viewer (illustration and additional info about mouse buttons), SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtWalkViewer, SoXtExaminerViewer, SoXtFlyViewer


SoXtPrintDialog

NAME

SoXtPrintDialog - dialog box for controlling printing

INHERITS FROM

SoXtComponent > SoXtPrintDialog

SYNOPSIS

#include <Inventor/Xt/SoXtPrintDialog.h>

typedef void	SoXtPrintDialogCB(void *userData,
SoXtPrintDialog *dialog)

Methods from class SoXtPrintDialog:

SoXtPrintDialog(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtPrintDialog()

void	setSceneGraph(SoNode *root)

SoNode *	getSceneGraph()

void	setSceneGraph(SoPath *path)

SoPath *	getSceneGraphPath()

void	setGLRenderAction(const SoGLRenderAction *act)

SoGLRenderAction *	getGLRenderAction()

void	setPrintSize(SbVec2f &inches)

void	setPrintSize(SbVec2s &)

void	setBeforePrintCallback(SoXtPrintDialogCB *f,
void *userData = NULL)

void	setAfterPrintCallback(SoXtPrintDialogCB *f,
void *userData = NULL)

Methods from class SoXtComponent:

virtual	void show()

virtual	void hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class provides an interactive widget for setting available options used in printing with the SoPrintAction and its subclasses. Options include whether to print with hidden lines or not, whether to print using the Landscape format, whether to print to a file or a printer.

METHODS

SoXtPrintDialog(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE)

~SoXtPrintDialog()

Constructors and destructor.

void	setSceneGraph(SoNode *root)

SoNode *	getSceneGraph()

void	setSceneGraph(SoPath *path)

SoPath *	getSceneGraphPath()

Sets/gets the root node or path to nodes to be used for printing.

void	setGLRenderAction(const SoGLRenderAction *act)

SoGLRenderAction *	getGLRenderAction()

Sets/gets the render action to be used when printing.

void	setPrintSize(SbVec2f &inches)

void	setPrintSize(SbVec2s &)

Sets/gets the size of the printed image. This is typically the same size as the window displaying the scene to be printed.

void	setBeforePrintCallback(SoXtPrintDialogCB *f,
void *userData = NULL)

void	setAfterPrintCallback(SoXtPrintDialogCB *f,
void *userData = NULL)

Two callbacks are maintained, one which gets called just before a print is executed, and one which gets called after a print is executed. These two methods sets the appropriate callback function (set these to NULL to remove the callback).

RESOURCES

!!------------------------------------------------
!! Print Dialog
!!------------------------------------------------
*IvPrintDialTitle.labelString: Print Dialog
*IvPrintDialIconTitle.labelString: Print Dialog
*IvPrintDialPrinter.labelString: Printer:
*IvPrintDialPageOut.labelString: Page Output:
*IvPrintDialToPrinter.labelString: To Printer
*IvPrintDialToFile.labelString: To File
*IvPrintDialQuit.labelString: Quit
*IvPrintDialPrint.labelString: Print
*IvPrintDialMessage.labelString: Message:
*IvPrintDialFileFormat.labelString: File Format:
*IvPrintDialPostScript.labelString: PostScript
*IvPrintDialRGB.labelString: RGB
*IvPrintDialPrintQuality.labelString: Print Quality:
*IvPrintDialHigh.labelString: High
*IvPrintDialDraft.labelString: Draft
*IvPrintDialPageFormat.labelString: Page Format
*IvPrintDialPortrait.labelString: Portrait
*IvPrintDialLandscape.labelString: Landscape
*IvPrintDialPrintSize.labelString: Print Size (inches):
*IvPrintDialFileName.labelString: File Name:
*IvPrintDialResolution.labelString: Resolution
*IvPrintDialBy.labelString: by
*IvPrintDialDpi.labelString: DPI:
*IvPrintDialMess1.labelString: Printing in progress...
*IvPrintDialMess2.labelString: ERROR: Empty database.
*IvPrintDialMess3.labelString: ERROR: Exceeds
*IvPrintDialMess4.labelString: ERROR: Could not execute print.
*IvPrintDialMess5.labelString: ERROR: Could not execute print.
*IvPrintDialMess6.labelString: ERROR: No printer.
*IvPrintDialMess7.labelString: ERROR: Couldn't open
*IvPrintDialMess8.labelString: ERROR: No file name.
*IvPrintDialMess9.labelString: ERROR: Could not open file.
*IvPrintDialMess10.labelString: ERROR: Could not get data.
*IvPrintDialMess11.labelString: ERROR: Could not get data.
*IvPrintDialMess12.labelString: Printing completed.

SEE ALSO

SoGLRenderAction, SoXtComponent


SoXtRenderArea

NAME

SoXtRenderArea - component for rendering Open Inventor scene graphs

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea

SYNOPSIS

#include <Inventor/Xt/SoXtRenderArea.h>

typedef SbBool	SoXtRenderAreaEventCB(void *userData,
XEvent *anyevent)

Methods from class SoXtRenderArea:

SoXtRenderArea(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SbBool getMouseInput = TRUE,
SbBool getKeyboardInput = TRUE)

~SoXtRenderArea()

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class provides Open Inventor rendering and event handling inside a GLX Motif widget. There is a routine to specify the scene to render. The scene is automatically rendered whenever anything under it changes (a data sensor is attached to the root of the scene), unless explicitly told not to do so (manual redraws). Users can also set Open Inventor rendering attributes such as the transparency type, antialiasing on or off, etc. This class employs an SoSceneManager to manage rendering and event handling.

X events that occur in the render area can be handled by the application, by the viewer (if this is really a viewer), or by the nodes in the scene graph. When a event occurs, it is first passed to the application event callback function registered with the setEventCallback() method on SoXtRenderArea. If this function does not exist or returns FALSE, the X event is either used directly by the viewer or translated to an SoEvent for further scene graph processing. If the viewer does not handle the event, and an overlay scene graph exists, the SoEvent is sent to that scene graph by way of an SoHandleEventAction. If no node in the overlay scene graph handles the event (i.e., calls setHandled() on the SoHandleEventAction), the SoEvent is passed to the normal scene graph in the same manner.

 METHODS

SoXtRenderArea(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SbBool getMouseInput = TRUE,
SbBool getKeyboardInput = TRUE)

~SoXtRenderArea()

Constructor which is passed arguments which tell it whether to register the mouse and keyboard devices by default (SoXtMouse and SoXtKeyboard).

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

Set/get the scene graph to be rendered in this component's window.

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

Set/get the scene graph to be rendered in the overlay plane. NOTE: This feature requires a graphics board that supports an overlay plane.

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

Register/unregister interest in devices. When a device is registered, messages from that device will be processed by the render area, and passed into the scene graph. Messages from unregistered devices will be ignored.

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

Set/get the background color for this window. Default is black (0,0,0).

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

Sets/gets the window background color when in color index mode. Default is black (index 0)).

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

Sets/gets the overlay window background color index. Default is 0 (clear color)).

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

Sets the colors to use when displaying in color index mode. This will load the color map with the given colors at the starting index.

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

Sets the colors to use for overlay bit planes.This will load the color map with the given colors at the starting index.

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

Sets/gets current viewport region to use for rendering

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

Set/get the quality level for rendering transparent objects. See SoGLRenderAction for possible transparency types.

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

Set/get the antialiasing for rendering. There are two kinds of antialiasing available: smoothing and multipass antialiasing. If smoothing is set to TRUE, smoothing is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. The value of numPasses controls multipass antialiasing. Each time a render action is applied, Open Inventor renders the scene numPasses times from slightly different camera positions, averaging the results. numPasses can be from one to 255, inclusive. Setting numPasses to one disables multipass antialiasing. You can use either, both, or neither of these antialiasing techniques. By default, both smoothing and multipass antialiasing are disabled.

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

Enable/prevent window clearing from happening before a rendering starts (default is clear TRUE). This can be useful to limit flickering when doing single buffering and geometry covers the entire window (used in the material editor). Can also control whether the depth buffer (sometimes called the Z buffer) is cleared before rendering.

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

Enable/prevent overlay window clearing from happening before a rendering starts (default is clear TRUE).

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

The render area will automatically redraw whenever something in the scene graph changes. Passing FALSE will disable this feature.

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

Sets/gets the priority of the redraw sensor and get the default priority number.

void	render()

void	renderOverlay()

Calling this forces the render area to be redrawn now. It is not necessary to call this method if auto redraw is enabled (which is the default).

void	scheduleRedraw()

void	scheduleOverlayRedraw()

Schedule a redraw to happen sometime soon (as opposed to immediately). This can be used to compress multiple redraws.

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

Call this convenience method to have this render area redraw whenever the selection list changes in the passed node. This is useful if using a highlight render action like the SoBoxHighlightRenderAction to correctly render whenever the selection changes. Pass NULL to turn this off.

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

X events which occur in the render area window are either directly handled by the viewer (when this is really a viewer) or automatically translated to SoEvents, then passed into the scene graph (via the SoHandleEventAction) so that live scene graph objects can handle the event (when viewers are not in viewing mode). This method allows the application to register a callback for handling events that occur in the window, instead of sending them to the viewers or down the graph. The callback is passed the X events, and should return TRUE if it handled the event. If the callback returns FALSE, then the event will be handled by the render area.

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

Sets/gets the GL render action to use. This is used to set selection highlighting with the SoBoxHighlightRenderAction and SoLineHighlightRenderAction classes.

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

Sets/gets the GL render action for the overlay window.

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Sets/gets the normal and overlay plane scene managers.

Note: for convenience most of the SoSceneManager methods have already been added to this class.

RESOURCES

*SoXtRenderArea*BackgroundColor: black (color name or hex value)

SEE ALSO

SoXtGLWidget, SoXtComponent, SoXtViewer, SoSceneManager, SoBoxHighlightRenderAction, SoLineHighlightRenderAction


SoXtResource

NAME

SoXtResource - used to retrieve X resources for SoXt components and widgets

INHERITS FROM

SoXtResource

SYNOPSIS

#include <Inventor/Xt/SoXtResource.h>

Methods from class SoXtResource:

SoXtResource(Widget w)

~SoXtResource()

SbBool	getResource(char *resName,
char *resClass,
SbColor &c)

SbBool	getResource(char *resName,
char *resClass,
short &i)

SbBool	getResource(char *resName,
char *resClass,
unsigned short &u)

SbBool	getResource(char *resName,
char *resClass,
char *&s)

SbBool	getResource(char *resName,
char *resClass,
SbBool &b)

SbBool	getResource(char *resName,
char *resClass,
float &f)

DESCRIPTION

This class provides an easy-to-use interface for retrieving X resource values for widgets and components. Rather than use standard Xt calls to traverse up a widget hierarchy, this class performs its own traversal so that it may provide special care for widgets which are Open Inventor components. For instance, the Open Inventor Material Editor top level widget is a Motif form widget. Its class name is thus XmForm. SoXtResource knows that the editor is an Open Inventor component, though, so it uses the class name provided by the editor (in this case "SoXtMaterialEditor") when looking up resource values.

EXAMPLE:

SoXtResource xr( materialEditor->getWidget() );
xr.getResource("tile1Color", "Tile1Color", color);
xr.getResource("updateFrequency", "UpdateFrequency", freq);

METHODS

SoXtResource(Widget w)

~SoXtResource()

Constructor and destructor. The constructor takes the widget for which it will retrieve resource values.

SbBool	getResource(char *resName,
char *resClass,
SbColor &c)

SbBool	getResource(char *resName,
char *resClass,
short &i)

SbBool	getResource(char *resName,
char *resClass,
unsigned short &u)

SbBool	getResource(char *resName,
char *resClass,
char *&s)

SbBool	getResource(char *resName,
char *resClass,
SbBool &b)

SbBool	getResource(char *resName,
char *resClass,
float &f)

This returns the X resource value for the specified resource name and class. There is no need to specify the widget hierarchy; this is automatically computed in the constructor.

NOTES

Components will typically look up their own resources during buildWidget(). In order for a component to have its Open Inventor class name recognized by SoXtResource, it must call SoXtComponent::registerWidget() in its buildWidget() method. (This is done in every Open Inventor component.)

SEE ALSO

X Resources (Xrm), X Intrinsics (Xt), SoXt, SoXtComponent


SoXtSliderSet

NAME

SoXtSliderSet - base class for Motif-only slider components

INHERITS FROM

SoXtComponent > SoXtSliderSetBase > SoXtSliderSet

SYNOPSIS

#include <Inventor/Xt/SoXtSliderSet.h>

Methods from class SoXtSliderSetBase:

virtual void	setNode(SoNode *newNode)

SoNode *	getNode() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used as a base class for all editors which use sets of Motif sliders to edit fields in an Open Inventor scene graph node. The editor consists of a number of sliders each of which may change a different value in a field. This class is not meant to be instanced by programmers who want to use an editor in a program. It should only be used as a base class when designing new editors.

This class has no public methods. The internal methods deal with managing the layout of the subcomponents.

RESOURCES

!!------------------------------------------------
!! For All Sliders
!!------------------------------------------------
*IvSlidersMin.labelString: min
*IvSlidersMax.labelString: max
*IvSlidersStyle.labelString: style

SEE ALSO

SoXtSliderSetBase, SoXtComponent, SoNode, SoXtLightSliderSet, SoXtMaterialSliderSet, SoXtTransformSliderSet


SoXtSliderSetBase

NAME

SoXtSliderSetBase - abstract base class for Motif-only slider components

INHERITS FROM

SoXtComponent > SoXtSliderSetBase

SYNOPSIS

#include <Inventor/Xt/SoXtSliderSetBase.h>

Methods from class SoXtSliderSetBase:

virtual void	setNode(SoNode *newNode)

SoNode *	getNode() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class is used as a base class for all editors which use Motif sliders to edit fields in an Open Inventor scene graph node. This class is not meant to be instanced by programmers who want to use an editor in a program. It should only be used as a base class when designing new editors.

SoXtSliderSetBase is derived from SoXtComponent, but adds three concepts. First, there is a node to edit. Second, there are subcomponents. When an SoXtSliderSetBase is shown or hidden, so are its subcomponents. (As an example, an SoXtTransformSliderSet is composed of many subcomponents). Third, an SoXtSliderSetBase has a layout size, which is used to lay out the subcomponents.

METHODS

virtual void	setNode(SoNode *newNode)

Sets a new node as the node to be modified by this editor component.

SoNode *	getNode() const

Returns a pointer to the node currently being modified by this editor component.

SEE ALSO

SoXtComponent, SoXtSliderSet


SoXtSpaceball

NAME

SoXtSpaceball - translates and reports events for a spaceball or SpaceMouse (Magellan) device

INHERITS FROM

SoXtDevice > SoXtSpaceball

SYNOPSIS

#include <Inventor/Xt/devices/SoXtSpaceball.h>

enum Mask	{
Event mask values: Bitwise OR these to specify which events this device should queue.
SoXtSpaceball::MOTION
Spaceball translation and rotation
SoXtSpaceball::PRESS
Spaceball button press
SoXtSpaceball::RELEASE
Spaceball button release
SoXtSpaceball::ALL
All spaceball events
}

SoXtSpaceball(Mask mask = ALL)

~SoXtSpaceball()

virtual void	enable(Widget w, XtEventHandler f,
XtPointer data, Window win = NULL)

virtual void	disable(Widget w,
XtEventHandler f,
XtPointer data)

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

void	setRotationScaleFactor(float f)

float	getRotationScaleFactor() const

void	setTranslationScaleFactor(float f)

float	getTranslationScaleFactor() const

static SbBool	exists()

void	setFocusToWindow(SbBool flag)

SbBool	isFocusToWindow() const

DESCRIPTION

This class manages events generated by the spaceball, including spaceball motion (SoMotion3Event), and spaceball button press and release events (SoSpaceballButtonEvent).

METHODS

SoXtSpaceball(Mask mask = ALL)

~SoXtSpaceball()

Constructor and destructor.

virtual void	enable(Widget w, XtEventHandler f,
XtPointer data, Window win = NULL)

virtual void	disable(Widget w,
XtEventHandler f,
XtPointer data)

These functions will enable/disable this device for the passed widget.The callback function f will be invoked when events occur in w. Data is the clientData which will be passed.

virtual const SoEvent *	translateEvent(XAnyEvent *xevent)

This converts a system event into an SoEvent, returning NULL if the event is not from this device.

void	setRotationScaleFactor(float f)

float	getRotationScaleFactor() const

void	setTranslationScaleFactor(float f)

float	getTranslationScaleFactor() const

The spaceball reports rotations and translations as integers. These values must be scaled to be useful. these methods allow the scale values to be set. Default values are .006 for translation and .006 for scale.

static SbBool	exists()

Return whether or not the spaceball device exists for use.

void	setFocusToWindow(SbBool flag)

SbBool	isFocusToWindow() const

Sets the input focus method used to get events from the space ball
if FALSE: SpaceBall events are received only if the cursor is in the window or when the window has the focus (default)
if TRUE: SpaceBall events are received even if cursor is out of the window


SoXtTransformSliderSet

NAME

SoXtTransformSliderSet - component with Motif sliders for editing SoTransform nodes

INHERITS FROM

SoXtComponent > SoXtSliderSetBase >SoXtSliderSet > SoXtTransformSliderSet

SYNOPSIS

#include <Inventor/Xt/SoXtTransformSliderSet.h>

Methods from class SoXtTransformSliderSet:

SoXtTransformSliderSet(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent =TRUE,
SoNode *newEditNode = NULL)

~SoXtTransformSliderSet()

Methods from class SoXtSliderSetBase:

virtual void	setNode(SoNode *newNode)

SoNode *	getNode() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This class defines an editor that uses Motif Sliders to edit fields in an SoTransform node. There are sliders for editing the translation, scale, rotation, and transform center.

METHODS

SoXtTransformSliderSet(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoNode *newEditNode = NULL)

~SoXtTransformSliderSet()

Constructor and destructor. At construction time the transform
node to edit can be supplied.

RESOURCES

!!------------------------------------------------
!! Transform Slider Set
!!------------------------------------------------
*IvTransformSliderTrans.labelString: TRANSLATIONS
*IvTransformSliderTransX.labelString: X Translation
*IvTransformSliderTransY.labelString: Y Translation
*IvTransformSliderTransZ.labelString: Z Translation
*IvTransformSliderScale.labelString: SCALES
*IvTransformSliderScaleX.labelString: X Scale
*IvTransformSliderScaleY.labelString: Y Scale
*IvTransformSliderScaleZ.labelString: Z Scale
*IvTransformSliderRotate.labelString: ROTATIONS
*IvTransformSliderRotateX.labelString: X Rotate
*IvTransformSliderRotateY.labelString: Y Rotate
*IvTransformSliderRotateZ.labelString: Z Rotate
*IvTransformSliderScaleOrient.labelString: SCALE ORIENTATION
*IvTransformSliderScaleOrientX.labelString: X Rotate
*IvTransformSliderScaleOrientY.labelString: Y Rotate
*IvTransformSliderScaleOrientZ.labelString: Z Rotate
*IvTransformSliderCenter.labelString: CENTER
*IvTransformSliderCenterX.labelString: X Center
*IvTransformSliderCenterY.labelString: Y Center
*IvTransformSliderCenterZ.labelString: Z Center
*IvTransformSliderTitle.labelString: Transform Editor
*IvTransformSliderIconTitle.labelString: Xf Editor

SEE ALSO

SoXtSliderSet, SoXtSliderSetBase, SoXtComponent, SoTransform


SoXtViewer

NAME

SoXtViewer - viewer component lowest base class

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer

SYNOPSIS

#include <Inventor/Xt/viewers/SoXtViewer.h>

typedef void	SoXtViewerCB(void *userData,
SoXtViewer *viewer)

Callback.

typedef void	SoXtViewerFPSCB(float fps,
void *userData,
SoXtViewer *viewer)

typedef void	SoXtViewerDecimationPercentageCB
(float percentage,
void *userData,
SoXtViewer *viewer)

Large Model Viewing notification callbacks for frames per second, and decimation percentage.

enum Type	{
SoXtViewer::BROWSER
Camera views scene, but is not added to scene
SoXtViewer::EDITOR
Camera is added to user's scene
}

enum DecimationStrategy	{
SoXtViewer::NORMAL
Decimation is not changed
SoXtViewer::FIXED_NUM_TRIANGLES
Try to fix number of triangles drawn
SoXtViewer::FRAMES_PER_SECOND
Try to fix frames per second
SoXtViewer::FIXED_PERCENTAGE
Use given decimation percentage
}

enum DrawStyle	{
SoXtViewer::VIEW_AS_IS
Unchanged
SoXtViewer::VIEW_HIDDEN_LINE
Render only the frontmost lines
SoXtViewer::VIEW_NO_TEXTURE
Render without textures
SoXtViewer::VIEW_LOW_COMPLEXITY
Render low complexity and no texture
SoXtViewer::VIEW_LINE
Wireframe draw style
SoXtViewer::VIEW_POINT
Point draw style
SoXtViewer::VIEW_BOX
Bounding box draw style
}

enum DrawType	{
SoXtViewer::STILL
Applies to static rendering
SoXtViewer::INTERACTIVE
Applies to rendering while interactive viewing
}

enum BufferType	{
SoXtViewer::BUFFER_SINGLE
Single buffer
SoXtViewer::BUFFER_DOUBLE
Double buffer
SoXtViewer:BUFFER_INTERACTIVE
Double buffer while interactive viewing
}

Methods from class SoXtViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

virtual void 	recomputeSceneSize()

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float 	getCurrentDecimationPercentage()

Methods from class SoXtRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

This is the lowest base class for viewer components. This class adds the notion of a camera to the SoXtRenderArea class. Whenever a new scene is specified with setSceneGraph(), the first camera encountered will be by default used as the edited camera. If no camera is found in the scene, the viewer will automatically create one. The viewer will use the first SoVRMLViewpoint encountered (if any) to define the parameters of the created camera. If the viewer type is SoXtViewer::BROWSER then the camera is told to view the supplied scene graph but is not added beneath that scene graph root. If the viewer type is SoXtViewer::EDITOR then the camera is added beneath the supplied scene graph root.

In addition to automatically creating a camera if needed, this base class also creates a headlight (directional light which is made to follow the camera), enables the user to change drawing styles (like wireframe or move wireframe), and buffering types. This base class also provides a convenient way to have the camera near and far clipping planes be automatically adjusted to minimize the clipping of objects in the scene.

Viewers allow the application to shadow event processing. When the application registers an event processing callback by calling setEventCallback() the viewer will invoke this callback for every X event it receives. However, unlike the render area, the viewer ignores the return value of this callback, and processes the event as usual. This allows the application to expand viewing capabilities without breaking the viewing paradigm. It is an easy way to hook up other devices, like the spaceball, to an existing viewer.

Depending on the DecimationStrategy, a viewer can control the complexity of a scene by adjusting the Decimation elements to reach certain goals. The viewer can attempt to keep a constant frame rate or a constant number of triangles rendered. The viewer can be set to switch to full detail when the scene is not moving.

In order to set the frame rate, the viewer times each render action traversal, and then adjusts the Decimation percentage to keep the time within a range depending on the goal frames per second. To fix the number of triangles, the viewer applies a GetPrimitiveCountAction before each traversal and sets the DecimationPercentage to the desired percentage of the resulting count.

If the DecimationStrategy is NORMAL (the default) then nothing special is done. If the strategy is FIXED_PERCENTAGE, then the same percentage is used for every render. Also note that FIXED_PERCENTAGE sets the DecimationType to be PERCENTAGE (all others use AUTOMATIC), which means that SoLODs will not use the camera position in their calculations, and can therefore be cached.

The application can add callbacks from the viewer to get the current decimation level, the current primitive count and the current frames per second. The decimation level and primitive count callbacks are called every frame. The frames per second callback is called after a certain number of samples have been averaged together.

METHODS

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

Set and get the edited camera. Setting the camera is only needed if the first camera found in the scene when setting the scene graph isn't the one the user really wants to edit.

virtual void	setCameraType(SoType type)

SoType	getCameraType()

Set and get the camera type that will be created by the viewer if no cameras are found in the scene graph (see SoPerspectiveCamera and SoOrthographicCamera). By default an SoPerspectiveCamera will be created if no camera are found.

Note: the set method will only take effect the next time a scene graph is specified (and if no cameras are found).

virtual void	viewAll()

Changes the camera position to view the entire scene (the camera zoom or orientation isn't changed).

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

Saves and restores the camera values.

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

Turns the headlight on/off (default on) and returns the headlight node.

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

Sets/gets the current drawing style in the main view. The user can specify the INTERACTIVE draw style (draw style used when the scene changes) independently from the STILL style. Default is VIEW_AS_IS draw style for STILL and VIEW_SAME_AS_STILL for INTERACTIVE. Possible draw styles are:

VIEW_AS_IS - Leaves the objects unchanged.

VIEW_HIDDEN_LINE - Renders the object as wireframe, but only shows the object front faces. This is accomplished using a two-pass rendering. In the first pass, the objects are rendered as FILLED using the background BASE_COLOR (this sets up the wanted z-buffer values). The second pass then renders the objects as LINES, while adjusting the z-buffer range to limit overlapping polygons problems.

VIEW_NO_TEXTURE - Renders the objects without any textures. This is done by setting the override flag on an empty SoTexture2 node.

VIEW_LOW_COMPLEXITY - Renders the objects without any textures and with a low complexity. This is done by setting the override flag on an empty SoTexture2 node, and by setting a low complexity value on an SoComplexity node with override set to TRUE.

VIEW_LINE - Renders the objects as LINES (no texture) with lighting model set to BASE_COLOR.

VIEW_LOW_RES_LINE - Renders the objects as LINES (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.

VIEW_POINT - Renders the objects as POINTS (no texture) with lighting model set to BASE_COLOR.

VIEW_LOW_RES_POINT - Renders the objects as POINTS (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.

VIEW_BBOX - Renders the objects with complexity BOUNDING_BOX, lighting model set to BASE_COLOR and drawing style LINES (no texture) with no depth comparison.

VIEW_SAME_AS_STILL - This only applies to INTERACTIVE draw type. It enables the interactive draw style mode to match the regular draw style mode without having to set it explicitly.

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

Sets/gets the current buffering type in the main view (default SoXtViewer::BUFFER_DOUBLE).

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

Set/get whether the viewer is turned on or off. When turned on, events are consumed by the viewer. When viewing is off, events are processed by the viewer's render area. This means events will be sent down to the scene graph for processing (i.e. picking can occur). Note that if the application has registered an event callback, it will be invoked on every message, whether viewing is turned on or not. However, the return value of this callback (which specifies whether the callback handled the event or not) is ignored when viewing is on. That is, the viewer will process the event even if the callback already did. This is to ensure that the viewing paradigm is not broken (default viewing is on).

virtual void	setCursorEnabled(SbBool onOrOff)

SbBool	isCursorEnabled() const

Set/get whether the viewer is allowed to change the cursor over the renderArea window. When disabled, the cursor is undefined by the viewer and will not change as the mode of the viewer changes. When re-enabled, the viewer will reset it to the appropriate icon.

Disabling the cursor enables the application to set the cursor directly on the viewer window or on any parent widget of the viewer. This can be used when setting a busy cursor on the application shell.

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

Set and get the auto clipping plane. When auto clipping is ON, the camera near and far planes are dynamically adjusted to be as tight as possible around the objects being viewed. When OFF, the user is expected to manually set those planes within the preference sheet (default is on).

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

Turns stereo viewing on/off on the viewer (default off). When in stereo mode, which may not work on all machines, the scene is rendered twice (in the left and right buffers) with an offset between the two views to simulate stereo viewing. Stereo glasses have to be used to see the effect. Stereo viewing is only possible with a graphics board that has support for stereo.

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

When the viewer is in seek mode, left mouse clicks initiate a pick, and the viewer changes its orientation and position to look at the picked object. This routine tells the seeking viewer whether to orient the camera towards the picked point (detail on), or the center of the object's bounding box (detail off). Default is detail on.

void	setSeekTime(float seconds)

float	getSeekTime()

Set the time a seek takes to change to the new camera location. A value of zero seeks directly to the point without any animation. Default value is 2 seconds.

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

Add/remove start and finish callback routines on the viewer. Start callbacks are called whenever the user starts doing interactive viewing (for example, mouse down), and finish callbacks are called when user is done doing interactive work (for example, mouse up).

Note: The viewer "this" pointer is passed as callback data.

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

Copy/paste the view. eventTime should be the time of the X event which initiated the copy or paste (e.g. if copy/paste is initiated from a keystroke, eventTime should be the time in the key down message.)

virtual void recomputeSceneSize()

This can be used to let the viewer know that the scene graph has changed so that the viewer can recompute things like speed which depend on the scene graph size. Note: This routine is automatically called whenever setSceneGraph() is called.

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

Set/get strategy to use to decide on decimation value.

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

Set/get goal number of triangles for the viewer to try to render.

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

Set/get goal frames per second for the viewer to try to render.

void	setFixedPercentage(float percent)

float	getFixedPercentage()

Set/get fixed percentage for the viewer to render (0.0 to 1.0)

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

If this flag is set, the viewer will render at full resolution when it sits still for a certain period of time.

SbBool	isStillNow()

Returns whether the viewer is currently still.

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

Register frames per second callback.

void	setNumSamples(int numFrames)

int	getNumSamples()

Set/get how many frames should be timed before frames per second callback is called, default is 10.

void 	setDecimationPercentageCallback
(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

Register decimation percentage callback.

float 	getCurrentDecimationPercentage()

Return the Decimation Percentage the viewer used in its last render.

SEE ALSO

SoXtComponent, SoXtRenderArea, SoXtExaminerViewer, SoXtWalkViewer, SoXtFlyViewer, SoXtPlaneViewer


SoXtWalkViewer

NAME

SoXtWalkViewer - viewer component which moves the camera in a plane

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer > SoXtFullViewer > SoXtConstrainedViewer > SoXtWalkViewer

SYNOPSIS

#include <Inventor/Xt/viewers/SoXtWalkViewer.h>

Methods from class SoXtWalkViewer:

SoXtWalkViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtWalkViewer()

Methods from class SoXtConstrainedViewer:

void	setUpDirection(const SbVec3f &newUpDirection)

SbVec3f	getUpDirection()

Methods from class SoXtFullViewer:

void	setDecoration(SbBool onOrOff)

SbBool	isDecoration()

void	setPopupMenuEnabled(SbBool trueOrFalse)

SbBool	isPopupMenuEnabled()

Widget	getAppPushButtonParent() const

void	addAppPushButton(Widget newButton)

void	insertAppPushButton(Widget newButton,
int index)

void	removeAppPushButton(Widget oldButton)

int	findAppPushButton(Widget oldButton)

int	lengthAppPushButton()

Widget	getRenderAreaWidget()

Methods from class SoXtViewer:

virtual void	setCamera(SoCamera *cam)

SoCamera *	getCamera()

virtual void	setCameraType(SoType type)

SoType	getCameraType()

virtual void	viewAll()

virtual void	saveHomePosition()

virtual void	resetToHomePosition()

void	setHeadlight(SbBool onOrOff)

SbBool	isHeadlight()

SoDirectionalLight *	getHeadlight()

void	setDrawStyle(SoXtViewer::DrawType type,
SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle	getDrawStyle(SoXtViewer::DrawType type)

void	setBufferingType(SoXtViewer::BufferType type)

SoXtViewer::BufferType	getBufferingType()

virtual void	setViewing(SbBool onOrOff)

SbBool	isViewing() const

virtual void 	setCursorEnabled(SbBool onOrOff)

SbBool 	isCursorEnabled() const

void	setAutoClipping(SbBool onOrOff)

SbBool	isAutoClipping() const

virtual void	setStereoViewing(SbBool onOrOff)

virtual SbBool	isStereoViewing()

void	setStereoOffset(float dist)

float	getStereoOffset()

void	setDetailSeek(SbBool onOrOff)

SbBool	isDetailSeek()

void	setSeekTime(float seconds)

float	getSeekTime()

void	addStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	addFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeStartCallback(SoXtViewerCB *f,
void *userData = NULL)

void	removeFinishCallback(SoXtViewerCB *f,
void *userData = NULL)

void	copyView(Time eventTime)

void	pasteView(Time eventTime)

virtual void	recomputeSceneSize()

void	setDecimationStrategy(DecimationStrategy strategy)

DecimationStrategy	getDecimationStrategy()

void	setGoalNumberOfTriangles(int32_t goal)

int32_t	getGoalNumberOfTriangles()

void	setGoalFramesPerSecond(float goal)

float	getGoalFramesPerSecond()

void	setFixedPercentage(float percent)

float	getFixedPercentage()

void	enableFullRenderingWhenStill(SbBool onOff)

SbBool	isFullRenderingWhenStill()

SbBool	isStillNow()

void	setFramesPerSecondCallback(SoXtViewerFPSCB *callback,
void *userData)

void	setNumSamples(int numFrames)

int	getNumSamples()

void	setDecimationPercentageCallback(SoXtViewerDecimationPercentageCB *callback,
void *userData = NULL)

float	getCurrentDecimationPercentage()

Methods from class SoXtRenderArea:

virtual void	setSceneGraph(SoNode *newScene)

virtual SoNode *	getSceneGraph()

void	setOverlaySceneGraph(SoNode *newScene)

SoNode *	getOverlaySceneGraph()

void	registerDevice(SoXtDevice *)

void	unregisterDevice(SoXtDevice *)

void	setBackgroundColor(const SbColor &c)

const SbColor &	getBackgroundColor() const

void	setBackgroundIndex(int index)

int	getBackgroundIndex() const

void	setOverlayBackgroundIndex(int index)

int	getOverlayBackgroundIndex() const

void	setColorMap(int startIndex,
int num,
const SbColor *colors)

void	setOverlayColorMap(int startIndex,
int num,
const SbColor *colors)

void	setViewportRegion(const SbViewportRegion &newRegion)

const SbViewportRegion &	getViewportRegion() const

void	setTransparencyType(SoGLRenderAction::TransparencyType type)

SoGLRenderAction::TransparencyType	getTransparencyType() const

void	setAntialiasing(SbBool smoothing,
int numPasses)

void	getAntialiasing(SbBool &smoothing,
int &numPasses) const

void	setClearBeforeRender(SbBool trueOrFalse,
SbBool zbTrueOrFalse=TRUE)

SbBool	isClearBeforeRender() const

SbBool	isClearZBufferBeforeRender() const

void	setClearBeforeOverlayRender(SbBool trueOrFalse)

SbBool	isClearBeforeOverlayRender() const

void	setAutoRedraw(SbBool trueOrFalse)

SbBool	isAutoRedraw() const

void	setRedrawPriority(unsigned long priority)

unsigned long	getRedrawPriority() const

static unsigned long	getDefaultRedrawPriority()

void	render()

void	renderOverlay()

void	scheduleRedraw()

void	scheduleOverlayRedraw()

void	redrawOnSelectionChange(SoSelection *s)

void	redrawOverlayOnSelectionChange(SoSelection *s)

void	setEventCallback(SoXtRenderAreaEventCB *fcn,
void *userData = NULL)

void	setGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getGLRenderAction() const

void	setOverlayGLRenderAction(SoGLRenderAction *ra)

SoGLRenderAction *	getOverlayGLRenderAction() const

void	setSceneManager(SoSceneManager *sm)

SoSceneManager *	getSceneManager() const

void	setOverlaySceneManager(SoSceneManager *sm)

SoSceneManager *	getOverlaySceneManager() const

Methods from class SoXtGLWidget:

void	setBorder(SbBool onOrOff)

SbBool	isBorder() const

void	setDoubleBuffer(SbBool onOrOff)

SbBool	isDoubleBuffer()

Widget	getNormalWindow()

Widget	getOverlayWindow()

GLXContext	getNormalContext()

GLXContext	getOverlayContext()

Widget	getNormalWidget()

Widget	getOverlayWidget()

virtual void	setNormalVisual(XVisualInfo *vis)

XVisualInfo *	getNormalVisual()

virtual void	setOverlayVisual(XVisualInfo *vis)

XVisualInfo *	getOverlayVisual()

void	setDrawToFrontBufferEnable(SbBool enableFlag)

SbBool	isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

virtual void	show()

virtual void	hide()

SbBool	isVisible()

Widget	getWidget() const

SbBool	isTopLevelShell() const

Widget	getShellWidget() const

Widget	getParentWidget() const

void	setSize(const SbVec2s &size)

SbVec2s	getSize()

Display *	getDisplay()

void	setTitle(const char *newTitle)

const char *	getTitle() const

void	setIconTitle(const char *newIconTitle)

const char *	getIconTitle() const

void	setWindowCloseCallback(SoXtComponentCB *func,
void *data = NULL)

static SoXtComponent *	getComponent(Widget w)

const char *	getWidgetName() const

const char *	getClassName() const

DESCRIPTION

The paradigm for this viewer is a walk-through of an architectural model. Its primary behavior is forward, backward, and left/right turning motion while maintaining a constant "eye level". It is also possible to stop and look around at the scene. The eye level plane can be disabled, allowing the viewer to proceed in the "look at" direction, as if on an escalator. The eye level plane can also be translated up and down - similar to an elevator.

METHODS

SoXtWalkViewer(Widget parent = NULL,
const char *name = NULL,
SbBool buildInsideParent = TRUE,
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
SoXtViewer::Type type = BROWSER)

~SoXtWalkViewer()

Constructor and destructor which specifies the viewer type. Please refer to the SoXtViewer reference pages for a description of the viewer types.

RESOURCES

!!------------------------------------------------
!! Decorations for Walk Viewer !!
!!------------------------------------------------
*IvWalkTitle.labelString: Walk Viewer
*IvWalkPrefTitle.labelString: Walk Viewer Preference Sheet
*IvWalkPopupTitle.labelString: Walk Viewer
*IvWalkIconTitle.labelString: Walk Viewer
*IvLeftTrimForm.IvH.labelString: H
!!------------------------------------------------
!! Preferences for Walk Viewer !!
!!------------------------------------------------
*IvFormPreference5.IvViewerSpeed.labelString: Viewer speed
*IvFormPreference5.IvIncrease.labelString: increase
*IvFormPreference5.IvDecrease.labelString: decrease

USAGE

(For 3-button mouse only.)

Left Mouse: Walk mode. Click down and move up and down for forwards and backwards motion. Move right and left for turning. Speed increases exponentially with the distance from the mouse-down origin.

Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left, and right.

Ctrl + Middle Mouse: Tilt the camera up/down and right/left. This allows you to look around while stopped.

<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.

<u> + Left Mouse: Press (but do not hold down) the <u> key, then click on a target object to set the "up" direction to the surface normal. By default +y is the "up" direction.

Right Mouse: Open the popup menu.

ALT: When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.

SEE ALSO

SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtPlaneViewer, SoXtExaminerViewer, SoXtFlyViewer, Walk Viewer (illustration and additional info on mouse buttons)


SoWin Classes

The stereo-related SoWin classes are listed in a separate table (below).

SoWin	Routines for Open Inventor/Windows compatibility
SoWinClipboard	Supports copy/paste for Open Inventor
SoWinCollisionViewer	Class to manage collisions between the camera and the scene
SoWinColorEditor	Component that lets you edit a color interactively
SoWinComponent	Abstract base class for all Open Inventor components
SoWinConstrainedViewer	Base viewer class which adds camera constraints given a world up direction
SoWinDevice	Abstract base class device for use with the SoWinRenderArea
SoWinDirectionalLightEditor	Component for editing directional lights
SoWinExaminerViewer	Viewer component which uses a virtual trackball to view the data
SoWinFlyViewer	Viewer component for flying through space, with a constant world up
SoWinFullViewer	Base viewer class which adds a decoration around the rendering area
SoWinGLWidget	Component for OpenGL rendering
SoWinKeyboard	Translates and reports messages for the keyboard
SoWinMaterialEditor	Component which lets you edit a material interactively
SoWinMouse	Translates and reports messages for the mouse
SoWinPlaneViewer	Viewer component which moves the camera in a plane
SoWinRenderArea	Component for rendering Open Inventor scene graphs
SoWinSpaceBall	Translate and reports events for the spaceball
SoWinViewer	Viewer component lowest base class
SoWinWalkViewer	Viewer component which moves the camera in a plane
Stereo-Related SoWin Classes

SoWinAnaglyphStereo	Class for anaglyph stereo support
SoWinHalfScreenStereo	Class for half-screen stereo support
SoWinInterlacedStereo	Class for interlaced stereo support
SoWinNoStereoView	Makes a stereo viewer behave like a monoscopic (non-stereo) viewer
SoWinRawStereo	Class for OpenGL stereo support
SoWinSSDIStereo	Class for SSDI stereo support
SoWinStereoDialog	Component that lets you modify stereo attributes interactively
SoWinStereoViewer	Pure virtual class for stereo support
SoWinStereoViewType	Class for stereo management

Other SoWin Classes

The following classes have no equivalent in the Windows implementation of Open Inventor:

SoXtInputFocus
SoXtLightSliderSet
SoXtMaterialList
SoXtMaterialSliderSet
SoXtPrintDialog
SoXtSliderSet
SoXtSliderSetBase
SoXtTransformSliderSet


SoXt Classes

SoXt	Routines for Open Inventor/Windows compatibility
SoXtClipboard	Supports copy/paste for Open Inventor using the Xt clipboard
SoXtCollisionViewer	Class to manage collisions between the camera and the scene
SoXtColorEditor	Component that lets you edit a color interactively
SoXtComponent	Abstract base class for all Open Inventor components
SoXtConstrainedViewer	Base viewer class which adds camera constraints given a world up direction
SoXtDevice	Abstract base class device for use with the SoXtRenderArea
SoXtDirectionalLightEditor	Component for editing directional lights
SoXtExaminerViewer	Viewer component which uses a virtual trackball to view the data
SoXtFileSelectionDialog	Cross-platform file selection box
SoXtFlyViewer	Viewer component for flying through space, with a constant world up
SoXtFullViewer	Base viewer class which adds a decoration around the rendering area
SoXtGLWidget	Component for OpenGL rendering
SoXtInputFocus	Reports input focus change events
SoXtKeyboard	Translates and reports events for the keyboard
SoLightSliderSet	Component with Motif sliders for editing SoLight nodes
SoXtMaterialEditor	Component which lets you edit a material interactively
SoXtMaterialList	Component which lets you edit a material interactively
SoXtMaterialSliderSet	Component with Motif sliders for editing SoMaterial nodes
SoXtMouse	Translates and reports events for the mouse
SoXtPlaneViewer	Viewer component which moves the camera in a plane
SoXtPrintDialog	Dialog box for controlling printing
SoXtRenderArea	Component for rendering Open Inventor scene graphs
SoXtResource	Used to retrieve X resources for SoXt components and widgets
SoXtSliderSet	Base class for Motif-only slider components
SoXtSliderSetBase	Abstract base class for Motif-only slider components
SoXtSpaceBall	Translates and reports events for a spaceball or SpaceMouse (Magellan) device
SoXtTransformSliderSet	Component with Motif sliders for editing SoTransform nodes
SoXtViewer	Viewer component lowest base class
SoXtWalkViewer	Viewer component which moves the camera in a plane


SoVRMLInterpOutput

NAME

SoVRMLInterpOutput - class for all VRML interpolator outputs

INHERITS FROM

SoVRMLInterpOutput

SYNOPSIS

#include <Inventor/VRML/SoVRMLInterpolator.h>

Methods from class SoVRMLInterpOutput:

SoType	getConnectionType() const

int	getForwardConnections(SoFieldList &list) const

void	enable(SbBool flag)

SbBool	isEnabled() const

SoVRMLInterpolator*	getContainer() const

DESCRIPTION

SoVRMLInterpOutput is the class for all VRML interpolator output fields. There is no public constructor routine for this class. Only the VRML interpolator classes create instances of SoVRMLInterpOutput.

Each VRML interpolator creates one or more VRML interpolator outputs. The type of the output is documented in the VRML interpolator reference pages. There is also an SoVRMLInterpOutput method for querying the connection type.

The application can at any time enable or disable the VRML interpolator outputs. By default the VRML interpolator outputs are enabled.

METHODS

SoType	getConnectionType() const

Returns the type of field this output can connect to.

int	getForwardConnections(SoFieldList &list) const

Returns the number of fields this output is writing to, and adds pointers to those fields to the given list.

void	enable(SbBool flag)

Enables or disables all connections from this output. If the connections are disabled, values will not be output along them. By default, outputs are enabled.

SbBool	isEnabled() const

Returns TRUE if this output is currently enabled.

SoVRMLInterpolator*	getContainer() const

Returns containing VRML interpolator.

SEE ALSO

SoVRMLInterpolator


SoVRMLInterpOutputList

NAME

SoVRMLInterpOutputList - maintains a list of pointers to VRML interpolator outputs

INHERITS FROM

SbPList > SoVRMLInterpOutputList

SYNOPSIS

#include <Inventor/SoLists.h>

Methods from class SoVRMLInterpOutputList:

SoVRMLInterpOutputList()

SoVRMLInterpOutputList(int size)

SoVRMLInterpOutputList(const SoVRMLInterpOutputList &l)

~SoVRMLInterpOutputList()

void	append(SoVRMLInterpOutput *interpOutput)

void	insert(SoVRMLInterpOutput *interpOutput,
int addBefore)

void	set(int i,
SoVRMLInterpOutput *interpOutput)

SoVRMLInterpOutput *	operator [](int i) const

Methods from class SbPList:

int	find(const void *ptr) const

void	remove(int which)

int	getLength() const

void	truncate(int start)

void	copy(const SbPList &pl)

SbPList &	operator =(const SbPList &pl)

int	operator ==(const SbPList &pl) const

int	operator !=(const SbPList &pl) const

DESCRIPTION

This subclass of SbPList holds lists of pointers to SoVRMInterpOutputs. It updates reference counts to VRML interpolator outputs in the list whenever adding or removing pointers.

METHODS

SoVRMLInterpOutputList()

Constructor.

SoVRMLInterpOutputList(int size)

Constructor that pre-allocates storage for size pointers.

SoVRMLInterpOutputList(const SoVRMLInterpOutputList &l)

Constructor that copies the contents of another list.

~SoVRMLInterpOutputList()

Destructor.

void	append(SoVRMLInterpOutput *interpOutput)

Adds a VRML interpolator output to the end of the list.

void	insert(SoVRMLInterpOutput *interpOutput,
int addBefore)

Inserts the given VRML interpolator output in the list before the element of the given index.

void	set(int i,
SoVRMLInterpOutput *interpOutput)

Sets an element of a list.

SoVRMLInterpOutput *	operator [](int i) const

Accesses an element of a list.

SEE ALSO

SoVRMLInterpOutput


Localization

Windows

TGS has already localized the embedded strings in Open Inventor (e.g. the viewer labels) for several useful languages. All localized strings are included in the SoWin resource file, Invrxxx.DLL (where xxx is the Open Inventor version number), and are automatically selected based on the current Locale. The Locale can be specified via the Regional Settings program of Control Panel.

Unix

The app-defaults/Inventor directory contains the default Motif resource file (named Inventor) used by the standard viewers. You must put this file in /usr/lib/X11/app-defaults or set the XAPPLRESDIR environment variable (see X Window documentation) to $OIVHOME/app-defaults.

NOTE: If you do not do this, the viewer labels will be prefixed with "Iv".

Several versions of the resource file are provided for supporting different languages (Inventor.english, Inventor.french, etc.). To use a specific language, make a link between the desired resource file and the Inventor file. For example, to use French language resources:

ln -s Inventor.french Inventor

setenv XAPPLRESDIR $OIVHOME/app-defaults

If you already have a Motif resource file, you can merge Inventor.xxx with yours (see xrdb in X documentation).


SoXtFileSelectionDialog

NAME

SoXtFileSelectionDialog - cross-platform file selection box

INHERITS FROM

SoXtFileSelectionDialog

SYNOPSIS

#include <Inventor/Xt /SoXtFileSelectionDialog.h>

typedef void	SoXtFileSelectionDialogCB(void *data,
SoXtFileSelectionDialog *dialog)

enum Dialog_Mode	{
Set the dialog box mode (Open file/Save file)
OPEN_FILE
Open file mode
SAVE_FILE
Save file mode
}

Methods from class SoXtFileSelectionDialog:

SoXtFileSelectionDialog()

~ SoXtFileSelectionDialog()

void	setSize(const SbVec2s &size)

SbVec2s	getSize(void)

void	setTitle(char *title)

char 	*getTitle(void)

void	setFilter(char *suffix,
char *title)

void	getFilter(char **suffix,
char **title)

void	setFileDirectory(char *directory)

char	*getFileDirectory()

void	setFileName(char *fName)

char	*getFileName(void)

char 	*getFilePath(void)

void	setMode(Dialog_Mode dMode)

Dialog_Mode	getMode(void)

void	show()

void	setAcceptCallback(SoXtFileSelectionDialogCB *f,
void *data)

void	setAbortCallback(SoXtFileSelectionDialogCB *f,
void *data)

DESCRIPTION

This class provides an interactive widget for file selection. Files can be selected in open file mode or in close file mode.

METHODS

SoXtFileSelectionDialog()

~ SoXtFileSelectionDialog()

Constructor and destructor.

void	setSize(const SbVec2s &size)

SbVec2s	getSize(void)

Sets/gets the dialog box size (Unix only).

void	setTitle(char *title)

char 	*getTitle(void)

Sets/gets the file selection dialog box title.

void	setFilter(char *suffix,
char *title)

void	getFilter(char **suffix,
char **title)

Sets/gets the suffix filter and the filter title.

void	setFileDirectory(char *directory)

char	*getFileDirectory()

Sets/gets the file directory.

void	setFileName(char *fName)

char	*getFileName(void)

Sets/gets the file name.

char	*getFilePath(void)

Retrieves the full file path.

void	setMode(Dialog_Mode dMode)

Dialog_Mode	getMode(void)

Sets/gets the mode (Open or Close) of the file selection box.

void	show()

Shows the file selection box dialog.

void	setAcceptCallback(SoXtFileSelectionDialogCB *f,
void *data)

Set the callback associated with the OK button.

void	setAbortCallback(SoXtFileSelectionDialogCB *f,
void *data)

Set the callback associated with the Cancel button.


Inventor Overview
Open Inventor Overview

What is It?

The Open Inventor 3D Toolkit is an object-oriented toolkit that simplifies and abstracts the task of writing graphics programming into a set of easy to use objects. These objects range from low level data-centered objects such as Sphere, Camera, Material, Light, and Group, to high level application-level objects such as the Walkthrough Viewer and Material Editor. The foundation concept in Open Inventor is the "scene database" which defines the objects to be used in an application. When using Open Inventor, a programmer creates, edits, and composes these objects into hierarchical 3D scene graphs (i.e., database). A variety of fundamental application tasks such as rendering, picking, event handling, and file reading/writing are built-in operations of all objects in the database and thus are simple to invoke.

Since Open Inventor is object-oriented (written in C++), it encourages programmers to extend the system by writing new objects. Open Inventor users have created a variety of new objects that are not included in the product, such as: Bezier surfaces, CSG objects, animation objects, special viewers, and many more.

Rendering

The rendering mechanism inside Open Inventor objects employs OpenGL. During rendering each object automatically makes the proper, efficient calls to OpenGL. Since Open Inventor was designed specifically to use OpenGL for graphics rendering, it is highly optimized to take advantage of all OpenGL accelerators. Its optimized scene graph pipeline also allows the developer to target PC and low-end systems without hardware acceleration.

Furthermore, Open Inventor rendering supports a caching scheme which automatically generates very fast renderings of the database without additional traversal overhead.

Picking

Inventor picking is extremely efficient and does not utilize rendering. Furthermore, picking returns a variety of 3D information and detail about what objects were picked. A sorted list of picked objects and corresponding information is returned to the programmer. Picking is so fast that programs can perform 3D locate highlighting as the mouse moves across a 3D window.

Interaction, Events, and Devices

Inventor defines an event model for writing 3D interaction. This model is window system independent. It is quite easy to use and makes 3D direct manipulation programming possible. Open Inventor includes a variety of interactive 3D objects and tools for writing interactive objects, such as: Manipulators, Draggers, and Projectors. The flexible event model encourages programmers to extend the system to support new devices and event types.

File Formats

The Open Inventor 3D File Format is SGI's standard for 3D data. The format supports both an ASCII and private binary format. The binary format is network-neutral and thus can be exported across machine boundaries.

SEE ALSO

TGS Innovations, Win32 Features, Documentation


TGS Innovations

Over the years, TGS has made the basic Open Inventor toolkit even more powerful and useful by adding many new features including:

•	VRML 2.0 (VRML97) Support
VRML (Virtual Reality Modeling Language) is the file format adopted by the Internet community for 3D geometry data on the World Wide Web. Both individual objects and complete scenes can be defined with VRML. Most of the VRML format is taken directly from the Open Inventor file format and Open Inventor nodes may be mixed with VRML nodes. With Release 2.0.2 from TGS, Open Inventor now supports the unique VRML nodes (see VRML) as native Open Inventor nodes. This makes Open Inventor the most powerful tool available for building applications that utilize VRML and 3D on the Internet.

•	Collision Detection
Allows you to manage objects and camera transformations to prevent objects from passing through (intersecting) one another.

•	Large Model Viewing (LMV) Features
A set of classes for intelligently simplifying/reorganizing a scene graph. The goal is to simplify very large scenes to a size that is reasonable to display and interact with while preserving the look and feel of the original geometry as much as possible. Also included is the LargeModelViewer program, a demonstration of the adaptive viewing, simplification, and ordering traversal techniques in Open Inventor.

•	Enhanced Stereo Viewing (SoWinStereoViewType, etc.)
Its wide range of software stereo formats enables use of many types of glasses, projectors, HMDs, and so forth. Hardware support of stereo is required for some, but not all, kinds of stereo.

•	Beveling (SoBevelAction, etc.)
Bevels edges and corners (vertices) of geometry giving a rounded appearance and adding interesting complexity to ordinary geometry.

•	Stroke Fonts (SoFont)
Stroke fonts are drawn with lines instead of triangles. They provide higher performance than polygonal fonts and are more readable at small sizes. Furthermore, their appearance is platform independent.

•	Double Precision Classes (SoMatrixd, etc.)
Convenience classes that allow double precision data (e.g. coordinates) to be passed to Open Inventor directly, without the need for intermediate conversion and storage as single precision data.

•	3D Texture (SoTexture3, etc.) Mapping
A standard feature in OpenGL 1.2 (extension in OpenGL 1.1), it is supported on Unix and some Windows boards for use with SoIndexedFaceSet. It is useful for volume rendering and special effects.

•	New Classes, including:

-	Clip Plane Manip (SoClipPlaneManip) - Manipulator to transform a clipping plane.

-	Extended Selection (SoExtSelection) - Extends the functionality of SoSelection to allow the user to select an object or multiple objects by drawing a lasso around the object(s) to be selected.

-	Image node (SoImage) - Node that displays an image that always faces the camera. This node can be useful for placing a logo in the scene, or for attaching an icon or marker to a 3D point.

-	Marker Set (SoMarkerSet) - Extension of Point Set that draws a small bitmap (symbol) at each 3D location. More than 90 pre-defined markers are included, and custom markers can be added.

-	Pattern (SoPattern) - Specifies OpenGL stipple patterns for faces, useful for geological visualization.

-	Polygon Offset (SoPolygonOffset) - Provides access to OpenGL 1.1's glPolygonOffset function. Can be used to draw edges on polygons without z-buffer "stitching".

-	Enhanced Search Capability (SoSearchPathAction) - Finding nodes by name is a useful technique for modifying a scene graph, but using SoNode::getByName or SoSearchAction requires assigning a unique name to every (interesting) node. Often the same subgraph will be used multiple times and it would be convenient to assign each instance of the subgraph a unique name, but reuse the same names for the nodes inside the subgraph. SoSearchPathAction allows this kind of hierarchical naming.

-	Conversion to VRML 1.0 (SoToVRMLAction) - Converts an Open Inventor scene graph to VRML 1.0 format.

-	Conversion to VRML2.0 (VRML97) (SoToVRML2Action) - Converts an Open Inventor scene graph to VMRL 2.0 format.

-	Image Mapping (SoToHTMLAction) - Computes an HTML client-side image map from a 3D scene, including optional hotspots (links) based on the projection of 3D objects.

-	Z3D Output (SoToZ3DAction) - Converts an Open Inventor scene graph to Z3D format. Z3D is a file format developed by TGS specifically for publishing 3D on the web. Using the free player available from our web site, it features much smaller files than VRML and a much smaller player than VRML.


Open Inventor Documentation

On-line Documentation

The following documents are available with the Open Inventor SDK for Win32 systems. On Unix systems, comparable information is provided, but may be packaged differently.

•	Readme.html - System requirements, installation information, etc.

•	RelNotes.txt - These notes describe the new features and improvements that have been added starting with the Open Inventor 2.0.2 release in 1995

•	Inventor.hlp - This help file.

•	oivwinwp.doc [Win32 only] -Explains how Open Inventor fits into the Windows environment.

•	vrml_for_oiv.doc - A detailed technical discussion of Open Inventor and VRML, and how Open Inventor works with VRML.

•	Optimizing.html - This is a detailed technical discussion of benchmarking, rendering optimization, and general optimization. If you want to get the best performance from your Open Inventor application, read this document.

•	OIV21PortGuide.doc - Explains how to port your Open Inventor 2.0 application to Open Inventor 2.1. This is useful if you have inherited very old code that needs to be used with the current version of Open Inventor. It has a very informative section on optimization (which has been extracted into the Optimizing.html document).

•	OIV21RelNotes.doc - Potentially useful if you have old (OIV 2.0) code that needs to work with the current Open Inventor release.

•	Ladmin.hlp [Win32 only] - Explains how licensing is done, and different ways/places you can specify your license string. This info is useful even if you are not using the Ladmin program.

•	redist.txt [Win32 only] - Read this if you are planning to distribute your application to other sites. It discusses runtime licenses, necessary DLLs, and other related topics.

Printed Materials

•	The Inventor Mentor, published by Addison-Wesley. This book describes how to write applications using the Open Inventor toolkit. This is an excellent book for new users of Open Inventor.

•	Open Inventor C++ Reference Manual, published by Addison-Wesley. It is now out of print. Unfortunately, it documents the standard Open Inventor classes as of SGI's Open Inventor 2.0, which is no longer current. Some of the classes are not compatible with the current release of Open Inventor. Furthermore, the book does not document any of the classes added by TGS (for example, VRML nodes), nor does it include any Windows-specific information. To summarize, the book is incomplete and contains some obsolete incompatible information. We do not recommend its use.

•	The Inventor Toolmaker, published by Addison-Wesley. For advanced programmers, this book describes how to create new Open Inventor classes, and how to customize existing classes.

Other

•	Open Inventor Newsgroup (comp.graphics.api.inventor) - .A forum for Open Inventor users to exchange information.

•	Sample programs and sample Open Inventor data files (*.iv) - These are an excellent source of information about using Open Inventor. Example programs are provided to demonstrate almost every signficant feature of Open Inventor.

•	TGS web site (www.tgs.com) - May provide additional information. In particular, see the page of "Useful Links for Open Inventor Developers."


Using a Spaceball or Space Mouse
Using a Spaceball or Space Mouse with Open Inventor

The SoXtSpaceball (or SoWinSpaceball) class can be used to manage events generated by the spaceball or the Magellan Space Mouse, including motion (SoMotion3Event) and button press or release (SoSpaceballButtonEvent) events.

UNIX-Specific Information

This class uses the Xinput extension event mechanism to get events from the device. SoXtSpaceball first tries to find a spaceball or a Magellan space mouse in the list of input devices on the server, and then generates Open Inventor events.

The example program $OIVHOME/src/TGSdemos/SpaceBall shows how to use this type of device.

A new method, setFocusToWindow, has been added to the SoXtSpaceball class to allow applications to define how inputs are received by the device. If set to TRUE, events are received even if the cursor is outside the graphic window. If set to FALSE, events are received only if the window has the focus.

The Magellan Space Mouse supports two kind of drivers:

•	ClientMessage driver: a deamon program generates user events that can be caught by the application. This mode is not supported by Open Inventor.

•	Xinput extension: a binary module is added to the X11 server. This module is loaded by the server. It generates Xinput extension events similar to normal XEvents. This is the way Open inventor works.

The Magellan Space Mouse is provided with Xinput extension driver for SGI, SUN and HP. For more information see http://www.spacemouse.com.


Classes

This section provides reference pages for the public C++ classes and member functions of the Open Inventor toolkit. For your convenience, two lists of classes are provided:

•	Alphabetic

•	By function

About "SoEXTENDER public" Classes

Member functions that are listed in the Open Inventor header files under "SoEXTENDER public" are available to programmers who wish to extend the toolkit. Although they are not documented, you should not avoid using them because of concerns that they may be subject to change without notice. They are as concrete and reliable as the documented methods. For detailed information on extending Open Inventor, see The Inventor ToolMaker, published by Addison-Wesley.


Home
Open Inventor 2.6  Reference Manual All rights reserved. No part of this documentation may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording or by any information storage and retrieval system, without permission in writing from TGS.	Inc.  5330 Carroll Canyon Rd, Suite 201  San Diego, CA 92121  USA  Tel: 858 457 5359  Fax: 858 452 2547  email:  info@tgs.com  Web:  www.tgs.com Europe  Avenue Henri Becquerel  Parc d'Activités Kennedy I  BP 227  33708 Mérignac cedex (FRANCE)  Phone : (33) (0) 5 56 13 37 77  Fax : (33) (0) 5 56 13 02 10  email:  info@europe.tgs.com


SoSearchPathAction

NAME

SoSearchPathAction - searches for a node in a scene graph using a sequence of search criteria

INHERITS FROM

SoAction > SoSearchAction > SoSearchPathAction

SYNOPSIS

#include <Inventor/actions/SoSearchPathAction.h>

Methods from class SoSearchPathAction:

SoSearchPathAction()

virtual	~SoSearchPathAction()

void	reset()

void	setSearchString(const char *searchString)

const SbString &	getSearchString() const

void	setSeparatorChar(const char sepChar)

char	getSeparatorChar() const

void	setDerivedIsOK(const SbBool derivedIsOK)

SbBool	getDerivedIsOK() const

int	getNumItemsFound() const

Methods from class SoSearchAction:

void	setSearchingAll(SbBool flag)

SbBool	isSearchingAll() const

SoPath *	getPath() const

Methods from class SoAction:

virtual void	apply(SoNode *node)

virtual void	apply(SoPath *path)

virtual void	apply(const SoPathList &pathList,
SbBool obeysRules = FALSE)

static SoType	getClassTypeId()

virtual SoType	getTypeId()

virtual SbBool	isOfType(SoType type)

virtual void	invalidateState()

DESCRIPTION

This class extends SoSearchAction to search for a sequence of items defined in a string, e.g. "Wheel1/Hub/Bearing". Each item can be a

•	Node name, or

•	Node type (type name in angle brackets, e.g. "<Cone>"), or

•	Node address (hex value starting with zero, e.g. "0x100fa30").

In the simplest case:

SoSearchPathAction spa;

spa.setSearchString( "Wheel1" );

is equivalent to:

SoSearchAction sa;

sa.setName( "Wheel1" ); // By default, interest is FIRST

When the action finds a node that satisfies the current search item, it effectively restarts the search from that node, using the next search item. This means that the search for each item (after the first) is confined to the subgraph under the node that satisfied the previous search item. In most cases each item (except possibly the last one) will be a grouping node, but this is not enforced by the action.

Finding nodes by name is a useful technique for modifying a scene graph, but using SoNode::getByName or SoSearchAction requires assigning a unique name to every (interesting) node. Often the same subgraph will be used multiple times and it would be convenient to assign each instance of the subgraph a unique name, but reuse the same names for the nodes inside the subgraph. SoSearchPathAction allows this kind of hierarchical naming.

Given a scene graph with hierarchical names, for example:

DEF Wheel1 Separator {

    DEF Hub Separator {

         DEF Bolt Separator {

             Cylinder { height 3 }

        }

    }

}

DEF Wheel2 Separator {

    DEF Hub Separator {

        DEF Bolt Separator {

            Cylinder { height 13 }

        }

    }

}

"Wheel1/Hub/Bolt" would find "Bolt" in the first wheel. Intermediate names may be omitted if the search string is still unambiguous. For example "Wheel1/Bolt" would find the same node in this simple case. "Wheel2/Hub/Bolt/<Cylinder>" would return a path including the leaf SoCylinder node in the second wheel.

Most of the methods inherited from SoSearchAction are ignored and do not return useful information (set/getNode, set/getName, etc.). Relevant inherited methods are set/isSearchingAll, getPath, and reset.

Note that by default nodekits do not search their children when a search action is applied. The reference page for SoBaseKit discusses the methods SoBaseKit::isSearchingChildren() and SoBaseKit::setSearchingChildren(), which allow you to query and control this behavior.

METHODS

SoSearchPathAction()

Constructor. The default action searches for first node of or derived from given type, using regular traversal rules.

virtual	~SoSearchPathAction()

Destructor

void	reset()

Reset options back to default values, clears returned path.

void	setSearchString(const char *searchString)

const SbString &	getSearchString() const

Set/get the search path string.

void	setSeparatorChar(const char sepChar)

char	getSeparatorChar() const

Set/get separator char for search string. The default is '/'.

void	setDerivedIsOK(const SbBool derivedIsOK)

SbBool	getDerivedIsOK() const

Set/get flag to allow search on a type to match derived types. Default is TRUE.

int	getNumItemsFound() const

Get the number of search items that were successfully found. If the complete search succeeded and a path was returned, then this will be the total number of search items (not in general the same as the number of nodes in the returned path!). If the search failed, this indicates which search item was the problem.

SEE ALSO

SoPath, SoSearchAction, SoBaseKit


SoSFBox3s

NAME

SoSFBox3s - field containing a three-dimensional box

INHERITS FROM

SoField > SoSField > SoSFBox3s

SYNOPSIS

#include <Inventor/fields/SoSFBox3s.h>

Methods from class SoSFBox3s:

static SoType	getClassTypeId()

virtual void	getTypeId() const

void	setValue(short xmin,
short ymin,
short zmin,
short xmax,
short ymax,
short zmax)

void	setValue(const SbVec3s &min,
const SbVec3s &max)

Methods from class SoField:

void	setIgnored(SbBool ignore)

SbBool	isIgnored() const

SbBool	isDefault() const

virtual SbBool	isOfType(SoType type) const

SbBool	set(const char *valueString)

void	get(SbString &valueString)

void	touch()

SbBool	connectFrom(SoField *fromField)

SbBool	connectFrom(SoEngineOutput *fromEngine)

void	disconnect()

SbBool	isConnected() const

SbBool	isConnectedFromField() const

SbBool	getConnectedField(SoField *&writingField) const

SbBool	isConnectedFromEngine() const

SbBool	getConnectedEngine(SoEngineOutput *&engineOutput) const

void	enableConnection(SbBool flag)

SbBool	isConnectionEnabled() const

int	getForwardConnections(SoFieldList &list) const

SoFieldContainer *	getContainer() const

DESCRIPTION

This field defines a three-dimensional box.

SoSFBox3s fields are written to file as 6 integers separated by whitespace.

METHODS

static SoType	getClassTypeId()

virtual void	getTypeId() const

Returns the type for this class or a particular object of this class.

void	setValue(short xmin,
short ymin,
short zmin,
short xmax,
short ymax,
short zmax)

void	setValue(const SbVec3s &min,
const SbVec3s &max)

Set the box dimensions.

SEE ALSO

SoField, SoSField