<commit_before>///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// TendrModelTetraPlugin                                                     //
//                                                                           //
// A Tendr model generator plugin for use with Unreal Engine in combination  //
// with the Tendr Dynamics soft-body physics plugin.                         //
//                                                                           //
// Version 1.0                                                               //
// January, 2015                                                             //
//                                                                           //
// Copyright (C) 2014-2015, Tendr Dynamics B.V.                              //
//                                                                           //
// Visit http://tendrdynamics.com for more information.                      //
//                                                                           //
// This file is governed by copyrights as described in the LICENSE file.     //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////

#pragma once

#include "Common/TendrModelData.h"
#include "TendrModelTetraGeneratorComponent.generated.h"

//
// UTendrModelTetraGeneratorComponent
//
// Unreal component class for Tendr-compatible container objects with tetrahedral model data.
// Implements the base ITendrModelData interface for use with the TendrDynamics plugin.
//
UCLASS( CollapseCategories, HideCategories = Object )
class UTendrModelTetraGeneratorComponent : public USceneComponent, public ITendrModelGenerator
{
	GENERATED_UCLASS_BODY( )

public:

	// Begin UObject interface.
#if WITH_EDITOR
	virtual void PreEditChange( UProperty* PropertyAboutToChange ) override;
	virtual void PostEditChangeProperty( FPropertyChangedEvent& PropertyChangedEvent ) override;
#endif // WITH_EDITOR
	virtual void BeginDestroy() override;
	virtual void GetAssetRegistryTags( TArray<FAssetRegistryTag>& OutTags ) const override;
	virtual FString GetDesc() override;
	// End UObject interface.

	// Begin UActorComponent interface.
	virtual void OnRegister() override;
	// End UActorComponent interface.

	// Begin ITendrModelData interface.
	virtual FTendrModelData Build( const FTendrVertexArray& InputVertices, const FTendrIndexArray& InputIndices, bool bSilent ) override;
	virtual FString GetLastError() override;
	// End ITendrModelData interface.

	// Exposes the TendrModelGenerator version so the TendrDynamics plugin can detect this as a compatible class.
	UPROPERTY()
	uint32 TendrModelGeneratorVersion;

	// Maximum volume constraint for tetrahedra in the generated model
	UPROPERTY( EditAnywhere, NoClear, BlueprintReadWrite, Category = "Tendr Model", meta = ( UIMin = 0, ClampMin = 0 ) )
	int32 MaximumTetraVolume;

private:
	/** Sets the last error **/
	void SetError( FString Text );

	/** Adds a neighbour to the connectivity structure **/
	bool ConnectivityAddNeighbour( FTendrModelData& ModelData, uint32 Src, uint32 Dst, uint32& MaxNeighbours );

	/** Last error **/
	FString LastError;
};<commit_msg>Changed maximum volume parameter from int32 to float.<commit_after>///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// TendrModelTetraPlugin                                                     //
//                                                                           //
// A Tendr model generator plugin for use with Unreal Engine in combination  //
// with the Tendr Dynamics soft-body physics plugin.                         //
//                                                                           //
// Version 1.0                                                               //
// January, 2015                                                             //
//                                                                           //
// Copyright (C) 2014-2015, Tendr Dynamics B.V.                              //
//                                                                           //
// Visit http://tendrdynamics.com for more information.                      //
//                                                                           //
// This file is governed by copyrights as described in the LICENSE file.     //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////

#pragma once

#include "Common/TendrModelData.h"
#include "TendrModelTetraGeneratorComponent.generated.h"

//
// UTendrModelTetraGeneratorComponent
//
// Unreal component class for Tendr-compatible container objects with tetrahedral model data.
// Implements the base ITendrModelData interface for use with the TendrDynamics plugin.
//
UCLASS( CollapseCategories, HideCategories = Object )
class UTendrModelTetraGeneratorComponent : public USceneComponent, public ITendrModelGenerator
{
	GENERATED_UCLASS_BODY( )

public:

	// Begin UObject interface.
#if WITH_EDITOR
	virtual void PreEditChange( UProperty* PropertyAboutToChange ) override;
	virtual void PostEditChangeProperty( FPropertyChangedEvent& PropertyChangedEvent ) override;
#endif // WITH_EDITOR
	virtual void BeginDestroy() override;
	virtual void GetAssetRegistryTags( TArray<FAssetRegistryTag>& OutTags ) const override;
	virtual FString GetDesc() override;
	// End UObject interface.

	// Begin UActorComponent interface.
	virtual void OnRegister() override;
	// End UActorComponent interface.

	// Begin ITendrModelData interface.
	virtual FTendrModelData Build( const FTendrVertexArray& InputVertices, const FTendrIndexArray& InputIndices, bool bSilent ) override;
	virtual FString GetLastError() override;
	// End ITendrModelData interface.

	// Exposes the TendrModelGenerator version so the TendrDynamics plugin can detect this as a compatible class.
	UPROPERTY()
	uint32 TendrModelGeneratorVersion;

	// Maximum volume constraint for tetrahedra in the generated model
	UPROPERTY( EditAnywhere, NoClear, BlueprintReadWrite, Category = "Tendr Model", meta = ( UIMin = 0, ClampMin = 0 ) )
	float MaximumTetraVolume;

private:
	/** Sets the last error **/
	void SetError( FString Text );

	/** Adds a neighbour to the connectivity structure **/
	bool ConnectivityAddNeighbour( FTendrModelData& ModelData, uint32 Src, uint32 Dst, uint32& MaxNeighbours );

	/** Last error **/
	FString LastError;
};
{'fraction_non_alphanumeric': 0.11428994959976282, 'fraction_numerical': 0.007708271568336793, 'mean_word_length': 1.42262118491921, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 54, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7589910', 'n_tokens_mistral': 1514, 'n_tokens_neox': 1419, 'n_words': 465}