You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "MeshDescription.h"
|
|
|
|
namespace MeshAttribute
|
|
{
|
|
namespace Vertex
|
|
{
|
|
extern MESHDESCRIPTION_API const FName Position;
|
|
}
|
|
}
|
|
|
|
|
|
class MESHDESCRIPTION_API FMeshAttributes
|
|
{
|
|
public:
|
|
explicit FMeshAttributes(FMeshDescription& InMeshDescription)
|
|
: MeshDescription(InMeshDescription)
|
|
{}
|
|
|
|
virtual ~FMeshAttributes() = default;
|
|
|
|
virtual void Register();
|
|
|
|
/** Accessors for cached vertex position array */
|
|
TVertexAttributesRef<FVector> GetVertexPositions() { return MeshDescription.VertexAttributes().GetAttributesRef<FVector>(MeshAttribute::Vertex::Position); }
|
|
TVertexAttributesConstRef<FVector> GetVertexPositions() const { return MeshDescription.VertexAttributes().GetAttributesRef<FVector>(MeshAttribute::Vertex::Position); }
|
|
|
|
protected:
|
|
|
|
FMeshDescription& MeshDescription;
|
|
};
|
|
|
|
|
|
class FMeshConstAttributes
|
|
{
|
|
public:
|
|
explicit FMeshConstAttributes(const FMeshDescription& InMeshDescription)
|
|
: MeshDescription(InMeshDescription)
|
|
{}
|
|
|
|
/** Accessors for cached vertex position array */
|
|
TVertexAttributesConstRef<FVector> GetVertexPositions() const { return MeshDescription.VertexAttributes().GetAttributesRef<FVector>(MeshAttribute::Vertex::Position); }
|
|
|
|
protected:
|
|
|
|
const FMeshDescription& MeshDescription;
|
|
};
|