Simbody  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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

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

SimTK::HandleEventsOptions::HandleEventsOptions ( )
inline
SimTK::HandleEventsOptions::HandleEventsOptions ( Real  accuracy)
inlineexplicit
SimTK::HandleEventsOptions::HandleEventsOptions ( Option  opt)
inlineexplicit

Member Function Documentation

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.

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.

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

Remove a given option from the set.

Nothing happens if the option wasn't already set.

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

Select a given option from the set.

Nothing happens if the option wasn't already set.

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

Return the current value for the accuracy option.

bool SimTK::HandleEventsOptions::isOptionSet ( Option  opt) const
inline
static Real SimTK::HandleEventsOptions::getDefaultAccuracy ( )
inlinestatic
HandleEventsOptions& SimTK::HandleEventsOptions::operator|= ( const HandleEventsOptions opts)
inline
HandleEventsOptions& SimTK::HandleEventsOptions::operator&= ( const HandleEventsOptions opts)
inline
HandleEventsOptions& SimTK::HandleEventsOptions::operator-= ( const HandleEventsOptions opts)
inline
HandleEventsOptions& SimTK::HandleEventsOptions::operator|= ( Option  opt)
inline
HandleEventsOptions& SimTK::HandleEventsOptions::operator-= ( Option  opt)
inline

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