Inherits InstanceData.

 AZ_INSTANCE_DATA (Model, "{C30F5522B3814B38BBAF6E0B1885C8B9}") 

 AZ_CLASS_ALLOCATOR (Model, AZ::SystemAllocator, 0) 

void  WaitForUpload () 

size_t  GetLodCount () const 
 Returns the number of Lods in the model.


AZStd::span< const Data::Instance< ModelLod > >  GetLods () const 
 Returns the full list of Lods, where index 0 is the most detailed, and N1 is the least.


bool  IsUploadPending () const 
 Returns whether a buffer upload is pending.


const Data::Asset< ModelAsset > &  GetModelAsset () const 

bool  LocalRayIntersection (const AZ::Vector3 &rayStart, const AZ::Vector3 &rayDir, float &distanceNormalized, AZ::Vector3 &normal) const 

bool  RayIntersection (const AZ::Transform &modelTransform, const AZ::Vector3 &nonUniformScale, const AZ::Vector3 &rayStart, const AZ::Vector3 &rayDir, float &distanceNormalized, AZ::Vector3 &normal) const 

const AZStd::unordered_set< AZ::Name > &  GetUvNames () const 
 Get available UV names from the model and its lods.


◆ LocalRayIntersection()
bool AZ::RPI::Model::LocalRayIntersection 
( 
const AZ::Vector3 & 
rayStart, 


const AZ::Vector3 & 
rayDir, 


float & 
distanceNormalized, 


AZ::Vector3 & 
normal 

) 
 const 
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][ATOM4343 Bake mesh spatial 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). 
[out]  distanceNormalized  If an intersection is found, will be set to the normalized distance of the intersection (in the range 0.01.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.
◆ RayIntersection()
bool AZ::RPI::Model::RayIntersection 
( 
const AZ::Transform & 
modelTransform, 


const AZ::Vector3 & 
nonUniformScale, 


const AZ::Vector3 & 
rayStart, 


const AZ::Vector3 & 
rayDir, 


float & 
distanceNormalized, 


AZ::Vector3 & 
normal 

) 
 const 
Checks a ray for intersection against this model, where the ray is in a different coordinate space. Important: only to be used in the Editor, it may kick off a job to calculate spatial information. [GFX TODO][ATOM4343 Bake mesh spatial during AP processing]
 Parameters

 modelTransform  a transform that puts the model into the ray's coordinate space 
 nonUniformScale  Nonuniform scale applied in the model's local frame. 
 rayStart  The starting point of the ray. 
 rayDir  The direction and length of the ray (magnitude is encoded in the direction). 
[out]  distanceNormalized  If an intersection is found, will be set to the normalized distance of the intersection (in the range 0.01.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.
◆ TEMPOrphanFromDatabase()
Orphan the model, its lods, and all their buffers so that they can be replaced in the instance database This is a temporary function, that will be removed once the Model/ModelAsset classes no longer need it
◆ WaitForUpload()
void AZ::RPI::Model::WaitForUpload 
( 
 ) 

Blocks the CPU until the streaming upload is complete. Returns immediately if no streaming upload is currently pending.
The documentation for this class was generated from the following file:
 Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Model/Model.h