Simbody  3.6
SimTK::HandleEventsOptions Class Reference

Options for the handleEvent() method. More...

Public Types

enum  Option {
  None = 0x0000,
  DontThrow = 0x0001,
  UseInfinityNorm = 0x0002
}
 

Public Member Functions

 HandleEventsOptions ()
 
 HandleEventsOptions (Real accuracy)
 
 HandleEventsOptions (Option opt)
 
HandleEventsOptionsclear ()
 Restore this object to its default-constructed state (no options selected, default accuracy). More...
 
HandleEventsOptionssetAccuracy (Real accuracy)
 The norm of the constraint errors must be driven to below this value for a project() to be considered successful. More...
 
HandleEventsOptionsclearOption (Option opt)
 Remove a given option from the set. More...
 
HandleEventsOptionssetOption (Option opt)
 Select a given option from the set. More...
 
Real getAccuracy () const
 Return the current value for the accuracy option. More...
 
bool isOptionSet (Option opt) const
 
HandleEventsOptionsoperator|= (const HandleEventsOptions &opts)
 
HandleEventsOptionsoperator &= (const HandleEventsOptions &opts)
 
HandleEventsOptionsoperator-= (const HandleEventsOptions &opts)
 
HandleEventsOptionsoperator|= (Option opt)
 
HandleEventsOptionsoperator-= (Option opt)
 

Static Public Member Functions

static Real getDefaultAccuracy ()
 

Detailed Description

Options for the handleEvent() method.

Accuracy should be be set by the caller, but if not the default is 1e-4.

Member Enumeration Documentation

◆ Option

Enumerator
None 

Take all defaults.

DontThrow 

Normally failure to meet the accuracy requirements throws an exception.

This will force the handleEvent() method to quietly return bad status instead.

UseInfinityNorm 

Use the stricter infinity (max absolute value) norm rather than the default RMS norm to determine when accuracy has been achieved.

Constructor & Destructor Documentation

◆ HandleEventsOptions() [1/3]

SimTK::HandleEventsOptions::HandleEventsOptions ( )
inline

◆ HandleEventsOptions() [2/3]

SimTK::HandleEventsOptions::HandleEventsOptions ( Real  accuracy)
inlineexplicit

◆ HandleEventsOptions() [3/3]

SimTK::HandleEventsOptions::HandleEventsOptions ( Option  opt)
inlineexplicit

Member Function Documentation

◆ clear()

HandleEventsOptions& SimTK::HandleEventsOptions::clear ( )
inline

Restore this object to its default-constructed state (no options selected, default accuracy).

A reference to the newly-cleared object is returned.

◆ setAccuracy()

HandleEventsOptions& SimTK::HandleEventsOptions::setAccuracy ( Real  accuracy)
inline

The norm of the constraint errors must be driven to below this value for a project() to be considered successful.

Normally an RMS norm is used but you can override that to use an infinity norm instead.

◆ clearOption()

HandleEventsOptions& SimTK::HandleEventsOptions::clearOption ( Option  opt)
inline

Remove a given option from the set.

Nothing happens if the option wasn't already set.

◆ setOption()

HandleEventsOptions& SimTK::HandleEventsOptions::setOption ( Option  opt)
inline

Select a given option from the set.

Nothing happens if the option wasn't already set.

◆ getAccuracy()

Real SimTK::HandleEventsOptions::getAccuracy ( ) const
inline

Return the current value for the accuracy option.

◆ isOptionSet()

bool SimTK::HandleEventsOptions::isOptionSet ( Option  opt) const
inline

◆ getDefaultAccuracy()

static Real SimTK::HandleEventsOptions::getDefaultAccuracy ( )
inlinestatic

◆ operator|=() [1/2]

HandleEventsOptions& SimTK::HandleEventsOptions::operator|= ( const HandleEventsOptions opts)
inline

◆ operator &=()

HandleEventsOptions& SimTK::HandleEventsOptions::operator&= ( const HandleEventsOptions opts)
inline

◆ operator-=() [1/2]

HandleEventsOptions& SimTK::HandleEventsOptions::operator-= ( const HandleEventsOptions opts)
inline

◆ operator|=() [2/2]

HandleEventsOptions& SimTK::HandleEventsOptions::operator|= ( Option  opt)
inline

◆ operator-=() [2/2]

HandleEventsOptions& SimTK::HandleEventsOptions::operator-= ( Option  opt)
inline

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