VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
trpage_io.h
Go to the documentation of this file.
1 /* ************************
2  Copyright Terrain Experts Inc.
3  Terrain Experts Inc (TERREX) reserves all rights to this source code
4  unless otherwise specified in writing by the President of TERREX.
5  This copyright may be updated in the future, in which case that version
6  supercedes this one.
7  -------------------
8  Terrex Experts Inc.
9  4400 East Broadway #314
10  Tucson, AZ 85711
11  info@terrex.com
12  Tel: (520) 323-7990
13  ************************
14  */
15 
16 #ifndef _trpage_io_h_
17 #define _trpage_io_h_
18 
19 /* trpage_io.h
20  Token definitions and basic classes.
21  */
22 
24 
25 #ifndef TeAttrH
26 /* was unsigned long, but it is used as if it was signed in the constructor
27  * and code that set the handle are using a signed value.
28  * 01-10-2006 David Fries
29  */
30 typedef long TeAttrHdl;
31 #endif
32 
34 #ifndef MIN
35 #define MIN(x,y) (((x) < (y)) ? (x) : (y))
37 #endif
38 #ifndef MAX
39 #define MAX(x,y) (((x) > (y)) ? (x) : (y))
41 #endif
42 
44 #define TRPG_MAGIC 9480372
45 
47 #define TRPG_VERSION_MAJOR 2
48 #define TRPG_VERSION_MINOR 2
50 
53 #define TRPG_NOMERGE_VERSION_MAJOR 2
54 #define TRPG_NOMERGE_VERSION_MINOR 2
55 
58 #define TRPG_NOTOKEN 0
59 
61 typedef short trpgToken;
62 
66 #define TRPG_MINTOKEN 100
67 #define TRPG_PUSH 100
69 #define TRPG_POP 101
71 
73 #define TRPGHEADER 200
74 #define TRPGHEAD_LODINFO 201
76 
78 #define TRPGMATTABLE 300
79 #define TRPGMATTABLE2 301
82 #define TRPGSHORTMATTABLE 302
85 
87 #define TRPGMATERIAL 400
88 #define TRPGMAT_BASIC 401
90 #define TRPGMAT_SHADE 402
92 #define TRPGMAT_SIZES 403
95 #define TRPGMAT_CULL 404
97 #define TRPGMAT_ALPHA 405
99 #define TRPGMAT_NORMAL 406
101 #define TRPGMAT_TEXTURE 407
103 #define TRPGMAT_BUMP 408
105 #define TRPGMAT_ATTR 409
107 #define TRPGMAT_HANDLE 410
109 
111 #define TRPGMAT_TEXENV 500
112 #define TRPGMAT_TXENV_MODE 501
114 #define TRPGMAT_TXENV_FILTER 502
116 #define TRPGMAT_TXENV_WRAP 503
118 #define TRPGMAT_TXENV_BORDER 504
120 
122 #define TRPGTEXTABLE 600
123 #define TRPGTEXTABLE2 601
125 #define TRPGTEXTURE 650
127 
129 #define TRPGMODELREF 700
130 #define TRPGMODELREF2 701
132 #define TRPGMODELTABLE 800
134 
136 #define TRPGTILETABLE 900
137 #define TRPG_TILE_ENTRY 901
139 #define TRPGTILETABLE2 902
141 
143 #define TRPGTILEHEADER 1000
144 #define TRPG_TILE_MATLIST 1001
146 #define TRPG_TILE_MODELLIST 1002
148 #define TRPG_TILE_DATE 1003
150 #define TRPGLOCALMATERIAL 1004
152 #define TRPG_TILE_LOCMATLIST 1005
154 
155 
158 #define TRPGLIGHTTABLE 1100
159 #define TRPGLIGHTATTR 1150
161 #define TRPGLIGHTATTR_BASIC 1151
163 #define TRPGLIGHTATTR_RASCAL 1152
165 #define TRPGLIGHTATTR_CALLIGRAPHIC 1153
167 #define TRPGLIGHTATTR_PERFORMER 1154
169 #define TRPGLIGHTATTR_ANIMATION 1155
171 #define TRPGLIGHTATTR_COMMENT 1156
173 #define TRPGLIGHTATTR_HANDLE 1157
175 #define TRPGLIGHT 1160
177 #define TRPG_LIGHT 1160
179 
181 #define TRPGRANGETABLE 1200
182 #define TRPG_RANGE 1201
184 
187 #define TRPG_TEXT_STYLE_TABLE 1300
188 #define TRPG_TEXT_STYLE 1301
190 #define TRPG_TEXT_STYLE_BASIC 1302
192 
194 #define TRPG_SUPPORT_STYLE_TABLE 1310
195 #define TRPG_SUPPORT_STYLE 1311
197 #define TRPG_SUPPORT_STYLE_BASIC 1312
199 
201 #define TRPG_LABEL_PROPERTY_TABLE 1320
202 #define TRPG_LABEL_PROPERTY 1321
204 #define TRPG_LABEL_PROPERTY_BASIC 1322
206 
207 
209 #define TRPG_LABEL 1330
210 
211 
213 #define TRPG_GROUP 2001
214 #define TRPG_BILLBOARD 2002
216 #define TRPG_LOD 2003
218 #define TRPG_TRANSFORM 2004
220 #define TRPG_MODELREF 2005
222 #define TRPG_LAYER 2006
224 
226 #define TRPG_GEOMETRY 3000
227 #define TRPG_GEOM_PRIM 3001
229 #define TRPG_GEOM_MATERIAL 3002
231 #define TRPG_GEOM_VERT32 3003
233 #define TRPG_GEOM_VERT64 3004
235 #define TRPG_GEOM_NORM32 3005
237 #define TRPG_GEOM_NORM64 3006
239 #define TRPG_GEOM_COLOR 3007
241 #define TRPG_GEOM_TEX32 3008
243 #define TRPG_GEOM_TEX64 3009
245 #define TRPG_GEOM_EFLAG 3010
247 
249 #define TRPG_ATTACH 4000
250 
252 #define TRPG_CHILDREF 5000
253 
255 #define TRPG_MAXTOKEN 5000
256 
258 
259 /* 64 bit disk reference value. */
262 typedef int trpgMatRef;
263 
264 /* Double precision 2 dimensional point. */
266 public:
267  double x, y;
268  trpg2dPoint (void) { };
269  trpg2dPoint (double in_x,double in_y) { x = in_x; y = in_y; };
270  bool operator==(const trpg2dPoint& pt ) const {
271  if ( x != pt.x ) return false;
272  if ( y != pt.y ) return false;
273  return true;
274  };
275  bool operator!=(const trpg2dPoint& pt ) const { return !operator==(pt); };
276 };
277 /* Integer 2 dimensional point. This is used primarily as a 2D index value. */
279 public:
280  int x,y;
281  trpg2iPoint (void) { };
282  trpg2iPoint (int in_x,int in_y) {x = in_x; y = in_y;};
283 };
284 /* Double precision 3 dimensional point. */
286 public:
287  double x,y,z;
288  trpg3dPoint(void) { };
289  trpg3dPoint(double in_x,double in_y,double in_z) {x = in_x; y = in_y; z = in_z;}
290  bool operator==(const trpg3dPoint& pt ) const {
291  if ( x != pt.x ) return false;
292  if ( y != pt.y ) return false;
293  if ( z != pt.z ) return false;
294  return true;
295  };
296  bool operator!=(const trpg3dPoint& pt ) const { return !operator==(pt); };
297 };
298 /* Simple red, green, blue color definition */
300 public:
301  trpgColor(float64 r,float64 g,float64 b) {red = r; green = g; blue = b;}
302  trpgColor(void) { };
303  bool operator==(const trpgColor& color) {
304  if ( color.red != red ) return false;
305  if ( color.green != green ) return false;
306  if ( color.blue != blue ) return false;
307  return true;
308  };
309  bool operator!=(const trpgColor& color) { return !operator==(color); };
310  float64 red,green,blue;
311 };
312 
315 
316 /* This is a base class for an abstract buffer type.
317  It contains the virtual methods for writing
318  data to an abstract device. The device implementation is up
319  to the subclass. trpgReadBuffer performs the similar function
320  for reading.
321  {group:Low Level I/O}
322  */
324 public:
325  virtual ~trpgWriteBuffer(void) { };
326  /* The add functions must be filled in by the child class
327  They add data of the appropriate type to the current buffer. */
328  virtual void Add(int32) = 0;
329  virtual void Add(int64) = 0;
330  virtual void Add(const char *) = 0;
331  virtual void Add(float32) = 0;
332  virtual void Add(float64) = 0;
333 //#if (bool != int32)
334  virtual void Add(bool) = 0;
335 //#endif
336  virtual void Add(uint8) = 0;
337 #if (trpgDiskRef != int64)
338  virtual void Add(trpgDiskRef) = 0;
339 #endif
340  virtual void Add(trpgToken) = 0;
341  /* Child class method. Returns the buffer to an original state. */
342  virtual void Reset(void) = 0;
344  virtual void Begin(trpgToken) = 0;
346  virtual void End(void) = 0;
348  virtual void Push(void) = 0;
350  virtual void Pop(void) = 0;
351 
353  virtual void Add(const trpg2iPoint &);
354  virtual void Add(const trpg2dPoint &);
355  virtual void Add(const trpg3dPoint &);
356  virtual void Add(const trpgColor &);
357  virtual void Add(const std::string &);
358 
359  /* Endianness is something the child class buffer type must set and use.
360  This function returns the endiannes of the current buffer. */
361  virtual trpgEndian GetEndian(void) { return ness; }
362 
363 protected:
368 };
369 
370 /* The Memory Write Buffer is an implementation of the Write Buffer that
371  uses chunks of memory. It contains implementations of the all the virtual
372  methods straight to memory. This is used primarily in writing archives and
373  tiles.
374  {group:Low Level I/O}
375  */
377 public:
378  /* The constructor takes an endianness for this buffer.
379  Data will automatically be converted to that as it goes in. */
381  virtual ~trpgMemWriteBuffer(void);
383  virtual int length(void) const;
385  virtual const char *getData(void) const;
387  virtual void setLength(unsigned int);
388 
390  virtual void Add(int32);
392  virtual void Add(int64);
393  /* Add an arbitrary length string to the buffer.
394  This writes both the length and the string itself.
395  */
396  virtual void Add(const char *);
398  virtual void Add(std::string &);
400  virtual void Add(float32);
402  virtual void Add(float64);
403 //#if (bool != int32)
405  virtual void Add(bool);
406 //#endif
408  virtual void Add(uint8);
409 #if (trpgDiskRef != int64)
410  virtual void Add(trpgDiskRef);
412 #endif
413  virtual void Add(trpgToken);
416  virtual void Reset(void);
417  /* Start defining an tokenized object. The token is put into the buffer stream
418  and the position of a size value following it is kept. When End() is called
419  the buffer will rewind to that value and save the size. This method ensures
420  that token data can be skipped if necessary. */
421  virtual void Begin(trpgToken);
422  /* This method is called at the end of a tokenized object. See Begin for details. */
423  virtual void End(void);
424  /* Adds the TRPG_PUSH token to the current buffer. This is done by objects
425  that have children as they're being written. See Pop as well. */
426  virtual void Push(void);
427  /* Adds the TRPG_POP token to the current buffer. This is done by objects
428  that have defined children. See Push. */
429  virtual void Pop(void);
430  /* Take out the pop from the end of the buffer, if there is one */
431  /* Will return true if a pop was actually taken out */
432  virtual bool UnPop();
433  /* Take out the push from the end of the buffer, if there is one */
434  /* Will return true if a push was actually taken out */
435  virtual bool UnPush();
436 
437 protected:
438  virtual void append(unsigned int,const char *);
439  virtual void set(unsigned int pos,unsigned int len,const char *);
440  int curLen;
441  int totLen;
442  char *data;
443  std::vector<int> lengths;
444 };
445 
446 /* This is a virtual base class for reading data from a device.
447  The device implementation is left as an excercise to the sub class.
448  This class contains methods for getting data that must be filled in
449  as well as helper methods that call those.
450  {group:Low Level I/O}
451  */
453 public:
454  virtual ~trpgReadBuffer(void) { };
455  /* The Get methods are utility routines that all call the GetData method.
456  Only that method need be filled in by a subclass. */
457  virtual bool Get(int32 &);
458  virtual bool Get(int64 &);
459  virtual bool Get(char *,int);
460  virtual bool Get(std::string &);
461  virtual bool Get(float32 &);
462  virtual bool Get(float64 &);
463 //#if (bool != int32)
464  virtual bool Get(bool &);
465 //#endif
466  virtual bool Get(uint8 &);
467 #if (trpgDiskRef != int64)
468  virtual bool Get(trpgDiskRef &);
469 #endif
470  virtual bool Get(trpgToken &);
471 
472  /* These methods return references to arrays of data of the given types.
473  These are all utility routines and depend upon GetDataRef. */
474  virtual bool GetArray(int,float32 **);
475  virtual bool GetArray(int,float64 **);
476  virtual bool GetArray(int,int32 **);
477  virtual bool GetArray(int,trpgColor **);
478  virtual bool GetArray(int,char **);
479 
480  virtual bool Get(trpg2iPoint &);
481  virtual bool Get(trpg2dPoint &);
482  virtual bool Get(trpg3dPoint &);
483  virtual bool Get(trpgColor &);
484  virtual bool GetToken(trpgToken &,int32 &);
485 
486  /* Force the buffer to only allow the next N bytes to be read.
487  The limits are stack based. That is, this limit is the current one
488  until it's popped off the stack. Then it reverts to the previous one.
489  Any bytes read in the mean time count against all limits. */
490  virtual void PushLimit(int);
491  /* Revert to the limit before this one. Typically this would happen when
492  a tokenized object has been read. */
493  virtual void PopLimit(void);
494  /* Skip to the end of the current limit. This is done by a parser when
495  reading a tokenized object from the buffer to make sure that the next
496  object can be safely read even if the current one wasn't. */
497  virtual bool SkipToLimit(void);
498 
500  virtual bool isEmpty(void) = 0;
501 
503  /* A utility function for subclasses to use to see if they would exceed an
504  outside imposed limit by reading the given number of bytes. */
505  virtual bool TestLimit(int);
506 
507 protected:
510  /* Virtual raw data retrieval function that must be implemented by a subclass.
511  It must return a given number of bytes in the array passed in. */
512  virtual bool GetData(char *,int)=0;
513  /* Virtual raw data reference retrieval function. The difference between
514  this method and GetData is that this is supposed to return a pointer
515  to a given amount of bytes. This assumes some sort of memory caching
516  mechanism in the subclass. */
517  virtual bool GetDataRef(char **,int)=0;
518  /* This virtual method must be filled in by the subclass so that SkipToLimit
519  will work correctly. */
520  virtual bool Skip(int) = 0;
521  /* Utility function that must be called after a successfull read to update
522  the outside imposed read limits. */
523  virtual void UpdateLimits(int);
524  std::vector<int> limits;
525 };
526 
527 /* This class implements a read buffer that uses a chunk of memory.
528  Typically, raw data will be dumped into this class, then it will be
529  passed to a parser for object based reading.
530  {group:Low Level I/O}
531  */
533 public:
536  ~trpgMemReadBuffer(void);
538  bool isEmpty(void);
540  void SetLength(int);
542  int GetLength(void) { return len; }
543  /* Return a pointer to the raw data cache for this object. Data will
544  be dumped straight into here (from disk, for example) and then parsed
545  by something that takes a trpgReadBuffer as input. */
546  char *GetDataPtr(void);
547 protected:
548  bool GetData(char *,int);
549  bool GetDataRef(char **,int);
550  bool Skip(int);
551  int len;
552  int totLen;
553  int pos;
554  char *data;
555 };
556 
557 /* A Checkable is purely a base class used by other classes that
558  need validity checks associated with them. By default, the
559  checkable will return false for isValid unless the valid flag is set.
560  */
562 public:
563  trpgCheckable(void);
564  virtual ~trpgCheckable(void);
566  bool isValid(void) const;
567 
568  virtual TeAttrHdl GetHandle() const {
569  return handle;
570  }
571  virtual void SetHandle(TeAttrHdl hdl) {
572  writeHandle = true;
573  handle = hdl;
574  }
575 
576 protected:
577  /* Set this flag to true if your checkable structure doesn't have a complex
578  check it needs to do. */
579  bool valid;
582 };
583 
584 class trpgPrintBuffer;
585 /* The Read/Writeable is a class that knows how to read itself from a trpgReadBuffer
586  and write itself to a trpgWriteBuffer. This includes all the node and header
587  data in TerraPage. These classes are intended as marshalling points for reading
588  and writing data, not as data containers in and of themselves. If you find
589  yourself keeping a lot of classes derived from trpgReadWriteable around, you're
590  probably misusing them.
591 
592  The classes derived from this one will have a lot of methods that begin with
593  "Set", "Get", and "Add". These will almost always return a bool value. This
594  is used to indicate whether the given call succeeded. In the case of "Set" and "Add" calls
595  this should always work if it possibly can. An out of range index might make it
596  fail, for example. "Get" calls will always fail if the object you're getting from
597  is not valid. Be sure to do an isValid check as soon as you've read or filled out
598  one of these objects.
599  {group:Read/Write Classes}
600  */
602 public:
603 
604  trpgReadWriteable() { errMess[0] = '\0';}
605 
606  /* The Write method is a virtual that must be filled in by the subclass.
607  It takes a trpgWriteBuffer and should return true on success. */
608  virtual bool Write(trpgWriteBuffer &) = 0;
609  /* The Read method should be overriden by a subclass. It should read
610  the contents of the given trpgReadBuffer up to the current limit
611  into itself. It must return true on success. */
612  virtual bool Read(trpgReadBuffer &) { return false;};
613  /* Every read/writeable must be able to reset itself to a pristine state
614  so that, for example, multiple objects of the same type can be read into
615  it, one after the other. */
616  virtual void Reset(void) = 0;
617  /* The print method is optional. If it's not there, it won't do anything.
618  */
619  virtual bool Print(trpgPrintBuffer &) const { return true; }
620 
621  const char *getErrMess() const {if(errMess[0] == '\0') return 0;else return &errMess[0];}
622 
623 protected:
624 
625  mutable char errMess[512];
626 };
627 
628 /* Pointer into a trpgwAppFile. The full name of the file
629  is based on the context (e.g. texture vs. tile)
630  {group:Archive Writing}
631  */
633 public:
634  trpgwAppAddress() {file = -1; offset = -1; row = -1; col = -1;};
636  int32 file;
644 
645 };
646 
647 /* Archive File.
648  This class represents an appendable file archive used for
649  consolidating tiles and textures.
650  {group:Archive Writing}
651  */
653 public:
654  trpgwAppFile() {valid=false;};
655  trpgwAppFile(trpgEndian,const char *,bool reuse=false);
656  virtual ~trpgwAppFile(void);
657  virtual bool Append(const trpgMemWriteBuffer *,const trpgMemWriteBuffer *);
658  virtual bool Append(const char *,int size);
659  virtual int64 Pos(void) const;
660  virtual int GetLengthWritten();
661  virtual bool Flush(void);
662  virtual void Init(trpgEndian,const char *,bool reuse=false);
663 
664  bool isValid(void) const;
665 protected:
666  bool valid;
667  trpgEndian ness,cpuNess;
668  FILE *fp;
670 };
671 
672 /* Archive File - Read version.
673  This class represents an appendable file archive from the
674  read perspective. This is the same type of file written by
675  trpgwAppFile.
676  */
678 public:
679  trpgrAppFile() {valid=false;};
680  trpgrAppFile(trpgEndian,const char *);
682  virtual void Init(trpgEndian,const char *);
683  virtual ~trpgrAppFile(void);
684  virtual bool Read(trpgMemReadBuffer *,int32 offset);
685  virtual bool Read(char *data,int32 baseOffset,int32 objOffset,int32 dataSize);
686 
687  bool isValid(void) const;
688 protected:
689  bool valid;
690  trpgEndian ness,cpuNess;
691  FILE *fp;
692 };
693 
694 /* Archive File Cache.
695  This class keeps
696  */
698 public:
700  trpgrAppFileCache(const char *prefix,const char *ext,int noFiles=32);
702  virtual void Init(const char *prefix,const char *ext,int noFiles);
703  virtual ~trpgrAppFileCache(void);
704  virtual trpgrAppFile *GetFile(trpgEndian ness,int id,int col,int row);
705  virtual trpgrAppFile *GetFile(trpgEndian ness,int id);
706  virtual trpgrAppFile *GetNewRAppFile(trpgEndian ness, const char *fileName);
707 protected:
709  char baseName[1024],ext[20];
710 
711  class OpenFile {
712  public:
713  OpenFile(void);
714  int id;
715  int row;
716  int col;
718  int lastUsed;
719  };
720 
721  std::vector<OpenFile> files;
722  int timeCount;
723 };
724 
725 #endif
Definition: trpage_io.h:314
bool writeHandle
Definition: trpage_io.h:581
int lastUsed
Definition: trpage_io.h:718
virtual void Add(int32)=0
trpgllong trpgDiskRef
Basic data types.
Definition: trpage_io.h:260
double y
Definition: trpage_io.h:287
trpg3dPoint(double in_x, double in_y, double in_z)
Definition: trpage_io.h:289
trpgEndian
Used to specify machine endianess.
Definition: trpage_io.h:314
int y
Definition: trpage_io.h:280
std::vector< int > limits
Definition: trpage_io.h:524
trpgEndian cpuNess
Endianness of the machine we&#39;re running on.
Definition: trpage_io.h:367
FILE * fp
Definition: trpage_io.h:668
FILE * fp
Definition: trpage_io.h:691
#define DT_DLL_osgdb_vrftxp
Contains DLL export macros.
Definition: osgdb_vrftxpDefines.h:25
virtual void Push(void)=0
See trpgMemWriteBuffer for details.
std::vector< OpenFile > files
Definition: trpage_io.h:721
const char * getErrMess() const
Definition: trpage_io.h:621
virtual TeAttrHdl GetHandle() const
Definition: trpage_io.h:568
Definition: trpage_io.h:314
trpgrAppFileCache()
Definition: trpage_io.h:699
virtual void End(void)=0
See trpgMemWriteBuffer for details.
Definition: trpage_io.h:697
int trpgMatRef
{secret}
Definition: trpage_io.h:262
float64 green
Definition: trpage_io.h:309
int timeCount
Definition: trpage_io.h:722
float64 red
Definition: trpage_io.h:309
double x
Definition: trpage_io.h:267
voidpf void uLong size
Definition: ioapi.h:39
virtual bool GetDataRef(char **, int)=0
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
trpgrAppFile * afile
Definition: trpage_io.h:717
trpgwAppFile()
Definition: trpage_io.h:654
virtual bool Skip(int)=0
trpg2iPoint(int in_x, int in_y)
Definition: trpage_io.h:282
long TeAttrHdl
Definition: trpage_io.h:30
TeAttrHdl handle
Definition: trpage_io.h:580
trpg2iPoint(void)
Definition: trpage_io.h:281
int32 row
Row and col are used for TerraPage 2.3 archives, so we can know which block to get the appropriate fi...
Definition: trpage_io.h:642
bool valid
Definition: trpage_io.h:666
virtual void Reset(void)=0
trpgColor(float64 r, float64 g, float64 b)
Definition: trpage_io.h:301
trpgEndian ness
Definition: trpage_io.h:508
double z
Definition: trpage_io.h:287
long long int64
Definition: trpage_sys.h:67
Definition: trpage_io.h:652
trpg2dPoint(double in_x, double in_y)
Definition: trpage_io.h:269
virtual bool GetData(char *, int)=0
Endiannees of the CPU.
int col
Definition: trpage_io.h:716
trpgEndian ness
Definition: trpage_io.h:690
trpg2dPoint(void)
Definition: trpage_io.h:268
virtual void SetHandle(TeAttrHdl hdl)
Definition: trpage_io.h:571
Definition: trpage_io.h:376
float64 blue
Definition: trpage_io.h:309
IMGUI_API void End()
trpgReadWriteable()
Definition: trpage_io.h:604
bool valid
Definition: trpage_io.h:579
Definition: trpage_io.h:265
unsigned char uint8
Basic data types.
Definition: trpage_sys.h:74
char * data
Current position.
Definition: trpage_io.h:554
char * data
Definition: trpage_io.h:442
int totLen
Data Length.
Definition: trpage_io.h:552
Definition: trpage_io.h:561
Definition: trpage_io.h:299
int32 offset
Offset within the file Note: This is not a 64 bit value.
Definition: trpage_io.h:639
Definition: trpage_io.h:532
Definition: trpage_io.h:677
Definition: trpage_print.h:28
Definition: trpage_io.h:632
float float32
Definition: trpage_sys.h:83
bool operator!=(const trpg3dPoint &pt) const
Definition: trpage_io.h:296
virtual ~trpgWriteBuffer(void)
Definition: trpage_io.h:325
virtual void Begin(trpgToken)=0
See trpgMemWriteBuffer for details.
int totLen
Definition: trpage_io.h:441
trpgColor(void)
Definition: trpage_io.h:302
double y
Definition: trpage_io.h:267
trpgEndian cpuNess
Endianness of the source we&#39;re reading.
Definition: trpage_io.h:509
Definition: trpage_io.h:601
int row
ID of open file.
Definition: trpage_io.h:715
int64 trpgllong
We use long longs for addresses within a paging file.
Definition: trpage_sys.h:96
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
std::vector< int > lengths
Definition: trpage_io.h:443
virtual bool Print(trpgPrintBuffer &) const
Definition: trpage_io.h:619
virtual bool Read(trpgReadBuffer &)
Definition: trpage_io.h:612
Definition: trpage_io.h:323
Definition: trpage_io.h:278
int GetLength(void)
Gets the size of the buffer.
Definition: trpage_io.h:542
trpgEndian ness
Definition: trpage_io.h:667
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
bool operator==(const trpgColor &color)
Definition: trpage_io.h:303
bool operator==(const trpg2dPoint &pt) const
Definition: trpage_io.h:270
int id
Definition: trpage_io.h:714
bool operator!=(const trpg2dPoint &pt) const
Definition: trpage_io.h:275
virtual ~trpgReadBuffer(void)
Definition: trpage_io.h:454
int len
Skip over the given amount.
Definition: trpage_io.h:551
Definition: trpage_io.h:711
trpg3dPoint(void)
Definition: trpage_io.h:288
int pos
Total allocated length.
Definition: trpage_io.h:553
trpgwAppAddress()
Definition: trpage_io.h:634
double x
Definition: trpage_io.h:287
#define TX_EXDECL
Goes before &quot;class&quot; to handle DLL export in windows.
Definition: trdll.h:69
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
trpgEndian ness
Target endianness of the buffer. This should be set by the subclass on creation.
Definition: trpage_io.h:365
virtual bool isEmpty(void)=0
Buffer is empty.
Definition: trpage_io.h:452
voidpf uLong offset
Definition: ioapi.h:42
trpgrAppFile()
Definition: trpage_io.h:679
int curLen
Definition: trpage_io.h:440
bool valid
Definition: trpage_io.h:689
virtual void Pop(void)=0
See trpgMemWriteBuffer for details.
virtual trpgEndian GetEndian(void)
Definition: trpage_io.h:361
int lengthSoFar
Definition: trpage_io.h:669
Definition: trpage_io.h:285
short trpgToken
16 bit token definition value. These are values such as TRPGTEXTABLE or TRPG_ATTACH, etc...
Definition: trpage_io.h:61
bool operator==(const trpg3dPoint &pt) const
Definition: trpage_io.h:290
int32 col
Definition: trpage_io.h:643

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)