Open 3D Engine ROS2 Gem API Reference
23.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
Common utils for Prefab Maker classes. More...
Functions | |
void | AddRequiredComponentsToEntity (AZ::EntityId entityId) |
AZ::IO::Path | GetAzModelAssetPathFromModelPath (const AZ::IO::Path &modelPath) |
void | SetEntityTransformLocal (const urdf::Pose &origin, AZ::EntityId entityId) |
AzToolsFramework::Prefab::PrefabEntityResult | CreateEntity (AZ::EntityId parentEntityId, const AZStd::string &name) |
AZStd::string | MakeEntityName (const AZStd::string &rootName, const AZStd::string &type, size_t index=0) |
AZStd::optional < Utils::AvailableAsset > | GetAssetFromPath (const Utils::UrdfAssetMap &urdfAssetsMapping, const AZStd::string &urdfMeshPath) |
AZStd::optional < Utils::AvailableAsset > | GetAssetFromPath (const Utils::UrdfAssetMap &urdfAssetsMapping, const std::string &urdfMeshPath) |
Common utils for Prefab Maker classes.
void ROS2::PrefabMakerUtils::AddRequiredComponentsToEntity | ( | AZ::EntityId | entityId | ) |
Add required components to the entity. Calling this will ensure all the required (default) components are added.
entityId | entity to modify. |
AzToolsFramework::Prefab::PrefabEntityResult ROS2::PrefabMakerUtils::CreateEntity | ( | AZ::EntityId | parentEntityId, |
const AZStd::string & | name | ||
) |
Create a prefab entity in hierarchy.
parentEntityId | id of parent entity for this new entity. Passing an invalid id would get the entity in the current context (for example, an entity which is currently open in the Editor). |
name | name for the new entity. |
AZStd::optional<Utils::AvailableAsset> ROS2::PrefabMakerUtils::GetAssetFromPath | ( | const Utils::UrdfAssetMap & | urdfAssetsMapping, |
const AZStd::string & | urdfMeshPath | ||
) |
Get an Asset for a specified mesh given its path and mapping.
urdfAssetsMapping | mapping of URDF assets. |
urdfMeshPath | a path to the mesh for which the Asset is requested. |
AZStd::optional<Utils::AvailableAsset> ROS2::PrefabMakerUtils::GetAssetFromPath | ( | const Utils::UrdfAssetMap & | urdfAssetsMapping, |
const std::string & | urdfMeshPath | ||
) |
Get Asset from path. Version for std::string.
AZ::IO::Path ROS2::PrefabMakerUtils::GetAzModelAssetPathFromModelPath | ( | const AZ::IO::Path & | modelPath | ) |
For a given model, return path to its Assets.
modelPath | path to the model. |
AZStd::string ROS2::PrefabMakerUtils::MakeEntityName | ( | const AZStd::string & | rootName, |
const AZStd::string & | type, | ||
size_t | index = 0 |
||
) |
Create an entity name from arguments.
rootName | root of entity's name. |
type | type of entity, depending on corresponding URDF tag. For example, "visual". |
index | index of entity, useful when multiple visuals or colliders are present for a single link. |
void ROS2::PrefabMakerUtils::SetEntityTransformLocal | ( | const urdf::Pose & | origin, |
AZ::EntityId | entityId | ||
) |
Set the transform for an entity.
origin | pose for the entity to set. |
entityId | entity which will be modified. |