AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
CalculateVolume.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or
9having been advised so by Algoryx Simulation AB for a time limited evaluation,
10or having purchased a valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17
19// AUTOMATICALLY GENERATED, DO NOT EDIT! (except inline functions) //
21
22#ifndef AGXFN_MATH_GEOMETRY_SPHERE_CALCULATEVOLUME_H
23#define AGXFN_MATH_GEOMETRY_SPHERE_CALCULATEVOLUME_H
24
25#include <agxData/Array.h>
26#include <agxData/EntityPtr.h>
27#include <agx/Integer.h>
28#include <agx/Real.h>
29#include <agx/Math.h>
30#include <agx/Job.h>
31
32
33namespace agx { namespace Math { namespace Geometry { namespace Sphere { } } } }
34
35namespace agxFn
36{
37 namespace Math
38 {
39 namespace Geometry
40 {
41 namespace Sphere
42 {
50 AGX_FORCE_INLINE void CalculateVolume
51 (
52 /* Parameter list automatically generated, do not edit */
53 agx::Real& volume,
54 const agx::Real& radius
55 )
56 {
57 // 4 pi r^3 / 3
58 volume = radius * radius * radius * (agx::Real(4) * agx::PI / agx::Real(3));
59 }
60
62 AGX_FORCE_INLINE agx::Real CalculateVolume
63 (
64 const agx::Real& radius
65 )
66 {
67 agx::Real volume;
68 agxFn::Math::Geometry::Sphere::CalculateVolume(volume, radius);
69 return volume;
70 }
71
72
73
74 }
75 }
76 }
77}
78
79#endif
#define AGX_FORCE_INLINE
Definition macros.h:58
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
const Real PI
Definition Math.h:63
double Real
Definition Real.h:42