One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

PhysicallyBasedMaterial.AnisotropyLevel

struct · iOS 15.0+ · SDK 27.1

struct AnisotropyLevel

An object that defines the degree to which an entity reflects light to create stretched or oblong highlights. By default, PBR materials are isotropic; in other words, an entity that uses ``PhysicallyBasedMaterial`` reflects light uniformly in all directions, mimicking the behavior of most real-world objects. Some objects, including those with many small parallel striations such as vinyl records, CDs, or straight hair, reflect light more in some directions than others, resulting in stretched or oblong specular highlights, as shown in the following figure. ![An illustration showing 11 metallic spheres in a horizontal row. The left-most sphere is isotropic. The spheres represent increasing anisotropy from left to right, with the sphere furthest to the right displaying a long, stretched highlight. ](PhysicallyBasedMaterial-AnisotropyLevel-swift-struct-1) Use this object to specify the ``PhysicallyBasedMaterial/anisotropyLevel-swift.property`` for a material.

Members (7)

init · iOS 15.0+

init

TypeScript
static initFloatLiteral(value: number): PhysicallyBasedMaterial_AnisotropyLevel
Swift declaration
init(floatLiteral value: Float)

Creates an anisotropy level object from a single value. - Parameters: - value: The anisotropy level.

get · iOS 15.0+

textureSemantic

TypeScript
static get textureSemantic(): TextureResource_Semantic
Swift declaration
static let textureSemantic: TextureResource.Semantic

The intended use of the object’s texture property.

init · iOS 15.0+

init

TypeScript
static initScaleTexture(scale?: number, texture?: (MaterialParameters_Texture) | null): PhysicallyBasedMaterial_AnisotropyLevel
Swift declaration
init(scale: Float = 1.0, texture: PhysicallyBasedMaterial.Texture? = nil)

Creates an anisotropy level object using a single value or a texture. By default, PBR materials are isotropic; in other words, an entity that uses ``PhysicallyBasedMaterial`` reflects light uniformly in all directions, mimicking the behavior of most real-world objects. Some objects, including those with many small parallel striations such as vinyl records, CDs, or straight hair, reflect light more in some directions than others, resulting in stretched or oblong specular highlights, as shown in the following figure. ![An illustration showing 11 metallic spheres in a horizontal row. The left-most sphere is isotropic. The spheres represent increasing anisotropy from left to right, with the sphere furthest to the right displaying a long, stretched highlight. ](PhysicallyBasedMaterial-AnisotropyLevel-swift-struct-init(scale:texture:)-1) Use this initializer to create an object to set the ``PhysicallyBasedMaterial/anisotropyLevel-swift.property`` for a material using either a single value for the entire material, or a UV-mapped image. If you specify `texture`, RealityKit calculates the anistotropy level for the entity by UV-mapping `texture` onto the entity and multiplying the value of each mapped pixel by `scale`. If you don’t specify `texture`, then RealityKit uses `scale` as the entire entity’s anisotropy level. If you provide a color image for `texture` rather than a grayscale image, RealityKit only uses the intensity of the image’s red channel. - Parameters: - scale: The anisotropy level value for the entire material. - texture: The anisotropy level values as a UV-mapped image.

get · iOS 15.0+

scale

TypeScript
get scale(): number
Swift declaration
var scale: Float

The anistropy level specified as a single value.

set · iOS 15.0+

scale

TypeScript
set scale(value: number)
Swift declaration
var scale: Float

The anistropy level specified as a single value.

get · iOS 15.0+

texture

TypeScript
get texture(): (MaterialParameters_Texture) | null
Swift declaration
var texture: PhysicallyBasedMaterial.Texture?

The anisotropy level values specified using a UV-mapped image.

set · iOS 15.0+

texture

TypeScript
set texture(value: (MaterialParameters_Texture) | null)
Swift declaration
var texture: PhysicallyBasedMaterial.Texture?

The anisotropy level values specified using a UV-mapped image.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →