diff --git a/Source/GPUPointCloudRenderer/Private/PointCloudStreamingCore.cpp b/Source/GPUPointCloudRenderer/Private/PointCloudStreamingCore.cpp index 364cb1a..30cedfc 100644 --- a/Source/GPUPointCloudRenderer/Private/PointCloudStreamingCore.cpp +++ b/Source/GPUPointCloudRenderer/Private/PointCloudStreamingCore.cpp @@ -165,7 +165,7 @@ void FPointCloudStreamingCore::Initialize(unsigned int pointCount) if (pointCount == 0) return; - int32 pointsPerAxis = FMath::CeilToInt(FMath::Sqrt(pointCount)); + int32 pointsPerAxis = FMath::CeilToInt(FMath::Sqrt(static_cast(pointCount))); // Ensure even-sized, power-of-two textures to avoid inaccuracies if (pointsPerAxis % 2 == 1) pointsPerAxis++; pointsPerAxis = GetUpperPowerOfTwo(pointsPerAxis); @@ -321,4 +321,4 @@ FPointCloudStreamingCore::~FPointCloudStreamingCore() { // delete mPointScalingTexture; //if (mColorTexture) // delete mColorTexture; -} \ No newline at end of file +} diff --git a/Source/GPUPointCloudRendererEditor/Private/GPUPointCloudRendererComponent.cpp b/Source/GPUPointCloudRendererEditor/Private/GPUPointCloudRendererComponent.cpp index 434fb0b..c0943b2 100644 --- a/Source/GPUPointCloudRendererEditor/Private/GPUPointCloudRendererComponent.cpp +++ b/Source/GPUPointCloudRendererEditor/Private/GPUPointCloudRendererComponent.cpp @@ -167,7 +167,7 @@ void UGPUPointCloudRendererComponent::CreateStreamingBaseMesh(int32 pointCount) CHECK_PCR_STATUS // Dirty fix: Avoid recreation of point cloud mesh every frame - int32 pointsPerAxis = FMath::CeilToInt(FMath::Sqrt(pointCount)); + int32 pointsPerAxis = FMath::CeilToInt(FMath::Sqrt(static_cast(pointCount))); if (pointsPerAxis % 2 == 1) pointsPerAxis++; pointsPerAxis = GetUpperPowerOfTwo(pointsPerAxis); auto totalPointCount = pointsPerAxis* pointsPerAxis; @@ -202,7 +202,7 @@ void UGPUPointCloudRendererComponent::BuildTriangleStack(TArraySetScalarParameterValue("DistanceScaling", mDistanceScaling); //mPointCloudMaterial->SetScalarParameterValue("DistanceFalloff", mDistanceFalloff); mPointCloudMaterial->SetScalarParameterValue("ShouldOverrideColor", (int)mShouldOverrideColor); -} \ No newline at end of file +}