Struct QRayCasterHit

Source
#[repr(C)]
pub struct QRayCasterHit { /* private fields */ }
Expand description

Details of a hit when casting a ray through a model.

C++ class: Qt3DRender::QRayCasterHit.

C++ documentation:

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

Source

pub 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.

Copy-assignment operator.

Calls C++ function: Qt3DRender::QRayCasterHit& Qt3DRender::QRayCasterHit::operator=(const Qt3DRender::QRayCasterHit& other).

C++ documentation:

Copy-assignment operator.

Source

pub 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.

Returns the distance between the origin of the ray and the intersection point

Calls C++ function: float Qt3DRender::QRayCasterHit::distance() const.

C++ documentation:

Returns the distance between the origin of the ray and the intersection point

Source

pub 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.

Returns a pointer to the entity that was hit

Calls C++ function: Qt3DCore::QEntity* Qt3DRender::QRayCasterHit::entity() const.

C++ documentation:

Returns a pointer to the entity that was hit

Source

pub 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.

Returns the id of the entity that was hit

Calls C++ function: Qt3DCore::QNodeId Qt3DRender::QRayCasterHit::entityId() const.

C++ documentation:

Returns the id of the entity that was hit

Source

pub 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.

Returns the coordinates of the intersection point in the entity's coordinate system

Calls C++ function: QVector3D Qt3DRender::QRayCasterHit::localIntersection() const.

C++ documentation:

Returns the coordinates of the intersection point in the entity’s coordinate system

Source

pub 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.

Default constructs an instance of QRayCasterHit.

Calls C++ function: [constructor] void Qt3DRender::QRayCasterHit::QRayCasterHit().

C++ documentation:

Default constructs an instance of QRayCasterHit.

Source

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>

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.

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).

C++ documentation:

Default constructs an instance of QRayCasterHit.

Source

pub 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.

Default constructs an instance of QRayCasterHit.

Calls C++ function: [constructor] void Qt3DRender::QRayCasterHit::QRayCasterHit(const Qt3DRender::QRayCasterHit& other).

C++ documentation:

Default constructs an instance of QRayCasterHit.

Source

pub 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.

Returns the index of the picked primitive

Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::primitiveIndex() const.

C++ documentation:

Returns the index of the picked primitive

Source

pub 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.

Returns a reference to the staticMetaObject field.

Source

pub 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.

Returns the type of the hit

Calls C++ function: Qt3DRender::QRayCasterHit::HitType Qt3DRender::QRayCasterHit::type() const.

C++ documentation:

Returns the type of the hit

Source

pub 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.

Returns the index of the first vertex of the picked primitive

Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::vertex1Index() const.

C++ documentation:

Returns the index of the first vertex of the picked primitive

Source

pub 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.

Returns the index of the second vertex of the picked primitive

Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::vertex2Index() const.

C++ documentation:

Returns the index of the second vertex of the picked primitive

Source

pub 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.

Returns the index of the third vertex of the picked primitive

Calls C++ function: unsigned int Qt3DRender::QRayCasterHit::vertex3Index() const.

C++ documentation:

Returns the index of the third vertex of the picked primitive

Source

pub 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.

Returns the coordinates of the intersection point in the model's coordinate system

Calls C++ function: QVector3D Qt3DRender::QRayCasterHit::worldIntersection() const.

C++ documentation:

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.
Source§

unsafe fn delete(&self)

Destroys the instance of QRayCasterHit.

Calls C++ function: [destructor] void Qt3DRender::QRayCasterHit::~QRayCasterHit().

C++ documentation:

Destroys the instance of QRayCasterHit.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.