Cafu Engine
DummyMaterialT Class Reference

The class implements the EditorMaterialI interface. More...

#include "EditorMaterialDummy.hpp"

Inheritance diagram for DummyMaterialT:

Public Member Functions

 DummyMaterialT (const wxString &Name)
 
int GetWidth () const
 
int GetHeight () const
 
const wxString & GetName () const
 
void Draw (wxDC &dc, const wxRect &DestRect, int NameBoxHeight, bool DrawNameBox) const
 
const wxImage & GetImage () const
 
MatSys::RenderMaterialTGetRenderMaterial (bool PreviewMode) const
 Returns the render material of this material. More...
 
MaterialTGetMaterial () const
 Returns the material object. More...
 
bool IsTranslucent () const
 Returns whether this material is rendered translucently. More...
 
bool ShowInMaterialBrowser () const
 Returns whether the material should be shown for selection in the materials browser. More...
 

Protected Attributes

wxString m_Name
 

Detailed Description

The class implements the EditorMaterialI interface.

It is used whenever a map file contains a material name for which we have no matching material in the MaterialSystems material manager.

Member Function Documentation

MaterialT * DummyMaterialT::GetMaterial ( ) const
virtual

Returns the material object.

Implements EditorMaterialI.

MatSys::RenderMaterialT * DummyMaterialT::GetRenderMaterial ( bool  PreviewMode) const
virtual

Returns the render material of this material.

Parameters
PreviewModeIf true, the render material for 3D preview mode is returned (as it would appear in Cafu). If false, the render material for the 3D edit mode is returned (derived from the meta_editorImage, better for editing in CaWE).

Implements EditorMaterialI.

bool DummyMaterialT::IsTranslucent ( ) const
inlinevirtual

Returns whether this material is rendered translucently.

Translucent materials are typically implemented with "alpha blending" and require rendering in back-to-front order. Classes that derive from MapElementT typically use this to determine the return value for their MapElementT::IsTranslucent() method.

See Also
MapElementT::IsTranslucent()

Implements EditorMaterialI.

bool DummyMaterialT::ShowInMaterialBrowser ( ) const
inlinevirtual

Returns whether the material should be shown for selection in the materials browser.

Useful for letting sprite and model materials out.

Implements EditorMaterialI.


The documentation for this class was generated from the following files: