open-dis-cpp
GridAxis.h
1 #pragma once
2 
3 #include <dis7/utils/DataStream.h>
4 #include <dis7/opendis7_export.h>
5 
6 
7 namespace DIS
8 {
9 // Grid axis record for fixed data. Section 6.2.41
10 
11 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
12 //
13 // @author DMcG, jkg
14 
15 class OPENDIS7_EXPORT GridAxis
16 {
17 protected:
20 
22  double _domainFinalXi;
23 
25  unsigned short _domainPointsXi;
26 
28  unsigned char _interleafFactor;
29 
31  unsigned char _axisType;
32 
34  unsigned short _numberOfPointsOnXiAxis;
35 
37  unsigned short _initialIndex;
38 
39 
40  public:
41  GridAxis();
42  virtual ~GridAxis();
43 
44  virtual void marshal(DataStream& dataStream) const;
45  virtual void unmarshal(DataStream& dataStream);
46 
47  double getDomainInitialXi() const;
48  void setDomainInitialXi(double pX);
49 
50  double getDomainFinalXi() const;
51  void setDomainFinalXi(double pX);
52 
53  unsigned short getDomainPointsXi() const;
54  void setDomainPointsXi(unsigned short pX);
55 
56  unsigned char getInterleafFactor() const;
57  void setInterleafFactor(unsigned char pX);
58 
59  unsigned char getAxisType() const;
60  void setAxisType(unsigned char pX);
61 
62  unsigned short getNumberOfPointsOnXiAxis() const;
63  void setNumberOfPointsOnXiAxis(unsigned short pX);
64 
65  unsigned short getInitialIndex() const;
66  void setInitialIndex(unsigned short pX);
67 
68 
69 virtual int getMarshalledSize() const;
70 
71  bool operator ==(const GridAxis& rhs) const;
72 };
73 }
74 
75 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
76 // Redistribution and use in source and binary forms, with or without
77 // modification, are permitted provided that the following conditions
78 // are met:
79 //
80 // * Redistributions of source code must retain the above copyright
81 // notice, this list of conditions and the following disclaimer.
82 // * Redistributions in binary form must reproduce the above copyright
83 // notice, this list of conditions and the following disclaimer
84 // in the documentation and/or other materials provided with the
85 // distribution.
86 // * Neither the names of the Naval Postgraduate School (NPS)
87 // Modeling Virtual Environments and Simulation (MOVES) Institute
88 // (http://www.nps.edu and http://www.MovesInstitute.org)
89 // nor the names of its contributors may be used to endorse or
90 // promote products derived from this software without specific
91 // prior written permission.
92 //
93 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
94 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
95 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
96 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
97 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
98 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
99 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
100 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
101 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
102 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
103 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
104 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned short _domainPointsXi
The number of grid points along the Xi domain axis for the enviornmental state data.
Definition: GridAxis.h:25
double _domainInitialXi
coordinate of the grid origin or initial value
Definition: GridAxis.h:19
unsigned char _interleafFactor
interleaf factor along the domain axis.
Definition: GridAxis.h:28
Definition: GridAxis.h:15
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned short _numberOfPointsOnXiAxis
Number of grid locations along Xi axis.
Definition: GridAxis.h:34
unsigned short _initialIndex
initial grid point for the current pdu
Definition: GridAxis.h:37
double _domainFinalXi
coordinate of the endpoint or final value
Definition: GridAxis.h:22
unsigned char _axisType
type of grid axis
Definition: GridAxis.h:31