iDecalTemplate Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
iDecalTemplate Struct Reference
Geometry utilities

Interface for a decal template which dictates the appearance of a newly created iDecal. More...

`#include <ivaria/decal.h>`

Inheritance diagram for iDecalTemplate:

List of all members.

## Public Member Functions
virtual float | GetBottomClippingScale () const =0
| Gets the distance between the decal position and the bottom clipping plane as a multiple of decal size.
virtual const csColor4 & | GetBottomColor () const =0
| The color to give vertices close to the bottom of the decal.
virtual float | GetDecalOffset () const =0
| A decal will be offset a bit from the geometry it wraps around in order to avoid z-buffer fighting issues.
virtual const csColor4 & | GetMainColor () const =0
| The main color of the decal.
virtual iMaterialWrapper * | GetMaterialWrapper ()=0
| Retrieves the material wrapper to use for this decal.
virtual const csVector2 & | GetMaxTexCoord () const =0
| The max tex coord is the uv coordinate of the bottom-right corner of the decal.
virtual const csVector2 & | GetMinTexCoord () const =0
| The min tex coord is the uv coordinate of the top-left corner of the decal.
virtual const uint | GetMixMode () const =0
| The mixmode of the decal.
virtual float | GetPerpendicularFaceOffset () const =0
| The perpendicular face offset specifies how much perpendicular faces in the decal will taper out.
virtual float | GetPerpendicularFaceThreshold () const =0
| The perpendicular face threshold specifies which faces are considered to be perpendicular in the decal.
virtual float | GetPolygonNormalThreshold () const =0
| Retrieves the polygon normal threshold for this decal.
virtual CS::Graphics::RenderPriority | GetRenderPriority () const =0
| Retrieves the rendering priority for this decal.
virtual float | GetTimeToLive () const =0
| Retrieves the time the decal will have to live in seconds before it is killed.
virtual float | GetTopClippingScale () const =0
| Gets the distance between the decal position and the top clipping plane as a multiple of decal size.
virtual const csColor4 & | GetTopColor () const =0
| The color to give vertices close to the top of the decal.
virtual csZBufMode | GetZBufMode () const =0
| Retrieves the z-buffer mode for this decal.
virtual bool | HasBottomClipping () const =0
| Determines whether or not this type of decal will have its geometry clipped against a plane below the decal.
virtual bool | HasClipping () const =0
| Get whether or not the decal will do any clipping.
virtual bool | HasTopClipping () const =0
| Determines whether or not this type of decal will have its geometry clipped against a plane above the decal.
virtual void | SetBottomClipping (bool enabled, float bottomPlaneScale)=0
| Enables or disables clipping geometry below the decal.
virtual void | SetBottomColor (const csColor4 &color)=0
| The color to give vertices close to the bottom of the decal.
virtual void | SetClipping (bool enabled)=0
| Set whether or not the decal will do any clipping.
virtual void | SetDecalOffset (float decalOffset)=0
| A decal will be offset a bit from the geometry it wraps around in order to avoid z-buffer fighting issues.
virtual void | SetMainColor (const csColor4 &color)=0
| The main color of the decal.
virtual void | SetMaterialWrapper (iMaterialWrapper *material)=0
| Sets the material wrapper to use for this decal.
virtual void | SetMixMode (uint mixMode)=0
| The mixmode of the decal.
virtual void | SetPerpendicularFaceOffset (float offset)=0
| The perpendicular face offset specifies how much perpendicular faces in the decal will taper out.
virtual void | SetPerpendicularFaceThreshold (float threshold)=0
| The perpendicular face threshold specifies which faces are considered to be perpendicular in the decal.
virtual void | SetPolygonNormalThreshold (float polygonNormalThreshold)=0
| Sets the polygon normal threshold for this decal.
virtual void | SetRenderPriority (CS::Graphics::RenderPriority renderPriority)=0
| Sets the rendering priority for this decal.
virtual void | SetTexCoords (const csVector2 &min, const csVector2 &max)=0
| The tex coords are the uv coordinate of the top-left and bottom-right corner of the decal.
virtual void | SetTimeToLive (float timeToLive)=0
| Sets the time the decal will have to live in seconds before it is killed.
virtual void | SetTopClipping (bool enabled, float topPlaneScale=0.0f)=0
| Enables or disables clipping geometry above the decal.
virtual void | SetTopColor (const csColor4 &color)=0
| The color to give vertices close to the top of the decal.
virtual void | SetZBufMode (csZBufMode mode)=0
| Sets the z-buffer mode for this decal.

## Detailed Description

Interface for a decal template which dictates the appearance of a newly created iDecal.

Definition at line 59 of file decal.h.

## Member Function Documentation

virtual float iDecalTemplate::GetBottomClippingScale | ( |  | ) | const`[pure virtual]`

