31 mar
This commit is contained in:
parent
b9e76e1202
commit
da3807b3ba
19 changed files with 45 additions and 1 deletions
|
|
@ -37,7 +37,6 @@ bCompressed=False
|
|||
bEncryptIniFiles=False
|
||||
bEncryptPakIndex=False
|
||||
bSkipEditorContent=False
|
||||
+DirectoriesToNeverCook=(Path="Heavy/StreetMap")
|
||||
+DirectoriesToAlwaysStageAsNonUFS=(Path="Modules")
|
||||
bNativizeBlueprintAssets=False
|
||||
bNativizeOnlySelectedBlueprints=False
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -463,9 +463,15 @@ public:
|
|||
/** Vinfamy added */
|
||||
UFUNCTION(BlueprintCallable)
|
||||
FStreetMapBuilding FindBuilding(const FVector2D Point);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
FStreetMapBuilding FindBuildingFromArray(const FVector2D Point, TArray<FStreetMapBuilding> SmallBuildings);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
TArray<FStreetMapBuilding> SearchByBuildingName(FString SearchTerm, FString Amenity) const;
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
TArray<FStreetMapBuilding> SearchByBuildingNameFromArray(FString SearchTerm, FString Amenity, TArray<FStreetMapBuilding> SmallBuildings) const;
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
TArray<FStreetMapBuilding> SearchByAmenity(FString Amenity) const;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,19 @@ FStreetMapBuilding UStreetMap::FindBuilding(const FVector2D Point)
|
|||
return emptyBuilding;
|
||||
}
|
||||
|
||||
FStreetMapBuilding UStreetMap::FindBuildingFromArray(const FVector2D Point, TArray<FStreetMapBuilding> SmallBuildings)
|
||||
{
|
||||
FStreetMapBuilding emptyBuilding;
|
||||
for (const auto &element : SmallBuildings)
|
||||
{
|
||||
if (FPolygonTools::IsPointInsidePolygon(element.BuildingPoints, Point))
|
||||
{
|
||||
return element;
|
||||
}
|
||||
}
|
||||
return emptyBuilding;
|
||||
}
|
||||
|
||||
TArray<FStreetMapBuilding> UStreetMap::SearchByBuildingName(FString SearchTerm, FString Amenity) const
|
||||
{
|
||||
TArray<FStreetMapBuilding> Results;
|
||||
|
|
@ -72,6 +85,32 @@ TArray<FStreetMapBuilding> UStreetMap::SearchByBuildingName(FString SearchTerm,
|
|||
return Results;
|
||||
}
|
||||
|
||||
TArray<FStreetMapBuilding> UStreetMap::SearchByBuildingNameFromArray(FString SearchTerm, FString Amenity, TArray<FStreetMapBuilding> SmallBuildings) const
|
||||
{
|
||||
TArray<FStreetMapBuilding> Results;
|
||||
if (SearchTerm.Len() > 0)
|
||||
{
|
||||
for (const auto &element : SmallBuildings)
|
||||
{
|
||||
if (element.BuildingName.Contains(SearchTerm))
|
||||
{
|
||||
Results.Add(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Results = SmallBuildings;
|
||||
}
|
||||
|
||||
if (Amenity.Len() > 0)
|
||||
{
|
||||
Results = FilterByAmenity(Amenity, Results);
|
||||
}
|
||||
|
||||
return Results;
|
||||
}
|
||||
|
||||
TArray<FStreetMapBuilding> UStreetMap::SearchByAmenity(FString Amenity) const
|
||||
{
|
||||
TArray<FStreetMapBuilding> Results = FilterByAmenity(Amenity, Buildings);
|
||||
|
|
|
|||
Loading…
Reference in a new issue