2017-12-21 12:43:31 +01:00
|
|
|
#pragma once
|
2018-01-19 21:36:31 +01:00
|
|
|
//TODO!! increase Destructioncount
|
2018-01-29 20:05:37 +01:00
|
|
|
#define DESTRUCTION_COUNT 3
|
2017-12-20 22:05:04 +01:00
|
|
|
|
2017-12-20 23:15:17 +01:00
|
|
|
#include "DestructionPower_Properties.h"
|
2017-12-21 12:20:57 +01:00
|
|
|
#include "../AbstraktionLayer_Base.h"
|
|
|
|
|
2017-12-20 22:05:04 +01:00
|
|
|
#include <vector>
|
|
|
|
#include <iostream>
|
|
|
|
#include <bitset>
|
|
|
|
#include <random>
|
|
|
|
|
2017-12-21 12:20:57 +01:00
|
|
|
class DestructionPower : public AbstractionLayer_Base<DestructionPower_Properties>
|
2017-12-20 22:05:04 +01:00
|
|
|
{
|
|
|
|
public:
|
2017-12-29 14:33:22 +01:00
|
|
|
bool PreProcessing(coor mySize,const vector<Part*>* partArray)override;
|
2017-12-21 12:20:57 +01:00
|
|
|
bool EvaluateQuality (coor constraintCoordinate, qualityVector& qVector) override;
|
2017-12-22 23:09:23 +01:00
|
|
|
bool SetConstraintOnPosition(coor constraintCoordinate, DestructionPower_Properties constraint);
|
2017-12-21 12:20:57 +01:00
|
|
|
bool RemoveConstraintOnPosition(coor constraintCoordinate)override;
|
2017-12-20 22:05:04 +01:00
|
|
|
|
2017-12-21 12:20:57 +01:00
|
|
|
void DestructionOfSurrounding(coor constraintCoordinate);
|
2017-12-22 22:55:55 +01:00
|
|
|
int getNextAbstractionLayer(coor newCoordinate, int currentAbstractionLayer);
|
|
|
|
|
2017-12-23 21:46:41 +01:00
|
|
|
void setDestructionPower(coor myCoor, int AbstractionLevel, float destructionPower)
|
|
|
|
{ m_constraintMatrix[myCoor.col][myCoor.row].DestructionArray[AbstractionLevel] = destructionPower;}
|
|
|
|
|
2017-12-20 22:05:04 +01:00
|
|
|
private:
|
2018-01-06 23:23:42 +01:00
|
|
|
float defaultDestructionPower(int i);
|
2017-12-20 22:05:04 +01:00
|
|
|
};
|