![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00006 #ifndef SHAPEMULTIPATCH_H 00007 #define SHAPEMULTIPATCH_H 00008 00009 #include "shape/shapeDefines.h" 00010 #include <stdio.h> 00011 #include "shape/shapeElement.h" 00012 #include "gdb/specMgr.h" 00013 00014 class DtShapePointZ; 00015 class DtShapePoint; 00016 class DtShapeReader; 00017 class DtShapeVectorReader; 00018 class DtGroup; 00019 00020 // class DtShapeMultipatch: 00021 // 00022 00023 enum DtShapeMultipatchPartType 00024 { 00025 SHAPEMULTIPATCH_STRIP, 00026 SHAPEMULTIPATCH_FAN, 00027 SHAPEMULTIPATCH_OUTER, 00028 SHAPEMULTIPATCH_INNER, 00029 SHAPEMULTIPATCH_FIRST, 00030 SHAPEMULTIPATCH_RING 00031 }; 00032 00033 class DT_DLL_shape DtShapeMultipatch : public DtShapeElement 00034 { 00035 00036 public: 00037 00038 // default constructor. 00039 DtShapeMultipatch(double elevationFactor); 00040 00041 // destructor 00042 virtual ~DtShapeMultipatch(); 00043 00044 virtual bool load(FILE* f, bool loadMeasures = true, const DtShapeProjection* projection = NULL); 00045 virtual DtShapePoint* point(int i); 00046 virtual DtInt32 numPoints(); 00047 virtual DtInt32 numPoints(int part); 00048 virtual DtInt32 numParts(); 00049 virtual DtInt32 initialVertex(int part); 00050 virtual DtInt32 partType(int part); 00051 virtual void setElevation(double elev); 00052 virtual void calculateMaxMins(double& myMaxHigh, double& myMinHigh); 00053 00054 virtual DtGroup* import(DtShapeReader* reader); 00055 00056 virtual bool importAsFeature(DtShapeVectorReader* reader, 00057 DtSpecificationID specID, 00058 DtSpecification& specification); 00059 00060 protected: 00061 00062 virtual DtGroup* importStrip(DtShapeReader* reader, int part); 00063 virtual DtGroup* importFan(DtShapeReader* reader, int part); 00064 virtual DtGroup* importPoly(DtShapeReader* reader, int part); 00065 00066 DtNetFloat64 myBoundingBox[4]; 00067 DtNetInt32 myNumParts; 00068 DtNetInt32 myNumPoints; 00069 DtNetInt32* myParts; 00070 DtNetInt32* myPartTypes; 00071 DtNetFloat64 myMinMax[2]; 00072 DtShapePointZ* myPointZs; 00073 DtNetFloat64 myZRange[2]; 00074 00075 }; 00076 00077 #endif