134 void SetSize(
double d)
override;
191 void Print()
override;
Class for representing a level set function on a regular grid.
Definition level_set_function.hpp:17
A class for representing a level set function as a Shape object.
Definition shape_level_set.hpp:25
nlohmann::json PackJson() override
Pack the LevelSet object into a JSON structure.
Definition shape_level_set.cpp:13
void Init()
Initialize the LevelSet object.
Definition shape_level_set.cpp:124
void InitFromSTL(std::string const &file, int mesh_res=40)
Initialize the LevelSet object from an STL file.
Vec3d SurfacePoint(Vec3d const &pos) override
Compute the surface point closest to a given position on the LevelSet object.
Definition shape_level_set.cpp:255
void SetSize(double d) override
Set the size of the LevelSet object.
Definition shape_level_set.cpp:218
void InitFromJson(nlohmann::json const &js) override
Initialize the LevelSet object from a JSON structure.
Definition shape_level_set.cpp:25
void UpdateShapeProperties() override
Update the shape properties of the LevelSet object.
Definition shape_level_set.cpp:172
Shape * Clone() const override
Clone the LevelSet object.
Definition shape_level_set.cpp:238
STLModel GetSTLModel(int num_nodes=200) override
Generate an STL model of the LevelSet object.
Definition shape_level_set.cpp:240
void InitFromDistanceMap(double c_0, double c_1, double c_2, double sp, const VecXT< VecXT< VecXT< double > > > &dist_map)
Initialize the LevelSet object from a distance map.
Definition shape_level_set.cpp:101
double SignedDistance(Vec3d const &pos) const override
Compute the signed distance from a given position to the surface of the LevelSet object.
Definition shape_level_set.cpp:251
void UpdateSurfaceNodes() override
Update the surface nodes of the LevelSet object.
Definition shape_level_set.cpp:149
LevelSet()
Default constructor.
Definition shape_level_set.cpp:8
void AlignAxes()
Align the axes of the LevelSet object.
Definition shape_level_set.cpp:135
void Print() override
Print information about the LevelSet object.
Definition shape_level_set.cpp:321
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
Definition bond_entry.hpp:7
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