public class Decal : IDisposable
Represents a decal, or a picture that can be moved on an object.

Finalizer

~Decal

#
~Decal()

Properties

CRC

#Since v6.0
public int CRC { get; }
The decal CRC identifies a decal by its state. Multiple decals which would be exactly the same would have the same CRC and are culled from the system. If you store this value with the intention of using it to find the decal again later, you must update your stored value whenever the decal state changes. You can detect when a decal changes by watching for the legacy OnUserDataTransformed event or the newer custom event uuidEventDecalUserDataTransformed.

DecalMapping

#Since v5.10 Obsolete v8.0
public DecalMapping DecalMapping { get; }
obsoleteUse Mapping instead
Gets the decal's mapping.

DecalProjection

#Since v5.10 Obsolete v8.0
public DecalProjection DecalProjection { get; }
obsoleteUse Projection instead
Gets the decal's projection. Used only when mapping is planar.

EndLatitude

#Since v5.10
public double EndLatitude { get; }
Gets the end angle of the decal's arc of latitude or 'horizontal sweep'. This is actually a LONGITUDINAL angle. Only used when mapping is cylindrical or spherical. This is deprecated in favor of HorzSweep().

EndLongitude

#Since v5.10
public double EndLongitude { get; }
Gets the end angle of the decal's arc of longitude or 'vertical sweep'. This is actually a LATITUDINAL angle. Only used when mapping is spherical.

Height

#Since v5.10
public double Height { get; set; }
Gets the height of the decal. Only used when mapping is cylindrical.

IsVisible

#Since v8.18
public bool IsVisible { get; }
Gets the decal's visibility.

Mapping

#Since v8.0
public DecalMapping Mapping { get; set; }
Gets the decal's mapping.

MapToInside

#Since v5.10
public bool MapToInside { get; set; }
Used only when mapping is cylindrical or spherical.
true if texture is mapped to inside of sphere or cylinder, else \e false.

Origin

#Since v5.10
public Point3d Origin { get; set; }
Gets the origin of the decal in world space.

Projection

#Since v8.0
public DecalProjection Projection { get; set; }
Gets the decal's projection. Used only when mapping is planar.

Radius

#Since v5.10
public double Radius { get; set; }
Gets the radius of the decal. Only used when mapping is cylindrical or spherical.

StartLatitude

#Since v5.10
public double StartLatitude { get; }
Gets the start angle of the decal's arc of latitude or 'horizontal sweep'. This is actually a LONGITUDINAL angle. Only used when mapping is cylindrical or spherical.

StartLongitude

#Since v5.10
public double StartLongitude { get; }
Gets the start angle of the decal's arc of longitude or 'vertical sweep'. This is actually a LATITUDINAL angle. Only used when mapping is spherical.

TextureInstanceId

#Since v5.10
public Guid TextureInstanceId { get; set; }
Gets the asset instance id for this decal. This is the instance id of a material or texture.

Transparency

#Since v5.10
public double Transparency { get; set; }
Gets the decal's transparency in the range 0 to 1.

VectorAcross

#Since v5.10
public Vector3d VectorAcross { get; set; }
Gets the vector across. For cylindrical and spherical mapping, the vector is unitized.
The 'across' vector of the decal. For planar mapping the length of the vector is relevant.

VectorUp

#Since v5.10
public Vector3d VectorUp { get; set; }
For cylindrical and spherical mapping, the vector is unitized.
The 'up' vector of the decal. For planar mapping the length of the vector is relevant.

Methods

ConstPointer

#Since v5.10
public nint ConstPointer()

Create

#Since v5.10
public static Decal Create(DecalCreateParams createParams)
createParams (DecalCreateParams)

CustomData

#Since v6.0
public List<NamedValue> CustomData()
Gets decal custom data for the current renderer. See Rhino.Plugins.RenderPlugIn.ShowDecalProperties.
A list of name-value pairs for the custom data properties. If there is no custom data on the decal for the current renderer, the list will be empty.

CustomData

#Since v8.0
public List<NamedValue> CustomData(Guid renderer)
Gets decal custom data for a specified renderer. See Rhino.Plugins.RenderPlugIn.ShowDecalProperties.
renderer (Guid)
A list of name-value pairs for the custom data properties. If there is no custom data on the decal for the specified renderer, the list will be empty.

