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
Syntaxpublic bool TryGetColor(
Point3d point,
Vector3d normal,
ref Color4f colInOut,
ref Point2d uvOut
)
Public Function TryGetColor (
point As Point3d,
normal As Vector3d,
ByRef colInOut As Color4f,
ByRef uvOut As Point2d
) As Boolean
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:
Booleantrue if the given point hits the decal, else false.
See Also