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_Media3DView_H 00006 #define COM_M4NKIND_Media3DView_H 00007 00008 #include "VirtualMedia.h" 00009 #include "PackList.h" 00010 #include "PackDynamicFloat.h" 00011 #include "PackULong_Flags.h" 00012 /*! 00013 \class Media3DView 00014 \ingroup BaseObjectInherited_VedaLib3DEngine 00015 \brief Define a 3D view of any Object3DVirtual (it implies Object3DScene ,etc...) 00016 by linking camera movements, and an optional rendering 2D target. 00017 It is a VirtualMedia, and should be used for any 3D rendering. 00018 */ 00019 00020 class Media3DView : public VirtualMedia 00021 { 00022 /*================================================================== 00023 PUBLIC 00024 ==================================================================*/ 00025 public: 00026 /*! 00027 \brief Constructor. There should only be members initialisation there. 00028 */ 00029 Media3DView(void); 00030 00031 /*! 00032 \brief Class Inheritance Descriptors. Also forces a destructor. See BASEOBJECT_DECLARE_... in .cpp 00033 */ 00034 BASEOBJECT_DEFINE_CLASS(Media3DView); 00035 00036 /*! 00037 \brief Process a media at a given date, 00038 or do anything) using a machine. You must process the media on machine this->GetMachine(). 00039 Note there are no play/pause or speed concept here, by default, a date is passed. 00040 00041 \param _frameDate a date, in second, which defines the effect cinematic. 00042 \param _pViewPort the viewport to render. Can't be 0L. 00043 */ 00044 virtual void ProcessMedia( double _frameDate,VirtualMachine::InternalViewPort *_pViewPort ); 00045 00046 /*================================================================== 00047 PROTECTED 00048 ==================================================================*/ 00049 protected: 00050 typedef enum{ 00051 scfl_NoClear=1 00052 } RenderFlag ; 00053 //! property flags for the scene rendering: 00054 PackULong_Flags mSer_Flags; 00055 //! property flags for the scene rendering: 00056 PackFloat mSer_TimeLength; 00057 //! Reference to Object or scene to render 00058 PackObjectReference mSer_MainObject; 00059 //! viewport rectangle where to render. 00060 PackObjectReference mSer_RenderTargetRef; 00061 //! camera coordinates and cinematic (same as objects) 00062 //! position of the camera 00063 PackDynamicFloat mSer_PositionRef; 00064 //! point looked at by the camera 00065 PackDynamicFloat mSer_TargetPositionRef; 00066 //! rotation around Z axis 00067 PackDynamicFloat mSer_FlipRot; 00068 //! focal length (view angle) 00069 PackDynamicFloat mSer_FOV; 00070 //! the depth that cut polygons 00071 PackDynamicFloat mSer_NearCutDepth; 00072 //! the maximum depth for polygons before they are cut. 00073 PackDynamicFloat mSer_FarCutDepth; 00074 00075 /*! 00076 \brief Tool: Find 2 angles that define a vector, using atan2() 00077 \param 00078 */ 00079 void AtanO1O2( float *po1, float xd,float yd,float zd ); 00080 00081 /*! 00082 \brief Method that really build the object using the serializable parameters. 00083 Close() should close everything opened by CreateInternal(). 00084 */ 00085 // disabled because, no rule for time length. 00086 virtual bool CreateInternal(void); 00087 00088 #ifdef _ENGINE_EDITABLE_ 00089 /*! 00090 \brief that closes everything. Still, the object exist and can be rebuild the same using Create() 00091 */ 00092 //disabled because == super. 00093 //virtual void CloseInternal(void); 00094 #endif 00095 00096 }; 00097 00098 #endif
/\/\ 4 N k ! N D _______ _ __ ___ _____ ___ _ _ ____ ___________ __//___ /________ |/ / ___________\_______/ \ / _ _ \/ _ / _ / _/_/____/ _ __ / / / / / / / \ \/ / / \ \ / \\___/___/___/ ¯ _____/_____/ ______\___/_____/\________\\ \________/_ ___ __ l____\ /elD! http://www.m4nkind.com \____/