#include <IRhRdkDecal.h>
This interface allows RDK clients to access decals that are attached to Rhino objects.
- See also
- CRhRdkObjectDataAccess
◆ eMapping
Enumerator |
---|
mapUnset | |
mapPlanar | |
mapCylindrical | |
mapSpherical | |
mapUV | |
mapForce32bit | |
◆ eProjection
Enumerator |
---|
projUnset | |
projForward | |
projBackward | |
projBoth | |
projForce32bit | |
◆ ~IRhRdkDecal()
virtual IRhRdkDecal::~IRhRdkDecal |
( |
| ) |
|
|
inlinevirtual |
◆ Color()
Blend color with the decal color at a given point.
- Parameters
-
ptPoint | is the point in space or, if the decal is uv-mapped, the uv-coordinate of that point. |
vecNormal | is the face normal of the given point. |
colInOut | is the color to blend the decal color to. |
uvOut | is the UV on the texture that the color point was read from |
- Returns
- true if the given point hits the decal, else false.
◆ CRC()
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 OnUserDataTransformed event. \See CRhRdkEventWatcher
◆ CustomData()
Get custom data associated with this decal.
- Returns
- A pointer to an interface from which you can retrieve custom data, or NULL if no custom data exists on the decal for the current Rhino renderer.
◆ EVF()
virtual void* IRhRdkDecal::EVF |
( |
const wchar_t * |
, |
|
|
void * |
|
|
) |
| |
|
pure virtual |
Emergency virtual function for future expansion.
◆ GetHorzSweep()
virtual void IRhRdkDecal::GetHorzSweep |
( |
double & |
sta, |
|
|
double & |
end |
|
) |
| const |
|
pure virtual |
Gets the start and end angles of the decal's 'horizontal sweep' (these are angles of longitude in radians).
- Note
- These correspond to the old methods LatStart() and LatEnd() which were badly named. Only used when mapping is cylindrical or spherical.
◆ GetTextureMapping()
◆ GetVertSweep()
virtual void IRhRdkDecal::GetVertSweep |
( |
double & |
sta, |
|
|
double & |
end |
|
) |
| const |
|
pure virtual |
Gets the start and end angles of the decal's 'vertical sweep' (these are angles of latitude in radians).
- Note
- These correspond to the old methods LonStart() and LonEnd() which were badly named. Only used when mapping is spherical.
◆ Height()
virtual double IRhRdkDecal::Height |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The height of the decal. Only used when mapping is cylindrical.
◆ Id()
This method is deprecated because the name is misleading. The decal 'id' is not an identifier at all, it's a CRC which changes when the decal changes. Please change your code to call CRC() instead.
◆ LatEnd()
◆ LatStart()
◆ LonEnd()
◆ LonStart()
◆ Mapping()
virtual eMapping IRhRdkDecal::Mapping |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The decal's mapping.
◆ MapToInside()
virtual bool IRhRdkDecal::MapToInside |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- true if texture is mapped to inside of sphere or cylinder, else false. Used only when mapping is cylindrical or spherical.
◆ Origin()
virtual ON_3dPoint IRhRdkDecal::Origin |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The origin of the decal in world space. Not used when the mapping is UV.
◆ Projection()
virtual eProjection IRhRdkDecal::Projection |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The decal's projection. Used only when mapping is planar.
◆ Radius()
virtual double IRhRdkDecal::Radius |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The radius of the decal. Only used when mapping is cylindrical or spherical.
◆ SetTexture()
virtual void IRhRdkDecal::SetTexture |
( |
const CRhRdkTexture * |
pTexture | ) |
|
|
pure virtual |
Set the decal's texture. The decal copies the texture and this copy will subsequently be returned by Texture().
◆ Texture()
- Returns
- The decal's texture or null on failure.
- Note
- The returned texture is temporary and only exists as long as the decal object, so you should not store this pointer. You should also not store the instance id. If you need the texture again, you should construct a new decal object and call Texture() each time.
◆ TextureInstanceId()
virtual UUID IRhRdkDecal::TextureInstanceId |
( |
void |
| ) |
const |
|
virtual |
- Returns
- The decal texture's instance id.
◆ Transparency()
virtual double IRhRdkDecal::Transparency |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The decal's transparency in the range 0 to 1.
◆ UVBounds()
virtual void IRhRdkDecal::UVBounds |
( |
double & |
dMinUOut, |
|
|
double & |
dMinVOut, |
|
|
double & |
dMaxUOut, |
|
|
double & |
dMaxVOut |
|
) |
| const |
|
pure virtual |
The UV bounds of the decal. Only used when mapping is UV.
◆ VectorAcross()
virtual ON_3dVector IRhRdkDecal::VectorAcross |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The 'across' vector of the decal. For planar mapping the length of the vector is relevant. Not used when the mapping is UV. For cylindrical and spherical mapping, the vector is unitized.
◆ VectorUp()
virtual ON_3dVector IRhRdkDecal::VectorUp |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The 'up' vector of the decal. For planar mapping the length of the vector is relevant. Not used when the mapping is UV. For cylindrical and spherical mapping, the vector is unitized.