Skip to content

M_Rhino_Render_TextureMapping_CreateBoxMapping

Will Pearson edited this page Aug 12, 2016 · 2 revisions

TextureMapping.CreateBoxMapping Method

Create a box projection texture mapping.

Namespace: Rhino.Render
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public static TextureMapping CreateBoxMapping(
	Plane plane,
	Interval dx,
	Interval dy,
	Interval dz,
	bool capped
)

VB

Public Shared Function CreateBoxMapping ( 
	plane As Plane,
	dx As Interval,
	dy As Interval,
	dz As Interval,
	capped As Boolean
) As TextureMapping

Parameters

 

plane
Type: Rhino.Geometry.Plane
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.Geometry.Interval
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,0) and plane.PointAt(dx[1],0,0), respectivly.
dy
Type: Rhino.Geometry.Interval
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],0) and plane.PointAt(0,dy[1],0), respectivly.
dz
Type: Rhino.Geometry.Interval
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[0]) and plane.PointAt(0,0,dz[1]), respectivly.
capped
Type: System.Boolean
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[1] | y=dy[1] | x=dx[0] | y=dy[0] | | 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[1] | y=dy[1] | x=dx[0] | y=dy[0] | z=dx[1] | z=dz[0] | | 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

Supported in: 5D58w

See Also

Reference

TextureMapping Class
Rhino.Render Namespace

Clone this wiki locally