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

VSG extension Class to define a view. More...

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

+ Inheritance diagram for PoView:

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

Additional Inherited Members

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

This class allows the user to define a "view".

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

In addition, when mouse event locations are mapped back into 3D space, Open Inventor automatically uses the view volume of the camera associated with the view whose viewport currently contains the mouse cursor.

Views can be used to efficiently create the effect of multiple windows, without the overhead and system dependent code to manage multiple windows. For example, views can be used to subdivide the window into multiple independent views of a 3D scene or to create an inset "bird's eye" view inside the window.

Basically, a view consists of a camera (specified with an SoCameraKit) and a viewport (specified using the fields of this node). The viewport is the region of the graphics window in which the scene graph will be rendered.

A To define a view, set the fields viewportOrigin and viewportSize to the desired viewport position and size in normalized device coordinates [0..1], then configure the camera (set the part cameraKit). All shape nodes placed after this node will be drawn using the specified camera and viewport. 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 in PoSceneView.
  • 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.

FILE FORMAT/DEFAULT

    PoView {
    viewportOrigin 0 0
    viewportSize 1 1
    }

    CATALOG PARTS

      PoView {
        Camera cameraKit (from PoBaseView)
        Corresponds to the camera of the view specified by the user.
      }

    Definition at line 100 of file PoView.h.

Constructor & Destructor Documentation

◆ PoView()

PoView::PoView ( )

Default constructor.

Member Function Documentation

◆ getClassNodekitCatalog()

static const SoNodekitCatalog * PoView::getClassNodekitCatalog ( )
static

Returns the SoNodekitCatalog for this class.

◆ getClassTypeId()

static SoType PoView::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getNodekitCatalog()

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

Returns the SoNodekitCatalog for this instance.

Reimplemented from PoBaseView.

◆ getTypeId()

virtual SoType PoView::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from PoBaseView.


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