15 #ifndef __IPSDKGEOMETRY_SPHERE3D_H__ 16 #define __IPSDKGEOMETRY_SPHERE3D_H__ 20 #pragma warning (push) 21 #pragma warning (disable : 4251) 24 #include <IPSDKGeometry/Entity/3d/BaseTypedGeometryEntity3d.h> 25 #include <IPSDKGeometry/Entity/3d/Point/Point3d.h> 55 Sphere3d(
const T xCenter,
const T yCenter,
const T zCenter,
const T radius);
69 inline void setCoords(
const Point3dData<T>& centerPt,
const T radius);
70 inline void setCoords(
const Point3d<T>& centerPt,
const T radius);
71 inline void setCoords(
const T xCenter,
const T yCenter,
const T zCenter,
const T radius);
73 inline void setCenter(
const Point3d<T>& centerPt);
74 inline void setCenter(
const T xCenter,
const T yCenter,
const T zCenter);
75 inline void setRadius(
const T radius);
76 inline T getRadius()
const;
77 inline T centerX()
const;
78 inline T centerY()
const;
79 inline T centerZ()
const;
116 template <
typename T>
120 return g_coordinateSystem3dType;
123 template <
typename T>
127 return g_entity3dType;
130 template <
typename T>
134 _centerPt = centerPt;
138 template <
typename T>
146 template <
typename T>
150 _centerPt.setCoords(xCenter, yCenter, zCenter);
154 template <
typename T>
158 _centerPt = centerPt;
161 template <
typename T>
168 template <
typename T>
172 _centerPt.setCoords(xCenter, yCenter, zCenter);
175 template <
typename T>
182 template <
typename T>
189 template <
typename T>
196 template <
typename T>
203 template <
typename T>
210 template <
typename T>
217 template <
typename T>
224 template <
typename T>
231 template <
typename T>
235 return std::abs(signedDistance(pt));
238 template <
typename T>
245 template <
typename T>
252 template <
typename T>
265 #pragma warning (pop) 267 #endif // __IPSDKGEOMETRY_SPHERE3D_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eCoordinateSystem3dType
Enumerate describing coordinate system 3d type.
Definition: GeometryEntity3dTypes.h:74
void setCenter(const Point3dData< T > ¢erPt)
access to the sphere parameters
Definition: Sphere3d.h:156
Point class associated to cartesian 3d coordinates.
Definition: GeometryEntity3dTypes.h:29
T centerX() const
access to the sphere parameters
Definition: Sphere3d.h:184
3d sphere associated to cartesian 3d coordinates
Definition: Sphere3d.h:36
ipReal64 area() const
retrieve sphere area
Definition: Sphere3d.h:247
#define IPSDK_DECLARE_GEOMETRY_ENTITY_3D(libraryName, className)
Macro allowing to declare a geometry entity 3d.
Definition: GeometryEntity3dHdrMacros.h:131
Point3dData< T > _centerPt
center of the sphere
Definition: Sphere3d.h:106
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
IPSDK_FORCEINLINE ipReal64 sphereVolume(const ipReal64 radius)
compute sphere volume
Definition: Sphere3d.h:54
IPSDK_FORCEINLINE ipReal64 sphereArea(const ipReal64 radius)
compute sphere area
Definition: Sphere3d.h:47
const Point3dData< T > & getCoords() const
access to point coordinates
Definition: Point3d.h:142
T centerZ() const
access to the sphere parameters
Definition: Sphere3d.h:198
ipReal64 distance(const Point3d< T > &pt) const
retrieve orthogonal distance between point and sphere
Definition: Sphere3d.h:226
T _radius
radius of the circle
Definition: Sphere3d.h:109
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.
Utility functions used to handle spheres 3d.
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
T getRadius() const
access to the sphere parameters
Definition: Sphere3d.h:219
ipReal64 volume() const
retrieve sphere volume
Definition: Sphere3d.h:254
eEntity3dType
Enumerate describing entity 3d type.
Definition: GeometryEntity3dTypes.h:38
ipReal64 signedDistance(const Point3d< T > &pt) const
retrieve signed orthogonal distance between point and sphere (positive value stands for exterior poin...
Definition: Sphere3d.h:240
void setRadius(const T radius)
access to the sphere parameters
Definition: Sphere3d.h:177
Basic operators used for sphere 3d management.
void setCoords(const Point3dData< T > ¢erPt, const T radius)
access to the sphere parameters
Definition: Sphere3d.h:132
eCoordinateSystem3dType getCoordinateSystem3dType() const
method allowing to retrieve coordinate system 3d type
Definition: Sphere3d.h:118
const Point3dData< T > & center() const
access to the sphere parameters
Definition: Sphere3d.h:205
eEntity3dType getEntity3dType() const
method allowing to retrieve entity 3d type
Definition: Sphere3d.h:125
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity3d.h:27
Cartesian coordinate system.
Definition: GeometryEntity3dTypes.h:76
Sphere.
Definition: GeometryEntity3dTypes.h:48
Lightweight structure used to store Point3d data.
Definition: GeometryEntity3dTypes.h:27
T centerY() const
access to the sphere parameters
Definition: Sphere3d.h:191
IPSDK_FORCEINLINE PackT abs(const PackT &in)
returns the absolute value of a pack
Definition: abs.h:41