46 lines
1.3 KiB
Markdown
46 lines
1.3 KiB
Markdown
|
---
|
||
|
title: UE5 3DGaussians 插件笔记
|
||
|
date: 2023-12-22 11:44:33
|
||
|
excerpt:
|
||
|
tags:
|
||
|
rating: ⭐
|
||
|
---
|
||
|
|
||
|
# c++
|
||
|
插件的c++部分主要实现了
|
||
|
|
||
|
|
||
|
|
||
|
## 相关代码
|
||
|
```c++
|
||
|
struct FThreeDGaussiansData
|
||
|
{
|
||
|
GENERATED_BODY()
|
||
|
|
||
|
public:
|
||
|
FThreeDGaussiansData() {}
|
||
|
|
||
|
FThreeDGaussiansData(const TArray<UTexture2D*>& textures, const FVector3f& in_minPos, const FVector3f& in_maxPos)
|
||
|
{
|
||
|
minPos = in_minPos;
|
||
|
maxPos = in_maxPos;
|
||
|
textureWidth = textures[0]->GetSizeX();
|
||
|
position = textures[0];
|
||
|
rotation = textures[1];
|
||
|
scaleAndOpacity = textures[2];
|
||
|
|
||
|
for (int i = 3; i < textures.Num(); i++)
|
||
|
{
|
||
|
sh.Add(textures[i]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "3D Gaussians") FVector3f minPos = FVector3f::Zero();
|
||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "3D Gaussians") FVector3f maxPos = FVector3f::Zero();
|
||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "3D Gaussians") int32 textureWidth = -1;
|
||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "3D Gaussians") UTexture2D* position;
|
||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "3D Gaussians") UTexture2D* rotation;
|
||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "3D Gaussians") UTexture2D* scaleAndOpacity;
|
||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "3D Gaussians") TArray<UTexture2D*> sh;
|
||
|
};
|
||
|
```
|