Open PaperOpt
OpenPaperOpt/Fiber.h
Go to the documentation of this file.
00001 
00006 #pragma once
00007 #ifndef FIBER_H
00008 #define FIBER_H
00009 
00010 // INCLUDES
00011 //
00012 #include "Distribution.h"
00013 #include "WavePacket.h"
00014 #include "Transform.h"
00015 #include "Basesheet.h"
00016 #include "Component.h"
00017 #include <string>
00018 #include "FiberGenerator.h"
00019 #include "Fluorescence.h"
00020 
00021 class FiberGenerator;
00022 
00023 class Fiber : public Component
00024 {
00025 public:
00046         Fiber(vector<complex_LC>& rRefrIndex, vector<complex_LC>& rLumenRefrIndex, vector<double>& rQScat, 
00047                 vector<double>& rQAbs,vector<double>& rQAbsFluo, double ContactReduction, V2<float>* pRoughness,
00048                 Distributions::Distribution* pDistScat, double Theta, double Phi,
00049                 double PolAngle, double Ellipticity, double Length, 
00050                 double Width, double WallThickness, const Basesheet* const pBasesheet);
00051 
00055         ~Fiber(void);
00056 
00069         int     Process(WavePacket& wp, int ComponentNumber, bool EntryScattering = false, complex_LC *pPrevRefrIndex = 0) const;
00070         int     Process(WavePacket& wp) const; //ML: Temp fix, this function must be defined because it is virtual
00071                                             //    in Component.
00072 
00073 // ACCESS
00077         const V3<double>& GetDirectionVector() const { return this->mDirectionVector; }
00081         const double GetPolAngle() const { return this->mPolAngle; }
00085         const double GetEllipticity() const { return this->mEllipticity; }
00089         const double GetWidth() const { return this->mWidth; }
00093         void SetIterationLimit(long N) { mIterationLimit = N; }
00094 
00095 private:
00096         enum Position
00097         {
00098                 OUTER_ENVELOPE,
00099                 INNER_ENVELOPE,
00100                 LUMEN,
00101                 FIBERWALL,
00102                 OUTSIDE
00103         };
00104 
00105 
00106 //      void ReadParamFile(std::string FilenameFiberwall, std::string FilenameLumen);
00115         Position InterceptFiberwall(const V3<double>& rDirection, V3<double>& rPosition, V3<double>& rNormal) const;
00126         void CreateFiber(WavePacket& wp, V3<double>& rLocalPos, V3<double>& rLocalDir, V3<double>& rLocalPol, V3<double>& rNormal) const;
00135         Position InterceptLumen(const V3<double>& rDirection, V3<double>& rPosition, V3<double>& rNormal) const;
00142         int CheckFiberends(const V3<double>& rPos1, V3<double>& rPos2) const;
00143 
00144         /* 
00145          * @param mpLumenRefrIndex      Lumen complex refractive index.
00146          * @param mB                            B Fiber b-axis size                             
00147          * @param mGlobalToLocal        
00148          * @param mDirectionVector      Local normal wave packet relative direction vector
00149          * @param mTheta                        Polar angle  of fiber.
00150          * @param mPhi                          Azimuthal angle  of fiber.
00151          * @param mPolAngle                     Tilt of fiber.
00152          * @param mWidth                        Fiber width.
00153          * @param mWallThickness        Fiberwall thickness in proportion to fiber width. Should be in the range [0, 1].
00154          * @param mIterationLimit       Iteration limit of fiber
00155 */
00156          vector<complex_LC> *mpLumenRefrIndex;
00157         double mTheta;
00158         double mPhi;
00159         double mPolAngle;
00160         double mEllipticity;
00161         double mLength;
00162         double mWidth;
00163         double mWallThickness;
00164         double mB;
00165         V3<double> mDirectionVector;
00166 
00167         //Used to change vector bases
00168         Transform mGlobalToLocal;
00169         
00170 }; // Fiber
00171 
00172 #endif // FIBER_H