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 { ... }
}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§
Sourceunsafe fn getBoundingBoxMin_max(
&self,
min: *mut SCNVector3,
max: *mut SCNVector3,
) -> bool
Available on crate features SceneKitTypes and objc2-core-foundation only.
unsafe fn getBoundingBoxMin_max( &self, min: *mut SCNVector3, max: *mut SCNVector3, ) -> bool
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.
Sourceunsafe fn setBoundingBoxMin_max(
&self,
min: *mut SCNVector3,
max: *mut SCNVector3,
)
Available on crate features SceneKitTypes and objc2-core-foundation only.
unsafe fn setBoundingBoxMin_max( &self, min: *mut SCNVector3, max: *mut SCNVector3, )
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.
Sourceunsafe fn getBoundingSphereCenter_radius(
&self,
center: *mut SCNVector3,
radius: *mut CGFloat,
) -> bool
Available on crate features SceneKitTypes and objc2-core-foundation only.
unsafe fn getBoundingSphereCenter_radius( &self, center: *mut SCNVector3, radius: *mut CGFloat, ) -> bool
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
impl ProtocolType for dyn SCNBoundingVolume
impl<T> ImplementedBy<T> for dyn SCNBoundingVolume
Implementations on Foreign Types§
impl<T> SCNBoundingVolume for ProtocolObject<T>where
T: ?Sized + SCNBoundingVolume,
Implementors§
impl SCNBoundingVolume for SCNBox
SCNParametricGeometry only.impl SCNBoundingVolume for SCNCapsule
SCNParametricGeometry only.impl SCNBoundingVolume for SCNCone
SCNParametricGeometry only.impl SCNBoundingVolume for SCNCylinder
SCNParametricGeometry only.impl SCNBoundingVolume for SCNFloor
SCNParametricGeometry only.impl SCNBoundingVolume for SCNGeometry
SCNGeometry only.impl SCNBoundingVolume for SCNNode
SCNNode only.impl SCNBoundingVolume for SCNPlane
SCNParametricGeometry only.impl SCNBoundingVolume for SCNPyramid
SCNParametricGeometry only.impl SCNBoundingVolume for SCNReferenceNode
SCNReferenceNode only.impl SCNBoundingVolume for SCNShape
SCNParametricGeometry only.impl SCNBoundingVolume for SCNSphere
SCNParametricGeometry only.impl SCNBoundingVolume for SCNText
SCNParametricGeometry only.impl SCNBoundingVolume for SCNTorus
SCNParametricGeometry only.impl SCNBoundingVolume for SCNTube
SCNParametricGeometry only.