1 #ifndef EXPR_Cylinder_H
2 #define EXPR_Cylinder_H
4 #include "EXPR_ElementaryGeometryNode.h"
25 static const std::array<tCInt,24> BOUNDING_BOX_POINTS;
28 std::array<tReal,3> mCenter;
31 std::array<tReal,3> mU;
32 std::array<tReal,3> mV;
33 std::array<tReal,3> mK;
36 std::array<tReal,3> mSize;
75 mem+=mCenter.size()*
sizeof(tReal);
76 mem+=mU.size()*
sizeof(tReal);
77 mem+=mV.size()*
sizeof(tReal);
78 mem+=mK.size()*
sizeof(tReal);
79 mem+=mSize.size()*
sizeof(tReal);
87 virtual CORE_UniquePointer<EXPR_ElementaryGeometryNode>
newInstance()
const override {
94 static inline CORE_UniquePointer<EXPR_Cylinder>
New() {
128 virtual void setArguments(
const std::vector<tString>& args)
override ;
134 memcpy(mCenter.data(),X.data(),X.size()*
sizeof(tReal));
139 inline void setCenter(std::initializer_list<tReal>&& X) {
140 auto iX=std::cbegin(X);
141 for(
auto& Ck:mCenter) {
156 memcpy(mU.data(),U.data(),U.size()*
sizeof(tReal));
162 auto iU=std::cbegin(U);
178 memcpy(mV.data(),U.data(),U.size()*
sizeof(tReal));
184 auto iU=std::cbegin(U);
270 virtual tString
toString() const final;
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class describes an ellipsoide CYLINDER from.
Definition: EXPR_Cylinder.h:19
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: EXPR_Cylinder.h:61
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_Cylinder.h:73
virtual void adimensionize(const tReal &L) final
adimensionize the cylinder
Definition: EXPR_Cylinder.cpp:89
virtual ~EXPR_Cylinder()
delete the class
Definition: EXPR_Cylinder.cpp:34
void setMainRadius(const tReal &L)
set the half-length along main direction
Definition: EXPR_Cylinder.h:216
void setMainDirection(const std::array< tReal, 3 > &U)
set the main direction
Definition: EXPR_Cylinder.h:155
void setMainDirection(std::initializer_list< tReal > &&U)
set the main direction
Definition: EXPR_Cylinder.h:161
void setSecondDirection(std::initializer_list< tReal > &&U)
set the second direction
Definition: EXPR_Cylinder.h:183
void setCenter(const std::array< tReal, 3 > &X)
set the center of the botton ellipsoide
Definition: EXPR_Cylinder.h:133
void setSecondRadius(const tReal &L)
set the half-length along secund direction
Definition: EXPR_Cylinder.h:230
void orthogonalize()
orthogonalize the data
Definition: EXPR_Cylinder.cpp:94
virtual CORE_UniquePointer< EXPR_ElementaryGeometryNode > newInstance() const override
create a new instance of this
Definition: EXPR_Cylinder.h:87
const tReal & getMainRadius() const
get the half-length along main direction
Definition: EXPR_Cylinder.h:223
virtual tString toString() const final
return the string representation of this
Definition: EXPR_Cylinder.cpp:287
const tReal & getLength() const
get the length of the cylinder
Definition: EXPR_Cylinder.h:207
const std::array< tReal, 3 > & getSecondDirection() const
get the second direction
Definition: EXPR_Cylinder.h:193
EXPR_Cylinder()
create the class
Definition: EXPR_Cylinder.cpp:19
void setCenter(std::initializer_list< tReal > &&X)
set the center
Definition: EXPR_Cylinder.h:139
virtual tBoolean isInsideCanonicalGeometry(const std::array< tReal, 3 > &P) const final
return true if the point is inside the canonical geometry
Definition: EXPR_Cylinder.cpp:131
void setSecondDirection(const std::array< tReal, 3 > &U)
set the second direction
Definition: EXPR_Cylinder.h:177
const std::array< tReal, 3 > & getMainDirection() const
get the main direction
Definition: EXPR_Cylinder.h:171
const tReal & getSecondRadius() const
get the half-length along secund direction
Definition: EXPR_Cylinder.h:237
virtual void setArguments(const std::vector< tString > &args) override
set the argument to define the geometry
Definition: EXPR_Cylinder.cpp:38
void setLength(const tReal &L)
set the length of the cylinder
Definition: EXPR_Cylinder.h:200
virtual void copy(const EXPR_Node &node) override
copy
Definition: EXPR_Cylinder.h:104
virtual void computeCanonicalBoundingBox(std::array< tReal, 3 > &minPoint, std::array< tReal, 3 > &maxPoint) const final
compute the bounding box of the geometry
Definition: EXPR_Cylinder.cpp:200
const std::array< tReal, 3 > & getCenter() const
get the center
Definition: EXPR_Cylinder.h:149
static CORE_UniquePointer< EXPR_Cylinder > New()
crete the new instance of this
Definition: EXPR_Cylinder.h:94
This class describes an elementary geometry.
Definition: EXPR_ElementaryGeometryNode.h:20
virtual void copy(const EXPR_Node &node) override
copy
Definition: EXPR_ElementaryGeometryNode.h:80
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_ElementaryGeometryNode.h:71
This class is a base class of the binary tree.
Definition: EXPR_Node.h:16