// ===================================================================
// $Id: mappibas.h,v 1.1 2003/02/20 18:30:49 havran Exp $
//
// mappibas.h
//     Header file for CMapping classes.
//
// Class: CMappingBase
//
// Licence and usage conditions in November 2003:
// This file can be used and modified only with written permission of
// Vlastimil Havran, Pohodli 27, 57001 Litomysl, the Czech Republic.
// This library is granted to be used by Polina Kondratieva within
// her MPI HIWI job working on BRDFLIB library. The usage condition
// may change in the next version of the library. At the moment,
// the library development is supported by Max-Planck-Institut for
// Informatik, Stuhlsatzenhausweg 85, 66123 Saarbruecken Germany
// See WWW: http://www.mpi-sb.mpg.de
// REPLACEMENT_STRING
//
// Initial coding by Vlastimil Havran, Petr Mladek, Jiri Liska, 1999
//
// Given to BRDFLIB project for the Polina Kondratieva's
// HIWI JOB assignment in November 2003.
// ===================================================================

#ifndef __MAPPIBAS_H__
#define __MAPPIBAS_H__

// BRDFLIB headers
#include "configh.h"

__BEGIN_BRDFLIB_HEADER

// ---------------------------------------------------------------------------
// This is general class for mapping.
// It is used for transformation the HitPointInfo on the MapPointInfo
// This is dynamically linked to an CObject3D instance.
// ---------------------------------------------------------------------------
class CMappingBase
{
public:
  // specifes the parameter which is mapped
  enum EDimType {
    // no mapping is/was performed
    EE_None      = 0x0,
    // one dimensional mapping
    EE_1D	 = 0x1,
    // two dimensional mapping
    EE_2D        = 0x3,
    // three dimensional mapping
    EE_3D        = 0x7,
    // time mapping
    EE_Time      = 0x8,
    // mapping the d-value
    EE_DCoord    = 0x10,
    // mapping value of index
    EE_Index     = 0x20,
    // estimate of surface area in object space
    // for a single pixel footprint
    EE_SurfaceArea = 0x40
  };

  // This enum specifies the type of parameter which is mapped
  enum EParamType {
    // the general option 
    EE_GENERAL = 0,
    // ambient coeficient
    EE_KA = 1, 
    //  diffuse coeficient for reflection
    EE_KD = 2,
    // specular coefficient for specular reflection
    EE_KS = 3,
    // specular coefficient of ideal reflection (mirror)
    EE_KM = 4,
    // coefficient of imperfection for specular reflection
    EE_KSI = 5,
    // coefficient of refraction for ideal refraction
    EE_KR = 6,
    // coefficient of the index of refraction
    EE_KRI = 7,
    //  diffuse coeficient for transmission
    EE_KDT = 8,
    // specular coefficient for specular transmission
    EE_KST = 9,
    // coefficient of imperfection for specular transmission
    EE_KSIT = 10,
    // coefficient for the light map associated with the object surface.
    EE_LM1 = 11, // for the first light map on the object surface.
    // coefficients of specular part of Lafortune model
    EE_CX = 12, // Cx coefficient
    EE_CY = 13, // Cy coefficient
    EE_CZ = 14, // Cz coefficient

    // specular coefficient of reflection for real metals
    // (according to the Fresnel equation)
    EE_KFM = 15,
    // coefficient of refraction for real dielectrics
    // (according to the Fresnel equation)
    EE_KFR = 16,
    // index of refraction for models constructed according to Fresnel formulas
    // (for both metals and dielectrics)
    EE_KFI = 17,
    // index of refraction for models constructed according to Fresnel formulas
    // (only for metals)
    EE_KFE = 18,
    // coefficient for volumetric reflection
    EE_KV = 19,
	// normalization (usually alpha) of shadowing/masking therm
	EE_KAN = 20,

    // This is the number of parameters used according to the count of
    // previous entries in this enum.
    EE_SIZE_OF_PARAMS
  };
};

__END_BRDFLIB_HEADER

#endif // __MAPPIBAS_H__

