H3D API  2.4.1
Public Member Functions | Protected Member Functions | List of all members
H3D::EventCollectingField< FieldType > Class Template Reference

The EventCollection field collects all fields routed to it that generates event between calls to the update function of the field. More...

#include <H3D/FieldTemplates.h>

Inheritance diagram for H3D::EventCollectingField< FieldType >:
Inheritance graph

Public Member Functions

virtual void upToDate ()
 Check that the field is up-to-date, if not update() is called to make it up-to-date. More...
 
bool hasCausedEvent (Field *f)
 Returns true if the Field given has generated an event to this field since the last call to the update() function.
 
size_t nrPendingEvents ()
 Returns the number of input fields that has generated an event to this field since the last call to the update() function.
 
template<class FieldType2 >
bool hasCausedEvent (H3DUniquePtr< FieldType2 > &f)
 Returns true if the Field given has generated an event to this field since the last call to the update() function.
 

Protected Member Functions

virtual void propagateEvent (Field::Event e)
 When the event is propagated the field that created the event is saved.
 

Detailed Description

template<class FieldType>
class H3D::EventCollectingField< FieldType >

The EventCollection field collects all fields routed to it that generates event between calls to the update function of the field.

Good to use if you have several fields and want to know which ones of them that has generated an event since last update.

Member Function Documentation

◆ upToDate()

template<class FieldType >
virtual void H3D::EventCollectingField< FieldType >::upToDate ( )
inlinevirtual

Check that the field is up-to-date, if not update() is called to make it up-to-date.

Overridden here to clear the event field collection when updated.

Reimplemented in H3D::PeriodicUpdate< EventCollectingField< Field > >.


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