VR-Forces 4.0.4 Class Documentation
include/ctdb/c4bPatch.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1999 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: c4bPatch.h,v $ $Revision: 1.6 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef c4bPatch_H_
00010 #define c4bPatch_H_
00011 
00012 #include "ctdb/ctdbDefines.h"
00013 #include <vlutil/vlMachineTypes.h>
00014 
00015 #include "geometry/point.h"
00016 
00017 // forward declarations
00018 class C4B;
00019 class c4b_feature_info;
00020 class c4b_treeline_info;
00021 class DtGroup;
00022 class DtTree;
00023 
00024 //
00025 // class MyC4BPatch:
00026 //
00027 class DT_DLL_ctdb MyC4BPatch
00028 {
00029 public:
00030 
00031    // default constructor
00032    MyC4BPatch();
00033 
00034    // destructor
00035    virtual ~MyC4BPatch();
00036 
00037    // If a copy constructor is implemented, the assignment operator should
00038    // also be implemented.  Should generally implement both of them anyway to
00039    // avoid memory problems due to inappropriate compiler provided defaults.
00040    // Access varies so need to put proper access keyword above these 
00041    // declarations.
00042 
00043    virtual void xlate_gridded_patch(C4B& c4b,
00044                                     DtGroup*& patchTerrain, 
00045                                     DtGroup*& patchFeatures);
00046    
00047    virtual void xlate_tinned_patch(C4B& c4b, 
00048                                    void* te8_or_te16, 
00049                                    int num_elements,
00050                                    DtGroup*& patchTerrain, 
00051                                    DtGroup*& patchFeatures);
00052 
00053    virtual void set_origin_and_post_indices(C4B& c4b, unsigned int patch_number);
00054    
00055    virtual void set_features(void* features,
00056                              bool has_feat,
00057                              bool uses_16_bits,
00058                              bool has_no_terrain_elts);
00059 
00060 protected:
00061 
00062    // copy constructor
00063    MyC4BPatch(const MyC4BPatch& orig);
00064 
00065    // assignment operator
00066    MyC4BPatch& operator=(const MyC4BPatch& orig);
00067  
00068    virtual DtTree* make_tree(C4B& c4b, const DtPoint& at, c4b_treeline_info* t);
00069 
00070    virtual DtGroup* xlate_features(C4B& c4b);
00071 
00072    virtual int xlate_microterrain(C4B& c4b, DtGroup* g, c4b_feature_info* f, int num_left_to_read);
00073 
00074    // return DtBuilding, DtTree, DtTreeCanopy in the following cases? -- RVK
00075    virtual int xlate_building(C4B& c4b, DtGroup* g, c4b_feature_info* f);
00076    virtual int xlate_tree(C4B& c4b, DtGroup* g, c4b_feature_info* f, int num_left_to_read);
00077    virtual int xlate_canopy(C4B& c4b, DtGroup* g, c4b_feature_info* f, int num_left_to_read);
00078    virtual int xlate_linear(C4B& c4b, DtGroup* g, c4b_feature_info* f, int num_left_to_read);
00079    virtual int xlate_feature(C4B& c4b, DtGroup* g, c4b_feature_info* f, int num_left_to_read);
00080 
00081 protected:
00082 
00083    static const int theMaxNumberOfTINVertices;
00084 
00085 protected:
00086 
00087    void*     myPatchFeatures;
00088    unsigned int   myIndexOfZerothPost;
00089    bool      myHasFeatureData;
00090    bool      myUses16BitIndices;
00091    bool      myHasNoTerrainElements;
00092    DtPoint   myOriginXY;
00093 
00094 };
00095 
00096 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)