#[repr(C)]pub struct QRayCasterHit { /* private fields */ }
Expand description
Details of a hit when casting a ray through a model.
C++ class: Qt3DRender::QRayCasterHit
.
Details of a hit when casting a ray through a model.
Qt3DRender::QRayCasterHit contains the details of a successful hit when casting a ray through a model using a Qt3DRender::QRayCaster or Qt3DRender::QScreenRayCaster component.
Implementations§
Source§impl QRayCasterHit
impl QRayCasterHit
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QRayCasterHit>>,
) -> Ref<QRayCasterHit>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QRayCasterHit>>, ) -> Ref<QRayCasterHit>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Copy-assignment operator.
Calls C++ function: Qt3DRender::QRayCasterHit& Qt3DRender::QRayCasterHit::operator=(const Qt3DRender::QRayCasterHit& other)
.
Copy-assignment operator.
Sourcepub unsafe fn distance(&self) -> c_float
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn distance(&self) -> c_float
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the distance between the origin of the ray and the intersection point
Calls C++ function: float Qt3DRender::QRayCasterHit::distance() const
.
Returns the distance between the origin of the ray and the intersection point
Sourcepub unsafe fn entity(&self) -> QPtr<QEntity>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn entity(&self) -> QPtr<QEntity>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns a pointer to the entity that was hit
Calls C++ function: Qt3DCore::QEntity* Qt3DRender::QRayCasterHit::entity() const
.
Returns a pointer to the entity that was hit
Sourcepub unsafe fn entity_id(&self) -> CppBox<QNodeId>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn entity_id(&self) -> CppBox<QNodeId>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the id of the entity that was hit
Calls C++ function: Qt3DCore::QNodeId Qt3DRender::QRayCasterHit::entityId() const
.
Returns the id of the entity that was hit
Sourcepub unsafe fn local_intersection(&self) -> CppBox<QVector3D>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn local_intersection(&self) -> CppBox<QVector3D>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the coordinates of the intersection point in the entity's coordinate system
Calls C++ function: QVector3D Qt3DRender::QRayCasterHit::localIntersection() const
.
Returns the coordinates of the intersection point in the entity’s coordinate system
Sourcepub unsafe fn new_0a() -> CppBox<QRayCasterHit>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn new_0a() -> CppBox<QRayCasterHit>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Default constructs an instance of QRayCasterHit.
Calls C++ function: [constructor] void Qt3DRender::QRayCasterHit::QRayCasterHit()
.
Default constructs an instance of QRayCasterHit.
Sourcepub unsafe fn new_9a(
type_: HitType,
id: impl CastInto<Ref<QNodeId>>,
distance: c_float,
local_intersect: impl CastInto<Ref<QVector3D>>,
world_intersect: impl CastInto<Ref<QVector3D>>,
primitive_index: c_uint,
v1: c_uint,
v2: c_uint,
v3: c_uint,
) -> CppBox<QRayCasterHit>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn new_9a( type_: HitType, id: impl CastInto<Ref<QNodeId>>, distance: c_float, local_intersect: impl CastInto<Ref<QVector3D>>, world_intersect: impl CastInto<Ref<QVector3D>>, primitive_index: c_uint, v1: c_uint, v2: c_uint, v3: c_uint, ) -> CppBox<QRayCasterHit>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Default constructs an instance of QRayCasterHit.
Calls C++ function: [constructor] void Qt3DRender::QRayCasterHit::QRayCasterHit(Qt3DRender::QRayCasterHit::HitType type, Qt3DCore::QNodeId id, float distance, const QVector3D& localIntersect, const QVector3D& worldIntersect, unsigned int primitiveIndex, unsigned int v1, unsigned int v2, unsigned int v3)
.
Default constructs an instance of QRayCasterHit.
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QRayCasterHit>>,
) -> CppBox<QRayCasterHit>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn new_copy( other: impl CastInto<Ref<QRayCasterHit>>, ) -> CppBox<QRayCasterHit>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Default constructs an instance of QRayCasterHit.
Calls C++ function: [constructor] void Qt3DRender::QRayCasterHit::QRayCasterHit(const Qt3DRender::QRayCasterHit& other)
.
Default constructs an instance of QRayCasterHit.
Sourcepub unsafe fn primitive_index(&self) -> c_uint
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn primitive_index(&self) -> c_uint
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the index of the picked primitive
Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::primitiveIndex() const
.
Returns the index of the picked primitive
Sourcepub unsafe fn static_meta_object() -> Ref<QMetaObject>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns a reference to the staticMetaObject
field.
Sourcepub unsafe fn type_(&self) -> HitType
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn type_(&self) -> HitType
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the type of the hit
Calls C++ function: Qt3DRender::QRayCasterHit::HitType Qt3DRender::QRayCasterHit::type() const
.
Returns the type of the hit
Sourcepub unsafe fn vertex1_index(&self) -> c_uint
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn vertex1_index(&self) -> c_uint
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the index of the first vertex of the picked primitive
Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::vertex1Index() const
.
Returns the index of the first vertex of the picked primitive
Sourcepub unsafe fn vertex2_index(&self) -> c_uint
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn vertex2_index(&self) -> c_uint
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the index of the second vertex of the picked primitive
Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::vertex2Index() const
.
Returns the index of the second vertex of the picked primitive
Sourcepub unsafe fn vertex3_index(&self) -> c_uint
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn vertex3_index(&self) -> c_uint
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the index of the third vertex of the picked primitive
Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::vertex3Index() const
.
Returns the index of the third vertex of the picked primitive
Sourcepub unsafe fn world_intersection(&self) -> CppBox<QVector3D>
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn world_intersection(&self) -> CppBox<QVector3D>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the coordinates of the intersection point in the model's coordinate system
Calls C++ function: QVector3D Qt3DRender::QRayCasterHit::worldIntersection() const
.
Returns the coordinates of the intersection point in the model’s coordinate system
Trait Implementations§
Source§impl CppDeletable for QRayCasterHit
Available on cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
impl CppDeletable for QRayCasterHit
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.