1 #ifndef EXPR_ElementaryGeometryNode_H
2 #define EXPR_ElementaryGeometryNode_H
4 #include "EXPR_LeafNode.h"
48 virtual CORE_UniquePointer<EXPR_ElementaryGeometryNode>
newInstance()
const=0;
73 mem+=
sizeof(tUChar)*mName.length();
89 inline void setName(
const tString& name) {
110 virtual tBoolean
isInside(std::array<tReal,3> P)
const override {
145 virtual void adimensionize(
const tReal& L,std::map<tString,tBoolean>& alreadyComputed)
override {
173 std::array<tReal,3>& maxPoint)
const=0;
189 const std::array<tReal,3>& C,
193 const tReal *Mk=M.data();
194 const tReal *Ck=C.data();
196 tReal x=(*Mk)-(*Ck);Mk++;Ck++;
197 tReal y=(*Mk)-(*Ck);Mk++;Ck++;
215 std::stringstream sout;
217 sout<<
"name:"<<mName<<
"\n";
tString getIdentityString() const
retrun the string identification of the class
Definition: CORE_Object.h:321
This class describes an elementary geometry.
Definition: EXPR_ElementaryGeometryNode.h:20
virtual void adimensionize(const tReal &L)=0
adimensionize the primary geometry
virtual tBoolean isInside(std::array< tReal, 3 > P) const override
return true if the point is in the node
Definition: EXPR_ElementaryGeometryNode.h:110
virtual void computeCanonicalBoundingBox(std::array< tReal, 3 > &minPoint, std::array< tReal, 3 > &maxPoint) const =0
compute the bounding box of the node
void computeBoundingBox()
compute the bounding box of the geometry taking into account the transformation of node
Definition: EXPR_ElementaryGeometryNode.h:123
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: EXPR_ElementaryGeometryNode.h:59
virtual void setArguments(const std::vector< tString > &args)=0
set the argument to define the geometry
virtual CORE_UniquePointer< EXPR_ElementaryGeometryNode > newInstance() const =0
create a new instance of this
void setName(const tString &name)
set name
Definition: EXPR_ElementaryGeometryNode.h:89
virtual void adimensionize(const tReal &L, std::map< tString, tBoolean > &alreadyComputed) override
adimensionize the node
Definition: EXPR_ElementaryGeometryNode.h:145
const tString & getName() const
get name
Definition: EXPR_ElementaryGeometryNode.h:96
static void GetSphericalCoordinates(const std::array< tReal, 3 > &M, const std::array< tReal, 3 > &C, tReal &r, tReal &theta, tReal &phi)
get the spherical coordinate of the point M with center C, radius r, inclination theta and azimuth ph...
Definition: EXPR_ElementaryGeometryNode.h:188
EXPR_ElementaryGeometryNode()
create the class
Definition: EXPR_ElementaryGeometryNode.h:35
virtual tString toString() const override
return the string representation of this
Definition: EXPR_ElementaryGeometryNode.h:214
virtual tBoolean isInsideCanonicalGeometry(const std::array< tReal, 3 > &P) const =0
return true if the point is in the node
virtual ~EXPR_ElementaryGeometryNode()
delete the class
Definition: EXPR_ElementaryGeometryNode.h:40
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
virtual void computeBoundingBox(std::map< tString, tBoolean > &alreadyComputed) override
compute the bounding box of the node
Definition: EXPR_ElementaryGeometryNode.h:134
This class describes a leaf node of the tree without children.
Definition: EXPR_LeafNode.h:15
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_LeafNode.h:62
This class is a base class of the binary tree.
Definition: EXPR_Node.h:16
virtual void adimensionize(const tReal &L, std::map< tString, tBoolean > &alreadyComputed)
adimensionize the node
Definition: EXPR_Node.cpp:135
const std::array< tReal, 3 > & getBoundingBoxMinPoint() const
get the min point bounding box of the node for reading
Definition: EXPR_Node.h:652
void linearTransformBoundingBox(std::array< tReal, 3 > &P, std::array< tReal, 3 > &Q) const
compute the bounding box after transformation
Definition: EXPR_Node.cpp:44
tBoolean isInsideBoundingBox(const std::array< tReal, 3 > &P) const
return true if the point P is in the bounding box
Definition: EXPR_Node.h:694
virtual tString toString() const override
return the string representation of this
Definition: EXPR_Node.cpp:145
const std::array< tReal, 3 > & getBoundingBoxMaxPoint() const
get the max point bounding box of the node for reading
Definition: EXPR_Node.h:658
void applyInverse(std::array< tReal, 3 > &P) const
apply the inverse transformation to point P
Definition: EXPR_Node.h:550
virtual void copy(const EXPR_Node &node)
copy
Definition: EXPR_Node.h:93