#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 |
|
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 const char * | DisplayName |
|
static const char * | Extension |
|
static const char * | Group |
|
|
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.
◆ 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.
The documentation for this class was generated from the following file:
- Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelAsset.h