VedaLibImage/ImplicitEquationImage_.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_ImplicitEquationImage_H
00006 #define COM_M4NKIND_ImplicitEquationImage_H
00007 
00008 #include "VirtualImage.h"
00009 #include "PackLong_WithLimits.h"
00010 #include "PackObjectReference.h"
00011 #include "PackULong_Flags.h"
00012 #include "PackULong_Enums.h"
00013 /*!
00014     \class  ImplicitEquationImage
00015     \ingroup BaseObjectInherited_VedaLibImage BaseObjectInheritedDocGroup
00016     \brief  virtual base Class able to define an image defined by an equation:
00017 */
00018 
00019 class ImplicitEquationImage : public VirtualImage
00020 {
00021 /*==================================================================
00022                                 PUBLIC
00023 ==================================================================*/
00024 public:
00025     /*!
00026         \brief  Constructor. There should only be members initialisation there.
00027     */
00028     ImplicitEquationImage(void);
00029     
00030     /*!
00031         \brief  Class Inheritance Descriptors. Also forces a destructor. See BASEOBJECT_DECLARE_... in .cpp
00032     */
00033     BASEOBJECT_DEFINE_CLASS(ImplicitEquationImage);
00034     /*!
00035         \brief  Return the pixel width of the image
00036     */
00037     virtual unsigned int    GetPixelWidth();
00038     /*!
00039         \brief  Return the pixel height of the image
00040     */
00041     virtual unsigned int    GetPixelHeight();
00042     /*!
00043         \brief  Return the number of byte component for one pixel.
00044             This one is no more a virtual method.
00045     */
00046     virtual unsigned int    GetByteDepth();
00047     /*
00048         \brief  If IsTimeDynamic() is true, this image can change with time.
00049                 You have to use UpdateToFrame()to make the image change to a given date.
00050         \param  _framedate time in seconds.
00051     */
00052     virtual void    UpdateToFrame(float _framedate);
00053 
00054 /*==================================================================
00055                                 PROTECTED
00056 ==================================================================*/
00057 protected:
00058     enum {
00059         eflag_TimeDynamic=1
00060     }; // it's a 1,2,4,8,16,32 bitfield enum !!!
00061     //! preference flags about the way the quation is used.
00062     PackULong_Flags         mSer_EquaFlags;
00063     enum {
00064         etype_XToGrey=0,
00065         etype_XYZToRGBA, // no RGBA special enum anymore: depends on equation, and 1.0 is default.
00066     }; //
00067     //! preference flags about the way the quation is used.
00068     PackULong_Enums         mSer_ResultTypeEnum;
00069     //! the pixel size:
00070     PackLong_WithLimits     mSer_PixelWidth;
00071     //! the pixel size:
00072     PackLong_WithLimits     mSer_PixelHeight;
00073     //! reference to an equation that can use X,Y:
00074     PackObjectReference     mSerRef_Equation;
00075     // ! we need a second buffer for double buffer.
00076 /*re?   float *m_pBitmap1Alloc;
00077     // ! the swap buffers
00078     float *m_pDblBuf1;
00079     // ! the swap buffers
00080     float *m_pDblBuf2;*/
00081     /*!
00082         \brief  Method that really build the object using the serializable parameters.
00083                 Close() should close everything opened by Create().
00084                 Create the whole bitmap using one equation.
00085             \return false if creation failed.
00086     */
00087     virtual bool CreateInternal(void);
00088     /*
00089         \brief the real draw method is kept protected, because used by construction and update:
00090         \param  _framedate
00091     */
00092     void    ProtectedDraw(float _framedate);
00093 
00094 };
00095 
00096 #endif

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