Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CObjectBase Class Reference

#include <ObjectBase.h>

Classes

struct  Anim
 
struct  Decal
 
struct  Prop
 
struct  Samp
 
struct  Variant
 
struct  Variation
 

Public Member Functions

 CObjectBase (CObjectManager &objectManager)
 
std::vector< u8CalculateVariationKey (const std::vector< std::set< CStr > > &selections)
 
const Variation BuildVariation (const std::vector< u8 > &variationKey)
 
std::set< CStr > CalculateRandomVariation (uint32_t seed, const std::set< CStr > &initialSelections)
 
std::set< CStr > CalculateRandomRemainingSelections (uint32_t seed, const std::vector< std::set< CStr > > &initialSelections)
 
std::vector< std::vector< CStr > > GetVariantGroups () const
 
bool Load (const VfsPath &pathname)
 Initialise this object by loading from the given file. More...
 
bool Reload ()
 Reload this object from the file that it was previously loaded from. More...
 
bool UsesFile (const VfsPath &pathname)
 Returns whether this object (including any possible props) uses the given file. More...
 

Public Attributes

VfsPath m_Pathname
 
CStrW m_ShortName
 
struct {
   bool   m_CastShadows
 
   bool   m_FloatOnWater
 
m_Properties
 
VfsPath m_Material
 

Private Types

typedef boost::mt19937 rng_t
 

Private Member Functions

 NONCOPYABLE (CObjectBase)
 
std::set< CStr > CalculateRandomRemainingSelections (rng_t &rng, const std::vector< std::set< CStr > > &initialSelections)
 

Private Attributes

std::vector< std::vector
< Variant > > 
m_VariantGroups
 
CObjectManagerm_ObjectManager
 
boost::unordered_set< VfsPathm_UsedFiles
 

Detailed Description

Definition at line 34 of file ObjectBase.h.

Member Typedef Documentation

typedef boost::mt19937 CObjectBase::rng_t
private

Definition at line 180 of file ObjectBase.h.

Constructor & Destructor Documentation

CObjectBase::CObjectBase ( CObjectManager objectManager)

Definition at line 34 of file ObjectBase.cpp.

Member Function Documentation

const CObjectBase::Variation CObjectBase::BuildVariation ( const std::vector< u8 > &  variationKey)

Definition at line 393 of file ObjectBase.cpp.

std::set< CStr > CObjectBase::CalculateRandomRemainingSelections ( uint32_t  seed,
const std::vector< std::set< CStr > > &  initialSelections 
)

Definition at line 478 of file ObjectBase.cpp.

std::set< CStr > CObjectBase::CalculateRandomRemainingSelections ( rng_t rng,
const std::vector< std::set< CStr > > &  initialSelections 
)
private

Definition at line 485 of file ObjectBase.cpp.

std::set< CStr > CObjectBase::CalculateRandomVariation ( uint32_t  seed,
const std::set< CStr > &  initialSelections 
)

Definition at line 467 of file ObjectBase.cpp.

std::vector< u8 > CObjectBase::CalculateVariationKey ( const std::vector< std::set< CStr > > &  selections)

Definition at line 301 of file ObjectBase.cpp.

std::vector< std::vector< CStr > > CObjectBase::GetVariantGroups ( ) const

Definition at line 615 of file ObjectBase.cpp.

bool CObjectBase::Load ( const VfsPath pathname)

Initialise this object by loading from the given file.

Returns false on error.

Definition at line 41 of file ObjectBase.cpp.

CObjectBase::NONCOPYABLE ( CObjectBase  )
private
bool CObjectBase::Reload ( )

Reload this object from the file that it was previously loaded from.

Returns false on error.

Definition at line 291 of file ObjectBase.cpp.

bool CObjectBase::UsesFile ( const VfsPath pathname)

Returns whether this object (including any possible props) uses the given file.

(This is used for hotloading.)

Definition at line 296 of file ObjectBase.cpp.

Member Data Documentation

bool CObjectBase::m_CastShadows

Definition at line 168 of file ObjectBase.h.

bool CObjectBase::m_FloatOnWater

Definition at line 170 of file ObjectBase.h.

VfsPath CObjectBase::m_Material

Definition at line 174 of file ObjectBase.h.

CObjectManager& CObjectBase::m_ObjectManager
private

Definition at line 185 of file ObjectBase.h.

VfsPath CObjectBase::m_Pathname

Definition at line 161 of file ObjectBase.h.

struct { ... } CObjectBase::m_Properties
CStrW CObjectBase::m_ShortName

Definition at line 164 of file ObjectBase.h.

boost::unordered_set<VfsPath> CObjectBase::m_UsedFiles
private

Definition at line 187 of file ObjectBase.h.

std::vector< std::vector<Variant> > CObjectBase::m_VariantGroups
private

Definition at line 184 of file ObjectBase.h.


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