OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
WGEScene Class Reference

Class for managing the OpenSceneGraph root node. More...

#include <WGEScene.h>

+ Inheritance diagram for WGEScene:
+ Collaboration diagram for WGEScene:

Public Member Functions

 WGEScene ()
 Default constructor. More...
 
bool isHomePositionRequested ()
 Indicates whether we want the widget showing the scene to be tranferred to its home position. More...
 
void forceFirstHomePositionRequestFalse ()
 Manually force all following requests not to be considered the first one. More...
 
- Public Member Functions inherited from WGEGroupNode
 WGEGroupNode ()
 Default constructor. More...
 
void insert (osg::ref_ptr< osg::Node > node)
 Adds the specified node to the child list of this node in a safe manner. More...
 
void remove (osg::ref_ptr< osg::Node > node)
 Removes the specified node from this group in a thread safe manner. More...
 
void remove_if (std::shared_ptr< WGEGroupNode::NodePredicate > predicate)
 Removes a node if the specified predicate evaluates to true. More...
 
void clear ()
 Removes all children from this node. More...
 

Protected Member Functions

virtual ~WGEScene ()
 Destructor. More...
 
- Protected Member Functions inherited from WGEGroupNode
virtual ~WGEGroupNode ()
 Destructor. More...
 

Private Attributes

bool firstHomePositionRequest
 Indicates whether we still have the first request for home position (isHomePositionRequested()). More...
 

Additional Inherited Members

- Public Types inherited from WGEGroupNode
typedef WPredicateHelper::ArbitraryPredicateBase< osg::ref_ptr< osg::Node > const > NodePredicate
 The base type of predicate. More...
 
- Protected Types inherited from WGEGroupNode
enum  ChildOperationType { INSERT = 0 , REMOVE , REMOVE_IF , CLEAR }
 The type of operation to perform. More...
 
- Protected Attributes inherited from WGEGroupNode
osg::ref_ptr< SafeUpdaterCallbackm_nodeUpdater
 Node callback used to update this root node. More...
 
std::queue< std::shared_ptr< ChildOperation > > m_childOperationQueue
 Queue of childs that need to be added/removed during the next update cycle. More...
 
std::shared_mutex m_childOperationQueueLock
 Lock used for inserting and removing childs into the child insertion/removal queue. More...
 
bool m_childOperationQueueDirty
 Flag denoting whether the m_childOperationQueue should be considered during the next update of the node. More...
 
bool m_removeAll
 True whenever all child nodes should be removed. More...
 

Detailed Description

Class for managing the OpenSceneGraph root node.

It can handle new nodes, removing nodes and so on.

Definition at line 35 of file WGEScene.h.

Constructor & Destructor Documentation

◆ WGEScene()

WGEScene::WGEScene ( )

Default constructor.

Definition at line 31 of file WGEScene.cpp.

References WLogger::addLogMessage(), and WLogger::getLogger().

+ Here is the call graph for this function:

◆ ~WGEScene()

WGEScene::~WGEScene ( )
protectedvirtual

Destructor.

Protected. To avoid accidental destruction of these root nodes.

Definition at line 37 of file WGEScene.cpp.

References WLogger::addLogMessage(), and WLogger::getLogger().

+ Here is the call graph for this function:

Member Function Documentation

◆ forceFirstHomePositionRequestFalse()

void WGEScene::forceFirstHomePositionRequestFalse ( )

Manually force all following requests not to be considered the first one.

Definition at line 42 of file WGEScene.cpp.

References firstHomePositionRequest.

◆ isHomePositionRequested()

bool WGEScene::isHomePositionRequested ( )

Indicates whether we want the widget showing the scene to be tranferred to its home position.

This is the case if we have the first child added to the scene.

Returns
true if reset to bbox is requested

Definition at line 47 of file WGEScene.cpp.

References firstHomePositionRequest.

Member Data Documentation

◆ firstHomePositionRequest

bool WGEScene::firstHomePositionRequest
private

Indicates whether we still have the first request for home position (isHomePositionRequested()).

Definition at line 64 of file WGEScene.h.

Referenced by forceFirstHomePositionRequestFalse(), and isHomePositionRequested().


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