62 towardIndex = d.towardIndex;
72 towardIndex = d.towardIndex;
80 o <<
"toward=\"" << towardIndex <<
"\"";
90 o <<
"x=\"" << x <<
"\" ";
102 o <<
"y=\"" << y <<
"\" ";
114 o <<
"z=\"" << z <<
"\"";
120 o <<
"/>" << std::endl;
124 void set(
const double x,
const double y,
const double z) {
137 towardIndex = toward;
138 xState = yState = zState = TOWARD;
143 return (towardIndex >= 0 && xState == TOWARD && yState == TOWARD && zState == TOWARD);
156 return (xState == NULL_DIR);
161 return (xState == SPECIFIED);
179 double getY()
const {
186 return (yState == NULL_DIR);
191 return (yState == SPECIFIED);
210 double getZ()
const {
217 return (zState == NULL_DIR);
222 return (zState == SPECIFIED);
255 DirState xState{NOT_SPECIFIED};
257 DirState yState{NOT_SPECIFIED};
259 DirState zState{NOT_SPECIFIED};
Class that defines the direction of the Load with x, y and z.
Definition: Direction.h:39
double getY() const
get the y coordinate
Definition: Direction.h:180
Direction(const Direction &d)
copy constructor
Definition: Direction.h:55
void setNullY()
set the y coordinate as NULL
Definition: Direction.h:195
void setY(const double y)
set the y coordinate
Definition: Direction.h:201
Direction(const unsigned int toward)
constructor with initialization of the toward
Definition: Direction.h:45
void setX(const double x)
set the x coordinate
Definition: Direction.h:171
Direction(double x0, double y0, double z0)
constructor with initialization of the 3 directions
Definition: Direction.h:49
bool isXSpecified() const
is the x coordinate specified
Definition: Direction.h:160
double getX() const
get the x coordinate
Definition: Direction.h:150
double getZ() const
get the z coordinate
Definition: Direction.h:211
void setNullX()
set the x coordinate as NULL
Definition: Direction.h:165
void setToward(const unsigned int toward)
set the toward index
Definition: Direction.h:136
bool isXNull() const
is the x coordinate NULL ?
Definition: Direction.h:155
bool isZNull() const
is the z coordinate NULL ?
Definition: Direction.h:216
bool isYNull() const
is the y coordinate NULL ?
Definition: Direction.h:185
void setNullZ()
set the z coordinate as NULL
Definition: Direction.h:226
bool isZSpecified() const
is the z coordinate specified
Definition: Direction.h:221
Direction()
default constructor: nothing is specified
Definition: Direction.h:43
void setZ(const double z)
set the z coordinate
Definition: Direction.h:232
int getToward() const
get the toward index
Definition: Direction.h:131
Direction & operator=(const Direction &d)
Definition: Direction.h:65
void set(const double x, const double y, const double z)
set the direction
Definition: Direction.h:124
bool isYSpecified() const
is the y coordinate specified
Definition: Direction.h:190
void xmlPrint(std::ostream &o) const
print to an ostream
Definition: Direction.h:77
bool isToward() const
true only if the direction is set by a toward atom
Definition: Direction.h:142