00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __WXCANOBJ3D_H__
00012 #define __WXCANOBJ3D_H__
00013
00014 #ifndef WX_PRECOMP
00015 #include "wx/wx.h"
00016 #endif
00017
00018 #include "wx/txtstrm.h"
00019
00020 #include "wx/canvas/canmod.h"
00021 #include "wx/editor/sttool.h"
00022
00023 #define __USE_EVENTS 1
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class A2DEDITORDLLEXP a2d3DShape: public a2dCanvasObject
00036 {
00037 public:
00038
00039 a2d3DShape( a2dCanvasObject* toshadow, double depth, double angle );
00040
00041 a2d3DShape( const a2d3DShape &other, CloneOptions options );
00042
00043 virtual ~a2d3DShape();
00044
00045 virtual a2dObject* Clone( CloneOptions options ) const;
00046
00047 double GetExtrudeDepth() { return m_depth; }
00048 double GetExtrudeAngle() { return wxRadToDeg( m_angle3d ); }
00049
00050 void SetExtrudeDepth( double depth ) { m_depth = depth; SetPending(true); }
00051 void SetExtrudeAngle( double angle3d ) { m_angle3d = wxDegToRad( angle3d ); SetPending(true); }
00052
00053 void SetExtrudeFillFromShape();
00054 void SetExtrudeStrokeFromShape();
00055
00056 DECLARE_CLASS(a2d3DShape)
00057
00058 protected:
00059
00060 void DoWalker( wxObject *parent, a2dWalkerIOHandler& handler );
00061
00062 #if wxART2D_USE_CVGIO
00063 virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
00064
00065 void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
00066 #endif //wxART2D_USE_CVGIO
00067
00068 bool DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox );
00069
00070 void DoRender( a2dIterC& ic, OVERLAP clipparent );
00071
00072 bool DoIsHitWorld( a2dIterC& ic, a2dHitEvent& hitEvent );
00073
00074 void Set3DBrushPen();
00075
00076 double m_depth;
00077 double m_angle3d;
00078
00079 a2dCanvasObjectPtr m_shape;
00080
00081 private:
00082
00083 a2d3DShape( const a2d3DShape &other );
00084 };
00085
00086 #if defined(WXART2D_USINGDLL)
00087 template class A2DEDITORDLLEXP a2dSmrtPtr<a2d3DShape>;
00088 #endif
00089
00090 #endif
00091