This reference page is linked to from the following overview topics: Low-level Device API.
#include <SolidColorMaterialHandle.h>
SolidColorMaterialHandle is a material class to support solid color.
This class is used for viewport display and Quicksilver. It's used by RenderItemHandle::SetCustomMaterial() to describe the solid color surface. How to use:
SolidColorMaterialHandle hMaterial; hMaterial.Initialize(); pItem->SetCustomMaterial(hMaterial); // pItem is an instance of RenderItemHandle
Public Member Functions |
|
| GraphicsDriverAPI | SolidColorMaterialHandle () |
| GraphicsDriverAPI | SolidColorMaterialHandle (const SolidColorMaterialHandle &from) |
|
GraphicsDriverAPI SolidColorMaterialHandle & |
operator= (const SolidColorMaterialHandle &from) |
| virtual GraphicsDriverAPI | ~SolidColorMaterialHandle () |
| GraphicsDriverAPI bool | Initialize () |
| Initialize the instance of solid color
material. |
|
| virtual
GraphicsDriverAPI const MaterialRequiredStreams * |
GetRequiredStreams () const |
| Returns the material required streams to
tell how to setup mesh data. |
|
| GraphicsDriverAPI void | SetColor (const AColor &color) |
| Set color for solid color material. |
|
| GraphicsDriverAPI const AColor & | GetColor () const |
| Get the color for solid color material.
|
|
| GraphicsDriverAPI SolidColorMaterialHandle | ( | ) |
| GraphicsDriverAPI SolidColorMaterialHandle | ( | const SolidColorMaterialHandle & | from | ) |
| virtual GraphicsDriverAPI ~SolidColorMaterialHandle | ( | ) | [virtual] |
| GraphicsDriverAPI SolidColorMaterialHandle& operator= | ( | const SolidColorMaterialHandle & | from | ) |
| GraphicsDriverAPI bool Initialize | ( | ) |
Initialize the instance of solid color material.
A SolidColorMaterialHandle should be initialized before it's used.
| virtual GraphicsDriverAPI const MaterialRequiredStreams* GetRequiredStreams | ( | ) | const [virtual] |
Returns the material required streams to tell how to setup mesh data.
When a BaseMaterialHandle is used by RenderItemHandle::SetCustomMaterial(), it also needs to know about the material requirement streams to setup corresponding mesh data. It could be used by GenerateRenderItems::GenerateRenderItems() for RenderItemHandle.
Reimplemented from BaseMaterialHandle.
| GraphicsDriverAPI void SetColor | ( | const AColor & | color | ) |
Set color for solid color material.
By default, the color of solid color material is AColor(1.0, 1.0, 1.0, 1.0). When a color is set, the solid color material will use this color.
| color | The color of solid color material. |
| GraphicsDriverAPI const AColor& GetColor | ( | ) | const |
Get the color for solid color material.