TexGen
FibreDistribution.h
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2006 Martin Sherburn
4
5This program is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License
7as published by the Free Software Foundation; either version 2
8of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18=============================================================================*/
19#pragma once
20
21namespace TexGen
22{
23 using namespace std;
24
26
31 {
32 public:
34 CFibreDistribution(TiXmlElement &Element);
35 virtual ~CFibreDistribution(void);
36
38 virtual CFibreDistribution* Copy() const = 0;
40 virtual string GetType() const = 0;
42 virtual void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const;
43
45 virtual double GetVolumeFraction(const vector<XY> &Section, double dFibreArea, XY Location, int YarnIndex=-1) const = 0;
47 virtual double GetVolumeFraction(double dArea, double dFibreArea, int YarnIndex=-1) const;
48
49
50 protected:
51
52 };
53}; // namespace TexGen
54
#define CLASS_DECLSPEC
Definition: Misc.h:35
Abstract base class that defines how the fibres are distributed within a yarn.
virtual string GetType() const =0
Derived class should return the class name.
virtual CFibreDistribution * Copy() const =0
Create a copy of the derived fibre distribution and return a pointer to the newly created instance.
virtual double GetVolumeFraction(const vector< XY > &Section, double dFibreArea, XY Location, int YarnIndex=-1) const =0
Get the volume fraction for a given location.
Namespace containing a series of customised math operations not found in the standard c++ library.
OUTPUT_TYPE
Definition: Misc.h:105
Struct for representing points in 2D space.
Definition: mymath.h:103