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

The 3D point class. More...

#include <3d.h>

Inheritance diagram for OPoint3D:
Inheritance graph
[legend]
Collaboration diagram for OPoint3D:
Collaboration graph
[legend]

Public Member Functions

 OPoint3D ()
 Default constructor. More...
 
 OPoint3D (const OPoint3D &pt)
 Copy constructor. More...
 
 OPoint3D (const OCoord3D &coord)
 Constructor from a 3D coord. More...
 
 OPoint3D (double x, double y, double z)
 Constructs a new object from 3 doubles. More...
 
 OPoint3D (double v[])
 Constructs a new object from 3 doubles. More...
 
virtual ~OPoint3D ()
 Destructor. More...
 
virtual void set (double x, double y, double z)
 
virtual void setFromOGL (double x, double y, double z)
 
virtual void setFromOGL (float x, float y, float z)
 
virtual void setFromOGL (float coords[3])
 
virtual void setFromOGL (double coords[3])
 
virtual void getToOGL (double &x, double &y, double &z)
 
virtual void getToOGL (double coords[3])
 
double distFrom (const OPoint3D &pt) const
 Computes the distance from this point to another. More...
 
double dist2DFrom (const OPoint3D &pt) const
 Computes the distance from this point to another in 2D plan. More...
 
bool isEqual (const OPoint3D &oPoint) const
 Compatibility alias for operator==. More...
 
- Public Member Functions inherited from OCoord3D
 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 * ()
 

Static Public Member Functions

static TabPoint3D checkPointsMaxDistance (const TabPoint3D &points, const double &distanceMax)
 
static TabPoint3D checkPointsMaxDistance (const OPoint3D &point1, const OPoint3D &point2, const double &distanceMax)
 Same as previous function taking two points instead of a tab of points. More...
 

Additional Inherited Members

- Public Attributes inherited from OCoord3D
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 point class.

Definition at line 486 of file 3d.h.

Constructor & Destructor Documentation

◆ OPoint3D() [1/5]

OPoint3D::OPoint3D ( )

Default constructor.

Definition at line 328 of file 3d.cpp.

◆ OPoint3D() [2/5]

OPoint3D::OPoint3D ( const OPoint3D pt)

Copy constructor.

Parameters
ptThe object to be copied.

Definition at line 330 of file 3d.cpp.

◆ OPoint3D() [3/5]

OPoint3D::OPoint3D ( const OCoord3D coord)

Constructor from a 3D coord.

Parameters
coordThe object to be copied.

Definition at line 332 of file 3d.cpp.

◆ OPoint3D() [4/5]

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

Constructs a new object from 3 doubles.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 334 of file 3d.cpp.

◆ OPoint3D() [5/5]

OPoint3D::OPoint3D ( double  v[])

Constructs a new object from 3 doubles.

Parameters
vtable of coordinates.

Definition at line 336 of file 3d.cpp.

◆ ~OPoint3D()

OPoint3D::~OPoint3D ( )
virtual

Destructor.

Definition at line 338 of file 3d.cpp.

Member Function Documentation

◆ checkPointsMaxDistance() [1/2]

TabPoint3D OPoint3D::checkPointsMaxDistance ( const OPoint3D point1,
const OPoint3D point2,
const double &  distanceMax 
)
static

Same as previous function taking two points instead of a tab of points.

Definition at line 423 of file 3d.cpp.

Here is the call graph for this function:

◆ checkPointsMaxDistance() [2/2]

TabPoint3D OPoint3D::checkPointsMaxDistance ( const TabPoint3D points,
const double &  distanceMax 
)
static

Utility method assuring that two consecutive points are spaced within a maximal length adding add new points if necessary

Parameters
pointsThe array of points to check.
distanceMaxMaximal distance between two points.
Returns
A new array containing points spaced less than distanceMax

Definition at line 386 of file 3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dist2DFrom()

double OPoint3D::dist2DFrom ( const OPoint3D pt) const

Computes the distance from this point to another in 2D plan.

Definition at line 376 of file 3d.cpp.

Here is the caller graph for this function:

◆ distFrom()

double OPoint3D::distFrom ( const OPoint3D pt) const

Computes the distance from this point to another.

Parameters
ptThe point to measure the distance from.

Definition at line 371 of file 3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getToOGL() [1/2]

void OPoint3D::getToOGL ( double &  x,
double &  y,
double &  z 
)
virtual

Compatibility with OGL. Change from Tympan frame to OGL.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 359 of file 3d.cpp.

Here is the caller graph for this function:

◆ getToOGL() [2/2]

void OPoint3D::getToOGL ( double  coords[3])
virtual

Compatibility with OGL. Change from Tympan frame to OGL.

Parameters
coords3D coordinates (double)

Definition at line 366 of file 3d.cpp.

Here is the call graph for this function:

◆ isEqual()

bool OPoint3D::isEqual ( const OPoint3D oPoint) const
inline

Compatibility alias for operator==.

Definition at line 595 of file 3d.h.

◆ set()

void OPoint3D::set ( double  x,
double  y,
double  z 
)
virtual

Set coordinates to the object.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 381 of file 3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFromOGL() [1/4]

virtual void OPoint3D::setFromOGL ( double  coords[3])
inlinevirtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
coords3D coordinates (double)

Definition at line 561 of file 3d.h.

Here is the call graph for this function:

◆ setFromOGL() [2/4]

void OPoint3D::setFromOGL ( double  x,
double  y,
double  z 
)
virtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 340 of file 3d.cpp.

Here is the caller graph for this function:

◆ setFromOGL() [3/4]

void OPoint3D::setFromOGL ( float  coords[3])
virtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
coords3D coordinates (float)

Definition at line 354 of file 3d.cpp.

Here is the call graph for this function:

◆ setFromOGL() [4/4]

void OPoint3D::setFromOGL ( float  x,
float  y,
float  z 
)
virtual

Definition at line 347 of file 3d.cpp.


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