Pyrogenesis  trunk
Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CObjectEntry Class Reference

#include <ObjectEntry.h>

Collaboration diagram for CObjectEntry:
Collaboration graph
[legend]

Public Member Functions

 CObjectEntry (const std::shared_ptr< CObjectBase > &base, CSimulation2 &simulation)
 
 ~CObjectEntry ()
 
bool BuildVariation (const std::vector< const std::set< CStr > *> &completeSelections, const std::vector< u8 > &variationKey, CObjectManager &objectManager)
 
CSkeletonAnimGetRandomAnimation (const CStr &animationName, const CStr &ID="") const
 Returns a randomly-chosen animation matching the given ID, or animationName if ID is empty. More...
 
std::vector< CSkeletonAnim * > GetAnimations (const CStr &animationName, const CStr &ID="") const
 Returns all the animations matching the given ID or animationName if ID is empty. More...
 

Public Attributes

std::shared_ptr< CObjectBasem_Base
 
std::vector< CObjectBase::Sampm_Samplers
 
VfsPath m_ModelName
 
CColor m_Color
 
std::wstring m_ProjectileModelName
 
CModelAbstractm_Model
 

Private Types

using SkeletonAnimMap = std::multimap< CStr, std::unique_ptr< CSkeletonAnim > >
 

Private Member Functions

 NONCOPYABLE (CObjectEntry)
 

Private Attributes

CSimulation2m_Simulation
 
SkeletonAnimMap m_Animations
 

Member Typedef Documentation

◆ SkeletonAnimMap

using CObjectEntry::SkeletonAnimMap = std::multimap<CStr, std::unique_ptr<CSkeletonAnim> >
private

Constructor & Destructor Documentation

◆ CObjectEntry()

CObjectEntry::CObjectEntry ( const std::shared_ptr< CObjectBase > &  base,
CSimulation2 simulation 
)

◆ ~CObjectEntry()

CObjectEntry::~CObjectEntry ( )

Member Function Documentation

◆ BuildVariation()

bool CObjectEntry::BuildVariation ( const std::vector< const std::set< CStr > *> &  completeSelections,
const std::vector< u8 > &  variationKey,
CObjectManager objectManager 
)

◆ GetAnimations()

std::vector< CSkeletonAnim * > CObjectEntry::GetAnimations ( const CStr &  animationName,
const CStr &  ID = "" 
) const

Returns all the animations matching the given ID or animationName if ID is empty.

If none found returns Idle animations (which are always added)

◆ GetRandomAnimation()

CSkeletonAnim * CObjectEntry::GetRandomAnimation ( const CStr &  animationName,
const CStr &  ID = "" 
) const

Returns a randomly-chosen animation matching the given ID, or animationName if ID is empty.

The chosen animation is picked randomly from the GetAnimations list with the frequencies as weights (if there are any defined). This method should always return an animation

◆ NONCOPYABLE()

CObjectEntry::NONCOPYABLE ( CObjectEntry  )
private

Member Data Documentation

◆ m_Animations

SkeletonAnimMap CObjectEntry::m_Animations
private

◆ m_Base

std::shared_ptr<CObjectBase> CObjectEntry::m_Base

◆ m_Color

CColor CObjectEntry::m_Color

◆ m_Model

CModelAbstract* CObjectEntry::m_Model

◆ m_ModelName

VfsPath CObjectEntry::m_ModelName

◆ m_ProjectileModelName

std::wstring CObjectEntry::m_ProjectileModelName

◆ m_Samplers

std::vector<CObjectBase::Samp> CObjectEntry::m_Samplers

◆ m_Simulation

CSimulation2& CObjectEntry::m_Simulation
private

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