XamlGouraud_Polytriangle.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 #if !defined XAML_GOURAUD_POLYTRI_HEADER
00019 #define XAML_GOURAUD_POLYTRI_HEADER
00020 
00024 
00025 #include "XAML/XamlCore.h"
00026 
00027 #include "whiptk/gouraud_polytri.h"
00028 #include "XAML/XamlPath.h"
00029 #include "XAML/XamlXML.h"
00030 
00031 
00036 
00037 
00041 class XAMLTK_API WT_XAML_Gouraud_Polytriangle : public WT_Gouraud_Polytriangle
00042 {
00043         friend class WT_XAML_Class_Factory;
00044         friend class XamlPath;
00045 
00046 private:
00047     enum
00048     {
00049         FirstPoint,
00050         SecondPoint,
00051         ThirdPoint
00052     } _eParseState;
00053 
00054 protected:
00056     WT_XAML_Gouraud_Polytriangle () 
00057         : _eParseState(FirstPoint)
00058     { }
00059 
00061     WT_XAML_Gouraud_Polytriangle(
00062         int                         count, 
00063         WT_Logical_Point const *    points, 
00064         WT_RGBA32 const *           colors, 
00065         WT_Boolean                  copy 
00066         ) throw(WT_Result)
00067         : WT_Gouraud_Polytriangle(count, points, colors, copy)
00068         , _eParseState(FirstPoint)
00069     { }
00070 
00072         WT_XAML_Gouraud_Polytriangle(WT_Gouraud_Polytriangle const& polytri) throw(WT_Result)
00073                 : WT_Gouraud_Polytriangle(polytri)
00074         , _eParseState(FirstPoint)
00075         {}
00076 
00078     virtual ~WT_XAML_Gouraud_Polytriangle()
00079     { }
00080 
00081 public:
00082     // Mandatory WT_Object virtual methods
00083     WT_Result        serialize(WT_File & file) const;
00085         WT_Result                parseAttributeList(XamlXML::tAttributeMap& rMap, WT_XAML_File& rFile);
00087     WT_Result        materializePoint( const WT_Point2D& pt, const WT_RGBA32& color, WT_XAML_File &rFile );
00088 
00089 };
00091 
00092 #endif // XAML_GOURAUD_POLYTRI_HEADER

Generated on Tue Jan 6 22:40:06 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5