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

The DtEntityWheelManager class is responsible for collecting art part ids related to wheels and then rotating those wheels based on the velocity of the entity The DtEntityWheelManager collects information in addModel which is then passed to DtEntityWheelUpdater. More...

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

Public Member Functions

 DtEntityWheelManager (DtDe &de)
 CTOR. More...
 
virtual ~DtEntityWheelManager ()
 DTOR. More...
 
virtual void addModel (DtOsgArticulatedModel &model, DtUniqueID uniqueId, DtUniqueID elementId)
 Add a model which will have its wheel rotating. More...
 
virtual void removeModel (DtOsgArticulatedModel &model)
 Remove the art part ids associated with this model from the DtEntityWheelManager. More...
 
virtual int numModels () const
 How many models are in the manager. More...
 
virtual int wheelSetNum (const int sisoValue) const
 Wheels are identified based on SISO-REF-010-2019 From https://www.sisostds.org/ProductsPublications/ReferenceDocuments.aspx This function will return first (1), second (2), ... More...
 
virtual WheelInfo::WheelSide wheelSide (const int sisoValue) const
 This will identify whether a wheel art part is left or right Does not check value to see if it is a wheel. More...
 
virtual bool hasWheels (const DtOsgArticulatedModel &model) const
 Are there any wheel part ids on this model. More...
 
virtual std::vector< intlistWheelParts (const DtOsgArticulatedModel &model)
 Get a list of the wheel part ids on this model. More...
 
virtual std::string toString (const int sisoValue) const
 String version of SISO value ex. More...
 
virtual bool isWheel (const int sisoValue) const
 Is this part ID a wheel ID? More...
 
virtual double computeRadius (const int sisoValue, const DtArticulatedModelParser::PartMap &partIdToNode)
 Look at the node for this part and computer a bounding box, return the (zmax-zmin)/2 as radius. More...
 
virtual double defaultWheelRadius () const
 Default wheel radius. More...
 
