void FNavigationQueryFilter::Assign(const FNavigationQueryFilter& Source) { if (Source.GetImplementation() != NULL) { QueryFilterImpl = Source.QueryFilterImpl; } MaxSearchNodes = Source.GetMaxSearchNodes(); }
TSharedPtr<const FNavigationQueryFilter> UNavigationQueryFilter::GetQueryFilter(const ANavigationData* NavData) const { TSharedPtr<const FNavigationQueryFilter> SharedFilter = NavData->GetQueryFilter(GetClass()); if (!SharedFilter.IsValid()) { FNavigationQueryFilter* NavFilter = new FNavigationQueryFilter(); NavFilter->SetFilterImplementation(NavData->GetDefaultQueryFilterImpl()); InitializeFilter(NavData, NavFilter); SharedFilter = MakeShareable(NavFilter); ((ANavigationData*)NavData)->StoreQueryFilter(GetClass(), SharedFilter); } return SharedFilter; }
void URecastFilter_UseDefaultArea::InitializeFilter(const ANavigationData& NavData, const UObject* Querier, FNavigationQueryFilter& Filter) const { #if WITH_RECAST Filter.SetFilterImplementation(dynamic_cast<const INavigationQueryFilterInterface*>(ARecastNavMesh::GetNamedFilter(ERecastNamedFilter::FilterOutAreas))); #endif // WITH_RECAST Super::InitializeFilter(NavData, Querier, Filter); }