VR-Forces 4.0.4 Class Documentation
include/ctdb/c7bTerrainElement8.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: c7bTerrainElement8.h,v $ $Revision: 1.10 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 //
00010 // File c7bTerrainElement8
00011 //
00012 
00013 
00014 #ifndef __DtC7bTerrainElement8
00015 #define __DtC7bTerrainElement8
00016 
00017 #include "ctdb/ctdbDefines.h"
00018 #include <stdio.h>
00019 #include "ctdb/c7NetTypes.h"
00020 
00021 // Class:    DtC7bTerrainElement8
00022 //
00023 // The class is public because should not be used but anyone else than 
00024 // DtC7b.
00025 // 
00026 
00027 class DT_DLL_ctdb DtTE8Info_Little
00028 {
00029 public:
00030     char                           adj_sides; /* Two bits per edge */
00031     unsigned char                 soil1;
00032     unsigned char                     soil0;
00033     unsigned char                      patch_adj:4;
00034     unsigned char                      vertices:2;
00035     unsigned char                      blank1:2; /* place holder */
00036 };
00037 
00038 class DT_DLL_ctdb DtTE8Info_Big
00039 {
00040 public:
00041     unsigned char                      blank1:2; /* place holder */
00042     unsigned char                      vertices:2;
00043     unsigned char                      patch_adj:4;
00044     unsigned char                     soil0;
00045     unsigned char                 soil1;
00046     char                           adj_sides; /* Two bits per edge */
00047 };
00048 
00049 class DT_DLL_ctdb DtC7bTerrainElement8
00050 {
00051 public:
00052 
00053    DtC7bTerrainElement8();
00054    ~DtC7bTerrainElement8();
00055 
00056    bool read(FILE *f);
00057 
00058    bool      isTriangle();
00059    bool      isQuadrilateral();
00060 
00061    int            vertices();
00062    int            soil0();
00063    int            soil1();
00064 
00065    void           swapEndian();
00066 
00067    DtC7NetU16       myY;
00068    DtC7NetU16       myX;
00069    DtC7NetFloat32   myZ;   
00070    DtNetU8        myAdjacents[4];   
00071    DtNetU8        myIndex[4]; 
00072    DtC7NetU32     myTEData;
00073 };
00074 
00075 #endif
00076 

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)