source: cpp/frams/genetics/fS/fS_conv.cpp @ 1290

Last change on this file since 1290 was 1017, checked in by Maciej Komosinski, 4 years ago

fS: faster collision detection, depends on "geometry" algorithms

File size: 632 bytes
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 2019-2020  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#include "fS_conv.h"
6
7SString GenoConv_fS0s::convert(SString &i, MultiMap *map, bool using_checkpoints)
8{
9        fS_Genotype *genotype;
10        try
11        {
12                genotype = new fS_Genotype(i.c_str());
13        }
14        catch (fS_Exception &e)
15        {
16                logPrintf("GenoConv_fS0s", "convert", LOG_ERROR, e.what());
17                return SString();
18        }
19
20        Model model = genotype->buildModel(using_checkpoints);
21        delete genotype;
22
23        if (map)
24        {
25                model.getCurrentToF0Map(*map);
26        }
27
28        return model.getF0Geno().getGenes();
29}
Note: See TracBrowser for help on using the repository browser.