CigiBaseSymbolLineDef.h

Go to the documentation of this file.
00001 
00039 #if !defined(_CIGI_BASE_SYMBOL_LINE_DEF_INCLUDED_)
00040 #define _CIGI_BASE_SYMBOL_LINE_DEF_INCLUDED_
00041 
00042 
00043 #include "CigiBaseVariableSizePckt.h"
00044 #include "CigiBaseVertexSymbolData.h"
00045 #include <vector>
00046 
00047 
00048 // ====================================================================
00049 // preprocessor definitions
00050 // ====================================================================
00051 
00052 #define CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3 32
00053 #define CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3 16
00054 
00055 
00056 class CigiSymbolLineDefV3_3;
00057 
00058 
00059 //=========================================================
00062 class CIGI_SPEC CigiBaseSymbolLineDef :
00063    public CigiBaseVariableSizePckt
00064 {
00065 
00066    friend class CigiSymbolLineDefV3_3;
00067 
00068 public:
00069 
00070 
00071    //=========================================================
00075    enum PrimitiveGrp
00076    {
00077       Points=0,
00078       Lines=1,
00079       LineStrip=2,
00080       LineLoop=3,
00081       Triangles=4,
00082       TriangleStrip=5,
00083       TriangleFan=6
00084    };
00085 
00086 
00087    //==> Management
00088 
00089    //=========================================================
00092    CigiBaseSymbolLineDef(void);
00093 
00094    //=========================================================
00097    virtual ~CigiBaseSymbolLineDef(void);
00098 
00099    //=========================================================
00102    CigiBaseSymbolLineDef(const CigiBaseSymbolLineDef &BaseIn);
00103 
00104    //=========================================================
00107    CigiBaseSymbolLineDef & operator=(const CigiBaseSymbolLineDef &BaseIn);
00108 
00109 
00110    //==> Buffer Packing/Unpacking
00111 
00112    //=========================================================
00123    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00124 
00125    //=========================================================
00135    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00136 
00137    //=========================================================
00145         virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket)
00146    { return(PacketSize + refPacket.GetVariableDataSize()); }
00147 
00148    //=========================================================
00160         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00161                        CigiCnvtInfoType::Type &CnvtInfo);
00162 
00163 
00164 
00165    //==> Accessing Member Variable Values functions
00166 
00167    //+> SymbolID
00168 
00169    //=========================================================
00176    int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true)
00177    {
00178       SymbolID = SymbolIDIn;
00179       return(CIGI_SUCCESS);
00180    }
00181 
00182    //=========================================================
00186    Cigi_uint16 GetSymbolID(void) const { return(SymbolID); }
00187    
00188 
00189    //+> Primitive
00190 
00191    //=========================================================
00200    int SetPrimitive(const PrimitiveGrp PrimitiveIn, bool bndchk=true);
00201 
00202    //=========================================================
00208    PrimitiveGrp GetPrimitive(void) const { return(Primitive); }
00209 
00210 
00211    //+> StipplePattern
00212 
00213    //=========================================================
00221    int SetStipplePattern(const Cigi_uint16 StipplePatternIn, bool bndchk=true)
00222    {
00223       StipplePattern = StipplePatternIn;
00224       return(CIGI_SUCCESS);
00225    }
00226 
00227    //=========================================================
00231    Cigi_uint16 GetStipplePattern(void) const { return(StipplePattern); }
00232 
00233 
00234    //+> LineWidth
00235 
00236    //=========================================================
00244    int SetLineWidth(const float LineWidthIn, bool bndchk=true);
00245 
00246    //=========================================================
00251    float GetLineWidth(void) const { return(LineWidth); }
00252 
00253 
00254    //+> StipplePatternLen
00255 
00256    //=========================================================
00265    int SetStipplePatternLen(const float StipplePatternLenIn, bool bndchk=true);
00266 
00267    //=========================================================
00272    float GetStipplePatternLen(void) const { return(StipplePatternLen); }
00273 
00274 
00275    //+> Vertices
00276 
00277    //=========================================================
00282    int GetVertexCount(void);
00283 
00284    //=========================================================
00294    virtual CigiBaseVertexSymbolData * AddVertex(void) =0;
00295 
00296    //=========================================================
00306    virtual int RemoveVertex(int VertexIndex, bool bndchk=true) =0;
00307 
00308    //=========================================================
00315    CigiBaseVertexSymbolData * GetVertex(int VertexIndex, bool bndchk=true);
00316 
00317    //=========================================================
00320    void ClearVertices(void);
00321 
00322 
00323 
00324 protected:
00325 
00326    //==> Member variables
00327 
00328    //=========================================================
00332    Cigi_uint16 SymbolID;
00333 
00334    //=========================================================
00345    PrimitiveGrp Primitive;
00346 
00347    //=========================================================
00351    Cigi_uint16 StipplePattern;
00352 
00353    //=========================================================
00357    float LineWidth;
00358 
00359    //=========================================================
00364    float StipplePatternLen;
00365 
00366    //=========================================================
00370    std::vector<CigiBaseVertexSymbolData *> Vertices;
00371 
00372 
00373 };
00374 
00375 
00376 
00377 #endif   //  #if !defined(_CIGI_BASE_SYMBOL_LINE_DEF_INCLUDED_)
00378 

Generated on Wed Apr 29 08:59:56 2009 for CCL by  doxygen 1.4.7