Maya 1.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
MayaMaterial Class Reference

Set of materials handled by the Maya framework. More...

#include <maya.h>

Public Member Functions

 MayaMaterial ()
 Empty.
 
 MayaMaterial (ShaderNode, const Color &, const Color &, const Color &=Color(0.1, 0.1, 0.1, 1.0), const double &=20.0, const QImage=QImage(), const QImage &=QImage(), bool=false, float=0.0, float=0.0)
 Create a material. More...
 
 ~MayaMaterial ()
 Empty.
 

Static Public Member Functions

static MayaMaterial SimpleColor (const Color &)
 Create a simple color material. More...
 

Public Attributes

QString name
 name of the material (for export purpose)
 
Color ambient
 Ambient color.
 
Color diffuse
 Diffuse color.
 
Color specular
 Specular color.
 
double shininess
 Specular exponent.
 

Static Public Attributes

static MayaMaterial None = MayaMaterial(ShaderPhong, Color(0.1, 0.5, 0.1, 1.0), Color(0.5, 0.2, 0.2, 1.0), Color(0.1, 0.1, 0.1, 1.0), 50.0)
 Default material.
 
static MayaMaterial Normal = MayaMaterial(ShaderNormal, Color(0.3, 0.3, 0.3, 1.0), Color(0.5, 0.4, 0.2, 1.0), Color(0.1, 0.1, 0.1, 1.0), 50.0)
 Normal shading based material.
 
static MayaMaterial NormalWire = MayaMaterial(ShaderNormalWireframe, Color(0.3, 0.3, 0.3, 1.0), Color(0.5, 0.4, 0.2, 1.0), Color(0.1, 0.1, 0.1, 1.0), 50.0)
 Normal shading based material.
 
static MayaMaterial MayaTransparent = MayaMaterial(ShaderGreyCoolWarm, Color(0.05, 0.05, 0.05, 0.25), Color(0.5, 0.5, 0.5, 0.25), Color(0.1, 0.1, 0.1, 0.25), 50.0)
 Else.
 
static MayaMaterial MayaTransparentWire = MayaMaterial(ShaderGreyCoolWarmWireframe, Color(0.05, 0.05, 0.05, 0.25), Color(0.5, 0.5, 0.5, 0.25), Color(0.1, 0.1, 0.1, 0.25), 50.0)
 Else.
 
static MayaMaterial WireframeAspectRatio = MayaMaterial(ShaderWireframeAspectRatio, Color(0.05, 0.05, 0.05, 0.25), Color(0.5, 0.5, 0.5, 0.25), Color(0.1, 0.1, 0.1, 0.25), 50.0)
 A Wireframe shading with an emphasis on the degenerate triangles (in red).
 
static MayaMaterial GreenColor = MayaMaterial(ShaderGreyCoolWarm, Color(0.5, 0.8, 0.6, 1.0), Color(0.1, 0.1, 0.1, 1.0), Color(0.0, 0.0, 0.0, 1.0), 50.0)
 Normal shading based material.
 
static MayaMaterial YellowColor = MayaMaterial(ShaderGreyCoolWarm, Color(0.8, 0.7, 0.5, 1.0), Color(0.1, 0.1, 0.1, 1.0), Color(0.0, 0.0, 0.0, 1.0), 50.0)
 Normal shading based material.
 
static MayaMaterial RedColor = MayaMaterial(ShaderGreyCoolWarm, Color(0.85, 0.5, 0.4, 1.0), Color(0.1, 0.1, 0.1, 1.0), Color(0.0, 0.0, 0.0, 1.0), 50.0)
 Normal shading based material.
 
static MayaMaterial BlueColor = MayaMaterial(ShaderGreyCoolWarm, Color(0.3, 0.25, 0.7, 1.0), Color(0.1, 0.1, 0.1, 1.0), Color(0.0, 0.0, 0.0, 1.0), 50.0)
 Normal shading based material.
 
static MayaMaterial ColdWarm = MayaMaterial(ShaderGooch, Color(0.8, 0.7, 0.5, 1.0), Color(0.1, 0.1, 0.1, 1.0), Color(0.0, 0.0, 0.0, 1.0), 50.0)
 Gooch shading based material.
 
static MayaMaterial TriPlanarRock = MayaMaterial(ShaderTerrainTexture3D, Color(0.05, 0.05, 0.05, 0.25), Color(0.5, 0.5, 0.5, 0.25), Color(0.1, 0.1, 0.1, 0.25), 50.0)
 Rock.
 

Detailed Description

Set of materials handled by the Maya framework.

Constructor & Destructor Documentation

◆ MayaMaterial()

MayaMaterial::MayaMaterial ( ShaderNode  shaderNode,
const Color ambient,
const Color diffuse,
const Color specular = Color(0.1, 0.1, 0.1, 1.0),
const double &  shininess = 20.0,
const QImage  textIm = QImage(),
const QImage &  textImAlpha = QImage(),
bool  useNormalMapping = false,
float  normalMappingStrength = 0.0,
float  textureScaling = 0.0 
)

Create a material.

Parameters
shaderNodeShader node type.
ambientAmbient color.
diffuseDiffuse color.
specularSpecular color.
shininessShininess, i.e. exponent.
textImTexture image.
textImAlphaTransparency texture image.

References ambient, diffuse, name, shininess, and specular.

Member Function Documentation

◆ SimpleColor()

MayaMaterial MayaMaterial::SimpleColor ( const Color c)
static

Create a simple color material.

Diffuse and specular colors are set to 0.1.

Parameters
cAmbient color.

References MayaMaterial().