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]
64 lines
2.3 KiB
C++
64 lines
2.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "PrimitiveViewRelevance.h"
|
|
#include "PrimitiveSceneProxy.h"
|
|
#include "AI/Navigation/NavLinkDefinition.h"
|
|
|
|
class FMaterialRenderProxy;
|
|
class FMeshElementCollector;
|
|
class FPrimitiveDrawInterface;
|
|
class UPrimitiveComponent;
|
|
|
|
class NAVIGATIONSYSTEM_API FNavLinkRenderingProxy : public FPrimitiveSceneProxy
|
|
{
|
|
private:
|
|
AActor* LinkOwnerActor;
|
|
class INavLinkHostInterface* LinkOwnerHost;
|
|
|
|
public:
|
|
SIZE_T GetTypeHash() const override;
|
|
|
|
struct FNavLinkDrawing
|
|
{
|
|
FVector Left;
|
|
FVector Right;
|
|
ENavLinkDirection::Type Direction;
|
|
FColor Color;
|
|
float SnapRadius;
|
|
float SnapHeight;
|
|
uint32 SupportedAgentsBits;
|
|
};
|
|
struct FNavLinkSegmentDrawing
|
|
{
|
|
FVector LeftStart, LeftEnd;
|
|
FVector RightStart, RightEnd;
|
|
ENavLinkDirection::Type Direction;
|
|
FColor Color;
|
|
float SnapRadius;
|
|
float SnapHeight;
|
|
uint32 SupportedAgentsBits;
|
|
};
|
|
|
|
private:
|
|
TArray<FNavLinkDrawing> OffMeshPointLinks;
|
|
TArray<FNavLinkSegmentDrawing> OffMeshSegmentLinks;
|
|
|
|
public:
|
|
/** Initialization constructor. */
|
|
FNavLinkRenderingProxy(const UPrimitiveComponent* InComponent);
|
|
virtual void GetDynamicMeshElements(const TArray<const FSceneView*>& Views, const FSceneViewFamily& ViewFamily, uint32 VisibilityMap, FMeshElementCollector& Collector) const override;
|
|
virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) const override;
|
|
virtual uint32 GetMemoryFootprint( void ) const override;
|
|
uint32 GetAllocatedSize( void ) const;
|
|
void StorePointLinks(const FTransform& LocalToWorld, const TArray<FNavigationLink>& LinksArray);
|
|
void StoreSegmentLinks(const FTransform& LocalToWorld, const TArray<FNavigationSegmentLink>& LinksArray);
|
|
|
|
static void GetLinkMeshes(const TArray<FNavLinkDrawing>& OffMeshPointLinks, const TArray<FNavLinkSegmentDrawing>& OffMeshSegmentLinks, TArray<float>& StepHeights, FMaterialRenderProxy* const MeshColorInstance, int32 ViewIndex, FMeshElementCollector& Collector, uint32 AgentMask);
|
|
|
|
/** made static to allow consistent navlinks drawing even if something is drawing links without FNavLinkRenderingProxy */
|
|
static void DrawLinks(FPrimitiveDrawInterface* PDI, TArray<FNavLinkDrawing>& OffMeshPointLinks, TArray<FNavLinkSegmentDrawing>& OffMeshSegmentLinks, TArray<float>& StepHeights, FMaterialRenderProxy* const MeshColorInstance, uint32 AgentMask);
|
|
};
|