TexGen
FibreDistributionConst.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#include "FibreDistribution.h"
21
22namespace TexGen
23{
26 {
27 public:
29 CFibreDistributionConst(TiXmlElement &Element);
31
32 CFibreDistribution* Copy() const { return new CFibreDistributionConst(*this); }
33 string GetType() const {return "CFibreDistributionConst";}
34 void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const;
35
36 double GetVolumeFraction(const vector<XY> &Section, double dFibreArea, XY Location, int YarnIndex = -1) const;
37 double GetVolumeFraction(double dArea, double dFibreArea, int YarnIndex = -1) const;
38
39 protected:
40 double IntegrateDistribution(const vector<XY> &Section) const;
41 };
42}; // namespace TexGen
43
44
45
#define CLASS_DECLSPEC
Definition: Misc.h:35
Fibre volume fraction is constant throughout the yarn.
string GetType() const
Derived class should return the class name.
CFibreDistribution * Copy() const
Create a copy of the derived fibre distribution and return a pointer to the newly created instance.
Abstract base class that defines how the fibres are distributed within a yarn.
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