virtual void setDefaultWheelRadius (double wheelRadius)
 Set the default wheel radius (if we can't compute the wheel radius for some reason) More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static DtEntityWheelManagerinstance (DtDe &de)
 Get/create the DtEntityWheelManager instance. More...
 
static void registerInstance (DtDe &de, DtEntityWheelManager *manager)
 
static const std::string & theClassName ()
 Get the name used to register this class. More...
 

Protected Member Functions

virtual void addWheels (DtOsgArticulatedModel &model)
 internal. Add the wheel art parts, More...
 
virtual void addWheelsFlipBookAnimations (DtOsgArticulatedModel &model)
 internal. Add the 'wheels' that are flip book animations. More...
 
virtual void addWheelsScrollableTextures (DtOsgArticulatedModel &model)
 internal. Add the 'wheels' that are scrollable textures More...
 

Protected Attributes

DtDemyDe
 
double myDefaultWheelRadius
 
std::set< intmyWheelPartIds
 
osg::ComputeBoundsVisitor myComputerBoundsVisitor
 
DtEntityWheelUpdatermyWheelUpdater
 
std::unordered_map
< DtOsgArticulatedModel
*, DtEntityWheelData
myEntityToWheelDataMap
 
std::unordered_map
< DtOsgArticulatedModel
*, DtEntityWheelDataCommon
myEntityWheelFlipBookMap
 
std::unordered_map
< DtOsgArticulatedModel
*, DtEntityWheelDataCommon
myEntityWheelScrollableTextureMap
 

Private Member Functions

 DtEntityWheelManager ()
 Default CTOR (unimplemented) More...
 
 DtEntityWheelManager (const DtEntityWheelManager &orig)
 brief Copy CTOR (unimplemented) More...
 
DtEntityWheelManageroperator= (const DtEntityWheelManager)
 brief Assignment operator (unimplemented) More...
 

Detailed Description

The DtEntityWheelManager class is responsible for collecting art part ids related to wheels and then rotating those wheels based on the velocity of the entity The DtEntityWheelManager collects information in addModel which is then passed to DtEntityWheelUpdater.

Constructor & Destructor Documentation

makVrv::DtEntityWheelManager::DtEntityWheelManager ( DtDe de)

CTOR.

virtual makVrv::DtEntityWheelManager::~DtEntityWheelManager ( )
virtual

DTOR.

makVrv::DtEntityWheelManager::DtEntityWheelManager ( )
private

Default CTOR (unimplemented)

makVrv::DtEntityWheelManager::DtEntityWheelManager ( const DtEntityWheelManager orig)
private

brief Copy CTOR (unimplemented)

Member Function Documentation

static DtEntityWheelManager& makVrv::DtEntityWheelManager::instance ( DtDe de)
static

Get/create the DtEntityWheelManager instance.

use de.registerInstance(DtEntityWheelManager::theClassName(),) to override the class instance

static void makVrv::DtEntityWheelManager::registerInstance ( DtDe de,
DtEntityWheelManager manager 
)
static
static const std::string& makVrv::DtEntityWheelManager::theClassName ( )
static

Get the name used to register this class.

virtual void makVrv::DtEntityWheelManager::addModel ( DtOsgArticulatedModel model,
DtUniqueID  uniqueId,
DtUniqueID  elementId 
)
virtual

Add a model which will have its wheel rotating.

virtual void makVrv::DtEntityWheelManager::removeModel ( DtOsgArticulatedModel model)
virtual

Remove the art part ids associated with this model from the DtEntityWheelManager.

virtual int makVrv::DtEntityWheelManager::numModels ( ) const
virtual

How many models are in the manager.

virtual int makVrv::DtEntityWheelManager::wheelSetNum ( const int  sisoValue) const
virtual

Wheels are identified based on SISO-REF-010-2019 From https://www.sisostds.org/ProductsPublications/ReferenceDocuments.aspx This function will return first (1), second (2), ...

10 based on the art part number Does not check value to see if it is a wheel

virtual WheelInfo::WheelSide makVrv::DtEntityWheelManager::wheelSide ( const int  sisoValue) const
virtual

This will identify whether a wheel art part is left or right Does not check value to see if it is a wheel.

virtual bool makVrv::DtEntityWheelManager::hasWheels ( const DtOsgArticulatedModel model) const
virtual

Are there any wheel part ids on this model.

virtual std::vector<int> makVrv::DtEntityWheelManager::listWheelParts ( const DtOsgArticulatedModel model)
virtual

Get a list of the wheel part ids on this model.

virtual std::string makVrv::DtEntityWheelManager::toString ( const int  sisoValue) const
virtual

String version of SISO value ex.

9120 -> "1st Left"

virtual bool makVrv::DtEntityWheelManager::isWheel ( const int  sisoValue) const
virtual

Is this part ID a wheel ID?

virtual double makVrv::DtEntityWheelManager::computeRadius ( const int  sisoValue,
const DtArticulatedModelParser::PartMap partIdToNode 
)
virtual

Look at the node for this part and computer a bounding box, return the (zmax-zmin)/2 as radius.

virtual double makVrv::DtEntityWheelManager::defaultWheelRadius ( ) const
virtual

Default wheel radius.

virtual void makVrv::DtEntityWheelManager::setDefaultWheelRadius ( double  wheelRadius)
virtual

Set the default wheel radius (if we can't compute the wheel radius for some reason)

virtual void makVrv::DtEntityWheelManager::addWheels ( DtOsgArticulatedModel model)
protectedvirtual

internal. Add the wheel art parts,

virtual void makVrv::DtEntityWheelManager::addWheelsFlipBookAnimations ( DtOsgArticulatedModel model)
protectedvirtual

internal. Add the 'wheels' that are flip book animations.

virtual void makVrv::DtEntityWheelManager::addWheelsScrollableTextures ( DtOsgArticulatedModel model)
protectedvirtual

internal. Add the 'wheels' that are scrollable textures

DtEntityWheelManager& makVrv::DtEntityWheelManager::operator= ( const DtEntityWheelManager  )
private

brief Assignment operator (unimplemented)

Member Data Documentation

DtDe& makVrv::DtEntityWheelManager::myDe
protected
double makVrv::DtEntityWheelManager::myDefaultWheelRadius
protected
std::set<int> makVrv::DtEntityWheelManager::myWheelPartIds
protected
osg::ComputeBoundsVisitor makVrv::DtEntityWheelManager::myComputerBoundsVisitor
protected
DtEntityWheelUpdater* makVrv::DtEntityWheelManager::myWheelUpdater
protected
std::unordered_map<DtOsgArticulatedModel*, DtEntityWheelData> makVrv::DtEntityWheelManager::myEntityToWheelDataMap
protected
std::unordered_map<DtOsgArticulatedModel*, DtEntityWheelDataCommon> makVrv::DtEntityWheelManager::myEntityWheelFlipBookMap
protected
std::unordered_map<DtOsgArticulatedModel*, DtEntityWheelDataCommon> makVrv::DtEntityWheelManager::myEntityWheelScrollableTextureMap
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)