24CSectionRotated::CSectionRotated(
const CSection &Section,
double dAngle)
25: m_dAngle(dAngle),m_pSection(Section)
27 if (
m_pSection->GetType() ==
"CSectionRectangle" )
46 Element.Attribute(
"Angle", &
m_dAngle);
47 TiXmlElement* pSection = Element.FirstChildElement(
"Section");
56 TiXmlElement Section(
"Section");
57 m_pSection->PopulateTiXmlElement(Section, OutputType);
58 Element.InsertEndChild(Section);
Abstract base class respresenting a yarn cross-section.
virtual void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const
Used for saving data to XML.
friend class CSectionRotated
static CObjectContainer< CSection > CreateSection(TiXmlElement &Element)
Create a section from TiXmlElement.
virtual string GetType() const =0
Derived class should return the class name.
CObjectContainer< CSectionMesh > m_pSectionMesh
Pointer to a derived class of SectionMesh, this class is in charge of creating the section mesh.
Create a rectangular mesh, the number of layers can be specified or set as -1 for automatic determina...
Section which represents a rotation of another section angle given in radians.
string GetBaseType() const
string GetDefaultName() const
Get the default name to assign to a section.
XY GetPoint(double t) const
Get a point lying on the perimeter correspending to parametric value t.
bool operator==(const CSection &CompareMe) const
Overloaded equality operator to determine if two sections are the same.
void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const
Used for saving data to XML.
string GetType() const
Derived class should return the class name.
CObjectContainer< CSection > m_pSection
Namespace containing a series of customised math operations not found in the standard c++ library.
std::string stringify(const T &x, int iPrecision=12, bool bScientific=true)
Function to convert a value (e.g. int, double, etc...) to a string.
Struct for representing points in 2D space.