[][src]Struct qt_3d_render::QLevelOfDetailSwitch

#[repr(C)]pub struct QLevelOfDetailSwitch { /* fields omitted */ }

Provides a way of enabling child entities based on distance or screen size.

C++ class: Qt3DRender::QLevelOfDetailSwitch.

C++ documentation:

Provides a way of enabling child entities based on distance or screen size.

This component is assigned to an entity. When the entity changes distance relative to the camera, the QLevelOfDetailSwitch will disable all the child entities except the one matching index Qt3DRender::QLevelOfDetailSwitch::currentIndex.

Methods

impl QLevelOfDetailSwitch[src]

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* Qt3DRender::QLevelOfDetailSwitch::metaObject() const.

pub unsafe fn new_1a(
    parent: impl CastInto<Ptr<QNode>>
) -> QBox<QLevelOfDetailSwitch>
[src]

Constructs a new QLevelOfDetailSwitch with the specified parent.

Calls C++ function: [constructor] void Qt3DRender::QLevelOfDetailSwitch::QLevelOfDetailSwitch(Qt3DCore::QNode* parent = …).

C++ documentation:

Constructs a new QLevelOfDetailSwitch with the specified parent.

pub unsafe fn new_0a() -> QBox<QLevelOfDetailSwitch>[src]

Provides a way of enabling child entities based on distance or screen size.

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

C++ documentation:

Provides a way of enabling child entities based on distance or screen size.

This component is assigned to an entity. When the entity changes distance relative to the camera, the QLevelOfDetailSwitch will disable all the child entities except the one matching index Qt3DRender::QLevelOfDetailSwitch::currentIndex.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int Qt3DRender::QLevelOfDetailSwitch::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* Qt3DRender::QLevelOfDetailSwitch::qt_metacast(const char* arg1).

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString Qt3DRender::QLevelOfDetailSwitch::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString Qt3DRender::QLevelOfDetailSwitch::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QLevelOfDetail>

pub fn slot_set_camera(&self) -> Receiver<(*mut QCamera,)>[src]

Sets the camera relative to which distance and size are computed.

Returns a built-in Qt slot Qt3DRender::QLevelOfDetail::setCamera that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the camera relative to which distance and size are computed.

Note: Setter function for property camera.

See also camera().

pub fn slot_set_current_index(&self) -> Receiver<(c_int,)>[src]

Sets the currentIndex.

Returns a built-in Qt slot Qt3DRender::QLevelOfDetail::setCurrentIndex that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the currentIndex.

Note: This should not normally be set by the user.

However, if the component is disabled, then changing the current index is a simple way of switching between multiple representations.

Note: Setter function for property currentIndex.

See also currentIndex().

pub fn slot_set_threshold_type(&self) -> Receiver<(ThresholdType,)>[src]

Sets the way thresholds values are interpreted with parameter thresholdType

Returns a built-in Qt slot Qt3DRender::QLevelOfDetail::setThresholdType that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the way thresholds values are interpreted with parameter thresholdType

Note: Setter function for property thresholdType.

See also thresholdType() and Qt3DRender::QLevelOfDetail::ThresholdType.

pub fn slot_set_thresholds(&self) -> Receiver<(*const QVectorOfDouble,)>[src]

Sets the range values in thresholds.

Returns a built-in Qt slot Qt3DRender::QLevelOfDetail::setThresholds that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the range values in thresholds.

Note: Setter function for property thresholds.

See also thresholds() and Qt3DRender::QLevelOfDetail::thresholdType.

pub fn slot_set_volume_override(
    &self
) -> Receiver<(*const QLevelOfDetailBoundingSphere,)>
[src]

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

Returns a built-in Qt slot Qt3DRender::QLevelOfDetail::setVolumeOverride that can be passed to qt_core::Signal::connect.

C++ documentation:

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

If this value to nullptr, the bounding volume of the entity is used. Care must be taken that this bounding volume never becomes invalid.

Access functions:

QLevelOfDetailBoundingSphere volumeOverride() const
void setVolumeOverride(const QLevelOfDetailBoundingSphere &volumeOverride)

Notifier signal:

void volumeOverrideChanged(const QLevelOfDetailBoundingSphere &volumeOverride)

See also Qt3DRender::QLevelOfDetailBoundingSphere.

pub fn camera_changed(&self) -> Signal<(*mut QCamera,)>[src]

Holds the id of the camera that is used to compute the actual distance or the screen size.

