Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Public Attributes | List of all members
OCoord3D Class Reference

The 3D coordinate class. More...

#include <3d.h>

Inheritance diagram for OCoord3D:
Inheritance graph
[legend]

Public Member Functions

 OCoord3D ()
 Default constructor. More...
 
 OCoord3D (const OCoord3D &coord)
 Copy constructor. More...
 
 OCoord3D (double x, double y, double z)
 Constructor with 3D point coordinates. More...
 
virtual ~OCoord3D ()
 Destructor. More...
 
OCoord3Doperator= (const OCoord3D &coord)
 operator= More...
 
bool operator== (const OCoord3D &coord) const
 operator== More...
 
bool operator!= (const OCoord3D &coord) const
 operator!= More...
 
void setCoords (double x, double y, double z)
 Sets the coordinates as an array of double. More...
 
void setCoords (double coords[3])
 Sets the coordinates as an array of double. More...
 
void getCoords (double coords[3])
 Gets the coordinates as an array of double. More...
 
double * getCoords ()
 Gets the coordinates as an array of double. More...
 
 operator const double * () const
 
 operator double * ()
 

Public Attributes

union {
   struct {
      double   _x
 x coordinate of OCoord3D More...
 
      double   _y
 y coordinate of OCoord3D More...
 
      double   _z
 z coordinate of OCoord3D More...
 
   } 
 
   double   _value [3]
 
}; 
 

Detailed Description

The 3D coordinate class.

Definition at line 225 of file 3d.h.

Constructor & Destructor Documentation

◆ OCoord3D() [1/3]

OCoord3D::OCoord3D ( )

Default constructor.

Definition at line 29 of file 3d.cpp.

◆ OCoord3D() [2/3]

OCoord3D::OCoord3D ( const OCoord3D coord)

Copy constructor.

Definition at line 33 of file 3d.cpp.

◆ OCoord3D() [3/3]

OCoord3D::OCoord3D ( double  x,
double  y,
double  z 
)

Constructor with 3D point coordinates.

Definition at line 31 of file 3d.cpp.

◆ ~OCoord3D()

OCoord3D::~OCoord3D ( )
virtual

Destructor.

Definition at line 38 of file 3d.cpp.

Member Function Documentation

◆ getCoords() [1/2]

double * OCoord3D::getCoords ( )

Gets the coordinates as an array of double.

Definition at line 97 of file 3d.cpp.

◆ getCoords() [2/2]

void OCoord3D::getCoords ( double  coords[3])

Gets the coordinates as an array of double.

Definition at line 90 of file 3d.cpp.

Here is the caller graph for this function:

◆ operator const double *()

OCoord3D::operator const double * ( ) const
inline

cast operator to get coordinates via a table.

Definition at line 265 of file 3d.h.

◆ operator double *()

OCoord3D::operator double * ( )
inline

cast operator to get coordinates via a table.

Definition at line 272 of file 3d.h.

◆ operator!=()

bool OCoord3D::operator!= ( const OCoord3D coord) const

operator!=

Definition at line 71 of file 3d.cpp.

Here is the call graph for this function:

◆ operator=()

OCoord3D & OCoord3D::operator= ( const OCoord3D coord)

operator=

Definition at line 40 of file 3d.cpp.

Here is the caller graph for this function:

◆ operator==()

bool OCoord3D::operator== ( const OCoord3D coord) const

operator==

Definition at line 51 of file 3d.cpp.

Here is the caller graph for this function:

◆ setCoords() [1/2]

void OCoord3D::setCoords ( double  coords[3])

Sets the coordinates as an array of double.

Definition at line 83 of file 3d.cpp.

◆ setCoords() [2/2]

void OCoord3D::setCoords ( double  x,
double  y,
double  z 
)

Sets the coordinates as an array of double.

Definition at line 76 of file 3d.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ 

union { ... }

◆ _value

double OCoord3D::_value[3]

Definition at line 286 of file 3d.h.

◆ _x

double OCoord3D::_x

x coordinate of OCoord3D

Definition at line 282 of file 3d.h.

◆ _y

double OCoord3D::_y

y coordinate of OCoord3D

Definition at line 283 of file 3d.h.

◆ _z

double OCoord3D::_z

z coordinate of OCoord3D

Definition at line 284 of file 3d.h.


The documentation for this class was generated from the following files: