class SoSceneViewer : public SoXtComponent

The SceneViewer component lets you select between different viewers (Examiner, tsRenderer, Walk

Inheritance:


Public Methods

SoXtViewer::BufferType getBufferingType()
SoCamera* getCamera()
and perspective), the user shouldn't cache the camera.
SoXtViewer::DrawStyle getDrawStyle(SoXtViewer::DrawType type)
SoDirectionalLight* getHeadlight()
Widget getRenderAreaWidget()
returns the current render area widget
SoGLRenderAction::TransparencyType getTransparencyType()
SbBool isDecoration()
SbBool isHeadlight()
SbBool isMenuShown()
SbBool isViewing()
void newData()
void saveHomePosition()
void setBufferingType(SoXtViewer::BufferType type)
void setCamera(SoCamera *cam)
void setDecoration(SbBool onOrOff)
Show/hide the viewer component trims (default shown)
void setDrawStyle(SoXtViewer::DrawType type, SoXtViewer::DrawStyle style)
void setHeadlight(SbBool onOrOff)
Show/hide headlight (default on) and get to the headlight node.
void setTransparencyType(SoGLRenderAction::TransparencyType type)
Set/get the level of transparency type
void setUserModeEventCallback(SoXtRenderAreaEventCB *fcn)
set the EXPLORER user mode callback routine
void setViewing(SbBool onOrOff)
Turn viewing on/off (Default to on) in the viewers.
void showMenu(SbBool onOrOff)
Show/hide the pulldown menu bar (default shown)
SoSceneViewer( Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, SoSelection *root = NULL, const char *envFile = NULL)
void viewAll()
void viewSelection()
~SoSceneViewer()

Protected Methods

virtual const char* getDefaultIconTitle()
virtual const char* getDefaultTitle()
virtual const char* getDefaultWidgetName()
redefine these
SoEXTENDER SoSceneViewer( Widget parent, const char *name, SbBool buildInsideParent, SoSelection *root, const char *envFile, SbBool buildNow)
when they are ready for it to be built.

Private Fields

MyColorEditor* ambientColorEditor
Ambient lighting color
SbBool antialiasingFlag
Turns fog on/off
MyColorEditor* backgroundColorEditor
Background color
SbBool calculatedLightManipSize
SoXtClipboard* clipboard
for copy and paste
MyColorEditor* colorEditor
Color editor
SvEManipMode curManip
SbBool curManipReplaces
SoXtFullViewer* currentViewer
current viewer ID
SoEnvironment* environment
SoLabel* envLabel
SbBool feedbackShown
Widget fileDialog
motif vars for file reading/writting
int fileMode
file reading methods
char* fileName
SbBool fogFlag
Environment: fog, antialiasing
SvLightData* headlightData
SoXtDirectionalLightEditor* headlightEditor
SoBoxHighlightRenderAction* highlightRA
Selection highlight
SbBool ignoreCallback
SbPList lightDataList
SoGroup* lightGroup
float lightManipSize
SoGroup* lightsCameraEnvironment
Lights, camera, environment!
SvManipList* maniplist
SoXtMaterialEditor* materialEditor
Material editor
SoSceneViewerData* menuItems
Widget menuWidget
our topmost form widget
Widget mgrWidget
SoXtPrintDialog* printDialog
printing vars
SoSeparator* sceneGraph
the same user supplied graph
SbDict* sceneKitCamNumDict
SoSelection* selection
Scene graph data
SbBool showMenuFlag
topbar menu widget
SoXtTransformSliderSet* transformSliderSet
transform slider set
GraphViewer* tsGraphViewer
extended version of gview from demo source
SoXtRenderAreaEventCB* userModeCB
void* userModedata
SbBool userModeFlag
SbBool useShowcaseBrowser
SoXtFullViewer* viewerList[4]
SvEViewer whichViewer
list of viewers

Private Methods

