paysages3d/src/definition/NoiseNode.h

41 lines
876 B
C
Raw Normal View History

2015-10-18 22:26:25 +00:00
#ifndef NOISENODE_H
#define NOISENODE_H
#include "definition_global.h"
#include "DefinitionNode.h"
namespace paysages {
namespace definition {
/**
* Definition node with noise parameters.
*/
class DEFINITIONSHARED_EXPORT NoiseNode : public DefinitionNode {
public:
2015-10-18 22:26:25 +00:00
NoiseNode(DefinitionNode *parent);
virtual ~NoiseNode();
inline const NoiseGenerator *getGenerator() {
return noise;
}
2015-10-18 22:26:25 +00:00
/**
* Set the number of levels to use in the noise generator.
*/
void setLevels(int levels, double min_value = -1.0, double max_value = 1.0);
2015-10-18 22:26:25 +00:00
protected:
2015-10-18 22:26:25 +00:00
virtual void save(PackStream *stream) const override;
virtual void load(PackStream *stream) override;
virtual void copy(DefinitionNode *destination) const override;
virtual void validate() override;
private:
2015-10-18 22:26:25 +00:00
NoiseGenerator *noise;
};
}
}
#endif // NOISENODE_H