Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::physics::context::PhysicsFlags Class Reference

A class that encapsulates the different boolean flags that a physics simulation can have. More...

#include <omPhysicsFlags.h>

Public Types

enum  Flag { FIXED_STEP = (1 << 0), DEACTIVATION = (1 << 1), DEFAULT = FIXED_STEP | DEACTIVATION, UNDEFINED = 0 }
 An enum that specifies the different physics simulation flags. More...
 

Public Member Functions

 PhysicsFlags ()
 Create a new physics flags object with no flags set. More...
 
 PhysicsFlags (Flag flag)
 Create a new physics flags object with the specified flag value initially set. More...
 
 PhysicsFlags (UInt32 newFlags)
 Create a new physics flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this physics flags object to an integer value. More...
 
Bool isSet (Flag flag) const
 Return whether or not the specified flag value is set for this flags object. More...
 
void set (Flag flag, Bool newIsSet)
 Set whether or not the specified flag value is set for this flags object. More...
 

Detailed Description

A class that encapsulates the different boolean flags that a physics simulation can have.

These flags provide boolean information about a physics simulation. Flags are indicated by setting a single bit of a 32-bit unsigned integer to 1.

Enum values for the different flags are defined as members of the class. Typically, the user would bitwise-OR the flag enum values together to produce a final set of set flags.

Member Enumeration Documentation

An enum that specifies the different physics simulation flags.

Enumerator
FIXED_STEP 

A flag indicating whether or not a fixed timestep should be used for simulation.

DEACTIVATION 

A flag indicating whether or objects can be deactivated if they stop moving.

DEFAULT 

The default flags to use for a physics simulation.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::physics::context::PhysicsFlags::PhysicsFlags ( )
inline

Create a new physics flags object with no flags set.

om::physics::context::PhysicsFlags::PhysicsFlags ( Flag  flag)
inline

Create a new physics flags object with the specified flag value initially set.

om::physics::context::PhysicsFlags::PhysicsFlags ( UInt32  newFlags)
inline

Create a new physics flags object with the specified initial combined flags value.

Member Function Documentation

om::physics::context::PhysicsFlags::operator UInt32 ( ) const
inline

Convert this physics flags object to an integer value.

This operator is provided so that the ObjectFlags shape can be used as an integer value for bitwise logical operations.

Bool om::physics::context::PhysicsFlags::isSet ( Flag  flag) const
inline

Return whether or not the specified flag value is set for this flags object.

void om::physics::context::PhysicsFlags::set ( Flag  flag,
Bool  newIsSet 
)
inline

Set whether or not the specified flag value is set for this flags object.


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