127 void SetSize(
double d)
override;
301 double d_rho_d_theta(
double theta,
double phi);
303 double d_rho_d_phi(
double theta,
double phi);
305 Vec3d d_xyz_d_theta(
double theta,
double phi);
307 Vec3d d_xyz_d_phi(
double theta,
double phi);
309 Vec3d d_normal_d_theta(
double theta,
double phi);
311 Vec3d d_normal_d_phi(
double theta,
double phi);
Class for working with STL models.
Definition stl_model.hpp:17
This class represents different types of shapes and performs various calculations on them.
Definition shape.hpp:15
A class representing a spherical harmonics object.
Definition shape_spherical_harmonics.hpp:24
Vec2d SurfaceCurvature(Vec3d const &pos)
Definition shape_spherical_harmonics.cpp:269
static VecXT< double > CalculateYnm(double theta, double phi, int deg)
Calculate the spherical harmonics terms for a given theta, phi, and degree.
Definition shape_spherical_harmonics.cpp:333
Shape * Clone() const override
Clone the SphericalHarmonics object.
Definition shape_spherical_harmonics.cpp:234
Vec3d SurfacePoint(Vec3d const &pos) override
Compute the surface point of the SphericalHarmonics object closest to a given point.
Definition shape_spherical_harmonics.cpp:248
void InitFromSTL(std::string const &file)
Initialize the SphericalHarmonics object from an STL file.
void SetSize(double d) override
Set the size of the SphericalHarmonics object.
Definition shape_spherical_harmonics.cpp:175
STLModel GetSTLModel(int num_nodes=200) override
Generate an STL model for the SphericalHarmonics object.
Definition shape_spherical_harmonics.cpp:184
int degree
The degree of the SphericalHarmonics object.
Definition shape_spherical_harmonics.hpp:26
static VecXT< double > CalculateYnm_Fast(double theta, double phi, int deg)
Calculate the spherical harmonics terms for a given theta, phi, and degree using pre-calculated value...
Definition shape_spherical_harmonics.cpp:380
double CalculateRho(double theta, double phi) const
Calculate the rho value for a given theta and phi.
Definition shape_spherical_harmonics.cpp:429
void UpdateSurfaceNodes() override
Update the surface nodes of the SphericalHarmonics object.
Definition shape_spherical_harmonics.cpp:107
SphericalHarmonics()
Default constructor.
Definition shape_spherical_harmonics.cpp:22
VecXT< double > a_nm
Definition shape_spherical_harmonics.hpp:27
void InitFromJson(nlohmann::json const &js) override
Initialize the SphericalHarmonics object from a JSON structure.
Definition shape_spherical_harmonics.cpp:44
double SignedDistance(Vec3d const &pos) const override
Compute the signed distance between a point and the SphericalHarmonics object.
Definition shape_spherical_harmonics.cpp:238
void Init()
Initialize the SphericalHarmonics object.
Definition shape_spherical_harmonics.cpp:100
void UpdateShapeProperties() override
Update the shape properties of the SphericalHarmonics object.
Definition shape_spherical_harmonics.cpp:129
nlohmann::json PackJson() override
Pack the SphericalHarmonics object into a JSON structure.
Definition shape_spherical_harmonics.cpp:36
Vec3d SurfaceNormal(Vec3d const &pos)
Definition shape_spherical_harmonics.cpp:261
void InitFromSurfacePoints(VecXT< Vec3d > const surf_points)
Initialize the SphericalHarmonics object from a list of surface points.
Definition shape_spherical_harmonics.cpp:81
Definition bond_entry.hpp:7
std::array< double, 2 > Vec2d
Definition utils_macros.hpp:17
std::vector< T > VecXT
Definition utils_macros.hpp:31
pos
Definition json_serilization.hpp:19
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18