VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtForceManager Class Reference

This class will maintain force information used in visualizers that need force dependent data (such as force color) More...

Inheritance diagram for makVrv::DtForceManager:
Inheritance graph
[legend]

Classes

struct  ForceInfo
struct  RGBAColor

Public Member Functions

 DtForceManager (DtSharedSettingsManager &manager)
 CTOR.
virtual ~DtForceManager ()
 DTOR.
virtual void addForce (DtForceType force, const std::string &forceName, const RGBAColor &forceColor, const RGBAColor &forcePrimaryColor, bool includeInDialogs=true)
 Adds a new force DtForceType to the manager.
virtual DtForceType nextAvailableId ()
 Get first available Id (starting at 1)
virtual void removeForce (DtForceType)
 Removes force from system.
virtual int numForces () const
 Number of forces in the force list.
virtual DtForceType forceAt (int iIndex) const
 Force Type for a specific index.
virtual RGBAColor colorForForce (DtForceType force, bool usePrimaryColors=false) const
 Color for a specified force.
virtual std::string nameForForce (DtForceType force) const
 Name for a specified force.
virtual DtForceType forceFromName (const std::string &name) const
 Force Type for a specific force name.
virtual bool includeInDialogs (DtForceType force) const
 Whether the force is included in VRF dialogs.
virtual void clearForces ()
 Clear hash list of forces.
virtual void setHostility (DtU8 force, DtU8 targetForce, bool hostile)
virtual bool hostile (DtU8 force, DtU8 targetForce)
- Public Member Functions inherited from makVrv::DtSharedSettings
 DtSharedSettings (const DtSharedSettingsManager &manager)
 CTOR.
virtual ~DtSharedSettings ()
 DTOR.
boost::shared_mutex & mutex ()
 Get the mutex for the settings object.
SafetyKey safeToEmitSignals ()
 Create a safety key for the function, see above example.
void setCurrentWriteLock (boost::unique_lock< boost::shared_mutex > *currentWriteLock)
 No need to call, set by the DtWriteSettingLock object.
virtual const DtSettingsBackupsettingsBackup () const
 Accessor for the settings backup (const).
virtual DtSettingsBackupsettingsBackup ()
 Accessor for the settings backup.
virtual void backup ()
 Called to back up the settings.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static std::string className ()

Protected Member Functions

virtual const ForceInfoforceInformation (DtForceType force) const
virtual ForceInfoforceInformation (DtForceType force)

Protected Attributes

ForceInfo myNullForce
std::map< DtForceType, ForceInfomyForces

Detailed Description

This class will maintain force information used in visualizers that need force dependent data (such as force color)

Constructor & Destructor Documentation

makVrv::DtForceManager::DtForceManager ( DtSharedSettingsManager manager)

CTOR.

virtual makVrv::DtForceManager::~DtForceManager ( )
virtual

DTOR.

Member Function Documentation

static std::string makVrv::DtForceManager::className ( )
static
virtual void makVrv::DtForceManager::addForce ( DtForceType  force,
const std::string &  forceName,
const RGBAColor forceColor,
const RGBAColor forcePrimaryColor,
bool  includeInDialogs = true 
)
virtual

Adds a new force DtForceType to the manager.

Replaces force if currently exists.

virtual DtForceType makVrv::DtForceManager::nextAvailableId ( )
virtual

Get first available Id (starting at 1)

virtual void makVrv::DtForceManager::removeForce ( DtForceType  )
virtual

Removes force from system.

virtual int makVrv::DtForceManager::numForces ( ) const
virtual

Number of forces in the force list.

virtual DtForceType makVrv::DtForceManager::forceAt ( int  iIndex) const
virtual

Force Type for a specific index.

virtual RGBAColor makVrv::DtForceManager::colorForForce ( DtForceType  force,
bool  usePrimaryColors = false 
) const
virtual

Color for a specified force.

virtual std::string makVrv::DtForceManager::nameForForce ( DtForceType  force) const
virtual

Name for a specified force.

virtual DtForceType makVrv::DtForceManager::forceFromName ( const std::string &  name) const
virtual

Force Type for a specific force name.

virtual bool makVrv::DtForceManager::includeInDialogs ( DtForceType  force) const
virtual

Whether the force is included in VRF dialogs.

virtual void makVrv::DtForceManager::setHostility ( DtU8  force,
DtU8  targetForce,
bool  hostile 
)
virtual
virtual bool makVrv::DtForceManager::hostile ( DtU8  force,
DtU8  targetForce 
)
virtual
virtual void makVrv::DtForceManager::clearForces ( )
virtual

Clear hash list of forces.

virtual const ForceInfo& makVrv::DtForceManager::forceInformation ( DtForceType  force) const
protectedvirtual
virtual ForceInfo& makVrv::DtForceManager::forceInformation ( DtForceType  force)
protectedvirtual

Member Data Documentation

ForceInfo makVrv::DtForceManager::myNullForce
protected
std::map<DtForceType, ForceInfo> makVrv::DtForceManager::myForces
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)