#include <ModelAsset.h>
Inherits AZ::Data::AssetData.
|
|
| AZ_RTTI (ModelAsset, "{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}", AZ::Data::AssetData) |
| |
|
| AZ_CLASS_ALLOCATOR (ModelAsset, AZ::SystemAllocator) |
| |
|
const Name & | GetName () const |
| | Returns the human readable name of the model.
|
| |
|
const AZ::Aabb & | GetAabb () const |
| | Returns the model-space axis aligned bounding box.
|
| |
|
const ModelMaterialSlotMap & | GetMaterialSlots () const |
| | Returns the list of all ModelMaterialSlot's for the model, across all LODs.
|
| |
|
const ModelMaterialSlot & | FindMaterialSlot (uint32_t stableId) const |
| | Find a material slot with the given stableId, or returns an invalid slot if it isn't found.
|
| |
|
size_t | GetLodCount () const |
| | Returns the number of Lods in the model.
|
| |
|
AZStd::span< const Data::Asset< ModelLodAsset > > | GetLodAssets () const |
| |
| void | AddRefBufferAssets () |
| |
| void | ReleaseRefBufferAssets () |
| |
|
bool | SupportLocalRayIntersection () const |
| | Returns true if the ModelAsset contains data which is required by LocalRayIntersectionAgainstModel() function.
|
| |
| virtual bool | LocalRayIntersectionAgainstModel (const AZ::Vector3 &rayStart, const AZ::Vector3 &rayDir, bool allowBruteForce, float &distanceNormalized, AZ::Vector3 &normal) const |
| |
|
const AZStd::vector< AZ::Name > & | GetTags () const |
| | Returns the model tags.
|
| |
|
|
static void | Reflect (AZ::ReflectContext *context) |
| |
|
|
static constexpr const char * | DisplayName { "ModelAsset" } |
| |
|
static constexpr const char * | Group { "Model" } |
| |
|
static constexpr const char * | Extension { "azmodel" } |
| |
|
|
class | ModelAssetCreator |
| |
|
class | ModelAssetHelpers |
| |
Contains a set of RPI::ModelLodAsset objects. Serialized to a .azmodel file. Actual model data is stored in the BufferAssets referenced by ModelLodAssets.
◆ AddRefBufferAssets()
| void AZ::RPI::ModelAsset::AddRefBufferAssets |
( |
| ) |
|
Increase reference for an overall reference count for all BufferAssets referenced by this ModelAsset When the ref count was 0, increase ref count would trigger block loading for all the BufferAssets
◆ LocalRayIntersectionAgainstModel()
| virtual bool AZ::RPI::ModelAsset::LocalRayIntersectionAgainstModel |
( |
const AZ::Vector3 & |
rayStart, |
|
|
const AZ::Vector3 & |
rayDir, |
|
|
bool |
allowBruteForce, |
|
|
float & |
distanceNormalized, |
|
|
AZ::Vector3 & |
normal |
|
) |
| const |
|
virtual |
Checks a ray for intersection against this model. The ray must be in the same coordinate space as the model. Important: only to be used in the Editor, it may kick off a job to calculate spatial information. [GFX TODO][ATOM-4343 Bake mesh spatial information during AP processing]
- Parameters
-
| rayStart | The starting point of the ray. |
| rayDir | The direction and length of the ray (magnitude is encoded in the direction). |
| allowBruteForce | Allow for brute force queries while the mesh is baking (remove when ATOM-4343 is complete) |
| [out] | distanceNormalized | If an intersection is found, will be set to the normalized distance of the intersection (in the range 0.0-1.0) - to calculate the actual distance, multiply distanceNormalized by the magnitude of rayDir. |
| [out] | normal | If an intersection is found, will be set to the normal at the point of collision. |
- Returns
- True if the ray intersects the mesh.
◆ ReleaseRefBufferAssets()
| void AZ::RPI::ModelAsset::ReleaseRefBufferAssets |
( |
| ) |
|
Reduce reference for an overall reference count for all BufferAssets referenced by this ModelAsset When the ref count reaches 0 after the reduce, it would release all the BufferAssets from the ModelAsset
The documentation for this class was generated from the following file:
- Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelAsset.h