<commit_before>/*
	This file is part of the MinSG library extension MultiAlgoRendering.
	Copyright (C) 2009-2012 <NAME> <<EMAIL>>
	
	This library is subject to the terms of the Mozilla Public License, v. 2.0.
	You should have received a copy of the MPL along with this library; see the 
	file LICENSE. If not, you can obtain one at http://mozilla.org/MPL/2.0/.
*/

#ifdef MINSG_EXT_MULTIALGORENDERING
#include "Dependencies.h"

#ifndef SURFELRENDERER_H
#define SURFELRENDERER_H

#include "../../Core/States/NodeRendererState.h"
#include "../../Core/FrameContext.h"
#include <Geometry/Matrix4x4.h>
#include <set>

namespace MinSG {
namespace MAR {

class SurfelRenderer : public NodeRendererState {
		PROVIDES_TYPE_NAME(MAR::SurfelRenderer)

	public:

		SurfelRenderer(Util::StringIdentifier channel = FrameContext::DEFAULT_CHANNEL)
			: NodeRendererState(channel), surfelCountFac(8), surfelSizeFac(1), maxSurfelSize(10), forceFlag(false){}

		SurfelRenderer(SurfelRenderer  other): NodeRendererState(std::move(other)) {};

		virtual ~SurfelRenderer() {}

		virtual NodeRendererResult displayNode(FrameContext & context, Node * node, const RenderParam & rp) override;

		float getSurfelCountFactor() const{
			return surfelCountFac;
		}
		void setSurfelCountFactor(float factor) {
			if(factor <= 0)
				throw std::logic_error("surfel count factor has to be greater zero");
			surfelCountFac = factor;
		}

		float getSurfelSizeFactor() const{
			return surfelSizeFac;
		}
		void setSurfelSizeFactor(float factor) {
			if(factor <= 0)
				throw std::logic_error("surfel size factor has to be greater zero");
			surfelSizeFac = factor;
		}
		
		float getMaxAutoSurfelSize() const{
			return maxSurfelSize;
		}
		void setMaxAutoSurfelSize(float size) {
			if(size <= 0)
				throw std::logic_error("surfel size factor has to be greater zero");
			maxSurfelSize = size;<commit_msg>Revert wrong transformation<commit_after>/*
	This file is part of the MinSG library extension MultiAlgoRendering.
	Copyright (C) 2009-2012 <NAME> <<EMAIL>>
	
	This library is subject to the terms of the Mozilla Public License, v. 2.0.
	You should have received a copy of the MPL along with this library; see the 
	file LICENSE. If not, you can obtain one at http://mozilla.org/MPL/2.0/.
*/

#ifdef MINSG_EXT_MULTIALGORENDERING
#include "Dependencies.h"

#ifndef SURFELRENDERER_H
#define SURFELRENDERER_H

#include "../../Core/States/NodeRendererState.h"
#include "../../Core/FrameContext.h"
#include <Geometry/Matrix4x4.h>
#include <set>

namespace MinSG {
namespace MAR {

class SurfelRenderer : public NodeRendererState {
		PROVIDES_TYPE_NAME(MAR::SurfelRenderer)

	public:

		SurfelRenderer(Util::StringIdentifier channel = FrameContext::DEFAULT_CHANNEL)
			: NodeRendererState(channel), surfelCountFac(8), surfelSizeFac(1), maxSurfelSize(10), forceFlag(false){}

		SurfelRenderer(const SurfelRenderer &) = default;

		virtual ~SurfelRenderer() {}

		virtual NodeRendererResult displayNode(FrameContext & context, Node * node, const RenderParam & rp) override;

		float getSurfelCountFactor() const{
			return surfelCountFac;
		}
		void setSurfelCountFactor(float factor) {
			if(factor <= 0)
				throw std::logic_error("surfel count factor has to be greater zero");
			surfelCountFac = factor;
		}

		float getSurfelSizeFactor() const{
			return surfelSizeFac;
		}
		void setSurfelSizeFactor(float factor) {
			if(factor <= 0)
				throw std::logic_error("surfel size factor has to be greater zero");
			surfelSizeFac = factor;
		}
		
		float getMaxAutoSurfelSize() const{
			return maxSurfelSize;
		}
		void setMaxAutoSurfelSize(float size) {
			if(size <= 0)
				throw std::logic_error("surfel size factor has to be greater zero");
			maxSurfelSize = size;
{'fraction_non_alphanumeric': 0.10195343858710196, 'fraction_numerical': 0.01123896173401124, 'mean_word_length': 4.689497716894977, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5922480', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1165, 'n_words': 335}