Commit 74054476 authored by Jonas Stienen's avatar Jonas Stienen

Initial checkin

parents
cmake_minimum_required( VERSION 2.8 )
project( ITADiffraction )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
# dependencies
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAGeo REQUIRED FIND_DEPENDENCIES )
if( NOT DEFINED ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM )
set( ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM ON CACHE BOOL "Build with genetic path search algorithm" )
endif( NOT DEFINED ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM )
# includes
include_directories( "include" )
# sources
set( ITADiffractionHeader
"include/ITADiffractionBase.h"
"include/ITADiffractionDefinitions.h"
"include/ITADiffractionEngine.h"
"include/ITADiffractionFilter.h"
"include/ITADiffractionFilterGenerator.h"
)
set( ITADiffractionSources
"src/ITADiffractionBase.cpp"
"src/ITADiffractionEngine.cpp"
"src/ITADiffractionEngineImpl.h"
"src/ITADiffractionEngineImpl.cpp"
"src/ITADiffractionFilterGenerator.cpp"
)
if( ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM )
set( ITADiffractionSources ${ITADiffractionSources}
"src/genetic/apexPointGene.h"
"src/genetic/apexPointGene.cpp"
"src/genetic/gene.h"
"src/genetic/geneticAlgorithm.h"
"src/genetic/geneticAlgorithm.cpp"
"src/genetic/heap.h"
"src/genetic/heapPlus.h"
)
endif( ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM )
# compiler
add_definitions( -DITA_BASE_DLL -DITA_GEO_DLL -DITA_DIFFRACTION_DLL -DITA_DIFFRACTION_EXPORT -D_USE_MATH_DEFINES -DNOMINMAX )
# linker
add_library( ITADiffraction SHARED ${ITADiffractionHeader} ${ITADiffractionSources} )
target_link_libraries( ITADiffraction ${VISTA_USE_PACKAGE_LIBRARIES} )
# config
vista_configure_lib( ITADiffraction )
vista_install( ITADiffraction )
set( ITADIFFRACTION_INCLUDE_OUTDIR "${CMAKE_CURRENT_SOURCE_DIR}/include" )
vista_create_cmake_configs( ITADiffraction )
vista_create_default_info_file( ITADiffraction )
set_property( TARGET ITADiffraction PROPERTY FOLDER "ITAGeometricalAcoustics" )
# tests
set( ITADIFFRACTION_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
/*
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2016
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
// $Id: ITADiffractionBase.h 2057 2011-10-24 20:08:48Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DIFFRACTION_BASE
#define INCLUDE_WATCHER_ITA_DIFFRACTION_BASE
#include <ITADiffractionDefinitions.h>
// ITA includes
#include <ITASampleBuffer.h>
#include <ITAGeoBase.h>
// Vista includes
#include <VistaBase/VistaVector3D.h>
#include <VistaMath/VistaGeometries.h>
// STL includes
#include <string>
#include <vector>
class CITAGeoHalfedgeMeshModel;
//! Geometrical propagation anchor with parameters of a diffraction wedge
class ITA_DIFFRACTION_API CITADiffractionWedge : public CITAGeoPropagationAnchor
{
public:
CITADiffractionWedge() : v3AperturePoint( CITAGeoPropagationAnchor::v3InteractionPoint )
{
CITAGeoPropagationAnchor::iAnchorType = CITAGeoPropagationAnchor::ITA_EDGE_DIFFRACTION;
};
VistaVector3D& v3AperturePoint;
VistaVector3D v3VertextStart;
VistaVector3D v3VertextEnd;
VistaVector3D v3MainWedgeFaceNormal;
VistaVector3D v3OppositeWedgeFaceNormal;
};
//! Edge diffraction order with respect to source and listener
enum ITA_DIFFRACTION_API
{
DIFFRACTION_ORDER_INF = -1, //!< Unkown / infinit order, e.g. probably not reached
DIFFRACTION_ORDER_0 = 0, //!< Entity in same halfspace of halfedge, not a valid diffraction order
DIFFRACTION_ORDER_1, //!< Entities connected by first order diffraction path
DIFFRACTION_ORDER_2, //!< ... by second order ..
DIFFRACTION_ORDER_3, //!< ... and so on ...
DIFFRACTION_ORDER_4,
DIFFRACTION_ORDER_5,
};
//! Specular reflection order on a plane
enum ITA_DIFFRACTION_API
{
SPECULAR_REFLECTION_ORDER_0 = 0, //!< Entity in same halfspace
SPECULAR_REFLECTION_ORDER_1, //!< Entities connected by first order specular reflection
SPECULAR_REFLECTION_ORDER_2, //! ... by second order ... and so on.
};
#endif // INCLUDE_WATCHER_ITA_DIFFRACTION_BASE
/*
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2016
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
// $Id: ITADiffractionDefinitions.h 2395 2012-04-20 06:58:52Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DIFFRACTION_DEFINITIONS
#define INCLUDE_WATCHER_ITA_DIFFRACTION_DEFINITIONS
#ifdef ITA_DIFFRACTION_DLL
#ifdef ITA_DIFFRACTION_EXPORT
#define ITA_DIFFRACTION_API __declspec( dllexport )
#else
#define ITA_DIFFRACTION_API __declspec( dllimport )
#endif
#else
#define ITA_DIFFRACTION_API
#endif
#endif // INCLUDE_WATCHER_ITA_DIFFRACTION_DEFINITIONS
/*
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2016
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
// $Id: ITADiffractionEngine.h 2057 2011-10-24 20:08:48Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DIFFRACTION_ENGINE
#define INCLUDE_WATCHER_ITA_DIFFRACTION_ENGINE
#include <ITADiffractionDefinitions.h>
#include <ITADiffractionBase.h>
// ITA includes
#include <ITAGeoBase.h>
// Forwards
class CITAGeoHalfedgeMeshModel;
class ITA_DIFFRACTION_API CITADiffractionEngine
{
public:
struct AbortionCriteria
{
enum
{
SOURCE_DRIVEN = 1, //!< Calculation is driven from source entity position, first
RECEIVER_DRIVEN = 2, //!< Calculation is driven from receiver entity position, first
};
int iNumMaxReflections;
int iNumMaxDiffractions;
double dMaxDiffractionAngleRad;
double dMaxAccumulatedDiffractionAngleRad;
int iDiffractionPreparationOrder;
int iDrivingDirection;
inline AbortionCriteria()
{
SetDefaults();
};
inline void SetDefaults()
{
iNumMaxDiffractions = DIFFRACTION_ORDER_5;
iNumMaxReflections = SPECULAR_REFLECTION_ORDER_1;
dMaxAccumulatedDiffractionAngleRad = 2 * Vista::Pi;
dMaxDiffractionAngleRad = Vista::Pi;
iDiffractionPreparationOrder = DIFFRACTION_ORDER_3;
iDrivingDirection = SOURCE_DRIVEN;
};
inline friend std::ostream& operator<<( std::ostream& os, const AbortionCriteria& oAC )
{
os << "Maximum diffraction path order: " << oAC.iNumMaxDiffractions << std::endl;
os << "Maximum specular reflection path order: " << oAC.iNumMaxReflections << std::endl;
os << "Maximum preparation diffraction order: " << oAC.iDiffractionPreparationOrder << std::endl;
if( oAC.iDrivingDirection == AbortionCriteria::SOURCE_DRIVEN )
os << "Driving direction: SOURCE (from source to receiver)" << std::endl;
else if( oAC.iDrivingDirection == AbortionCriteria::RECEIVER_DRIVEN )
os << "Driving direction: RECEIVER (from receiver to source)" << std::endl;
else
os << "Driving direction: undefined" << std::endl;
os << "Maximum single diffraction angle (radients): " << oAC.dMaxDiffractionAngleRad << std::endl;
os << "Maximum accumulated diffraction angle (radients): " << oAC.dMaxAccumulatedDiffractionAngleRad << std::endl;
return os;
}
} oAbortionCriteria;
enum CandidateValidationAlgorithm
{
DETERMINISTIC = 1,
APPROXIMATE_GENETIC = 2,
};
inline virtual ~CITADiffractionEngine() {};
//! Factory method to create an instance of the diffraction engine
static CITADiffractionEngine* create( const CITAGeoHalfedgeMeshModel* pModel, const CITASource&, const CITAReceiver&, int iAlgorithm = DETERMINISTIC );
virtual bool CalculateDiffractionPaths( std::vector< CITAGeoPropagationPath >& vPaths ) =0;
void SetDefaultAbortionCriteria();
virtual void GetCombinedDiffractionGradientVisualization( CITAGeoHalfedgeMeshModel* pModel ) const=0;
virtual void GetFromSourceDiffractionGradientVisualization( CITAGeoHalfedgeMeshModel* pModel ) const=0;
virtual void GetFromReceiverDiffractionGradientVisualization( CITAGeoHalfedgeMeshModel* pModel ) const=0;
virtual void GetPropagationPathCandidatesVisualization( std::vector< CITAGeoPropagationPath >& voPropCandidates ) =0;
protected:
//! Protected default constructor, use create() instead
inline CITADiffractionEngine() {};
};
//! STL stream output operator
//ITA_DIFFRACTION_API std::ostream& operator<<( std::ostream&, const CITADiffractionEngine::AbortionCriteria& );
#endif // INCLUDE_WATCHER_ITA_DIFFRACTION_ENGINE
/*
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2016
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
// $Id: ITADiffractionFilter.h 2057 2011-10-24 20:08:48Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DIFFRACTION_FILTER
#define INCLUDE_WATCHER_ITA_DIFFRACTION_FILTER
#include <ITADiffractionDefinitions.h>
// ITA includes
#include <ITASampleBuffer.h>
class ITA_DIFFRACTION_API CITADiffractionFilter
{
CITADiffractionFilter();
ITASampleBuffer sbFIRFilter;
int nLeadingZeros;
int nFilterLength;
};
#endif // INCLUDE_WATCHER_ITA_DIFFRACTION_FILTER
/*
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2016
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
// $Id: ITADiffractionFilterGenerator.h 2057 2011-10-24 20:08:48Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DIFFRACTION_FILTER_GENERATOR
#define INCLUDE_WATCHER_ITA_DIFFRACTION_FILTER_GENERATOR
#include <ITADiffractionDefinitions.h>
#include <ITADiffractionFilter.h>
// ITA includes
#include <ITASampleBuffer.h>
#include <ITAGeoBase.h>
// STL includes
#include <vector>
class ITA_DIFFRACTION_API CITAFilterGenerator
{
public:
enum AcousticDiffractionModel
{
MODEL_MAEKAWA = 1,
MODEL_KIRCHOFF,
MODEL_BIOT_TOLSTOY,
MODEL_BIOT_TOLSTOY_MEDWIN,
};
CITAFilterGenerator( int iModel = MODEL_BIOT_TOLSTOY_MEDWIN );
void GenerateFIR( const std::vector< CITAGeoPropagationPath >& vPaths, CITADiffractionFilter& oFilter );
private:
int m_iModel;
};
#endif // INCLUDE_WATCHER_ITA_DIFFRACTION_FILTER_GENERATOR
// $Id: ITADiffractionBase.cpp 2395 2012-04-20 06:58:52Z stienen $
#include <ITADiffractionBase.h>
\ No newline at end of file
// $Id: ITADiffractionEngine.cpp 2395 2012-04-20 06:58:52Z stienen $
#include <ITADiffractionEngine.h>
#include "ITADiffractionEngineImpl.h"
CITADiffractionEngine* CITADiffractionEngine::create( const CITAGeoHalfedgeMeshModel* pModel, const CITASource& oSource, const CITAReceiver& oReceiver, int iAlgorithm )
{
return new CITADiffractionEngineImpl( pModel, oSource, oReceiver, iAlgorithm );
}
void CITADiffractionEngine::SetDefaultAbortionCriteria()
{
oAbortionCriteria.SetDefaults();
}
\ No newline at end of file
This diff is collapsed.
// $Id: ITADiffractionEngineImpl.h 2057 2011-10-24 20:08:48Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DIFFRACTION_ENGINE_IMPL
#define INCLUDE_WATCHER_ITA_DIFFRACTION_ENGINE_IMPL
#include <ITADiffractionEngine.h>
// OpenMesh includes
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
typedef OpenMesh::PolyMesh_ArrayKernelT<> CITAMesh;
class CITADiffractionEngineImpl : public CITADiffractionEngine
{
public:
CITADiffractionEngineImpl( const CITAGeoHalfedgeMeshModel* pModel, const CITASource&, const CITAReceiver&, int iAlgorithm );
bool CalculateDiffractionPaths( std::vector< CITAGeoPropagationPath >& vPaths );
class CITAGeoPropagationPathCandidate
{
public:
CITAMesh::FaceHandle hContourFace;
int iContourFaceCombinedOrder;
bool bAudible;
std::vector< std::vector< CITAMesh::HalfedgeHandle > > vvhToReceiverBranches;
std::vector< std::vector< CITAMesh::HalfedgeHandle > > vvhToSourceBranches;
inline CITAGeoPropagationPathCandidate()
: iContourFaceCombinedOrder( DIFFRACTION_ORDER_INF ), bAudible( false )
{};
inline CITAGeoPropagationPathCandidate( CITAMesh::FaceHandle hContourFace_, int iCombinedOrder_ = DIFFRACTION_ORDER_INF )
: hContourFace( hContourFace_ )
, iContourFaceCombinedOrder( iCombinedOrder_ )
, bAudible( false )
{};
};
void GetCombinedDiffractionGradientVisualization( CITAGeoHalfedgeMeshModel* pModel ) const;
void GetFromSourceDiffractionGradientVisualization( CITAGeoHalfedgeMeshModel* pModel ) const;
void GetFromReceiverDiffractionGradientVisualization( CITAGeoHalfedgeMeshModel* pModel ) const;
void GetPropagationPathCandidatesVisualization( std::vector< CITAGeoPropagationPath >& voPropCandidates );
private:
CITADiffractionEngineImpl();
virtual ~CITADiffractionEngineImpl();
const CITAGeoHalfedgeMeshModel* m_pGeoModel;
CITASource m_oSource;
CITAReceiver m_oReceiver;
int m_iAlgorithm; //!< Diffraction path candidate validation algorithm
//! Prepares edge diffraction properties on given polygonal mesh
/**
* The preparation includes determination of wedge opening angle, halfedge
* local coordinate system with axis-and-angle representation, direct
* line-of-sight visibility test for source and listener.
*
* @note Currently only works for convex geometries
*/
void PrepareDiffractionPathTree();
//! Marks all faces that are illuminated by the entities
/**
* @note Currently only works for convex geometries!
*
* @return True, if illuminated faces are overlapping, false otherwise
*
*/
bool MarkIlluminatedFaces();
//! Recursively searches for the diffraction gradients
/**
* @note Currently only works for convex geometries!
*
* @return True, if a connection between source and receiver could be found within given abortion criteria, false otherwise
*
*/
bool RecursiveDiffractionGradientSearch( int iRecursiveIteration );
bool DerivePropagationPathsFromDiffractionContour( std::vector< CITAGeoPropagationPathCandidate >& voPropagationCandidates );
bool FollowGradientBranchesToSource( const std::vector< CITAMesh::HalfedgeHandle > vhTrunkEdge, std::vector< std::vector< CITAMesh::HalfedgeHandle > >& vvhBranchesList ) const;
bool FollowGradientBranchesToReceiver( const std::vector< CITAMesh::HalfedgeHandle > vhTrunkEdge, std::vector< std::vector< CITAMesh::HalfedgeHandle > >& vvhBranchesList ) const;
void ValidateDiffractionPaths();
void AudibilityTest( std::vector< CITAGeoPropagationPathCandidate >& voCandidates );
void AudibilityTest( CITAGeoPropagationPathCandidate& oCandidate );
bool ReverseAngleRangeTest( const std::vector< CITAMesh::HalfedgeHandle >& vhPath, const VistaVector3D& vFromPos ) const;
double GetValidIncidenceAngleRad( CITAMesh::HalfedgeHandle hFrom, CITAMesh::HalfedgeHandle hTo ) const;
bool FindAperturePointFirstOrder( const VistaVector3D& v3StartVertex, const VistaVector3D& v3EndVertex, const VistaVector3D& v3Pos, VistaVector3D& v3AperturePoint ) const;
bool CalculatePropagationPath( const CITAGeoPropagationPathCandidate&, CITAGeoPropagationPath& ) const;
bool ApproximatePropagationPathGeneticAlgorithm( const CITAGeoPropagationPathCandidate&, CITAGeoPropagationPath& ) const;
};
#endif // INCLUDE_WATCHER_ITA_DIFFRACTION_ENGINE_IMPL
// $Id: ITADiffractionEngine.cpp 2395 2012-04-20 06:58:52Z stienen $
#include <ITADiffractionFilterGenerator.h>
// ITA includes
#include <ITAException.h>
#include <ITAGeoHalfedgeMeshModel.h>
// Vista includes
#include <VistaMath/VistaGeometries.h>
// STL includes
#include <assert.h>
#include <stdio.h>
// OpenMesh includes
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
typedef OpenMesh::PolyMesh_ArrayKernelT<> CITAMesh;
//! ITAMesh pointer wrapper
struct CITAMeshPtr
{
CITAMesh* pTopLevelMesh;
};
CITAFilterGenerator::CITAFilterGenerator( int iModel )
: m_iModel( iModel )
{
}
\ No newline at end of file
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "apexPointGene.h"
#include <VistaBase/VistaVectorMath.h>
apexPointGene::apexPointGene(VistaVector3D *source, VistaVector3D *receiver, const std::vector<std::pair<VistaVector3D, VistaVector3D>> *edges, double variation)
: m_pvEdges(edges), m_dVariation(variation)
{
m_NumberOfEdges = edges->size();
m_pvSource = source;
m_pvReceiver = receiver;
m_pvPositions = nullptr;
random.SetSeed(time(NULL));
}
apexPointGene::apexPointGene( std::vector<double> *positions, VistaVector3D *source, VistaVector3D *receiver, const std::vector<std::pair<VistaVector3D, VistaVector3D>> *edges, double variation )
: m_pvEdges(edges), m_dVariation(variation)
{
m_pvPositions = positions;
m_NumberOfEdges = m_pvPositions->size();
m_pvSource = source;
m_pvReceiver = receiver;
m_PathLength = fitness();
random.SetSeed(3);
}
apexPointGene::~apexPointGene()
{
delete m_pvPositions;
}
bool apexPointGene::operator> (const apexPointGene& r) const
{
return m_PathLength > r.m_PathLength;
}
bool apexPointGene::operator< (const apexPointGene& r) const
{
return m_PathLength < r.m_PathLength;
}
double apexPointGene::fitness()
{
std::vector<VistaVector3D> path;
path.resize(m_NumberOfEdges + 2);
path[0] = *m_pvSource;
for (size_t i = 0; i < m_NumberOfEdges; i++)
{
path[i + 1] = m_pvEdges->at(i).first + m_pvPositions->at(i)*(m_pvEdges->at(i).second - m_pvEdges->at(i).first);
}
path[m_NumberOfEdges + 1] = *m_pvReceiver;
double length = 0;
for (size_t i = 0; i < m_NumberOfEdges + 1;i++)
{
length += (path[i + 1] - path[i]).GetLength();
}
return length;
}
void apexPointGene::mutate(){}
apexPointGene* apexPointGene::generateRandomGene()
{
std::vector<double> *positions = new std::vector<double>();
positions->resize(m_NumberOfEdges);
for (size_t i = 0; i < m_NumberOfEdges; i++)
{
positions->at(i) = random.GenerateDouble(0.0,1.0);
}
apexPointGene* temp = new apexPointGene(positions, m_pvSource, m_pvReceiver, m_pvEdges, m_dVariation);
return temp;
}
apexPointGene* apexPointGene::combine(apexPointGene& second)
{
std::vector<double> *positions = new std::vector<double>();
positions->resize(m_NumberOfEdges);
for (size_t i = 0; i < m_NumberOfEdges; i++)
{
if (random.GenerateDouble(0.0,2.0) > 1.0)
{
positions->at(i) = m_pvPositions->at(i) + random.GenerateDouble(0.0, 2 * m_dVariation) - m_dVariation;
if (positions->at(i) > 1.0)
positions->at(i) = 1.0;
else if (positions->at(i) < 0.0)
positions->at(i) = 0.0;
}
else
{
positions->at(i) = second.m_pvPositions->at(i) + random.GenerateDouble(0.0, 2 * m_dVariation) - m_dVariation;
if (positions->at(i) > 1.0)
positions->at(i) = 1.0;
else if (positions->at(i) < 0.0)
positions->at(i) = 0.0;
}
}
return new apexPointGene(positions, m_pvSource, m_pvReceiver, m_pvEdges, m_dVariation);
}
std::vector<VistaVector3D> apexPointGene::getPath() const
{
std::vector<VistaVector3D> path;
path.resize(m_NumberOfEdges + 2);
path[0] = *m_pvSource;
for (size_t i = 0; i < m_NumberOfEdges; i++)
{
path[i+1] = m_pvEdges->at(i).first + m_pvPositions->at(i)*(m_pvEdges->at(i).second - m_pvEdges->at(i).first);
}
path[m_NumberOfEdges + 1] = *m_pvReceiver;
return path;
}
std::vector<double> apexPointGene::getPositions()
{
return *m_pvPositions;
}
\ No newline at end of file
#pragma once
//#include "gene.h"
#include <vector>
#include <VistaBase/VistaVector3D.h>
#include <VistaTools/VistaRandomNumberGenerator.h>
#include <chrono>
class apexPointGene
{
public:
size_t m_NumberOfEdges;
double m_PathLength;
apexPointGene(VistaVector3D *source, VistaVector3D *receiver, const std::vector<std::pair<VistaVector3D, VistaVector3D>> *edges, double variation);
apexPointGene(std::vector<double> *positions, VistaVector3D *source, VistaVector3D *receiver, const std::vector<std::pair<VistaVector3D, VistaVector3D>> *edges, double variation);
~apexPointGene();
double fitness();
bool operator> (const apexPointGene&) const;