VedaLibMath/VirtualEquation.h

Go to the documentation of this file.
00001 /*! \file 
00002     \author victorien ferry & www.m4nkind.com
00003     \brief This file applies the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 , read file COPYING.
00004 */
00005 #ifndef COM_M4NKIND_VirtualEquation_H
00006 #define COM_M4NKIND_VirtualEquation_H
00007 
00008 #include "BaseObject.h"
00009 /*!
00010     \class  VirtualEquation
00011     \ingroup BaseObjectInherited_VedaLibMath BaseObjectInheritedDocGroup
00012     \brief  virtual class Defining an equation of the form: result = func(x,y,z,time)
00013 */
00014 class VirtualEquation : public BaseObject
00015 {
00016 /*==================================================================
00017                                 PUBLIC
00018 ==================================================================*/
00019 public:
00020 #ifdef _ENGINE_EDITABLE_
00021     /*!
00022         \brief  Constructor. There should only be members initialisation there.
00023     */
00024     VirtualEquation();
00025 #endif
00026     /*!
00027         \brief  Class Inheritance Descriptors. Also forces a destructor. See BASEOBJECT_DECLARE_... in .cpp
00028     */
00029     BASEOBJECT_DEFINE_VIRTUALCLASS(VirtualEquation);
00030     /*!
00031         \brief   Compute 1,2,3 or 4 value according to a parameter list (X,Y,Z,D).
00032                 An equation can manage one or more dimensions on input and output.
00033                 the result is <b>added</b> over the outgoing parameter table,
00034                 and unused output parameters are left untouch, so you
00035                 must init _OutgoingParameterTable before, with default values you will choose.
00036         \param  _OutgoingParameterTable result table. result is added over the table values.
00037         \param _IncomingParameterTable. float table, the (X,Y,Z,D) parameters.
00038     */
00039     virtual void Compute( float _OutgoingParameterTable[4] , const float _IncomingParameterTable[4] )=0;
00040     
00041 #ifdef _ENGINE_EDITABLE_
00042     /*!
00043         \brief  a GUI could need to play, draw, print, or output from any way, a preview of a 
00044                 created object. This is done with this method. sub classes can implement it (or not) in
00045                 any way, to explicit current shape of an object.<br>
00046 
00047         \param  _frameDate a date, in second, which defines the effect cinematic.
00048         \param  _pPreviewViewPort the viewport to render. Can't be 0L.
00049         \param  _pPreviewConfiguration
00050     */
00051     virtual void ProcessPreview(double _frameDate,VirtualMachine::InternalViewPort *_pPreviewViewPort,const PreviewConfiguration *_pPreviewConfiguration);
00052 #endif
00053     
00054 /*==================================================================
00055                                 PROTECTED
00056 ==================================================================*/
00057 protected:
00058 #ifdef _ENGINE_EDITABLE_
00059     //! object created for preview.
00060     VirtualMachine::InternalObject3DBuffer  *m_pPreviewLine;
00061 #endif
00062 #ifdef _ENGINE_EDITABLE_
00063     static const unsigned int   m_PreviewLinePoints=196;
00064     /*!
00065         \brief  Preview Tool: Create a preview line 3D Object.
00066     */
00067     virtual void ProcessPreview_CreateLine(VirtualMachine::InternalObject3DBuffer **_ppVertexAndPolygonBufferOut, unsigned int _nbPoint=2);
00068 #endif  
00069 #ifdef _ENGINE_EDITABLE_
00070     /*!
00071         \brief  tool for ProcessPreview: draw a grid and the equation value, and let the current
00072                     scale and matrix on the viewport.
00073 
00074         \param  _frameDate a date, in second, which defines the effect cinematic.
00075         \param  _pPreviewViewPort the viewport to render. Can't be 0L.
00076         \param  _pPreviewConfiguration
00077     */
00078     virtual void ProcessPreview_DrawEquation(double _frameDate,VirtualMachine::InternalViewPort *_pPreviewViewPort,const PreviewConfiguration *_pPreviewConfiguration);
00079 #endif
00080 };
00081 #endif

      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/