void addAttachedLightManipGeometry()
void addLight(SoLight *light)
SvLightData* addLightEntry(SoLight *light, SoSwitch *lightSwitch)
void addLightMenuEntry(SvLightData *)
static void afterPrintCallback(void *uData, SoXtPrintDialog *)
static void ambientColorCallback(void *userData, const SbColor *color)
Invokes color editor on amb
void attachManip( SvEManipMode manipType, SoPath *p )
attaches a manipulator
void attachManipToAll( SvEManipMode manipType )
static void backgroundColorCallback(void *userData, const SbColor *color)
Invokes color editor on bkg
static void beforePrintCallback(void *uData, SoXtPrintDialog *)
void buildAndLayoutMenu(Widget parent)
void buildAndLayoutViewer(SoXtFullViewer *vwr)
Widget buildWidget(Widget parent)
list of menu items data
void calculateLightManipSize()
vars to make the light manips all the same size
void constructorCommon(SoSelection *root, const char *envFile, SbBool buildNow)
void createColorEditor()
void createLightsCameraEnvironment()
void createMaterialEditor()
void createTransformSliderSet()
void createTsGraphViewer()
void deleteScene()
void destroySelectedObjects()
copy/paste 3d data
void detachManip( SoPath *p )
detaches a manipulator
void detachManipFromAll()
SbBool doFileIO(const char *filename)
void editAmbientColor()
void editBackgroundColor()
void editLight(SvLightData *data, SbBool flag)
static void editLightColorCB(Widget, SvLightData *, void *)
static void editLightToggleCB(Widget, SvLightData *, void *)
static void fileDialogCB(Widget, SoSceneViewer *, XmFileSelectionBoxCallbackStruct *)
SoMaterial* findMaterialForAttach( const SoPath *target )
static SoCallbackAction::Response findMtlPreTailCB(void *data, SoCallbackAction *accum, const SoNode *)
callback used by Accum state action created by findMaterialForAttach
SoPath* findTransformForAttach( const SoPath * target )
const SbColor& getBackgroundColor()
void getFileName()
SoCamera* getLastSceneKitCamera(SoGroup *root)
Returns the last scene kit camera in a scene.
static SbBool iconDropCB(void *userData, const char *filename)
Drag and drop support (allowing dropping of data into SceneViewer)
static SbBool isAffectedByMaterial( SoNode *node )
static SbBool isAffectedByTransform( SoNode *node )
static void lightSubmenuDisplay(Widget, SvLightData *, void *)
static void lightToggleCB(Widget, SvLightData *, void *)
static void menuDisplay(Widget, SoSceneViewerData *, XtPointer)
callback when a menu is displayed
static SbBool objDropCB( void *userData, Atom dataType, void *data, uint32_t numBytes)
void pasteDone(SoPathList *pathList)
Paste callback - invoked when paste data transfer is complete
static void pasteDoneCB(void *userData, SoPathList *pathList)
void pickAll()
static SoPath* pickFilterCB(void *userData, const SoPickedPoint *pick)
void pickParent()
Select parent, if there is one; select everything.
void print()
static void processTopbarEvent(Widget, SoSceneViewerData *, XmAnyCallbackStruct *)
callback for all menu buttons to perform action
SbBool readEnvFile(const char *filename)
SbBool readFile(const char *filename)
void removeAttachedLightManipGeometry()
(used for file writting and printing)
void removeCameras(SoGroup *root)
cameras
void removeLight(SvLightData *)
static void removeLightCB(Widget, SvLightData *, void *)
void removeManips()
and restore later
void replaceAllManips( SvEManipMode manipType )
replaces manips with the given type for all selected objects.
void restoreManips()
void restoreSceneKitCameras(SoGroup *root)
void save()
static void selectionCallback(void *userData, SoPath *obj)
void setAntialiasing(SbBool onOrOff)
AA-ing on/off
void setCameraFields( SoCamera *fromCam )
Copies from given camera into this viewer's camera, if types match.
void setFog(SbBool onOrOff)
Fog on/off
void setLastSceneKitCamera(SoGroup *root, SoCamera *theCam)
Copies our camera into the last scene kit camera in a scene.
void showAboutDialog()
static void SoSceneViewer::adjustScaleTabSizeCB( void *, SoXtViewer *)
Added to viewer as a finishCallback.
void switchOffSceneKitCameras(SoGroup *root)
Switches off/ restores camera num settings of scenekits.
void switchToViewer(SvEViewer newViewer)
current viewer pt
void transferDirectionalLightLocation( SvLightData *data )
void turnLightOnOff(SvLightData *data, SbBool flag)
void updateCommandAvailability()
this is called after objects are added/deleted or the selection changes
SbBool writeEnvFile(const char *filename)
SbBool writeFile(const char *filename)

Documentation

The SceneViewer component lets you select between different viewers (Examiner, tsRenderer, Walk ..) and lets you perform some simple attribute assignment, and some manipulation of data.

Limitations: - GraphViewer has a different selection than the SceneViewer itself.

SoSceneViewer( Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, SoSelection *root = NULL, const char *envFile = NULL)

~SoSceneViewer()

SoEXTENDER SoSceneViewer( Widget parent, const char *name, SbBool buildInsideParent, SoSelection *root, const char *envFile, SbBool buildNow)
when they are ready for it to be built.

void viewAll()

void viewSelection()

void saveHomePosition()

void setCamera(SoCamera *cam)

SoCamera* getCamera()
and perspective), the user shouldn't cache the camera.

void newData()

void showMenu(SbBool onOrOff)
Show/hide the pulldown menu bar (default shown)

SbBool isMenuShown()

void setDecoration(SbBool onOrOff)
Show/hide the viewer component trims (default shown)

SbBool isDecoration()

void setHeadlight(SbBool onOrOff)
Show/hide headlight (default on) and get to the headlight node.

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

void setViewing(SbBool onOrOff)
Turn viewing on/off (Default to on) in the viewers.

SbBool isViewing()

void setTransparencyType(SoGLRenderAction::TransparencyType type)
Set/get the level of transparency type

SoGLRenderAction::TransparencyType getTransparencyType()

Widget getRenderAreaWidget()
returns the current render area widget

void setUserModeEventCallback(SoXtRenderAreaEventCB *fcn)
set the EXPLORER user mode callback routine

virtual const char* getDefaultWidgetName()
redefine these

virtual const char* getDefaultTitle()

virtual const char* getDefaultIconTitle()

SoSelection* selection
Scene graph data

SoSeparator* sceneGraph
the same user supplied graph

SoGroup* lightsCameraEnvironment
Lights, camera, environment!

SoLabel* envLabel

SoEnvironment* environment

SoGroup* lightGroup

void createLightsCameraEnvironment()

SoBoxHighlightRenderAction* highlightRA
Selection highlight

Widget mgrWidget

Widget menuWidget
our topmost form widget

SbBool showMenuFlag
topbar menu widget

SoSceneViewerData* menuItems

Widget buildWidget(Widget parent)
list of menu items data

void buildAndLayoutMenu(Widget parent)

void buildAndLayoutViewer(SoXtFullViewer *vwr)

static void processTopbarEvent(Widget, SoSceneViewerData *, XmAnyCallbackStruct *)
callback for all menu buttons to perform action

static void menuDisplay(Widget, SoSceneViewerData *, XtPointer)
callback when a menu is displayed

void updateCommandAvailability()
this is called after objects are added/deleted or the selection changes

int fileMode
file reading methods

char* fileName

SbBool useShowcaseBrowser

void getFileName()

SbBool doFileIO(const char *filename)

SbBool readFile(const char *filename)

SbBool writeFile(const char *filename)

SbBool readEnvFile(const char *filename)

SbBool writeEnvFile(const char *filename)

void deleteScene()

void save()

void removeCameras(SoGroup *root)
cameras

SoCamera* getLastSceneKitCamera(SoGroup *root)
Returns the last scene kit camera in a scene.

void setLastSceneKitCamera(SoGroup *root, SoCamera *theCam)
Copies our camera into the last scene kit camera in a scene.

void switchOffSceneKitCameras(SoGroup *root)
Switches off/ restores camera num settings of scenekits.

void restoreSceneKitCameras(SoGroup *root)

void setCameraFields( SoCamera *fromCam )
Copies from given camera into this viewer's camera, if types match.

SbDict* sceneKitCamNumDict

Widget fileDialog
motif vars for file reading/writting

static void fileDialogCB(Widget, SoSceneViewer *, XmFileSelectionBoxCallbackStruct *)

SoXtPrintDialog* printDialog
printing vars

void print()

static void beforePrintCallback(void *uData, SoXtPrintDialog *)

static void afterPrintCallback(void *uData, SoXtPrintDialog *)

SbBool feedbackShown

void showAboutDialog()

void pickParent()
Select parent, if there is one; select everything.

