VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtProp Class Reference

Facade object for a scene prop.

Public Member Functions

 DtProp (DtDe &de, DtAgentManagerInterface &agentManagerInterface, const std::string &propType, const std::string &name)
 
virtual ~DtProp ()
 
void destroy ()
 
bool operator== (const DtProp &prop) const
 
bool getRecord (makArchives::DtPropRecord &recOut) const
 
void setFromRecord (const makArchives::DtPropRecord &rec)
 
void setColorFilter (float r, float g, float b, float a)
 
void setVisible (bool isVisible)
 
void setScribed (bool isSelected)
 
bool scribed () const
 
DtUniqueID uniqueID () const
 
void getPosition (double &x, double &y, double &z) const
 
void setPosition (double x, double y, double z)
 
void getOrientation (double &x, double &y, double &z, double &w) const
 
void setOrientation (double x, double y, double z, double w)
 
void setOrientation (double psi, double theta, double phi)
 
const std::string & propType () const
 
void setPropType (const std::string &proptype)
 
const std::string & modelDefinition () const
 
void setModelDefinition (const std::string &modelDefinition)
 
void setExternalNodeLocation (const std::string &searchExpression, unsigned int index)
 
const std::string & searchExp () const
 
unsigned int searchIndex () const
 
void setTerrainTreeSettings (DtTerrainTreeSettings *terrainTreeSettings)
 
const DtTerrainTreeSettingsterrainTreeSettings (void) const
 
const std::string & name () const
 
void setName (const std::string &name)
 
bool isVisible () const
 
const DtModelAgent * model () const
 
DtModelAgent * model ()
 
bool operator!= (const DtProp &prop) const
 
float red () const
 
float green () const
 
float blue () const
 
float alpha () const
 
const DtSceneObjectAgent * sceneObject () const
 
DtSceneObjectAgent * sceneObject ()
 

Protected Member Functions

virtual void selectionChanged (const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected)
 

Protected Attributes

DtDemyDe
 
std::string myPropType
 
DtSceneObjectAgent * mySceneObject
 
DtModelAgent * myObjectModel
 
DtScribeBoxModelAgent * myScribeBoxModel
 
std::string myModelDefinition
 
std::string mySearchExp
 
unsigned int mySearchIndex
 
std::string myName
 
bool myIsVisible
 
float myAlpha
 
float myR
 
float myG
 
float myB
 
double myPosX
 
double myPosY
 
double myPosZ
 
double myOrientationX
 
double myOrientationY
 
double myOrientationZ
 
double myOrientationW
 
bool myIsTreeFlag
 
DtTerrainTreeSettingsmyTerrainTreeSettings
 
DtAgentManagerInterfacemyAgentManagerInterface
 

Private Member Functions

 DtProp (const DtProp &copy)
 
DtPropoperator= (const DtProp &copy)
 

Friends

class DtTerrainLayer
 

Constructor & Destructor Documentation

makVrv::DtProp::DtProp ( DtDe de,
DtAgentManagerInterface agentManagerInterface,
const std::string &  propType,
const std::string &  name 
)

CTOR Construct a prop from a model definition.

makVrv::DtProp::DtProp ( const DtProp copy)
private

Copy CTOR.

virtual makVrv::DtProp::~DtProp ( )
virtual

DTOR.

Member Function Documentation

DtProp& makVrv::DtProp::operator= ( const DtProp copy)
private

Assignment operator.

void makVrv::DtProp::destroy ( )

Delete the contents of the prop.

bool makVrv::DtProp::operator== ( const DtProp prop) const

Returns true IFF argument has same type and name.

bool makVrv::DtProp::getRecord ( makArchives::DtPropRecord recOut) const

Returns true if recOut was filled with all the information about this prop.

void makVrv::DtProp::setFromRecord ( const makArchives::DtPropRecord rec)

Fill out this prop from the record.

void makVrv::DtProp::setColorFilter ( float  r,
float  g,
float  b,
float  a 
)

Set the multipliers for the prop's color.

void makVrv::DtProp::setVisible ( bool  isVisible)

Set the prop visible or not.

void makVrv::DtProp::setScribed ( bool  isSelected)

Set the prop has a scribed bounding box.

bool makVrv::DtProp::scribed ( ) const

Get if the prop has a scribed bounding box.

DtUniqueID makVrv::DtProp::uniqueID ( ) const

Accessors.

Get a unique id.

void makVrv::DtProp::getPosition ( double x,
double y,
double z 
) const

Get the prop position.

void makVrv::DtProp::setPosition ( double  x,
double  y,
double  z 
)

Set the prop position in scene coordinates.

void makVrv::DtProp::getOrientation ( double x,
double y,
double z,
double w 
) const

Get the prop orientation.

void makVrv::DtProp::setOrientation ( double  x,
double  y,
double  z,
double  w 
)

Set the prop orientation.

void makVrv::DtProp::setOrientation ( double  psi,
double  theta,
double  phi 
)

Set the prop orientation in Euler angles.

const std::string& makVrv::DtProp::propType ( ) const

Get type of prop (e.g. building, tree, ...)

void makVrv::DtProp::setPropType ( const std::string &  proptype)

Change the prop type of this prop.

const std::string& makVrv::DtProp::modelDefinition ( ) const

Get the model definition.

void makVrv::DtProp::setModelDefinition ( const std::string &  modelDefinition)

Set the model definition of a prop.

void makVrv::DtProp::setExternalNodeLocation ( const std::string &  searchExpression,
unsigned int  index 
)

Set the location of the node moved to this prop from a terrain.

const std::string& makVrv::DtProp::searchExp ( ) const

Get the expression used to find the prop.

unsigned int makVrv::DtProp::searchIndex ( ) const

Get the index used to find the prop.

void makVrv::DtProp::setTerrainTreeSettings ( DtTerrainTreeSettings terrainTreeSettings)

Set tree settings (for when the prop is a tree)

const DtTerrainTreeSettings* makVrv::DtProp::terrainTreeSettings ( void  ) const

Get the tree settings (for when the prop is a tree)

float makVrv::DtProp::red ( ) const

Get the current color filter components.

float makVrv::DtProp::green ( ) const

Get the current color filter components.

float makVrv::DtProp::blue ( ) const

Get the current color filter components.

float makVrv::DtProp::alpha ( ) const

Get the current color filter components.

const std::string& makVrv::DtProp::name ( ) const

Get the prop's name.

void makVrv::DtProp::setName ( const std::string &  name)

Set the props name.

bool makVrv::DtProp::isVisible ( ) const
const DtSceneObjectAgent* makVrv::DtProp::sceneObject ( ) const

Get the prop's distributed scene object driver.

DtSceneObjectAgent* makVrv::DtProp::sceneObject ( )

Get the prop's distributed scene object driver.

const DtModelAgent* makVrv::DtProp::model ( ) const

Get the prop's distributed model driver.

DtModelAgent* makVrv::DtProp::model ( )

Get the prop's distributed model driver.

bool makVrv::DtProp::operator!= ( const DtProp prop) const

!= operator for props

virtual void makVrv::DtProp::selectionChanged ( const DtSelectionManager::IdSet selected,
const DtSelectionManager::IdSet deselected 
)
protectedvirtual

Friends And Related Function Documentation

friend class DtTerrainLayer
friend

Befriend the DtTerrainLayer to allow it to manage connection of the selectionChanged slot to the selectionChanged signal of the DtTerrainLayer.

Member Data Documentation

DtDe& makVrv::DtProp::myDe
protected
std::string makVrv::DtProp::myPropType
protected
DtSceneObjectAgent* makVrv::DtProp::mySceneObject
protected
DtModelAgent* makVrv::DtProp::myObjectModel
protected
DtScribeBoxModelAgent* makVrv::DtProp::myScribeBoxModel
protected
std::string makVrv::DtProp::myModelDefinition
protected

The model definition.

std::string makVrv::DtProp::mySearchExp
protected

The expression that was used to find the prop.

unsigned int makVrv::DtProp::mySearchIndex
protected
std::string makVrv::DtProp::myName
protected

The prop's unique name.

bool makVrv::DtProp::myIsVisible
protected

Whether the prop is visible.

float makVrv::DtProp::myAlpha
protected

Color components.

float makVrv::DtProp::myR
protected
float makVrv::DtProp::myG
protected
float makVrv::DtProp::myB
protected
double makVrv::DtProp::myPosX
protected

Position set by DtPropRecord on load. Need because trees require a position when they are added. The scene object doesn't exist yet when the prop is created from the record. Therefore store the position that was loaded from the DtPropRecord.

double makVrv::DtProp::myPosY
protected
double makVrv::DtProp::myPosZ
protected
double makVrv::DtProp::myOrientationX
protected
double makVrv::DtProp::myOrientationY
protected
double makVrv::DtProp::myOrientationZ
protected
double makVrv::DtProp::myOrientationW
protected
bool makVrv::DtProp::myIsTreeFlag
protected
DtTerrainTreeSettings* makVrv::DtProp::myTerrainTreeSettings
protected
DtAgentManagerInterface& makVrv::DtProp::myAgentManagerInterface
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)