146 Vec4d const &quat)
const override;
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 triangle in 3D space.
Definition shape_triangle.hpp:19
Vec3d SupportPoint(Vec3d const &dir) override
Calculate the support point of the Triangle object in a given direction.
Definition shape_triangle.cpp:227
void Init()
Initialize the Triangle object.
Definition shape_triangle.cpp:62
nlohmann::json PackJson() override
Pack the Triangle object into a JSON structure.
Definition shape_triangle.cpp:38
Shape * Clone() const override
Clone the Triangle object.
Definition shape_triangle.cpp:124
Vec3d dir_n
The normal direction of the triangle.
Definition shape_triangle.hpp:22
void Translate(Vec3d const &pos) override
Translate the Triangle object.
Definition shape_triangle.cpp:71
std::tuple< Vec3d, Vec3d > GetBoundAABB() const override
Compute the axis-aligned bounding box of the Triangle object.
Definition shape_triangle.cpp:138
void InitFromJson(nlohmann::json const &js) override
Initialize the Triangle object from a JSON structure.
Definition shape_triangle.cpp:46
void UpdateShapeProperties() override
Update the shape properties of the Triangle object.
Definition shape_triangle.cpp:101
Triangle()
Default constructor.
Definition shape_triangle.cpp:8
bool CheckEnclose(Vec3d const &pos) const override
Check if a point is enclosed by the Triangle object.
Definition shape_triangle.cpp:270
double SignedDistance(Vec3d const &pos) const override
Compute the signed distance between a point and the Triangle object.
Definition shape_triangle.cpp:262
void SetVertices(Vec3d const &a, Vec3d const &b, Vec3d const &c)
Set the vertices of the Triangle object.
Definition shape_triangle.cpp:54
Vec3d SurfacePoint(Vec3d const &pos) override
Compute the surface point of the Triangle object closest to a given point.
Definition shape_triangle.cpp:266
Mat3d vertices
The three vertices that define the triangle.
Definition shape_triangle.hpp:21
void UpdateSurfaceNodes() override
Update the surface nodes of the Triangle object.
Definition shape_triangle.cpp:79
STLModel GetSTLModel(int num_nodes=200) override
Generate an STL model for the Triangle object.
Definition shape_triangle.cpp:126
VecXT< Vec3d > SupportPoints(Vec3d const &dir) override
Calculate the support points of the Triangle object in a given direction.
Definition shape_triangle.cpp:246
Definition bond_entry.hpp:7
std::array< std::array< double, 3 >, 3 > Mat3d
Definition utils_macros.hpp:22
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
std::array< double, 4 > Vec4d
Definition utils_macros.hpp:19