Click or drag to resize

DecalTryGetColor Method

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.

Namespace:  Rhino.Render
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.10
Syntax
public bool TryGetColor(
	Point3d point,
	Vector3d normal,
	ref Color4f colInOut,
	ref Point2d uvOut
)

Parameters

point
Type: Rhino.GeometryPoint3d
The point in space or, if the decal is uv-mapped, the uv-coordinate of that point.
normal
Type: Rhino.GeometryVector3d
The face normal of the given point.
colInOut
Type: Rhino.DisplayColor4f
Accepts the color to blend the decal color to and returns the blended color. See the notes above for details.
uvOut
Type: Rhino.GeometryPoint2d
Returns the (u,v) on the texture that the color was read from.

Return Value

Type: Boolean
true if the given point hits the decal, else false.
See Also