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

A class that encapsulates the different boolean flags that collision detection can have. More...

#include <omPhysicsCollisionFlags.h>

Public Types

enum  Flag { ENABLED = (1 << 0), CONTINUOUS = (1 << 1), DEFAULT = ENABLED | CONTINUOUS, UNDEFINED = 0 }
 An enum that specifies the different collision flags. More...
 

Public Member Functions

 CollisionFlags ()
 Create a new collision flags object with no flags set. More...
 
 CollisionFlags (Flag flag)
 Create a new collision flags object with the specified flag value initially set. More...
 
 CollisionFlags (UInt32 newFlags)
 Create a new collision flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this collision 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 collision detection can have.

These flags provide global boolean parameters for collision detection. 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 collision flags.

Enumerator
ENABLED 

A flag indicating that collision detection is enabled for simulation.

CONTINUOUS 

A flag indicating whether or not continuous collision detection is performed.

DEFAULT 

The default flags to use for a collision simulation.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::physics::collision::CollisionFlags::CollisionFlags ( )
inline

Create a new collision flags object with no flags set.

om::physics::collision::CollisionFlags::CollisionFlags ( Flag  flag)
inline

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

om::physics::collision::CollisionFlags::CollisionFlags ( UInt32  newFlags)
inline

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

Member Function Documentation

om::physics::collision::CollisionFlags::operator UInt32 ( ) const
inline

Convert this collision flags object to an integer value.

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

Bool om::physics::collision::CollisionFlags::isSet ( Flag  flag) const
inline

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

void om::physics::collision::CollisionFlags::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: