Files
UnrealEngineUWP/Engine/Source/Runtime/NavigationSystem/Public/NavRelevantComponent.h
Ben Marsh 7598af0532 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

[CL 4662404 by Ben Marsh in Main branch]
2018-12-14 13:41:00 -05:00

53 lines
1.5 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "Components/ActorComponent.h"
#include "AI/Navigation/NavRelevantInterface.h"
#include "NavRelevantComponent.generated.h"
UCLASS()
class NAVIGATIONSYSTEM_API UNavRelevantComponent : public UActorComponent, public INavRelevantInterface
{
GENERATED_UCLASS_BODY()
//~ Begin UActorComponent Interface
virtual void OnRegister() override;
virtual void OnUnregister() override;
//~ End UActorComponent Interface
//~ Begin INavRelevantInterface Interface
virtual FBox GetNavigationBounds() const override;
virtual bool IsNavigationRelevant() const override;
virtual void UpdateNavigationBounds() override;
virtual UObject* GetNavigationParent() const override;
//~ End INavRelevantInterface Interface
virtual void CalcAndCacheBounds() const;
UFUNCTION(BlueprintCallable, Category="AI|Navigation")
void SetNavigationRelevancy(bool bRelevant);
/** force relevancy and skip attaching navigation data to owner's root entry */
void ForceNavigationRelevancy(bool bForce);
/** force refresh in navigation octree */
void RefreshNavigationModifiers();
protected:
/** bounds for navigation octree */
mutable FBox Bounds;
/** attach navigation data to entry for owner's root component (depends on its relevancy) */
UPROPERTY()
uint32 bAttachToOwnersRoot : 1;
mutable uint32 bBoundsInitialized : 1;
UPROPERTY(transient)
UObject* CachedNavParent;
};