57 Plane(
double c_x,
double c_y,
double c_z,
double n_x,
double n_y,
double n_z);
130 void SetCenter(
double c_x,
double c_y,
double c_z);
141 void SetNormal(
double n_x,
double n_y,
double n_z);
155 Vec4d const &quat)
const override;
227 void Print()
override;
A class for representing a plane with a center point and normal vector.
Definition shape_plane.hpp:22
void Init()
Initialize the Plane object.
Definition shape_plane.cpp:34
void UpdateShapeProperties() override
Update the shape properties of the Plane object.
Definition shape_plane.cpp:83
void InitFromJson(nlohmann::json const &js) override
Initialize the Plane object from a JSON structure.
Definition shape_plane.cpp:107
void SetNormal(double n_x, double n_y, double n_z)
Set the normal vector of the Plane object.
Definition shape_plane.cpp:133
Vec3d SupportPoint(Vec3d const &dir) override
Compute the support point of the Plane object in a given direction.
Definition shape_plane.cpp:203
void SetExtent(double e)
Set the extent of the Plane object.
Definition shape_plane.cpp:119
Vec3d dir_n
Definition shape_plane.hpp:24
nlohmann::json PackJson() override
Pack the Plane object into a JSON structure.
Definition shape_plane.cpp:97
Vec3d center
Definition shape_plane.hpp:24
void Print() override
Print information about the Plane object.
Definition shape_plane.cpp:260
STLModel GetSTLModel(int num_nodes=400) override
Generate an STL model of the Plane object.
Definition shape_plane.cpp:174
double SignedDistance(Vec3d const &pos) const override
Compute the signed distance from a given position to the surface of the Plane object.
Definition shape_plane.cpp:251
void UpdateSurfaceNodes() override
Update the surface nodes of the Plane object.
Definition shape_plane.cpp:41
double extent
Definition shape_plane.hpp:31
Vec3d SurfacePoint(Vec3d const &pos) override
Compute the surface point on the Plane object closest to a given position.
Definition shape_plane.cpp:255
VecXT< Vec3d > SupportPoints(Vec3d const &dir) override
Compute the support points of the Plane object in a given direction.
Definition shape_plane.cpp:215
void SetCenter(double c_x, double c_y, double c_z)
Set the center point of the Plane object.
Definition shape_plane.cpp:125
Plane()
Default constructor.
Definition shape_plane.cpp:7
Shape * Clone() const override
Clone the Plane object.
Definition shape_plane.cpp:95
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
virtual std::tuple< Vec3d, Vec3d > GetBoundAABB() const
Gets the boundary AABB of the shape instance.
Definition shape.cpp:128
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
std::array< double, 4 > Vec4d
Definition utils_macros.hpp:19