esp::assets::AbstractPhysicsAttributes class

base attributes object holding attributes shared by all PhysicsObjectAttributes and PhysicsSceneAttributes objects; Should be treated as if is abstract - should never be instanced directly

Base classes

class AbstractAttributes
Base class for all implemented attributes.

Derived classes

class PhysicsObjectAttributes
Specific Attributes instance which is constructed with a base set of physics object required attributes.
class PhysicsSceneAttributes
attributes for a single physical scene

Public static variables

static const std::map<std::string, esp::assets::AssetType> AssetTypeNamesMap
Constant static map to provide mappings from string tags to AssetType values. This will be used to map values set in json for mesh type to AssetTypes. Keys must be lowercase.

Constructors, destructors, conversion operators

AbstractPhysicsAttributes(const std::string& classKey, const std::string& handle)
~AbstractPhysicsAttributes() defaulted virtual

Public functions

void setScale(const Magnum::Vector3& scale)
auto getScale() const -> Magnum::Vector3
void setMargin(double margin)
collision shape inflation margin
auto getMargin() const -> double
void setOrientUp(const Magnum::Vector3& orientUp)
set default up orientation for object/scene mesh
auto getOrientUp() const -> Magnum::Vector3
get default up orientation for object/scene mesh
void setOrientFront(const Magnum::Vector3& orientFront)
set default forwardd orientation for object/scene mesh
auto getOrientFront() const -> Magnum::Vector3
get default forwardd orientation for object/scene mesh
void setUnitsToMeters(double unitsToMeters)
auto getUnitsToMeters() const -> double
void setFrictionCoefficient(double frictionCoefficient)
auto getFrictionCoefficient() const -> double
void setRestitutionCoefficient(double restitutionCoefficient)
auto getRestitutionCoefficient() const -> double
void setRenderAssetType(int renderAssetType)
auto getRenderAssetType() -> int
void setRenderAssetHandle(const std::string& renderAssetHandle)
auto getRenderAssetHandle() const -> std::string
void setRenderAssetIsPrimitive(bool renderAssetIsPrimitive)
Sets whether this object uses file-based mesh render object or primitive render shapes.
void setCollisionAssetType(int collisionAssetType)
auto getCollisionAssetType() -> int
auto getRenderAssetIsPrimitive() const -> bool
void setCollisionAssetHandle(const std::string& collisionAssetHandle)
auto getCollisionAssetHandle() const -> std::string
void setCollisionAssetIsPrimitive(bool collisionAssetIsPrimitive)
Sets whether this object uses file-based mesh collision object or primitive(implicit) collision shapes.
auto getCollisionAssetIsPrimitive() const -> bool
void setUseMeshCollision(bool useMeshCollision)
whether this object uses mesh collision or primitive(implicit) collision calculation.
auto getUseMeshCollision() const -> bool
void setRequiresLighting(bool requiresLighting)
auto getRequiresLighting() const -> bool
auto getIsDirty() const -> bool
void setIsClean()

Protected functions

void setIsDirty()
auto getBoolDispStr(bool val) const -> std::string

Function documentation

void esp::assets::AbstractPhysicsAttributes::setRenderAssetIsPrimitive(bool renderAssetIsPrimitive)

Sets whether this object uses file-based mesh render object or primitive render shapes.

Parameters
renderAssetIsPrimitive whether this object's render asset is a primitive or not

void esp::assets::AbstractPhysicsAttributes::setCollisionAssetIsPrimitive(bool collisionAssetIsPrimitive)

Sets whether this object uses file-based mesh collision object or primitive(implicit) collision shapes.

Parameters
collisionAssetIsPrimitive whether this object's collision asset is a primitive (implicitly calculated) or a mesh