Gets the distance between the decal position and the bottom clipping plane as a multiple of decal size.

Returns:
  The bottom clipping plane scale.

virtual const csColor4& iDecalTemplate::GetBottomColor | ( |  | ) | const`[pure virtual]`

The color to give vertices close to the bottom of the decal.

The color of a vertex between the decal position and the bottom plane will be interpolated between this color and the main color based on distance from the bottom plane.

Returns:
  The top color of the decal.

virtual float iDecalTemplate::GetDecalOffset | ( |  | ) | const`[pure virtual]`

A decal will be offset a bit from the geometry it wraps around in order to avoid z-buffer fighting issues.

The greater this offset is, the less chance there is of z fighting, but if this is too high then the decal will appear to be floating.

Returns:
  the decal offset.

virtual const csColor4& iDecalTemplate::GetMainColor | ( |  | ) | const`[pure virtual]`

The main color of the decal.

Returns:
  The main color of the decal.

virtual iMaterialWrapper* iDecalTemplate::GetMaterialWrapper | ( |  | ) | `[pure virtual]`

Retrieves the material wrapper to use for this decal.

Returns:
  the material wrapper.

virtual const csVector2& iDecalTemplate::GetMaxTexCoord | ( |  | ) | const`[pure virtual]`

The max tex coord is the uv coordinate of the bottom-right corner of the decal.

Returns:
  The max tex coordinate.

virtual const csVector2& iDecalTemplate::GetMinTexCoord | ( |  | ) | const`[pure virtual]`

The min tex coord is the uv coordinate of the top-left corner of the decal.

Returns:
  The min tex coordinate.

virtual const uint iDecalTemplate::GetMixMode | ( |  | ) | const`[pure virtual]`

The mixmode of the decal.

Returns:
  The mixmode.

virtual float iDecalTemplate::GetPerpendicularFaceOffset | ( |  | ) | const`[pure virtual]`

The perpendicular face offset specifies how much perpendicular faces in the decal will taper out.

The bottom of the perpendicular face will taper out by the amount given, but the top of the perpendicular face will not taper at all.

Returns:
  The perpendicular face offset.

virtual float iDecalTemplate::GetPerpendicularFaceThreshold | ( |  | ) | const`[pure virtual]`

The perpendicular face threshold specifies which faces are considered to be perpendicular in the decal.

Perpendicular faces will be tapered outwards by an amount relative to the perpendicular face offset.

Returns:
  The perpendicular face threshold.

virtual float iDecalTemplate::GetPolygonNormalThreshold | ( |  | ) | const`[pure virtual]`

Retrieves the polygon normal threshold for this decal.

Values close to 1 will exclude polygons that don't match the decal's normal closely, and values closer to 0 will be more accepting and allow polygons with a very different normal from the decal's normal.

Values between -1 and 0 are acceptable, but will allow polygons that are facing in the opposite direction from the decal to be included.

Returns:
  the polygon threshold.

virtual CS::Graphics::RenderPriority iDecalTemplate::GetRenderPriority | ( |  | ) | const`[pure virtual]`

Retrieves the rendering priority for this decal.

Returns:
  the rendering priority.

virtual float iDecalTemplate::GetTimeToLive | ( |  | ) | const`[pure virtual]`

Retrieves the time the decal will have to live in seconds before it is killed.

Returns:
  The time to live in seconds.

virtual float iDecalTemplate::GetTopClippingScale | ( |  | ) | const`[pure virtual]`

Gets the distance between the decal position and the top clipping plane as a multiple of decal size.

Returns:
  The top clipping plane scale.

virtual const csColor4& iDecalTemplate::GetTopColor | ( |  | ) | const`[pure virtual]`

The color to give vertices close to the top of the decal.

The color of a vertex between the decal position and the top plane will be interpolated between this color and the main color based on distance from the top plane.

Returns:
  The top color of the decal.

virtual csZBufMode iDecalTemplate::GetZBufMode | ( |  | ) | const`[pure virtual]`

Retrieves the z-buffer mode for this decal.

Returns:
  the z-buffer mode.

virtual bool iDecalTemplate::HasBottomClipping | ( |  | ) | const`[pure virtual]`

Determines whether or not this type of decal will have its geometry clipped against a plane below the decal.

Returns:
  True if bottom clipping is enabled.

virtual bool iDecalTemplate::HasClipping | ( |  | ) | const`[pure virtual]`

Get whether or not the decal will do any clipping.

virtual bool iDecalTemplate::HasTopClipping | ( |  | ) | const`[pure virtual]`

Determines whether or not this type of decal will have its geometry clipped against a plane above the decal.

Returns:
  True if top clipping is enabled.

virtual void iDecalTemplate::SetBottomClipping | ( | bool | enabled,
|  | float | bottomPlaneScale
| ) |  | `[pure virtual]`

