9#ifndef AVARA3D_SCENE_HITTESTRESULT_H
10#define AVARA3D_SCENE_HITTESTRESULT_H
27 enum class HitTestSearchMode : uint8_t {
49 std::shared_ptr<Node>
node()
const;
80 std::shared_ptr<Mesh> mesh,
92 std::weak_ptr<Node> _node;
95 std::shared_ptr<Mesh> _mesh;
97 std::optional<uint32_t> _faceIndex;
Describes an intersection with scene geometry or a physics body.
const math::vec3 & localNormal() const
Returns the hit surface normal in the node's local coordinate system.
const math::vec3 & worldCoordinates() const
Returns the hit position in world coordinates.
const math::mat4 & modelTransform() const
Returns the local-to-world model transform used for this hit.
const math::vec3 & localCoordinates() const
Returns the hit position in the node's local coordinate system.
const math::vec3 & worldNormal() const
Returns the hit surface normal in world coordinates.
std::optional< uint32_t > faceIndex() const
Returns the zero-based triangle index within meshElement().
const MeshElement * meshElement() const
Returns the hit visual mesh element, or nullptr when no visual mesh element is identified.
std::shared_ptr< Node > node() const
Returns the hit node, or nullptr if it has since been destroyed.
Owns the vertex and optional index data for one mesh primitive.