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

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

		Volumetric Clouds Shape shell definition

		Author:	Jerome
		Date:	02/23/2003

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

#ifndef __I3DShVolumetricCloudsShape__
#define __I3DShVolumetricCloudsShape__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "APITypes.h"
#include "Index.h"
#include "MCCompObj.h"

//****** Globally Unique Ids *************************************************

MCDEFINE_GUID(IID_I3DShVolumetricCloudsShape, 0xb082ca95, 0xd02d, 0x44b9, 0x97, 0x22, 0x5, 0x8d, 0x7b, 0xda, 0xe8, 0x9e);


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

/// \addtogroup ShellInterface
/// \{

/// A VolumetricCloudsShape defines the shape of a cloud. It defines both the global
/// shape of the cloud and details.
/// 
/// \see I3DExVolumetricCloudsShape
///
struct I3DShVolumetricCloudsShape : 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 will be contained in the box defined by {(0,0,0), size }
	///
	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
