Pyrogenesis
13997
|
#include <ObjectBase.h>
Classes | |
struct | Anim |
struct | Decal |
struct | Prop |
struct | Samp |
struct | Variant |
struct | Variation |
Public Member Functions | |
CObjectBase (CObjectManager &objectManager) | |
std::vector< u8 > | CalculateVariationKey (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 |
CObjectManager & | m_ObjectManager |
boost::unordered_set< VfsPath > | m_UsedFiles |
Definition at line 34 of file ObjectBase.h.
|
private |
Definition at line 180 of file ObjectBase.h.
CObjectBase::CObjectBase | ( | CObjectManager & | objectManager | ) |
Definition at line 34 of file ObjectBase.cpp.
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.
|
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.
|
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.
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.
|
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.
|
private |
Definition at line 187 of file ObjectBase.h.
|
private |
Definition at line 184 of file ObjectBase.h.