I3DHUtilities.h Source File#
|
instant3Dhub
|
I3DHUtilities.h
Go to the documentation of this file.
192 static UPARAM(DisplayName = "Unreal Transform") FMatrix ConvertTransformOriginalToUnreal(const FMatrix& OriginalTransform);
200 static UPARAM(DisplayName = "Original Transform") FMatrix ConvertTransformUnrealToOriginal(const FMatrix& UnrealTransform);
212 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Utilities", meta = (DisplayName = "Convert Transform Original to Unreal (Pure)"))
213 static UPARAM(DisplayName = "Unreal Transform") FMatrix ConvertTransformOriginalToUnrealPure(const FMatrix& OriginalTransform);
225 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Utilities", meta = (DisplayName = "Convert Transform Unreal to Original (Pure)"))
226 static UPARAM(DisplayName = "Original Transform") FMatrix ConvertTransformUnrealToOriginalPure(const FMatrix& UnrealTransform);
234 static UPARAM(DisplayName = "Unreal Volume") FBox ConvertVolumeOriginalToUnreal(const FBox& OriginalVolume);
242 static UPARAM(DisplayName = "Original Volume") FBox ConvertVolumeUnrealToOriginal(const FBox& UnrealVolume);
254 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Utilities", meta = (DisplayName = "Convert Volume Original to Unreal (Pure)"))
255 static UPARAM(DisplayName = "Unreal Volume") FBox ConvertVolumeOriginalToUnrealPure(const FBox& OriginalVolume);
267 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Utilities", meta = (DisplayName = "Convert Volume Unreal to Original (Pure)"))
268 static UPARAM(DisplayName = "Original Volume") FBox ConvertVolumeUnrealToOriginalPure(const FBox& UnrealVolume);
279 UFUNCTION(BlueprintCallable, meta = (AutoCreateRefTerm = "Color"), Category = "{instant3Dhub}|Utilities")
280 static FString UEColorToWebvisAppearanceURI(const FLinearColor& Color, EAppearanceURIMode Mode);
289 UFUNCTION(BlueprintCallable, meta = (AutoCreateRefTerm = "InURI"), Category = "{instant3Dhub}|Utilities")
290 static bool WebvisAppearanceURIToUEColor(const FString& InURI, FLinearColor& OutColor, EAppearanceURIMode& OutMode);
305 static bool AnalyzeHitResult(const struct FHitResult& HitResult, FI3DHHitResult& OutI3DHHitResult, bool bRequestDetailNode = false);
328 static bool ClipLineSegmentByPlane(UPARAM(ref) FVector& Start, UPARAM(ref) FVector& End, const FPlane& Plane);
339 UFUNCTION(BlueprintCallable, Category = "{instant3Dhub}|Utilities", meta = (DefaultToSelf = "HubConnector"))
340 static bool ClipLineSegmentByMainClipPlane(AI3DHConnector* HubConnector, UPARAM(ref) FVector& Start, UPARAM(ref) FVector& End);
351 UFUNCTION(BlueprintCallable, Category = "{instant3Dhub}|Utilities", meta = (DefaultToSelf = "HubConnector"))
352 static bool ClipLineSegmentByClipPlanes(AI3DHConnector* HubConnector, UPARAM(ref) FVector& Start, UPARAM(ref) FVector& End);
368 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Utilities", meta = (WorldContext = "WorldContextObject"))
403 static bool IsValidNamespaceIdentifier(FStringView NamespaceIdentifier, FString* OutValidationError = nullptr);
411 static bool IsReservedNamespaceIdentifier(FStringView NamespaceIdentifier, FString* OutValidationError = nullptr);
414 static FStringView GetNamespaceSpecificString(const FStringView URN, const FStringView NamespaceIdentifier)
431 static void FindFirstUnselectedAncestor(TSharedPtr<class FI3DHConnectorAPI> API, int32 NodeId, TUniqueFunction<void(int32 AncestorId, EI3DHErrorCode ErrorCode)> OnComplete);
434 static void FindFirstUnselectedAncestor_GameThread(TSharedPtr<class FI3DHConnectorAPI> API, int32 CurrentNodeId, bool IsCurrentNodeSelected, TUniqueFunction<void(int32 AncestorId, EI3DHErrorCode ErrorCode)> OnComplete);
EAppearanceURIMode
Describes how the appearance is affected by the appearance URI.
Definition I3DHDataTypes.h:1488
EI3DHErrorCode
Enumeration of Error Codes returned from various instant3Dhub API Calls.
Definition I3DHError.h:16
The HubConnector is the central actor for communication with an instant3Dhub instance in your network...
Definition I3DHConnector.h:214
Utility functions for using Unreal Engine with Instant3DHub.
Definition I3DHUtilities.h:25
static bool IsReservedNamespaceIdentifier(FStringView NamespaceIdentifier, FString *OutValidationError=nullptr)
Checks whether a Namespace Identifier avoids the prefixes reserved by the plugin.
static FStringView GetNamespaceSpecificString(const FStringView URN, const FStringView NamespaceIdentifier)
Returns the Namespace-Specific String (NSS) from a URN urn:NID:NSS.
Definition I3DHUtilities.h:414
static void FindFirstUnselectedAncestor(TSharedPtr< class FI3DHConnectorAPI > API, int32 NodeId, TUniqueFunction< void(int32 AncestorId, EI3DHErrorCode ErrorCode)> OnComplete)
Finds the first ancestor node that is not selected, excluding the root node.
static bool IsURN(const FStringView URI)
Returns whether the string starts with the URN prefix urn:.
Definition I3DHUtilities.h:388
static bool IsValidNamespaceIdentifier(FStringView NamespaceIdentifier, FString *OutValidationError=nullptr)
Validates that a Namespace Identifier can be used for Custom Material URNs.
static bool AnalyzeHitResult(const struct FHitResult &HitResult, FI3DHHitResult &OutI3DHHitResult, bool bRequestDetailNode=false)
Analyzes a hit result to check if and what instant3Dhub geometry was hit.
static bool IsWithEditor()
Query if the current build is an Editor build of the engine.
static TMap< FString, FString > GetURLQueryParams(const FString &URL)
Parse the provided URL and retrieve its URL query parameters.
static FString ExtractNamespaceIdentifier(FStringView URI)
Extracts the Namespace Identifier (NID) from a URN urn:NID:NSS.
static bool WebvisAppearanceURIToUEColor(const FString &InURI, FLinearColor &OutColor, EAppearanceURIMode &OutMode)
Converts a WebVis appearanceURI (e.g.
static FString UEColorToWebvisAppearanceURI(const FLinearColor &Color, EAppearanceURIMode Mode)
Converts color to the matching WebVis appearanceURI.
static bool IsEditorStandaloneGame(const UObject *WorldContextObject)
Query if the current build is an Editor build of the engine and the provided 'WorldContextObject' is ...
static FPlane MakePlaneFromClipPlaneActor(const AActor *ClipPlaneActor)
Makes a plane structure from the clip plane actor with its world space location as plane origin and i...
static bool ClipLineSegmentByClipPlanes(AI3DHConnector *HubConnector, FVector &Start, FVector &End)
Clip a line segment to the positive half space (the side with the normal pointing upwards) of all Cli...
static bool ClipLineSegmentByMainClipPlane(AI3DHConnector *HubConnector, FVector &Start, FVector &End)
Clip a line segment to the positive half space (the side with the normal pointing upwards) of the Mai...
static bool ClipLineSegmentByPlane(FVector &Start, FVector &End, const FPlane &Plane)
Clip a line segment to the positive half space (the side with the normal pointing upwards) of a plane...
static FMatrix ConvertTransformUnrealToOriginal(const FMatrix &UnrealTransform)
Converts a transformation matrix to the Original coordinate system.
static FBox ConvertVolumeUnrealToOriginal(const FBox &UnrealVolume)
Converts a volume to the Original coordinate system.
static const FMatrix & GetOriginalToUnrealNormalMatrix()
Gets original to unreal normal matrix.
static FBox ConvertVolumeUnrealToOriginalPure(const FBox &UnrealVolume)
Converts a volume to the Original coordinate system.
static float GetOriginalToUnrealScale()
Returns the scale factor between Original and Unreal coordinates.
static const FMatrix & GetUnrealToOriginalNormalMatrix()
Gets unreal to original normal matrix.
static FBox ConvertVolumeOriginalToUnrealPure(const FBox &OriginalVolume)
Converts a volume to the Unreal coordinate system.
static FMatrix ConvertTransformUnrealToOriginalPure(const FMatrix &UnrealTransform)
Converts a transformation matrix to the Original coordinate system.
static const FMatrix & GetOriginalToUnrealMatrix()
Returns the conversion matrix between the Original and Unreal coordinate systems.
static const FMatrix & GetUnrealToOriginalMatrix()
Returns the conversion matrix between the Unreal and Original coordinate systems.
static FMatrix ConvertTransformOriginalToUnrealPure(const FMatrix &OriginalTransform)
Converts a transformation matrix to the Unreal coordinate system.
static FMatrix ConvertTransformOriginalToUnreal(const FMatrix &OriginalTransform)
Converts a transformation matrix to the Unreal coordinate system.
static FBox ConvertVolumeOriginalToUnreal(const FBox &OriginalVolume)
Converts a volume to the Unreal coordinate system.
Structure containing instant3Dhub-specific information about one hit of a trace.
Definition I3DHDataTypes.h:1522
Generated by