|
FEDEM Solver
R8.0
Source code of the dynamics solver
|
A namespace with volume calculation functions for some 3D shapes. More...
Functions | |
| void | tetVolume (const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3, const FaVec3 &v4, double &vol) |
| Calculates the volume of a tetrahedron. More... | |
| void | wedVolume (const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3, const FaVec3 &v4, const FaVec3 &v5, const FaVec3 &v6, double &vol) |
| Calculates the volume of a wedge. More... | |
| void | hexVolume (const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3, const FaVec3 &v4, const FaVec3 &v5, const FaVec3 &v6, const FaVec3 &v7, const FaVec3 &v8, double &vol) |
| Calculates the volume of a hexahedron. More... | |
| double | tetCenter (FaVec3 &v1, FaVec3 &v2, FaVec3 &v3, FaVec3 &v4, FaVec3 &vc) |
| Calculates the volume and volume center of a tetrahedron. More... | |
| double | wedCenter (FaVec3 &v1, FaVec3 &v2, FaVec3 &v3, FaVec3 &v4, FaVec3 &v5, FaVec3 &v6, FaVec3 &vc) |
| Calculates the volume and volume center of a wedge. More... | |
| double | hexCenter (FaVec3 &v1, FaVec3 &v2, FaVec3 &v3, FaVec3 &v4, FaVec3 &v5, FaVec3 &v6, FaVec3 &v7, FaVec3 &v8, FaVec3 &vc) |
| Calculates the volume and volume center of a hexahedron. More... | |
| void | tetMoment (const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3, const FaVec3 &v4, FFaTensor3 &vm) |
| Calculates the volume moment of intertia of a tetrahedron. More... | |
| void | wedMoment (const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3, const FaVec3 &v4, const FaVec3 &v5, const FaVec3 &v6, FFaTensor3 &vm) |
| Calculates the volume moment of intertia of a wedge. More... | |
| void | hexMoment (const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3, const FaVec3 &v4, const FaVec3 &v5, const FaVec3 &v6, const FaVec3 &v7, const FaVec3 &v8, FFaTensor3 &vm) |
| Calculates the volume moment of intertia of a hexahedron. More... | |
A namespace with volume calculation functions for some 3D shapes.
The volume of an object is computed as a sum of tetrahedron and pyramid contributions to account for possibly warped faces. There are also functions for calculation of the volume center and moments of inertia. Note that the volume center functions will update the vertex coordinates such that they become relative to the calculated center. These relative coordinates are needed by the inertia calculation functions.
| double FFaVolume::hexCenter | ( | FaVec3 & | v1, |
| FaVec3 & | v2, | ||
| FaVec3 & | v3, | ||
| FaVec3 & | v4, | ||
| FaVec3 & | v5, | ||
| FaVec3 & | v6, | ||
| FaVec3 & | v7, | ||
| FaVec3 & | v8, | ||
| FaVec3 & | vc | ||
| ) |
Calculates the volume and volume center of a hexahedron.
| void FFaVolume::hexMoment | ( | const FaVec3 & | v1, |
| const FaVec3 & | v2, | ||
| const FaVec3 & | v3, | ||
| const FaVec3 & | v4, | ||
| const FaVec3 & | v5, | ||
| const FaVec3 & | v6, | ||
| const FaVec3 & | v7, | ||
| const FaVec3 & | v8, | ||
| FFaTensor3 & | vm | ||
| ) |
Calculates the volume moment of intertia of a hexahedron.
The input vertices are assumed to be relative to the objects volume center. The moments are computed as a sum of six pyramid contributions, where the first vertex is at the volume center and the four others are on a face.
| void FFaVolume::hexVolume | ( | const FaVec3 & | v1, |
| const FaVec3 & | v2, | ||
| const FaVec3 & | v3, | ||
| const FaVec3 & | v4, | ||
| const FaVec3 & | v5, | ||
| const FaVec3 & | v6, | ||
| const FaVec3 & | v7, | ||
| const FaVec3 & | v8, | ||
| double & | vol | ||
| ) |
Calculates the volume of a hexahedron.
The volume of a hexahedron object is computed as a sum of six pyramids defined by the eight vertices and the center point.
Calculates the volume and volume center of a tetrahedron.
Calculation of volume center. The input vertices are then shifted such that they become relative to the computed volume center. The volume of the object is retured.
| void FFaVolume::tetMoment | ( | const FaVec3 & | v1, |
| const FaVec3 & | v2, | ||
| const FaVec3 & | v3, | ||
| const FaVec3 & | v4, | ||
| FFaTensor3 & | vm | ||
| ) |
Calculates the volume moment of intertia of a tetrahedron.
The input vertices are assumed to be relative to the objects volume center. The moments are computed as a sum of four tetrahedron contributions, where the first vertex is at the volume center and the three other vertices are on a face.
| void FFaVolume::tetVolume | ( | const FaVec3 & | v1, |
| const FaVec3 & | v2, | ||
| const FaVec3 & | v3, | ||
| const FaVec3 & | v4, | ||
| double & | vol | ||
| ) |
Calculates the volume of a tetrahedron.
| double FFaVolume::wedCenter | ( | FaVec3 & | v1, |
| FaVec3 & | v2, | ||
| FaVec3 & | v3, | ||
| FaVec3 & | v4, | ||
| FaVec3 & | v5, | ||
| FaVec3 & | v6, | ||
| FaVec3 & | vc | ||
| ) |
Calculates the volume and volume center of a wedge.
| void FFaVolume::wedMoment | ( | const FaVec3 & | v1, |
| const FaVec3 & | v2, | ||
| const FaVec3 & | v3, | ||
| const FaVec3 & | v4, | ||
| const FaVec3 & | v5, | ||
| const FaVec3 & | v6, | ||
| FFaTensor3 & | vm | ||
| ) |
Calculates the volume moment of intertia of a wedge.
The input vertices are assumed to be relative to the objects volume center. The moments are computed as a sum of two tetrahedron and three pyramid contributions, where the first vertex is at the volume center and the three/four other vertices are on a face.
| void FFaVolume::wedVolume | ( | const FaVec3 & | v1, |
| const FaVec3 & | v2, | ||
| const FaVec3 & | v3, | ||
| const FaVec3 & | v4, | ||
| const FaVec3 & | v5, | ||
| const FaVec3 & | v6, | ||
| double & | vol | ||
| ) |
Calculates the volume of a wedge.
The volume of a wedge object is computed as a sum of two tetrahedrons and three pyramids defined by the six vertices and the center point.