| Support Forum G3D Web Page |
Public Member Functions | |
| HitInfo () | |
| void | clear () |
| void | set (const shared_ptr< Model > &model, const shared_ptr< Entity > &entity=nullptr, const shared_ptr< Material > &material=nullptr, const Vector3 &normal=Vector3::nan(), const Point3 &point=Point3::nan(), const String &partName="", const String &meshName="", int meshID=0, int primIndex=0, float u=0.0f, float v=0.0f) |
Public Attributes | |
| const shared_ptr< Entity > | entity |
| May be null. More... | |
| const shared_ptr< Material > | material |
| May be null. More... | |
| const int | meshID |
| For debugging. More... | |
| const String | meshName |
| If the model contains multiple meshes (e.g., ArticulatedModel), this is an identifier for the underlying mesh or other surface in which primitiveIndex should be referenced. More... | |
| const shared_ptr< Model > | model |
| const Vector3 | normal |
| In world space. More... | |
| const String | partName |
| const Point3 | point |
| In world space. More... | |
| const int | primitiveIndex |
| If the model has multiple primitives, this is the index of the one hit. More... | |
| const float | u |
| Barycentric coords within the primitive hit if it is a triangle. More... | |
| const float | v |
| Barycentric coords within the primitive hit if it is a triangle. More... | |
Static Public Attributes | |
| static HitInfo | ignore |
| G3D::Model::HitInfo::HitInfo | ( | ) |
| void G3D::Model::HitInfo::clear | ( | ) |
| void G3D::Model::HitInfo::set | ( | const shared_ptr< Model > & | model, |
| const shared_ptr< Entity > & | entity = nullptr, |
||
| const shared_ptr< Material > & | material = nullptr, |
||
| const Vector3 & | normal = Vector3::nan(), |
||
| const Point3 & | point = Point3::nan(), |
||
| const String & | partName = "", |
||
| const String & | meshName = "", |
||
| int | meshID = 0, |
||
| int | primIndex = 0, |
||
| float | u = 0.0f, |
||
| float | v = 0.0f |
||
| ) |
| const shared_ptr<Entity> G3D::Model::HitInfo::entity |
May be null.
|
static |
| const shared_ptr<Material> G3D::Model::HitInfo::material |
May be null.
| const int G3D::Model::HitInfo::meshID |
For debugging.
| const String G3D::Model::HitInfo::meshName |
If the model contains multiple meshes (e.g., ArticulatedModel), this is an identifier for the underlying mesh or other surface in which primitiveIndex should be referenced.
| const shared_ptr<Model> G3D::Model::HitInfo::model |
| const Vector3 G3D::Model::HitInfo::normal |
In world space.
| const String G3D::Model::HitInfo::partName |
| const Point3 G3D::Model::HitInfo::point |
In world space.
Point3::nan() if no object was hit.
| const int G3D::Model::HitInfo::primitiveIndex |
If the model has multiple primitives, this is the index of the one hit.
| const float G3D::Model::HitInfo::u |
Barycentric coords within the primitive hit if it is a triangle.
| const float G3D::Model::HitInfo::v |
Barycentric coords within the primitive hit if it is a triangle.
1.8.15