transferfunctioneditorfactory.cpp 707 Bytes
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "transferfunctioneditorfactory.h"

#include "application/gui/properties/abstracttransferfunctioneditor.h"
#include "application/gui/properties/simpletransferfunctioneditor.h"

#include "core/classification/abstracttransferfunction.h"
#include "core/classification/simpletransferfunction.h"

namespace TUMVis {

    AbstractTransferFunctionEditor* TransferFunctionEditorFactory::createEditor(AbstractTransferFunction* tf) {
        tgtAssert(tf != 0, "Transfer function must not be 0.");

        if (SimpleTransferFunction* tester = dynamic_cast<SimpleTransferFunction*>(tf)) {
            return new SimpleTransferFunctionEditor(tester);
        }

        return 0;
    }

}