Returns a built-in Qt signal Qt3DRender::QLevelOfDetail::cameraChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Holds the id of the camera that is used to compute the actual distance or the screen size.

Access functions:

QCamera *camera() const
void setCamera(QCamera *camera)

Notifier signal:

void cameraChanged(QCamera *camera)

pub fn current_index_changed(&self) -> Signal<(c_int,)>[src]

The index in the range array which matches the current distance to the camera or screen size.

Returns a built-in Qt signal Qt3DRender::QLevelOfDetail::currentIndexChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

The index in the range array which matches the current distance to the camera or screen size.

Access functions:

int currentIndex() const
void setCurrentIndex(int currentIndex)

Notifier signal:

void currentIndexChanged(int currentIndex)

pub fn threshold_type_changed(&self) -> Signal<(ThresholdType,)>[src]

Specifies how range values are interpreted.

Returns a built-in Qt signal Qt3DRender::QLevelOfDetail::thresholdTypeChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Specifies how range values are interpreted.

Access functions:

ThresholdType thresholdType() const
void setThresholdType(ThresholdType thresholdType)

Notifier signal:

void thresholdTypeChanged(ThresholdType thresholdType)

See also Qt3DRender::QLevelOfDetail::ThresholdType.

pub fn thresholds_changed(&self) -> Signal<(*const QVectorOfDouble,)>[src]

Array of range values as float point numbers. The value for the most detailed representation should be specified first.

Returns a built-in Qt signal Qt3DRender::QLevelOfDetail::thresholdsChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Array of range values as float point numbers. The value for the most detailed representation should be specified first.

If Qt3DRender::QLevelOfDetail::thresholdType is set to Qt3DRender::QLevelOfDetail::DistanceToCameraThreshold, values should be specified in ascending order, in camera space coordinates

If Qt3DRender::QLevelOfDetail::thresholdType is set to Qt3DRender::QLevelOfDetail::ProjectedScreenPixelSizeThreshold, values should be specified in descending order, in screen space pixels.

Access functions:

QVector<qreal> thresholds() const
void setThresholds(const QVector<qreal> &thresholds)

Notifier signal:

void thresholdsChanged(const QVector<qreal> &thresholds)

See also Qt3DRender::QLevelOfDetail::ThresholdType.

pub fn volume_override_changed(
    &self
) -> Signal<(*const QLevelOfDetailBoundingSphere,)>
[src]

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

Returns a built-in Qt signal Qt3DRender::QLevelOfDetail::volumeOverrideChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

If this value to nullptr, the bounding volume of the entity is used. Care must be taken that this bounding volume never becomes invalid.

Access functions:

QLevelOfDetailBoundingSphere volumeOverride() const
void setVolumeOverride(const QLevelOfDetailBoundingSphere &volumeOverride)

Notifier signal:

void volumeOverrideChanged(const QLevelOfDetailBoundingSphere &volumeOverride)

See also Qt3DRender::QLevelOfDetailBoundingSphere.

pub unsafe fn camera(&self) -> QPtr<QCamera>[src]

Holds the id of the camera that is used to compute the actual distance or the screen size.

Calls C++ function: Qt3DRender::QCamera* Qt3DRender::QLevelOfDetail::camera() const.

C++ documentation:

Holds the id of the camera that is used to compute the actual distance or the screen size.

Access functions:

QCamera *camera() const
void setCamera(QCamera *camera)

Notifier signal:

void cameraChanged(QCamera *camera)

pub unsafe fn create_bounding_sphere(
    &self,
    center: impl CastInto<Ref<QVector3D>>,
    radius: c_float
) -> CppBox<QLevelOfDetailBoundingSphere>
[src]

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

Calls C++ function: Qt3DRender::QLevelOfDetailBoundingSphere Qt3DRender::QLevelOfDetail::createBoundingSphere(const QVector3D& center, float radius).

C++ documentation:

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

pub unsafe fn current_index(&self) -> c_int[src]

The index in the range array which matches the current distance to the camera or screen size.

Calls C++ function: int Qt3DRender::QLevelOfDetail::currentIndex() const.

C++ documentation:

The index in the range array which matches the current distance to the camera or screen size.

Access functions:

int currentIndex() const
void setCurrentIndex(int currentIndex)

Notifier signal:

void currentIndexChanged(int currentIndex)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* Qt3DRender::QLevelOfDetail::metaObject() const.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int Qt3DRender::QLevelOfDetail::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* Qt3DRender::QLevelOfDetail::qt_metacast(const char* arg1).

