Exemplo n.º 1
0
plLayer& plLayer::InitToDefault()
{
    fState->Reset();

    *fTexture = nil;

    SetRuntimeColor(hsColorRGBA().Set(0.5f, 0.5f, 0.5f, 1.f));
    SetPreshadeColor(hsColorRGBA().Set(0.5f, 0.5f, 0.5f, 1.f));
    SetAmbientColor(hsColorRGBA().Set(0,0,0,1.f));
    SetOpacity(1.f);

    fTransform->Reset();

    SetUVWSrc(0);
    SetLODBias(-1.f);
    SetSpecularColor( hsColorRGBA().Set(0,0,0,1.f));
    SetSpecularPower(1.f);

    *fVertexShader = nil;
    *fPixelShader = nil;

    fBumpEnvXfm->Reset();

    return *this;
}
Exemplo n.º 2
0
mitk::Material::Material(  )
{
  InitializeStandardValues();
  SetColor( GetColor() );
  SetColorCoefficient( GetColorCoefficient() );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( GetSpecularCoefficient() );
  SetSpecularPower( GetSpecularPower() );
  SetOpacity( GetOpacity() );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
}
Exemplo n.º 3
0
mitk::Material::Material( mitk::Material::Color color, vtkFloatingPointType colorCoefficient, vtkFloatingPointType specularCoefficient, vtkFloatingPointType specularPower, vtkFloatingPointType opacity )
{
  InitializeStandardValues();
  SetColor( color );
  SetColorCoefficient( colorCoefficient );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( specularCoefficient );
  SetSpecularPower( specularPower );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
}
Exemplo n.º 4
0
mitk::Material::Material( vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType opacity )
{
  InitializeStandardValues();
  SetColor( red, green, blue );
  SetColorCoefficient( GetColorCoefficient() );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( GetSpecularCoefficient() );
  SetSpecularPower( GetSpecularPower() );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
  m_Name = "";
}
Exemplo n.º 5
0
void Material::Init(ResourceManager * mgr)
{
    resMgr = mgr;
    data.optionsMask = 0;

    SetDiffuseColor(Color::White());

    SetEmmisivePower(1);
    SetSpecularPower(3);
    SetSpecularIntesity(3);

    diffuseMap = TextureHandler(false);
    bumpMap = TextureHandler(false);
}
Exemplo n.º 6
0
mitk::Material::Material( Color color, double opacity )
{
  InitializeStandardValues();
  SetColor( color );
  SetColorCoefficient( GetColorCoefficient() );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( GetSpecularCoefficient() );
  SetSpecularPower( GetSpecularPower() );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
  m_Name = "";
}
Exemplo n.º 7
0
mitk::Material::Material( double red, double green, double blue,
    double colorCoefficient, double specularCoefficient,
    double specularPower, double opacity )
{
  InitializeStandardValues();
  SetColor( red, green, blue );
  SetColorCoefficient( colorCoefficient );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( specularCoefficient );
  SetSpecularPower( specularPower );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
  m_Name = "";
}
Exemplo n.º 8
0
void plLayer::CloneNoTexture( plLayerInterface *original )
{
    SetBlendFlags( original->GetBlendFlags() );
    SetClampFlags( original->GetClampFlags() );
    SetShadeFlags( original->GetShadeFlags() );
    SetZFlags( original->GetZFlags() );
    SetMiscFlags( original->GetMiscFlags() );
    SetState( original->GetState() );

    SetPreshadeColor( original->GetPreshadeColor() );
    SetRuntimeColor( original->GetRuntimeColor() );
    SetAmbientColor( original->GetAmbientColor() );
    SetSpecularColor( original->GetSpecularColor() );
    SetOpacity( original->GetOpacity() );
    SetTransform( original->GetTransform() );
    SetUVWSrc( original->GetUVWSrc() );
    SetLODBias( original->GetLODBias() );
    SetSpecularPower( original->GetSpecularPower() );

    SetVertexShader( original->GetVertexShader() );
    SetPixelShader( original->GetPixelShader() );
    SetBumpEnvMatrix( original->GetBumpEnvMatrix() );
}