IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Sphere3d.h
Go to the documentation of this file.
1 // Sphere3d.h:
3 // -----------
4 //
14 
15 #ifndef __IPSDKMATH_SPHERE3D_H__
16 #define __IPSDKMATH_SPHERE3D_H__
17 
19 #include <IPSDKMath/Constants.h>
21 
22 namespace ipsdk {
23 namespace math {
24 
27 
30 IPSDKMATH_API bool
31 sphereFromPoints(const ipReal64 x0, const ipReal64 y0, const ipReal64 z0,
32  const ipReal64 x1, const ipReal64 y1, const ipReal64 z1,
33  const ipReal64 x2, const ipReal64 y2, const ipReal64 z2,
34  const ipReal64 x3, const ipReal64 y3, const ipReal64 z3,
35  ipReal64& xc, ipReal64& yc, ipReal64& zc, ipReal64& radius);
36 
39 IPSDKMATH_API bool
40 sphereFromPoints(const ipReal64 x0, const ipReal64 y0, const ipReal64 z0,
41  const ipReal64 x1, const ipReal64 y1, const ipReal64 z1,
42  const ipReal64 x2, const ipReal64 y2, const ipReal64 z2,
43  ipReal64& xc, ipReal64& yc, ipReal64& zc, ipReal64& radius);
44 
46 IPSDK_FORCEINLINE ipReal64
47 sphereArea(const ipReal64 radius)
48 {
49  return 4 * M_PI * radius * radius;
50 }
51 
53 IPSDK_FORCEINLINE ipReal64
54 sphereVolume(const ipReal64 radius)
55 {
56  return (4 * M_PI / 3) * radius * radius * radius;
57 }
58 
61 
62 } // end of namespace math
63 } // end of namespace ipsdk
64 
65 #endif // __IPSDKMATH_SPHERE3D_H__
Definition of import/export macro for library.
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
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
IPSDKMATH_API bool sphereFromPoints(const ipReal64 x0, const ipReal64 y0, const ipReal64 z0, const ipReal64 x1, const ipReal64 y1, const ipReal64 z1, const ipReal64 x2, const ipReal64 y2, const ipReal64 z2, const ipReal64 x3, const ipReal64 y3, const ipReal64 z3, ipReal64 &xc, ipReal64 &yc, ipReal64 &zc, ipReal64 &radius)
computation of sphere parameters from four points
Predefined constants for ipsdk math library.
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27