Decal
ReferencesRepresents a decal, or a picture that can be moved on an object.
Finalizer
~Decal
#~Decal()
Properties
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.
obsoleteUse Mapping instead
Gets the decal's mapping.
obsoleteUse Projection instead
Gets the decal's projection. Used only when mapping is planar.
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().
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.
Gets the height of the decal. Only used when mapping is cylindrical.
Used only when mapping is cylindrical or spherical.
Value: true if texture is mapped to inside of sphere or cylinder, else \e false.
Gets the decal's projection. Used only when mapping is planar.
Gets the radius of the decal. Only used when mapping is cylindrical or spherical.
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.
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.
Gets the asset instance id for this decal. This is the instance id of a material or texture.
Gets the decal's transparency in the range 0 to 1.
Gets the vector across. For cylindrical and spherical mapping, the vector is unitized.
Value: The 'across' vector of the decal. For planar mapping the length of the vector is relevant.
Methods
public nint ConstPointer()
Parameters:
| createParams (DecalCreateParams) |
Gets decal custom data for the current renderer. See Rhino.Plugins.RenderPlugIn.ShowDecalProperties.
Returns: 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.
Gets decal custom data for a specified renderer. See Rhino.Plugins.RenderPlugIn.ShowDecalProperties.
Parameters:
| renderer (Guid) |
Returns: 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.
public void Dispose()
Gets the Texture Mapping of the decal.
The UV bounds of the decal. Only used when mapping is UV.
Gets the angles of the decal's arc of 'horizontal sweep'. Replaces StartLatitude and EndLatitude.
public nint NonConstPointer()
Sets the angles of the decal's arc of 'horizontal sweep'.
Sets the UV bounds of the decal. Only used when mapping is UV.
Sets the angles of the decal's arc of 'vertical sweep'.
obsoleteDo not use
This method is deprecated in favor of TextureRenderHash below.
Parameters:
| rh (TextureRenderHashFlags) | |
| lw (LinearWorkflow) |
obsoleteDo not use
This method is deprecated in favor of TextureRenderHash below.
Parameters:
| rh (TextureRenderHashFlags) |
obsoleteDo not use
Get the texture render hash for the referenced texture using the specified CrcRenderHashFlags and linear workflow.
Parameters:
| flags (CrcRenderHashFlags) | |
| lw (LinearWorkflow) |
obsoleteDo not use
Get the texture render hash for the referenced texture using the specified CrcRenderHashFlags.
Parameters:
| flags (CrcRenderHashFlags) |
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.
Parameters:
| 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. |
Returns: true if the given point hits the decal, else false.