Pyrogenesis trunk
|
Maintains the tree of possible objects from a specific actor definition at a given quality level. More...
#include <ObjectBase.h>
Classes | |
struct | Anim |
struct | Decal |
struct | Prop |
struct | Samp |
struct | Variant |
struct | Variation |
Public Member Functions | |
CObjectBase (CObjectManager &objectManager, CActorDef &actorDef, u8 QualityLevel) | |
std::set< CStr > | CalculateRandomRemainingSelections (uint32_t seed, const std::vector< std::set< CStr > > &initialSelections) const |
std::vector< u8 > | CalculateVariationKey (const std::vector< const std::set< CStr > * > &selections) const |
const Variation | BuildVariation (const std::vector< u8 > &variationKey) const |
std::vector< std::vector< CStr > > | GetVariantGroups () const |
const CStr & | GetIdentifier () const |
bool | UsesFile (const VfsPath &pathname) const |
Returns whether this object (including any possible props) uses the given file. More... | |
Public Attributes | |
struct { | |
bool m_CastShadows | |
bool m_FloatOnWater | |
} | m_Properties |
VfsPath | m_Material |
u8 | m_QualityLevel |
Private Types | |
using | rng_t = boost::mt19937 |
Private Member Functions | |
NONCOPYABLE (CObjectBase) | |
std::unique_ptr< CObjectBase > | CopyWithQuality (u8 newQualityLevel) const |
Acts as an explicit copy constructor, for a new quality level. More... | |
std::set< CStr > | CalculateRandomRemainingSelections (rng_t &rng, const std::vector< std::set< CStr > > &initialSelections) const |
void | GetQualitySplits (std::vector< u8 > &splits) const |
Get all quality levels at which this object changes (includes props). More... | |
bool | Load (const CXeromyces &XeroFile, const XMBElement &base) |
bool | LoadVariant (const CXeromyces &XeroFile, const XMBElement &variant, Variant ¤tVariant) |
Private Attributes | |
friend | CActorDef |
CActorDef & | m_ActorDef |
CStr | m_Identifier |
std::vector< std::vector< Variant > > | m_VariantGroups |
CObjectManager & | m_ObjectManager |
Maintains the tree of possible objects from a specific actor definition at a given quality level.
An Object Base is made of:
|
private |
CObjectBase::CObjectBase | ( | CObjectManager & | objectManager, |
CActorDef & | actorDef, | ||
u8 | QualityLevel | ||
) |
const CObjectBase::Variation CObjectBase::BuildVariation | ( | const std::vector< u8 > & | variationKey | ) | const |
|
private |
std::set< CStr > CObjectBase::CalculateRandomRemainingSelections | ( | uint32_t | seed, |
const std::vector< std::set< CStr > > & | initialSelections | ||
) | const |
std::vector< u8 > CObjectBase::CalculateVariationKey | ( | const std::vector< const std::set< CStr > * > & | selections | ) | const |
|
private |
Acts as an explicit copy constructor, for a new quality level.
Note that this does not reload the actor, so this setting will only change props.
const CStr & CObjectBase::GetIdentifier | ( | ) | const |
|
private |
Get all quality levels at which this object changes (includes props).
Intended to be called by CActorFef.
splits | - a sorted vector of unique quality splits. |
std::vector< std::vector< CStr > > CObjectBase::GetVariantGroups | ( | ) | const |
|
private |
|
private |
|
private |
bool CObjectBase::UsesFile | ( | const VfsPath & | pathname | ) | const |
Returns whether this object (including any possible props) uses the given file.
(This is used for hotloading.)
|
private |
|
private |
bool CObjectBase::m_CastShadows |
bool CObjectBase::m_FloatOnWater |
|
private |
VfsPath CObjectBase::m_Material |
|
private |
struct { ... } CObjectBase::m_Properties |
u8 CObjectBase::m_QualityLevel |
|
private |