# TextureMapping class

Namespace: [Rhino.Render](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.render.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public sealed class TextureMapping : ModelComponent
```

Represents a texture mapping.

## Properties

- [Capped](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/capped.md): // The m_bCapped applies to planar, cylinder and box mappings. If m_bCapped is false, the cylinder or box is "infinite", if m_bCapped is true, they are finite. In planar mappings, m_bCapped=false means "the Z texture coordinate will always be 0.0" this is now the default behaviour in Rhino 5.0 - it's what users expect apparently.
- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/componenttype.md): Returns [ModelComponentType.TextureMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponenttype.md).
- [Id](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/id.md): The unique Id for this texture mapping object.
- [MappingType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/mappingtype.md): Texture mapping type associated with this Mapping object.
- [NormalTransform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/normaltransform.md): For primitive based mappings, these transformations are used to map the world coordinate (x,y,z) point P and surface normal N before it is projected to the normalized mapping primitive. The surface normal transformation, m_Nxyz, is always calculated from m_Pxyz. It is a runtime setting that is not saved in 3dm files. If m_type is srfp_mapping, then m_Pxyz and m_Nxyz are ignored.
- [PrimativeTransform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/primativetransform.md): (obsolete) For primitive based mappings, these transformations are used to map the world coordinate (x,y,z) point P and surface normal N before it is projected to the normalized mapping primitive. The surface normal transformation, m_Nxyz, is always calculated from m_Pxyz. It is a runtime setting that is not saved in 3dm files. If m_type is srfp_mapping, then m_Pxyz and m_Nxyz are ignored.
- [PrimitiveTransform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/primitivetransform.md): For primitive based mappings, these transformations are used to map the world coordinate (x,y,z) point P and surface normal N before it is projected to the normalized mapping primitive. The surface normal transformation, m_Nxyz, is always calculated from m_Pxyz. It is a runtime setting that is not saved in 3dm files. If m_type is srfp_mapping, then m_Pxyz and m_Nxyz are ignored.
- [Projection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/projection.md): See Projection
- [TextureSpace](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/texturespace.md): See TextureSpace
- [UvwTransform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/uvwtransform.md): Transform applied to mapping coordinate (u,v,w) to convert it into a texture coordinate.

## Methods

- [CreateBoxMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/createboxmapping.md): (static) Create a box projection texture mapping.
- [CreateCustomMeshMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/createcustommeshmapping.md): (static) Create custom mesh mapping
- [CreateCylinderMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/createcylindermapping.md): (static) Create a cylindrical projection texture mapping.
- [CreateOcsMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/createocsmapping.md): (static) Create a Ocs texture mapping. Note that OCS mappings must be placed on mapping channel ON_ObjectRenderingAttributes::OCSMappingChannelId() otherwise they will not work.
- [CreatePlaneMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/createplanemapping.md): (2 overloads, static) Create a planar projection texture mapping
- [CreateSphereMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/createspheremapping.md): (static) Create a spherical projection texture mapping.
- [CreateSurfaceParameterMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/createsurfaceparametermapping.md): (static) Create a mapping that will convert surface parameters into normalized(0,1)x(0,1) texture coordinates.
- [Decompose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/decompose.md): Gets the same decomposition of the texture mapping transforms as is used in the UI.
- [Evaluate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/evaluate.md): (2 overloads) Evaluate the mapping to get a texture coordinate
- [TryGetMappingBox](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/trygetmappingbox.md): (2 overloads) Get a box projection from the texture mapping, including capped information
- [TryGetMappingCylinder](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/trygetmappingcylinder.md): (2 overloads) Get a cylindrical projection parameters from this texture mapping.
- [TryGetMappingMesh](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/trygetmappingmesh.md): Get custom mapping mesh from this texture mapping.
- [TryGetMappingPlane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/trygetmappingplane.md): (2 overloads) Get plane mapping parameters from this texture mapping, including capping information
- [TryGetMappingSphere](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping/trygetmappingsphere.md): Get a spherical projection parameters from this texture mapping.

## Inherited Members

- From [ModelComponent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent.md): [ComponentStatus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/componentstatus.md), [DeletedName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/deletedname.md), [HasId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasid.md), [HasIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasindex.md), [HasName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasname.md), [IdIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/idislocked.md), [Index](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/index.md), [IndexIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/indexislocked.md), [InstanceDefinitionModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/instancedefinitionmodelserialnumber.md), [IsComponentStatusLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/iscomponentstatuslocked.md), [IsDeleted](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/isdeleted.md), [IsReference](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/isreference.md), [IsSystemComponent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/issystemcomponent.md), [ModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/modelserialnumber.md), [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/name.md), [NameIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/nameislocked.md), [ReferenceModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/referencemodelserialnumber.md), [ClearId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearid.md), [ClearIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearindex.md), [ClearName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearname.md), [DataCRC](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/datacrc.md), [LockId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockid.md), [LockIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockindex.md), [LockName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockname.md), [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/tostring.md)
- From [CommonObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject.md): [Disposed](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/disposed.md), [HasUserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/hasuserdata.md), [IsDocumentControlled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isdocumentcontrolled.md), [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalid.md), [UserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdata.md), [UserDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdictionary.md), [ConstructConstObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/constructconstobject.md), [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/dispose.md), [EnsurePrivateCopy](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/ensureprivatecopy.md), [GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/getobjectdata.md), [IsValidWithLog](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalidwithlog.md), [NonConstOperation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/nonconstoperation.md), [OnSwitchToNonConst](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/onswitchtononconst.md), [ToJSON](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/tojson.md)