Enables or disables clipping geometry below the decal.

Parameters:

  enabled | True if bottom clipping should be enabled.
  bottomPlaneScale | The distance from the decal position to the bottom plane as a multiple of decal size.

virtual void iDecalTemplate::SetBottomColor | ( | const csColor4 & | color | ) | `[pure virtual]`

The color to give vertices close to the bottom of the decal.

The color of a vertex between the decal position and the bottom plane will be interpolated between this color and the main color based on distance from the bottom plane.

Parameters:

  color | The top color of the decal.

virtual void iDecalTemplate::SetClipping | ( | bool | enabled | ) | `[pure virtual]`

Set whether or not the decal will do any clipping.

This has to be enabled for SetTopClipping() and SetBottomClipping() being used. Default value is true.

virtual void iDecalTemplate::SetDecalOffset | ( | float | decalOffset | ) | `[pure virtual]`

A decal will be offset a bit from the geometry it wraps around in order to avoid z-buffer fighting issues.

The greater this offset is, the less chance there is of z fighting, but if this is too high then the decal will appear to be floating.

Parameters:

  decalOffset | The distance between decal and the geometry.

virtual void iDecalTemplate::SetMainColor | ( | const csColor4 & | color | ) | `[pure virtual]`

The main color of the decal.

Parameters:

  color | The main color of the decal.

virtual void iDecalTemplate::SetMaterialWrapper | ( | iMaterialWrapper * | material | ) | `[pure virtual]`

Sets the material wrapper to use for this decal.

Parameters:

  material | The material wrapper of the decal.

virtual void iDecalTemplate::SetMixMode | ( | uint | mixMode | ) | `[pure virtual]`

The mixmode of the decal.

Parameters:

  mixMode | The mixmode of the decal.

virtual void iDecalTemplate::SetPerpendicularFaceOffset | ( | float | offset | ) | `[pure virtual]`

The perpendicular face offset specifies how much perpendicular faces in the decal will taper out.

The bottom of the perpendicular face will taper out by the amount given, but the top of the perpendicular face will not taper at all.

Parameters:

  offset | The new perpendicular face offset.

virtual void iDecalTemplate::SetPerpendicularFaceThreshold | ( | float | threshold | ) | `[pure virtual]`

The perpendicular face threshold specifies which faces are considered to be perpendicular in the decal.

Perpendicular faces will be tapered outwards by an amount relative to the perpendicular face offset.

Parameters:

  threshold | The new perpendicular face threshold.

virtual void iDecalTemplate::SetPolygonNormalThreshold | ( | float | polygonNormalThreshold | ) | `[pure virtual]`

Sets the polygon normal threshold for this decal.

Values close to 1 will exclude polygons that don't match the decal's normal closely, and values closer to 0 will be more accepting and allow polygons with a very different normal from the decal's normal.

Values between -1 and 0 are acceptable, but will allow polygons that are facing in the opposite direction from the decal to be included.

Parameters:

  polygonNormalThreshold | The polygon normal threshold.

virtual void iDecalTemplate::SetRenderPriority | ( | CS::Graphics::RenderPriority | renderPriority | ) | `[pure virtual]`

Sets the rendering priority for this decal.

Parameters:

  renderPriority | The render priority of the decal.

virtual void iDecalTemplate::SetTexCoords | ( | const csVector2 & | min,
|  | const csVector2 & | max
| ) |  | `[pure virtual]`

The tex coords are the uv coordinate of the top-left and bottom-right corner of the decal.

Parameters:

  min | The top-left corner of the decal.
  max | The bottom-right corner of the decal.

virtual void iDecalTemplate::SetTimeToLive | ( | float | timeToLive | ) | `[pure virtual]`

Sets the time the decal will have to live in seconds before it is killed.

Parameters:

  timeToLive | The time to live in seconds.

virtual void iDecalTemplate::SetTopClipping | ( | bool | enabled,
|  | float | topPlaneScale = `0.0f`
| ) |  | `[pure virtual]`

Enables or disables clipping geometry above the decal.

Parameters:

  enabled | True if top clipping should be enabled.
  topPlaneScale | The distance from the decal position to the top plane as a multiple of decal size.

virtual void iDecalTemplate::SetTopColor | ( | const csColor4 & | color | ) | `[pure virtual]`

The color to give vertices close to the top of the decal.

The color of a vertex between the decal position and the top plane will be interpolated between this color and the main color based on distance from the top plane.

Parameters:

  color | The top color of the decal.

virtual void iDecalTemplate::SetZBufMode | ( | csZBufMode | mode | ) | `[pure virtual]`

Sets the z-buffer mode for this decal.

Parameters:

  mode | The z-buffer mode for the decal.

The documentation for this struct was generated from the following file:

- ivaria/decal.h