コード例 #1
0
void FNavigationQueryFilter::Assign(const FNavigationQueryFilter& Source)
{
    if (Source.GetImplementation() != NULL)
    {
        QueryFilterImpl = Source.QueryFilterImpl;
    }
    MaxSearchNodes = Source.GetMaxSearchNodes();
}
コード例 #2
0
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;
}
コード例 #3
0
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);
}