Cafu Engine
EngineMaterialT Class Reference

This class implements the EditorMaterialI for materials that we have a material for in the MaterialSystems material manager. More...

#include "EditorMaterialEngine.hpp"

Inheritance diagram for EngineMaterialT:

Public Member Functions

 EngineMaterialT (MaterialT *MatSysMaterial_)
 
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...
 

Detailed Description

This class implements the EditorMaterialI for materials that we have a material for in the MaterialSystems material manager.

Member Function Documentation

MaterialT* EngineMaterialT::GetMaterial ( ) const
inlinevirtual

Returns the material object.

Implements EditorMaterialI.

MatSys::RenderMaterialT * EngineMaterialT::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 EngineMaterialT::IsTranslucent ( ) const
virtual

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 EngineMaterialT::ShowInMaterialBrowser ( ) const
virtual

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: