Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
PoSceneView Class Reference

VSG extension Class to define a view which contains a scene. More...

#include <Inventor/Gui/view/PoSceneView.h>

+ Inheritance diagram for PoSceneView:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
virtual const SoNodekitCataloggetNodekitCatalog () const
 Returns the SoNodekitCatalog for this instance.
 
 PoSceneView ()
 Default constructor.
 
- Public Member Functions inherited from PoBaseView
SbBool isPointWithinViewport (float x, float y) const
 Indicates if a point defined in the normalized space [0-1]x[0-1] is in the viewport of the view.
 
void setCamera (SoGuiViewer *viewer)
 Sets the camera of the view on the viewer.
 
void sensitiveOnEvents (SbBool flag)
 Specifies if the view is sensitive to events.
 
SbBool isSensitiveOnEvents () const
 Returns true if the view is sensitive to events.
 
- Public Member Functions inherited from SoBaseKit
 SoBaseKit ()
 Constructor.
 
virtual SoNodegetPart (const SbName &partName, SbBool makeIfNeeded)
 Searches the nodekit catalog (and those of all nested nodekits) for the part named partName.
 
template<typename PartType >
PartType * getPart (const SbName &partName)
 Like getPart(const SbName&,SbBool) but casts the returned part to the specified type and sets the makeIfNeeded parameter to TRUE.
 
template<typename PartType >
PartType * checkPart (const SbName &partName)
 Like getPart(const SbName&,SbBool) but casts the returned part to the specified type and sets the makeIfNeeded parameter to FALSE.
 
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.
 
virtual SoNodeKitPathcreatePathToPart (const SbName &partName, SbBool makeIfNeeded, const SoPath *pathToExtend=NULL)
 Returns a path that begins at this nodekit and ends at partName.
 
virtual SbBool setPart (const SbName &partName, SoNode *newPart)
 Inserts the given node (not a copy) as the new part specified by partName.
 
SoNONUNICODE SbBool set (char *nameValuePairListString)
 This function allows field values of parts (nodes) to be set in several different parts simultaneously.
 
SbBool set (const SbString &nameValuePairListString)
 This function allows field values of parts (nodes) to be set in several different parts simultaneously.
 
SoNONUNICODE SbBool set (const char *partNameString, const char *parameterString)
 This function allows field values of parts (nodes) to be set.
 
SbBool set (const SbString &partNameString, const SbString &parameterString)
 This function allows field values of parts (nodes) to be set.
 
- Public Member Functions inherited from SoNode
virtual void setOverride (const SbBool state)
 Turns the override flag on or off.
 
virtual SbBool isOverride () const
 Returns the state of the override flag.
 
virtual SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
 
virtual SbBool affectsState () const
 Returns TRUE if a node has an effect on the state during traversal.
 
virtual void touch ()
 Marks an instance as modified, simulating a change to it.
 
- Public Member Functions inherited from SoFieldContainer
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.
 
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
 Returns TRUE if this object's fields are exactly equal to fc's fields.
 
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
 Copies the contents of fc's fields into this object's fields.
 
SoNONUNICODE 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.
 
SbBool set (const SbString &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.
 
void get (SbString &fieldDataString)
 Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.
 
virtual int getFields (SoFieldList &list) const
 Appends references to all of this object's fields to resultList, and returns the number of fields appended.
 
virtual int getAllFields (SoFieldList &list) const
 Returns a list of fields, including the eventIn's and eventOut's.
 
virtual SoFieldgetField (const SbName &fieldName) const
 Returns a the field of this object whose name is fieldName.
 
virtual SoFieldgetEventIn (const SbName &fieldName) const
 Returns a the eventIn with the given name.
 
virtual SoFieldgetEventOut (const SbName &fieldName) const
 Returns the eventOut with the given name.
 
SbBool getFieldName (const SoField *field, SbName &fieldName) const
 Returns the name of the given field in the fieldName argument.
 
SbBool enableNotify (SbBool flag)
 Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).
 
SbBool isNotifyEnabled () const
 Notification is the process of telling interested objects that this object has changed.
 
virtual void setUserData (void *data)
 Sets application data.
 
void * getUserData (void) const
 Gets user application data.
 
- Public Member Functions inherited from SoBase
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
void setSynchronizable (const bool b)
 Sets this to be a ScaleViz synchronizable object.
 
bool isSynchronizable () const
 Gets the ScaleViz synchronizable state of this object.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 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.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 
- Public Member Functions inherited from SoGetView
 SoGetView ()
 Default constructor.
 
virtual ~SoGetView ()
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static const SoNodekitCataloggetClassNodekitCatalog ()
 Returns the SoNodekitCatalog for this class.
 
- Static Public Member Functions inherited from PoBaseView
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static const SoNodekitCataloggetClassNodekitCatalog ()
 Returns the SoNodekitCatalog for this class.
 
static PoBaseViewgetView (SoGuiViewer *viewer, int mouseX, int mouseY)
 Returns the view (if any) that contains the given mouse cursor position.
 
static SoDEPRECATED SbBool viewingEventCB (void *viewer, void *anyEvent)
 The callback is automatically registered in the So<XXX>Viewer classes.
 
- Static Public Member Functions inherited from SoBaseKit
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static const SoNodekitCataloggetClassNodekitCatalog ()
 Returns the SoNodekitCatalog for the class SoBaseKit.
 
static void setSearchingChildren (SbBool newVal)
 Sets if nodekit children are searched during SoSearchAction traversal.
 
static SbBool isSearchingChildren ()
 Returns TRUE if nodekit children are searched during SoSearchAction traversal.
 
- Static Public Member Functions inherited from SoNode
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SoNodegetByName (const SbName &name)
 A node's name can be set using SoBase::setName().
 
