Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

pointset.h

00001 //  Copyright (c) 1996-2001 by Autodesk, Inc.
00002 //
00003 //  By using this code, you are agreeing to the terms and conditions of
00004 //  the License Agreement included in the documentation for this code.
00005 //
00006 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00007 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00008 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00009 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00010 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00011 //
00012 //  Use, duplication, or disclosure by the U.S. Government is subject to
00013 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00014 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00015 //  Data and Computer Software), as applicable.
00016 //
00017 
00018 #if !defined POINTSET_HEADER
00019 #define POINTSET_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 
00023 class WT_File;
00024 
00026 class WHIPTK_API WT_Point_Set
00027 {
00028 
00029 protected:
00030     WT_Integer32                m_count;  
00031     WT_Integer32                m_allocated; 
00032     WT_Logical_Point *          m_points; 
00033     WT_Boolean                  m_transformed; 
00034     WT_Boolean                  m_relativized; 
00035     int                         m_points_materialized; 
00037 private:
00038     WT_Point_Set (WT_Point_Set const &)
00039       : m_count (0)
00040       , m_allocated (0)
00041       , m_points (WD_Null)
00042       , m_transformed(WD_False)
00043       , m_relativized(WD_False)
00044       , m_points_materialized (0)
00045     {
00046         WD_Complain ("cannot copy WT_Point_Set");
00047     } // prohibited
00048 
00049     WT_Point_Set & operator= (WT_Point_Set const &)
00050     {
00051         WD_Complain ("cannot assign WT_Point_Set");
00052         return *this;
00053     } // prohibited
00054 
00055 public:
00056 
00058 
00059     WT_Point_Set()
00060         : m_count (0)
00061         , m_allocated (0)
00062         , m_points (WD_Null)
00063         , m_transformed(WD_False)
00064         , m_relativized(WD_False)
00065     { }
00066 
00068 
00075     WT_Point_Set(
00076         int                         count, 
00077         WT_Logical_Point const *    points, 
00078         WT_Boolean                  copy 
00079         );
00080 
00082     virtual ~WT_Point_Set();
00084 
00085 
00087 
00088     WT_Logical_Point * points() const
00089     {
00090         return m_points;
00091     }
00093 
00095 
00096     int    allocated() const
00097     {
00098         return m_allocated;
00099     }
00100 
00102     void clear();
00103 
00105     int    count() const
00106     {
00107         return m_count;
00108     }
00109 
00111     WT_Boolean first_point_fits_in_16_bits() const;
00112 
00114     WT_Boolean remaining_points_fit_in_16_bits() const;
00115 
00117     WT_Boolean operator== (WT_Point_Set const & set) const;
00119 
00121 
00122 
00127     virtual WT_Result   materialize(WT_File & file);
00128 
00130 
00136     virtual WT_Result   materialize_ascii(WT_File & file);
00137 
00139 
00144     virtual WT_Result   materialize_16_bit(WT_File & file);
00145 
00147 
00153     WT_Result  serialize(WT_File &  file, 
00154                                   WT_Byte    opcode_ascii, 
00155                                   WT_Byte    opcode_32bit, 
00156                                   WT_Byte    opcode_16bit 
00157                                   ) const;
00158 
00160 
00162     virtual WT_Result   skip_operand(WT_File & file);
00163 
00165 
00167     virtual WT_Result   skip_operand_ascii(WT_File & file);
00168 
00170 
00172     virtual WT_Result   skip_operand_16_bit(WT_File & file);
00174 
00175 
00176 
00178 
00179     void        de_relativize(WT_File & file);
00181     void        relativize(WT_File & file);
00183     WT_Point_Set const &     set(
00184         int                         count, 
00185         WT_Logical_Point const *    points, 
00186         WT_Boolean                  copy 
00187         );
00188 
00190     void        transform(WT_Transform const & transform);
00192 
00193 };
00194 
00195 #endif // POINTSET_HEADER

Generated on Tue May 17 12:07:44 2005 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.1