24CSectionScaled::CSectionScaled(
const CSection &Section,
XY Scale)
25: m_Scale(Scale), m_pSection(Section)
44 m_Scale = valueify<XY>(Element.Attribute(
"Scale"));
45 TiXmlElement* pSection = Element.FirstChildElement(
"Section");
54 TiXmlElement Section(
"Section");
55 m_pSection->PopulateTiXmlElement(Section, OutputType);
56 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.
static CObjectContainer< CSection > CreateSection(TiXmlElement &Element)
Create a section from TiXmlElement.
virtual string GetType() const =0
Derived class should return the class name.
friend class CSectionScaled
Section which represents a scaled version of another section.
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.
void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const
Used for saving data to XML.
CObjectContainer< CSection > m_pSection
string GetType() const
Derived class should return the class name.
bool operator==(const CSection &CompareMe) const
Overloaded equality operator to determine if two sections are the same.
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.