class
#include <esp/gfx/replay/Player.h>
AbstractPlayerImplementation Backend implementation for Player.
Intended to be used via subclassing and implementing at least all pure virtual functions, optionally also setNodeSematicId() and changeLightSetup() which are no-op by default.
Derived classes
- class AbstractSceneGraphPlayerImplementation
- Classic scene graph backend implementation for Player.
- class esp::sim::BatchPlayerImplementation
Constructors, destructors, conversion operators
- AbstractPlayerImplementation() defaulted explicit
- ~AbstractPlayerImplementation() defaulted virtual
- AbstractPlayerImplementation(const AbstractPlayerImplementation&) deleted
- AbstractPlayerImplementation(AbstractPlayerImplementation&&) defaulted noexcept
Public functions
- auto operator=(const AbstractPlayerImplementation&) -> AbstractPlayerImplementation& deleted
- auto operator=(AbstractPlayerImplementation&&) -> AbstractPlayerImplementation& defaulted noexcept
Private functions
-
auto loadAndCreateRenderAssetInstance(const esp::
assets:: AssetInfo& assetInfo, const esp:: assets:: RenderAssetInstanceCreationInfo& creation) -> NodeHandle pure virtual - Load and create a render asset instance.
- void deleteAssetInstance(NodeHandle node) pure virtual
- Delete asset instance.
-
void deleteAssetInstances(const std::
unordered_map<RenderAssetInstanceKey, NodeHandle>& instances) pure virtual - Clear all asset instances.
-
void setNodeTransform(NodeHandle node,
const Magnum::
Vector3& translation, const Magnum:: Quaternion& rotation) pure virtual - Set node transform from translation and rotation components.
-
void setNodeTransform(NodeHandle node,
const Mn::
Matrix4& transform) pure virtual - Set node transform.
-
auto hackGetNodeTransform(NodeHandle node) const -> Mn::
Matrix4 pure virtual - Get node transform.
- void setNodeMetadata(NodeHandle node, const InstanceMetadata& metadata) virtual
- Set node metadata.
- void changeLightSetup(const LightSetup& lights) virtual
- Change light setup.
-
void createRigInstance(int rigId,
const std::
vector<std:: string>& boneNames) virtual - Create and register a rig instance along with its bone IDs and names.
- void deleteRigInstance(int rigId) virtual
- Delete and unregister a rig instance.
-
void setRigPose(int rigId,
const std::
vector<gfx:: replay:: Transform>& pose) virtual - Set all bone transforms for a specific rig.
Function documentation
NodeHandle esp:: gfx:: replay:: AbstractPlayerImplementation:: loadAndCreateRenderAssetInstance(const esp:: assets:: AssetInfo& assetInfo,
const esp:: assets:: RenderAssetInstanceCreationInfo& creation) pure virtual private
Load and create a render asset instance.
Returns a handle that references the newly added node containing the loaded asset — i.e., it's meant to appear in the scene. Returns nullptr
in case of a failure.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: deleteAssetInstance(NodeHandle node) pure virtual private
Delete asset instance.
The handle
is expected to be returned from an earlier call to loadAndCreateRenderAssetInstance() on the same instance. Use clearAssetInstances() for deleting everything instead.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: deleteAssetInstances(const std:: unordered_map<RenderAssetInstanceKey, NodeHandle>& instances) pure virtual private
Clear all asset instances.
The player behaves as if loadAndCreateRenderAssetInstance() was not called at all. It may still contain the resources like meshes and textures loaded by the previous calls though. The instances
contain all node handles returned from loadAndCreateRenderAssetInstance() and can be ignored if the implementation keeps track of these on its own.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: setNodeTransform(NodeHandle node,
const Magnum:: Vector3& translation,
const Magnum:: Quaternion& rotation) pure virtual private
Set node transform from translation and rotation components.
The handle
is expected to be returned from an earlier call to loadAndCreateRenderAssetInstance() on the same instance.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: setNodeTransform(NodeHandle node,
const Mn:: Matrix4& transform) pure virtual private
Set node transform.
The handle
is expected to be returned from an earlier call to loadAndCreateRenderAssetInstance() on the same instance.
Mn:: Matrix4 esp:: gfx:: replay:: AbstractPlayerImplementation:: hackGetNodeTransform(NodeHandle node) const pure virtual private
Get node transform.
The handle
is expected to be returned from an earlier call to loadAndCreateRenderAssetInstance() on the same instance.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: setNodeMetadata(NodeHandle node,
const InstanceMetadata& metadata) virtual private
Set node metadata.
The handle
is expected to be returned from an earlier call to loadAndCreateRenderAssetInstance() on the same instance. Default implementation does nothing.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: changeLightSetup(const LightSetup& lights) virtual private
Change light setup.
Default implementation does nothing.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: createRigInstance(int rigId,
const std:: vector<std:: string>& boneNames) virtual private
Create and register a rig instance along with its bone IDs and names.
Default implementation does nothing.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: deleteRigInstance(int rigId) virtual private
Delete and unregister a rig instance.
Default implementation does nothing.
void esp:: gfx:: replay:: AbstractPlayerImplementation:: setRigPose(int rigId,
const std:: vector<gfx:: replay:: Transform>& pose) virtual private
Set all bone transforms for a specific rig.
Default implementation does nothing.