4 #include "EXPR_ElementaryGeometryNode.h"
22 std::array<tReal,3> mMinPoint;
23 std::array<tReal,3> mMaxPoint;
34 for(
auto& Pk:mMinPoint) Pk=0;
35 for(
auto& Pk:mMaxPoint) Pk=1;
68 mem+=mMinPoint.size()*
sizeof(tReal);
69 mem+=mMaxPoint.size()*
sizeof(tReal);
77 virtual CORE_UniquePointer<EXPR_ElementaryGeometryNode>
newInstance()
const override {
84 static inline CORE_UniquePointer<EXPR_Paver>
New() {
85 CORE_UniquePointer<EXPR_Paver> p(
new EXPR_Paver(),
111 virtual void setArguments(
const std::vector<tString>& args)
override;
121 inline void setBox(
const tReal& x0,
const tReal& x1,
122 const tReal& y0,
const tReal& y1,
123 const tReal& z0,
const tReal& z1) {
124 tReal *P=mMinPoint.data(),*Q=mMaxPoint.data();
136 inline void setBox(
const std::array<tReal,6>& x) {
138 tReal *iP=mMinPoint.data(),*iQ=mMaxPoint.data();
140 const tReal *iX=x.data();
141 const tReal *eX=iX;eX+=x.size();
144 (*iP)=(*iX);iP++;iX++;
145 (*iQ)=(*iX);iQ++;iX++;
155 memcpy(mMinPoint.data(),A.data(),A.size()*
sizeof(tReal));
161 memcpy(mMaxPoint.data(),A.data(),A.size()*
sizeof(tReal));
179 if (k<3)
return (mMaxPoint[k]-mMinPoint[k]);
185 inline void setSize(
const std::array<tReal,3>& H) {
186 const tReal *iP=mMinPoint.data();
187 const tReal *iH=H.data();
188 for(
auto& Qk:mMaxPoint) {
213 std::array<tReal,3>& maxPoint)
const final ;
220 virtual tString toString() const final;
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class describes an elementary geometry.
Definition: EXPR_ElementaryGeometryNode.h:20
void setName(const tString &name)
set name
Definition: EXPR_ElementaryGeometryNode.h:89
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
This class describes a right paver define by a min & max points PAVER[X0,X1,Y0,Y1,...
Definition: EXPR_Paver.h:17
void setMaxPoint(const std::array< tReal, 3 > &A)
set the max point
Definition: EXPR_Paver.h:160
void setBox(const std::array< tReal, 6 > &x)
set the paver
Definition: EXPR_Paver.h:136
tReal getSize(const tUSInt &k) const
get the size in the direction
Definition: EXPR_Paver.h:178
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: EXPR_Paver.h:54
virtual tBoolean isInsideCanonicalGeometry(const std::array< tReal, 3 > &p) const final
return true if the point is inside the canonical geometry
Definition: EXPR_Paver.cpp:34
void setBox(const tReal &x0, const tReal &x1, const tReal &y0, const tReal &y1, const tReal &z0, const tReal &z1)
set the paver
Definition: EXPR_Paver.h:121
void setSize(const std::array< tReal, 3 > &H)
set the size
Definition: EXPR_Paver.h:185
virtual void computeCanonicalBoundingBox(std::array< tReal, 3 > &minPoint, std::array< tReal, 3 > &maxPoint) const final
compute the bounding box of the geometry
Definition: EXPR_Paver.cpp:48
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_Paver.h:66
virtual ~EXPR_Paver()
delete the class
Definition: EXPR_Paver.h:41
const std::array< tReal, 3 > & getMaxPoint() const
get the max point
Definition: EXPR_Paver.h:172
EXPR_Paver()
create the class
Definition: EXPR_Paver.h:32
void setMinPoint(const std::array< tReal, 3 > &A)
set the min point
Definition: EXPR_Paver.h:154
const std::array< tReal, 3 > & getMinPoint() const
get the min point
Definition: EXPR_Paver.h:166
virtual CORE_UniquePointer< EXPR_ElementaryGeometryNode > newInstance() const override
create a new instance of this
Definition: EXPR_Paver.h:77
virtual void copy(const EXPR_Node &node) override
copy
Definition: EXPR_Paver.h:97
virtual void setArguments(const std::vector< tString > &args) override
set the argument to define the geometry
Definition: EXPR_Paver.cpp:5
static CORE_UniquePointer< EXPR_Paver > New()
crete the new instance of this
Definition: EXPR_Paver.h:84
virtual void adimensionize(const tReal &L) final
adimensionize the cylinder
Definition: EXPR_Paver.cpp:26