﻿TextureMapping.CreateBoxMapping Method  Create a box projection texture mapping.

Namespace:  Rhino.Render
Assembly:  RhinoCommon (in RhinoCommon.dll) Syntax
```public static TextureMapping CreateBoxMapping(
Plane plane,
Interval dx,
Interval dy,
Interval dz,
bool capped
)```

Parameters

plane
Type: Rhino.GeometryPlane
The sides of the box the box are parallel to the plane's coordinate planes. The dx, dy, dz intervals determine the location of the sides.
dx
Type: Rhino.GeometryInterval
Determines the location of the front and back planes. The vector plane.xaxis is perpendicular to these planes and they pass through plane.PointAt(dx,0,0) and plane.PointAt(dx,0,0), respectivly.
dy
Type: Rhino.GeometryInterval
Determines the location of the left and right planes. The vector plane.yaxis is perpendicular to these planes and they pass through plane.PointAt(0,dy,0) and plane.PointAt(0,dy,0), respectivly.
dz
Type: Rhino.GeometryInterval
Determines the location of the top and bottom planes. The vector plane.zaxis is perpendicular to these planes and they pass through plane.PointAt(0,0,dz) and plane.PointAt(0,0,dz), respectivly.
capped
Type: SystemBoolean
If true, the box is treated as a finite capped box.

Return Value

Type: TextureMapping
TextureMapping instance if input is valid Remarks
When m_texture_space = divided, the box is mapped to texture space as follows: If the box is not capped, then each side maps to 1/4 of the texture map. v=1+---------+---------+---------+---------+ | x=dx | y=dy | x=dx | y=dy | | Front | Right | Back | Left | | --y-> | <-x-- | <-y-- | --x-> | v=0+---------+---------+---------+---------+ 0/4 <=u<= 1/4 <=u<= 2/4 <=u<= 3/4 <=u<= 4/4 If the box is capped, then each side and cap gets 1/6 of the texture map. v=1+---------+---------+---------+---------+---------+---------+ | x=dx | y=dy | x=dx | y=dy | z=dx | z=dz | | Front | Right | Back | Left | Top | Bottom | | --y-> | <x-- | <-y-- | --x-> | --x-> | --x-> | v=0+---------+---------+---------+---------+---------+---------+ 0/6 <=u<= 1/6 <=u<= 2/6 <=u<= 3/6 <=u<= 4/6 <=u<= 5/6 <=u<= 6/6 Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.15 See Also