/****************************************************************************************************

		I3DExVolumetricCloudsShape.h
		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Jerome
		Date:	02/23/2003

****************************************************************************************************/

#ifndef __I3DExVolumetricCloudsShape__
#define __I3DExVolumetricCloudsShape__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "APITypes.h"


//****** Globally Unique Id **************************************************
MCDEFINE_GUID2(IID_I3DExVolumetricCloudsShape, R_IID_I3DExVolumetricCloudsShape);

//****** Family Id ***********************************************************
const FourCharT kVolumetricCloudsShapeFamilyID = kRID_VolumetricCloudsShapeFamilyID;


//****************************************************************************

/// \addtogroup ExternalInterface
///
/// \{

/// A VolumetricCloudsShape defines the shape of a cloud. It defines both the global
/// shape of the cloud and details.
///
struct I3DExVolumetricCloudsShape : public IMCUnknown
{
	// ****************************************************************************
	//								GetValue
	//
	/// This return a density value of the cloud at a given point. The density must 
	/// be between 0 and 1.
	/// > 0 is no density (fully transparent)
	/// > 1 is cloud
	///
	/// \param point	the point is in the box defined by {(0,0,0), (1,1,1) }
	///
	virtual real		MCCOMAPI	GetValue( const TVector3& point ) = 0;

	// ****************************************************************************
	//								SetScale
	//
	/// Use to tell the Shape the scale it will be displayed.
	///
	/// \param scale	the 3 directions scale
	///
	virtual void		MCCOMAPI	SetScale( const TVector3& scale ) = 0;

	// ****************************************************************************
	//								SetPrecision
	//
	/// Use to tell the Shape the precision requested.
	///
	/// \param precision	Level of precision. 0.0f is the poorest, 1.0f is the best.
	///
	virtual void		MCCOMAPI	SetPrecision	( const real precision ) = 0;
	
	// ****************************************************************************
	//								IsDataChanged
	//
	/// Use to know if the shape has changed since the last time time function is called.
	/// Very usefull for updating the caches. Be accurate on the returned value
	/// to avoid HUGE recomputation.
	///
	/// \return		true if the shape has changed since the last call.
	///
	virtual boolean		MCCOMAPI	IsShapeChanged	() = 0;

};

/// \}
#endif
