Class

SCNFloor

A plane that can optionally display a reflection of the scene above it.

Declaration

@interface SCNFloor : SCNGeometry

Overview

Figure 1

A floor geometry, showing a reflection of the text object above it

By default, a floor extends infinitely in the x- and z-axis dimensions of its local coordinate space, and is located in the plane whose y-coordinate is zero. To position and orient a floor in a scene, attach it to the geometry property of an SCNNode object. Often, you use a floor to provide a background for a scene.

If a floor’s reflectivity property is greater than zero, SceneKit automatically renders reflections for all geometries above it. Optionally, you can add an opacity gradient so that reflections of scene contents closer to the floor appear more clearly than those of scene contents further from it. You control the floor’s reflectivity using the properties listed in Adding Reflections to a Floor.

Topics

Creating a Floor

+ floor

Creates a floor geometry.

Adding Reflections to a Floor

reflectivity

The intensity of the scene’s reflection on the floor. Animatable.

reflectionFalloffEnd

The distance from the floor at which scene contents are no longer reflected. Animatable.

reflectionFalloffStart

The distance from the floor at which scene contents are reflected at full intensity. Animatable.

reflectionResolutionScaleFactor

The resolution scale factor of the offscreen buffer that SceneKit uses to render reflections.

reflectionCategoryBitMask

A mask that defines which categories of other objects show reflections on the floor.

Adjusting a Floor's Size

width

The extent of the floor along its x-axis. Animatable.

length

The extent of the floor along its z-axis. Animatable.

Relationships

Inherits From

See Also

Basic Shapes

SCNBox

A six-sided polyhedron geometry whose faces are all rectangles, optionally with rounded edges and corners.

SCNCapsule

A right circular cylinder geometry whose ends are capped with hemispheres.

SCNCone

A right circular cone or frustum geometry.

SCNCylinder

A right circular cylinder geometry.

SCNPlane

A rectangular, one-sided plane geometry of specified width and height.

SCNPyramid

A right rectangular pyramid geometry.

SCNSphere

A sphere (or ball or globe) geometry.

SCNTorus

A torus, or ring-shaped geometry.

SCNTube

A tube or pipe geometry—a right circular cylinder with a circular hole along its central axis.