void pickAll()

SoXtClipboard* clipboard
for copy and paste

void destroySelectedObjects()
copy/paste 3d data

void pasteDone(SoPathList *pathList)
Paste callback - invoked when paste data transfer is complete

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

static SbBool iconDropCB(void *userData, const char *filename)
Drag and drop support (allowing dropping of data into SceneViewer)

static SbBool objDropCB( void *userData, Atom dataType, void *data, uint32_t numBytes)

SoXtFullViewer* viewerList[4]

SvEViewer whichViewer
list of viewers

SoXtFullViewer* currentViewer
current viewer ID

void switchToViewer(SvEViewer newViewer)
current viewer pt

SbBool fogFlag
Environment: fog, antialiasing

void setFog(SbBool onOrOff)
Fog on/off

SbBool antialiasingFlag
Turns fog on/off

void setAntialiasing(SbBool onOrOff)
AA-ing on/off

MyColorEditor* backgroundColorEditor
Background color

const SbColor& getBackgroundColor()

void editBackgroundColor()

static void backgroundColorCallback(void *userData, const SbColor *color)
Invokes color editor on bkg

SbBool ignoreCallback

SoMaterial* findMaterialForAttach( const SoPath *target )

SoPath* findTransformForAttach( const SoPath * target )

static SoCallbackAction::Response findMtlPreTailCB(void *data, SoCallbackAction *accum, const SoNode *)
callback used by Accum state action created by findMaterialForAttach

SoXtTransformSliderSet* transformSliderSet
transform slider set

void createTransformSliderSet()

GraphViewer* tsGraphViewer
extended version of gview from demo source

void createTsGraphViewer()

SoXtMaterialEditor* materialEditor
Material editor

void createMaterialEditor()

MyColorEditor* colorEditor
Color editor

void createColorEditor()

SvEManipMode curManip

SbBool curManipReplaces

SvManipList* maniplist

void replaceAllManips( SvEManipMode manipType )
replaces manips with the given type for all selected objects.

void attachManip( SvEManipMode manipType, SoPath *p )
attaches a manipulator

void attachManipToAll( SvEManipMode manipType )

void detachManip( SoPath *p )
detaches a manipulator

void detachManipFromAll()

void removeManips()
and restore later

void restoreManips()

static void SoSceneViewer::adjustScaleTabSizeCB( void *, SoXtViewer *)
Added to viewer as a finishCallback.

SbPList lightDataList

SoXtDirectionalLightEditor* headlightEditor

SvLightData* headlightData

void addLight(SoLight *light)

SvLightData* addLightEntry(SoLight *light, SoSwitch *lightSwitch)

void addLightMenuEntry(SvLightData *)

void turnLightOnOff(SvLightData *data, SbBool flag)

static void lightToggleCB(Widget, SvLightData *, void *)

void editLight(SvLightData *data, SbBool flag)

static void editLightToggleCB(Widget, SvLightData *, void *)

static void editLightColorCB(Widget, SvLightData *, void *)

void removeLight(SvLightData *)

static void removeLightCB(Widget, SvLightData *, void *)

static void lightSubmenuDisplay(Widget, SvLightData *, void *)

void transferDirectionalLightLocation( SvLightData *data )

void calculateLightManipSize()
vars to make the light manips all the same size

float lightManipSize

SbBool calculatedLightManipSize

void removeAttachedLightManipGeometry()
(used for file writting and printing)

void addAttachedLightManipGeometry()

MyColorEditor* ambientColorEditor
Ambient lighting color

void editAmbientColor()

static void ambientColorCallback(void *userData, const SbColor *color)
Invokes color editor on amb

static void selectionCallback(void *userData, SoPath *obj)

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

static SbBool isAffectedByTransform( SoNode *node )

static SbBool isAffectedByMaterial( SoNode *node )

SoXtRenderAreaEventCB* userModeCB

void* userModedata

SbBool userModeFlag

void constructorCommon(SoSelection *root, const char *envFile, SbBool buildNow)


This class has no child classes.
Author:
Silicon Graphics Inc., extensions by Andreas Lücke
Version:
0.0
See Also:
FieldEditor

alphabetic index hierarchy of classes


This page is part of the tsKit's reference manual by Andreas Lücke.
Back to tsKit-Home

generated by doc++