//////////////////////////////////////////////////////////////////////////////
//
//    Author	    : Gokhan Kisacikoglu
//    Date		: Wed Nov 21 11:46:40 PST 2001
//    File		: SFScalarFieldBlend.h
//    Description : Header file defining the SFScalarFieldBlend class
//
//////////////////////////////////////////////////////////////////////////////

#ifndef _SFSCALARFIELDBLEND_INCLUDED_
#define _SFSCALARFIELDBLEND_INCLUDED_

#include <Inventor/engines/SoSubEngine.h>
#include <Inventor/fields/SoSFFloat.h>
#include <Inventor/fields/SoMFFloat.h>
#include <Inventor/fields/SoMFVec3f.h>

#include "SFScalarField.h"

//////////////////////////////////////////////////////////////////////////////
//
//    Class: SFScalarFieldBlend
//
//    A subclass of the SoEngine class.    Blends two scalar datasets
//
//////////////////////////////////////////////////////////////////////////////

class SFScalarFieldBlend : public SoEngine {

  // Required Inventor macro
  SO_ENGINE_HEADER(SFScalarFieldBlend);

public:
  // scalar field data
  SFScalarField input1;
  SFScalarField input2;
  SoEngineOutput output;	// SFScalarField
    
  // blend amount
  SoSFFloat	 blendValue;
    
  // Inventor stuff
  static void     initClass		    ();

  SFScalarFieldBlend	    ();

protected:
  virtual void    inputChanged (SoField *which);

private:
  virtual	     ~SFScalarFieldBlend	 ();

  // Inventor method, called when the engine is to be evaluated
  virtual void    evaluate ();

  SFScalarField blended;
};

#endif /* _SFSCALARFIELDBLEND_INCLUDED_ */