Dispose

#Since v5.10
public void Dispose()

Dispose

#Since v5.10
public void Dispose(bool isDisposing)
isDisposing (bool)

GetTextureMapping

#Since v7.0
public TextureMapping GetTextureMapping()
Gets the Texture Mapping of the decal.

GetUVBounds

#Since v8.18
public void GetUVBounds(out double min_u, out double min_v, out double max_u, out double max_v)
The UV bounds of the decal. Only used when mapping is UV.
min_u (out double)
min_v (out double)
max_u (out double)
max_v (out double)

HorzSweep

#Since v8.0
public void HorzSweep(out double sta, out double end)
Gets the angles of the decal's arc of 'horizontal sweep'. Replaces StartLatitude and EndLatitude.
sta (out double)
end (out double)

NonConstPointer

#Since v5.10
public nint NonConstPointer()

SetHorzSweep

#Since v9.0
public void SetHorzSweep(double sta, double end)
Sets the angles of the decal's arc of 'horizontal sweep'.
sta (double)
end (double)

SetUVBounds

#Since v9.0
public void SetUVBounds(double min_u, double min_v, double max_u, double max_v)
Sets the UV bounds of the decal. Only used when mapping is UV.
min_u (double)
min_v (double)
max_u (double)
max_v (double)

SetVertSweep

#Since v9.0
public void SetVertSweep(double sta, double end)
Sets the angles of the decal's arc of 'vertical sweep'.
sta (double)
end (double)

TextureRenderCRC

#Since v7.0 Obsolete v8.0
[CLSCompliant(false)] public uint TextureRenderCRC(TextureRenderHashFlags rh, LinearWorkflow lw)
obsoleteDo not use
This method is deprecated in favor of TextureRenderHash below.

TextureRenderCRC

#Since v7.0 Obsolete v8.0
[CLSCompliant(false)] public uint TextureRenderCRC(TextureRenderHashFlags rh)
obsoleteDo not use
This method is deprecated in favor of TextureRenderHash below.
rh (TextureRenderHashFlags)

TextureRenderHash

#Since v8.0 Obsolete v8.5
[CLSCompliant(false)] public uint TextureRenderHash(CrcRenderHashFlags flags, LinearWorkflow lw)
obsoleteDo not use
Get the texture render hash for the referenced texture using the specified CrcRenderHashFlags and linear workflow.
flags (CrcRenderHashFlags)
lw (LinearWorkflow)

TextureRenderHash

#Since v8.0 Obsolete v8.5
[CLSCompliant(false)] public uint TextureRenderHash(CrcRenderHashFlags flags)
obsoleteDo not use
Get the texture render hash for the referenced texture using the specified CrcRenderHashFlags.
flags (CrcRenderHashFlags)

TryGetColor

#Since v5.10
public bool TryGetColor(Point3d point, Vector3d normal, ref Color4f colInOut, ref Point2d uvOut)
Blend a color with the decal color at a given point. Please note that this function is very slow so you should only use it if you're not overly concerned about performance. Also please note that this function is actually a 'blend' operation, not a true 'get' operation and is sensitive to the value passed into the colInOut parameter. The alpha value of colInOut is used as the blend amount where 0 means 'all decal RGB' and 1 means 'all colInOut RGB'. If you want to simply GET the decal color, you must pass 0 for colInOut alpha.
point (Point3d)The point in space or, if the decal is uv-mapped, the uv-coordinate of that point.
normal (Vector3d)The face normal of the given point.
colInOut (ref Color4f)Accepts the color to blend the decal color to and returns the blended color. See the notes above for details.
uvOut (ref Point2d)Returns the (u,v) on the texture that the color was read from.
true if the given point hits the decal, else false.

UVBounds

#Since v5.10
public void UVBounds(ref double minUOut, ref double minVOut, ref double maxUOut, ref double maxVOut)
The UV bounds of the decal. Only used when mapping is UV.
minUOut (ref double)
minVOut (ref double)
maxUOut (ref double)
maxVOut (ref double)

VertSweep

#Since v8.0
public void VertSweep(out double sta, out double end)
Gets the angles of the decal's arc of 'vertical sweep'. Replaces StartLongitude and EndLongitude.
sta (out double)
end (out double)