pub unsafe fn set_camera(&self, camera: impl CastInto<Ptr<QCamera>>)[src]

Sets the camera relative to which distance and size are computed.

Calls C++ function: [slot] void Qt3DRender::QLevelOfDetail::setCamera(Qt3DRender::QCamera* camera).

C++ documentation:

Sets the camera relative to which distance and size are computed.

Note: Setter function for property camera.

See also camera().

pub unsafe fn set_current_index(&self, current_index: c_int)[src]

Sets the currentIndex.

Calls C++ function: [slot] void Qt3DRender::QLevelOfDetail::setCurrentIndex(int currentIndex).

C++ documentation:

Sets the currentIndex.

Note: This should not normally be set by the user.

However, if the component is disabled, then changing the current index is a simple way of switching between multiple representations.

Note: Setter function for property currentIndex.

See also currentIndex().

pub unsafe fn set_threshold_type(&self, threshold_type: ThresholdType)[src]

Sets the way thresholds values are interpreted with parameter thresholdType

Calls C++ function: [slot] void Qt3DRender::QLevelOfDetail::setThresholdType(Qt3DRender::QLevelOfDetail::ThresholdType thresholdType).

C++ documentation:

Sets the way thresholds values are interpreted with parameter thresholdType

Note: Setter function for property thresholdType.

See also thresholdType() and Qt3DRender::QLevelOfDetail::ThresholdType.

pub unsafe fn set_thresholds(
    &self,
    thresholds: impl CastInto<Ref<QVectorOfDouble>>
)
[src]

Sets the range values in thresholds.

Calls C++ function: [slot] void Qt3DRender::QLevelOfDetail::setThresholds(const QVector<double>& thresholds).

C++ documentation:

Sets the range values in thresholds.

Note: Setter function for property thresholds.

See also thresholds() and Qt3DRender::QLevelOfDetail::thresholdType.

pub unsafe fn set_volume_override(
    &self,
    volume_override: impl CastInto<Ref<QLevelOfDetailBoundingSphere>>
)
[src]

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

Calls C++ function: [slot] void Qt3DRender::QLevelOfDetail::setVolumeOverride(const Qt3DRender::QLevelOfDetailBoundingSphere& volumeOverride).

C++ documentation:

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

If this value to nullptr, the bounding volume of the entity is used. Care must be taken that this bounding volume never becomes invalid.

Access functions:

QLevelOfDetailBoundingSphere volumeOverride() const
void setVolumeOverride(const QLevelOfDetailBoundingSphere &volumeOverride)

Notifier signal:

void volumeOverrideChanged(const QLevelOfDetailBoundingSphere &volumeOverride)

See also Qt3DRender::QLevelOfDetailBoundingSphere.

pub unsafe fn threshold_type(&self) -> ThresholdType[src]

Specifies how range values are interpreted.

Calls C++ function: Qt3DRender::QLevelOfDetail::ThresholdType Qt3DRender::QLevelOfDetail::thresholdType() const.

C++ documentation:

Specifies how range values are interpreted.

Access functions:

ThresholdType thresholdType() const
void setThresholdType(ThresholdType thresholdType)

Notifier signal:

void thresholdTypeChanged(ThresholdType thresholdType)

See also Qt3DRender::QLevelOfDetail::ThresholdType.

pub unsafe fn thresholds(&self) -> CppBox<QVectorOfDouble>[src]

Array of range values as float point numbers. The value for the most detailed representation should be specified first.

Calls C++ function: QVector<double> Qt3DRender::QLevelOfDetail::thresholds() const.

C++ documentation:

Array of range values as float point numbers. The value for the most detailed representation should be specified first.

If Qt3DRender::QLevelOfDetail::thresholdType is set to Qt3DRender::QLevelOfDetail::DistanceToCameraThreshold, values should be specified in ascending order, in camera space coordinates

If Qt3DRender::QLevelOfDetail::thresholdType is set to Qt3DRender::QLevelOfDetail::ProjectedScreenPixelSizeThreshold, values should be specified in descending order, in screen space pixels.

Access functions:

QVector<qreal> thresholds() const
void setThresholds(const QVector<qreal> &thresholds)

Notifier signal:

void thresholdsChanged(const QVector<qreal> &thresholds)

See also Qt3DRender::QLevelOfDetail::ThresholdType.

pub unsafe fn volume_override(&self) -> CppBox<QLevelOfDetailBoundingSphere>[src]

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

Calls C++ function: Qt3DRender::QLevelOfDetailBoundingSphere Qt3DRender::QLevelOfDetail::volumeOverride() const.

C++ documentation:

The default is a sphere of radius 1 and centered at the local origin of the entity. This proxy volume is used to compute the distance to the camera or the size of the screen projection.

If this value to nullptr, the bounding volume of the entity is used. Care must be taken that this bounding volume never becomes invalid.

Access functions:

QLevelOfDetailBoundingSphere volumeOverride() const
void setVolumeOverride(const QLevelOfDetailBoundingSphere &volumeOverride)

Notifier signal:

void volumeOverrideChanged(const QLevelOfDetailBoundingSphere &volumeOverride)

See also Qt3DRender::QLevelOfDetailBoundingSphere.

Trait Implementations

impl CppDeletable for QLevelOfDetailSwitch[src]

unsafe fn delete(&self)[src]

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

impl Deref for QLevelOfDetailSwitch[src]

type Target = QLevelOfDetail

The resulting type after dereferencing.

fn deref(&self) -> &QLevelOfDetail[src]

Calls C++ function: Qt3DRender::QLevelOfDetail* static_cast<Qt3DRender::QLevelOfDetail*>(Qt3DRender::QLevelOfDetailSwitch* ptr).

impl DynamicCast<QLevelOfDetailSwitch> for QLevelOfDetail[src]

unsafe fn dynamic_cast(ptr: Ptr<QLevelOfDetail>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* dynamic_cast<Qt3DRender::QLevelOfDetailSwitch*>(Qt3DRender::QLevelOfDetail* ptr).

impl DynamicCast<QLevelOfDetailSwitch> for QComponent[src]

unsafe fn dynamic_cast(ptr: Ptr<QComponent>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* dynamic_cast<Qt3DRender::QLevelOfDetailSwitch*>(Qt3DCore::QComponent* ptr).

impl DynamicCast<QLevelOfDetailSwitch> for QNode[src]

unsafe fn dynamic_cast(ptr: Ptr<QNode>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* dynamic_cast<Qt3DRender::QLevelOfDetailSwitch*>(Qt3DCore::QNode* ptr).

impl DynamicCast<QLevelOfDetailSwitch> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* dynamic_cast<Qt3DRender::QLevelOfDetailSwitch*>(QObject* ptr).

impl StaticDowncast<QLevelOfDetailSwitch> for QLevelOfDetail[src]

unsafe fn static_downcast(ptr: Ptr<QLevelOfDetail>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* static_cast<Qt3DRender::QLevelOfDetailSwitch*>(Qt3DRender::QLevelOfDetail* ptr).

impl StaticDowncast<QLevelOfDetailSwitch> for QComponent[src]

unsafe fn static_downcast(ptr: Ptr<QComponent>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* static_cast<Qt3DRender::QLevelOfDetailSwitch*>(Qt3DCore::QComponent* ptr).

impl StaticDowncast<QLevelOfDetailSwitch> for QNode[src]

unsafe fn static_downcast(ptr: Ptr<QNode>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* static_cast<Qt3DRender::QLevelOfDetailSwitch*>(Qt3DCore::QNode* ptr).

impl StaticDowncast<QLevelOfDetailSwitch> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QLevelOfDetailSwitch>[src]

Calls C++ function: Qt3DRender::QLevelOfDetailSwitch* static_cast<Qt3DRender::QLevelOfDetailSwitch*>(QObject* ptr).

impl StaticUpcast<QComponent> for QLevelOfDetailSwitch[src]

unsafe fn static_upcast(ptr: Ptr<QLevelOfDetailSwitch>) -> Ptr<QComponent>[src]

Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DRender::QLevelOfDetailSwitch* ptr).

impl StaticUpcast<QLevelOfDetail> for QLevelOfDetailSwitch[src]

unsafe fn static_upcast(ptr: Ptr<QLevelOfDetailSwitch>) -> Ptr<QLevelOfDetail>[src]

Calls C++ function: Qt3DRender::QLevelOfDetail* static_cast<Qt3DRender::QLevelOfDetail*>(Qt3DRender::QLevelOfDetailSwitch* ptr).

impl StaticUpcast<QNode> for QLevelOfDetailSwitch[src]

unsafe fn static_upcast(ptr: Ptr<QLevelOfDetailSwitch>) -> Ptr<QNode>[src]

Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QLevelOfDetailSwitch* ptr).

impl StaticUpcast<QObject> for QLevelOfDetailSwitch[src]

unsafe fn static_upcast(ptr: Ptr<QLevelOfDetailSwitch>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QLevelOfDetailSwitch* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.