15 #ifndef __IPSDKGEOMETRY_SEGMENT3D_H__ 16 #define __IPSDKGEOMETRY_SEGMENT3D_H__ 20 #pragma warning (push) 21 #pragma warning (disable : 4251) 25 #include <IPSDKGeometry/Entity/3d/Point/Point3d.h> 26 #include <IPSDKGeometry/Entity/3d/Vector/Vector3d.h> 55 Segment3d(
const T x0,
const T y0,
const T z0,
const T x1,
const T y1,
const T z1);
73 inline void setCoords(
const T x0,
const T y0,
const T z0,
const T x1,
const T y1,
const T z1);
138 template <
typename T>
147 template <
typename T>
149 Segment3d<T>::Segment3d(
const Point3d<T>& pt0,
const Point3d<T>& pt1) :
150 _pt0(pt0.getCoords()),
151 _pt1(pt1.getCoords())
156 template <
typename T>
158 Segment3d<T>::Segment3d(
const Point3dData<T>& pt0,
const Point3dData<T>& pt1) :
165 template <
typename T>
167 Segment3d<T>::Segment3d(
const Point3d<T>& pt0,
const Vector3d& v01)
172 template <
typename T>
174 Segment3d<T>::Segment3d(
const Point3dData<T>& pt0,
const Vector3d& v01)
179 template <
typename T>
183 return g_coordinateSystem3dType;
186 template <
typename T>
190 return g_entity3dType;
193 template <
typename T>
197 _pt0.setCoords(x0, y0, z0);
198 _pt1.setCoords(x1, y1, z1);
201 template <
typename T>
209 template <
typename T>
217 template <
typename T>
224 template <
typename T>
230 _pt1.
_x += math::round<T>(v01.
getX());
231 _pt1._y += math::round<T>(v01.
getY());
232 _pt1._z += math::round<T>(v01.
getZ());
235 template <
typename T>
242 template <
typename T>
249 template <
typename T>
256 template <
typename T>
263 template <
typename T>
270 template <
typename T>
277 template <
typename T>
281 return (_pt0._x + _pt1._x) / 2.0;
284 template <
typename T>
288 return (_pt0._y + _pt1._y) / 2.0;
291 template <
typename T>
295 return (_pt0._z + _pt1._z) / 2.0;
298 template <
typename T>
305 template <
typename T>
312 template <
typename T>
320 template <
typename T>
335 #pragma warning (pop) 337 #endif // __IPSDKGEOMETRY_SEGMENT3D_H__ 3d segment associated to two points
Definition: Segment3d.h:38
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eCoordinateSystem3dType
Enumerate describing coordinate system 3d type.
Definition: GeometryEntity3dTypes.h:74
void setCoords(const T x0, const T y0, const T z0, const T x1, const T y1, const T z1)
access to segment coordinates
Definition: Segment3d.h:195
Point class associated to cartesian 3d coordinates.
Definition: GeometryEntity3dTypes.h:29
#define IPSDK_DECLARE_GEOMETRY_ENTITY_3D(libraryName, className)
Macro allowing to declare a geometry entity 3d.
Definition: GeometryEntity3dHdrMacros.h:131
Point3dData< T > _pt1
second point associated to segment
Definition: Segment3d.h:132
Point3dData< T > _pt0
first point associated to segment
Definition: Segment3d.h:129
const Point3dData< T > & getPoint1() const
access to segment coordinates
Definition: Segment3d.h:272
T _x
x coordinate of point
Definition: Point3dData.h:69
Operators associated to segment 3d entities.
eCoordinateSystem3dType getCoordinateSystem3dType() const
method allowing to retrieve coordinate system 3d type
Definition: Segment3d.h:181
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
ipReal64 distance(const Point3d< T > &pt) const
retrieve orthogonal distance between point and segment
Definition: Segment3d.h:307
const Point3dData< T > & getPoint0() const
access to segment coordinates
Definition: Segment3d.h:265
const Point3dData< T > & getCoords() const
access to point coordinates
Definition: Point3d.h:142
ipReal64 getX() const
retrieve cartesian components of vector
Definition: Vector3d.h:264
Vector class associated to spherical 3d coordinates.
Definition: Vector3d.h:32
IPSDKGEOMETRY_API ipReal64 distance(const Point2d< T > &pt1, const Point2d< T > &pt2)
compute euclidian distance between two points
Definition of import/export macro for library.
Segment.
Definition: GeometryEntity3dTypes.h:64
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
void setPoint1(const Point3d< T > &pt1)
access to segment coordinates
Definition: Segment3d.h:251
ipReal64 getZ() const
retrieve cartesian components of vector
Definition: Vector3d.h:276
ipReal64 getMiddleZ() const
retrieve segment middle point coordinates
Definition: Segment3d.h:293
Point3dData< ipReal64 > getMiddlePoint() const
retrieve segment middle point coordinates
Definition: Segment3d.h:300
Utility functions for ipsdk math library.
eEntity3dType
Enumerate describing entity 3d type.
Definition: GeometryEntity3dTypes.h:38
eEntity3dType getEntity3dType() const
method allowing to retrieve entity 3d type
Definition: Segment3d.h:188
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity3d.h:27
boost::numeric::ublas::bounded_vector< ipReal64, 3 > Vector3d
3d vector type associated to library
Definition: LinearAlgebraTypes.h:42
Cartesian coordinate system.
Definition: GeometryEntity3dTypes.h:76
ipReal64 getMiddleX() const
retrieve segment middle point coordinates
Definition: Segment3d.h:279
Lightweight structure used to store Point3d data.
Definition: GeometryEntity3dTypes.h:27
void setPoint0(const Point3d< T > &pt0)
access to segment coordinates
Definition: Segment3d.h:237
ipReal64 getMiddleY() const
retrieve segment middle point coordinates
Definition: Segment3d.h:286
ipReal64 getY() const
retrieve cartesian components of vector
Definition: Vector3d.h:270