SCNBoundingVolume

Trait SCNBoundingVolume 

Source
pub unsafe trait SCNBoundingVolume: NSObjectProtocol {
    // Provided methods
    unsafe fn getBoundingBoxMin_max(
        &self,
        min: *mut SCNVector3,
        max: *mut SCNVector3,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn setBoundingBoxMin_max(
        &self,
        min: *mut SCNVector3,
        max: *mut SCNVector3,
    )
       where Self: Sized + Message { ... }
    unsafe fn getBoundingSphereCenter_radius(
        &self,
        center: *mut SCNVector3,
        radius: *mut CGFloat,
    ) -> bool
       where Self: Sized + Message { ... }
}
Available on crate feature SCNBoundingVolume only.
Expand description

The SCNBoundingVolume protocol is implemented by objects which can compute their bounding boxes.

You can currently use this protocol to get the bounding boxes of nodes and geometries.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn getBoundingBoxMin_max( &self, min: *mut SCNVector3, max: *mut SCNVector3, ) -> bool
where Self: Sized + Message,

Available on crate features SceneKitTypes and objc2-core-foundation only.

Fill the min and max vectors with the min and max vertex of the bounding box.

Parameter min: A pointer to a SCNVector3 to store the min vertex of the bounding box into.

Parameter max: A pointer to a SCNVector3 to store the max vertex of the bounding box into.

the returned bounding box is in local space of the receiver.

Source

unsafe fn setBoundingBoxMin_max( &self, min: *mut SCNVector3, max: *mut SCNVector3, )
where Self: Sized + Message,

Available on crate features SceneKitTypes and objc2-core-foundation only.

Override the receiver bounding box with the min and max vectors provided (in local space of the receiver).

Parameter min: A pointer to a SCNVector3 representing the min vertex of the desired bounding box.

Parameter max: A pointer to a SCNVector3 representing the max vertex of the desired bounding box.

Passing nil as arguments will recompute the original bounding box of the receiver.

Source

unsafe fn getBoundingSphereCenter_radius( &self, center: *mut SCNVector3, radius: *mut CGFloat, ) -> bool
where Self: Sized + Message,

Available on crate features SceneKitTypes and objc2-core-foundation only.

Fill the center vector with the center of the bounding sphere and store the radius of the bounding sphere in ‘radius’.

Parameter center: A pointer to a SCNVector3 to store the center of the bounding sphere into.

Parameter radius: A pointer to a CGFloat to store the radius of the bounding sphere into.

the returned bounding sphere is in local space of the receiver.

Trait Implementations§

Source§

impl ProtocolType for dyn SCNBoundingVolume

Source§

const NAME: &'static str = "SCNBoundingVolume"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn SCNBoundingVolume

Implementations on Foreign Types§

Source§

impl<T> SCNBoundingVolume for ProtocolObject<T>

Implementors§

Source§

impl SCNBoundingVolume for SCNBox

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNCapsule

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNCone

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNCylinder

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNFloor

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNGeometry

Available on crate feature SCNGeometry only.
Source§

impl SCNBoundingVolume for SCNNode

Available on crate feature SCNNode only.
Source§

impl SCNBoundingVolume for SCNPlane

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNPyramid

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNReferenceNode

Available on crate feature SCNReferenceNode only.
Source§

impl SCNBoundingVolume for SCNShape

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNSphere

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNText

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNTorus

Available on crate feature SCNParametricGeometry only.
Source§

impl SCNBoundingVolume for SCNTube

Available on crate feature SCNParametricGeometry only.