static int getByName (const SbName &name, SoNodeList &list)
 A node's name can be set using SoBase::setName().
 
- Static Public Member Functions inherited from SoFieldContainer
static SoType getClassTypeId ()
 Returns the type of this class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Public Attributes

SoSFBool isBackgroundVisible
 Defines the visibility of the background of the view.
 
SoSFBool isBorderVisible
 Defines the visibility of the borders of the view.
 
- Public Attributes inherited from PoBaseView
SoSFVec2f viewportOrigin
 Lower-left corner coordinates of the viewport of the view.
 
SoSFVec2f viewportSize
 Size of the viewport of the view.
 
- Public Attributes inherited from SoBaseKit
SoSFBool boundingBoxIgnoring
 Whether to ignore this node during bounding box traversal.
 

Detailed Description

VSG extension Class to define a view which contains a scene.

This class allows the user to define a view which contains a scene.

Views allow the application to specify multiple cameras, each with its own separate viewport (region of the 3D window). This is more powerful than just using multiple SoCamera nodes, because camera nodes do not allow specifying a viewport (the viewport is always the full window). See PoBaseView for more explanation.

A scene is a set of any nodes (except SoCamera nodes) placed under an SoGroup node which must be seen in a viewport according to a camera configuration. To define a view, set the fields viewportOrigin and viewportSize according to the viewport position and size you want to have (relative to the display window sizes), configure the camera (set the part cameraKit), build the scene under an SoGroup node, and set this scene to the view (set the part scene). All shape nodes contained in the scene will be drawn in the viewport previously defined and according to the camera definition. You can define as many views as you want.

NOTES:

  • If you use a viewer, you should call the method SoBaseKit::setSearchingChildren(TRUE) to allow the viewer to search for cameras inside nodekits (like this one).
  • Do not place a camera node before this nodekit.
  • Create a camera for each view and set it using the setPart method. See example.
  • When you use HardCopy, the graphics window is the paper sheet.
  • SoGui::init() needs to be called in order to initialize this class (this is done automatically if you use SoXt, SoWin or SoQt).

LIMITATIONS:

  • The field SoCamera::viewportMapping must be equal to ADJUST_CAMERA in order to have a correct vectorisation when you use
    HardCopy,
  • Do not use the SoBoxHighlightRenderAction class on a scene graph which contains a view,
  • Do not push view,
  • Be careful when you use the method viewAll() of the class SoXtViewer, because this method works on the entire scene graph and not on a portion of a scene graph. Overload this method according to your requirements,
  • Some of the viewer functions/buttons do not work correctly with views.
    For example, saveHomePosition() and resetToHomePosition() do not work correctly because the viewer only stores one copy of the camera.
  • The viewer rendering options, e.g. wireframe, apply to ALL views inside the viewer. You can implement these effects per-view using an SoDrawStyle node and setOverride() if necessary.
  • In case of tile rendering with SoOffscreenRenderArea : SoGradientBackground in a PoSceneView will not be rendered with the correct size (i.e. the SoGradientBackground size will not match the target size). Call SoOffscreenRenderArea.setTileSize() with the offscreen rendering total size to avoid this size problem.

EXAMPLE

FILE FORMAT/DEFAULT

    PoSceneView {
    viewportOrigin 0 0
    viewportSize 1 1
    isBackgroundVisible FALSE
    isBorderVisible FALSE
    }

    CATALOG PARTS

      PoSceneView {
        Separator topSep (from PoSceneView) {
          Separator backgroundSep (from PoSceneView) {
          Contains properties and shapes to draw the background of the view.
            AppearanceKit backgroundApp (from PoSceneView)
            Specifies the appearance of the background.
            Group background (from PoSceneView)
            Contains a SoFaceSet shape to draw the background.
          }
            Separator sceneSep (from PoSceneView) {
            Contains the camera and the scene of the view specified by the user.
              Camera cameraKit (from PoBaseView)
              Contains the camera of the view specified by the user.
              Group scene (from PoSceneView)
              Contains the scene of the view specified by the user.
            }
              Separator borderSep (from PoSceneView) {
              Contains properties and shapes to draw the borders of the view.
                AppearanceKit borderApp (from PoSceneView)
                Specifies the appearance of the borders.
                Group border (from PoSceneView)
                Contains a SoLineSet shape to draw the borders.
              }
            }
          }

        Definition at line 227 of file PoSceneView.h.

      Constructor & Destructor Documentation

      ◆ PoSceneView()

      PoSceneView::PoSceneView ( )

      Default constructor.

      Member Function Documentation

      ◆ getClassNodekitCatalog()

      static const SoNodekitCatalog * PoSceneView::getClassNodekitCatalog ( )
      static

      Returns the SoNodekitCatalog for this class.

      ◆ getClassTypeId()

      static SoType PoSceneView::getClassTypeId ( )
      static

      Returns the type identifier for this class.


      ◆ getNodekitCatalog()

      virtual const SoNodekitCatalog * PoSceneView::getNodekitCatalog ( ) const
      virtual

      Returns the SoNodekitCatalog for this instance.

      Reimplemented from PoBaseView.

      ◆ getTypeId()

      virtual SoType PoSceneView::getTypeId ( ) const
      virtual

      Returns the type identifier for this specific instance.

      Reimplemented from PoBaseView.

      Member Data Documentation

      ◆ isBackgroundVisible

      SoSFBool PoSceneView::isBackgroundVisible

      Defines the visibility of the background of the view.

      Definition at line 257 of file PoSceneView.h.

      ◆ isBorderVisible

      SoSFBool PoSceneView::isBorderVisible

      Defines the visibility of the borders of the view.

      Definition at line 262 of file PoSceneView.h.


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