UI3DHUtilities Class Reference#
|
instant3Dhub
|
#include "I3DHUtilities.h"
Detailed Description
Utility functions for using Unreal Engine with Instant3DHub.
Static Public Member Functions | |
| static float | GetOriginalToUnrealScale () |
| static const FMatrix & | GetOriginalToUnrealMatrix () |
| static const FMatrix & | GetUnrealToOriginalMatrix () |
| static const FMatrix & | GetOriginalToUnrealNormalMatrix () |
| static const FMatrix & | GetUnrealToOriginalNormalMatrix () |
| static FMatrix | ConvertTransformOriginalToUnreal (const FMatrix &OriginalTransform) |
| static FMatrix | ConvertTransformUnrealToOriginal (const FMatrix &UnrealTransform) |
| static FMatrix | ConvertTransformOriginalToUnrealPure (const FMatrix &OriginalTransform) |
| static FMatrix | ConvertTransformUnrealToOriginalPure (const FMatrix &UnrealTransform) |
| static FBox | ConvertVolumeOriginalToUnreal (const FBox &OriginalVolume) |
| static FBox | ConvertVolumeUnrealToOriginal (const FBox &UnrealVolume) |
| static FBox | ConvertVolumeOriginalToUnrealPure (const FBox &OriginalVolume) |
| static FBox | ConvertVolumeUnrealToOriginalPure (const FBox &UnrealVolume) |
| static FString | UEColorToWebvisAppearanceURI (const FLinearColor &Color, EAppearanceURIMode Mode) |
| static bool | WebvisAppearanceURIToUEColor (const FString &InURI, FLinearColor &OutColor, EAppearanceURIMode &OutMode) |
| static bool | AnalyzeHitResult (const struct FHitResult &HitResult, FI3DHHitResult &OutI3DHHitResult, bool bRequestDetailNode=false) |
| static FPlane | MakePlaneFromClipPlaneActor (const AActor *ClipPlaneActor) |
| static bool | ClipLineSegmentByPlane (FVector &Start, FVector &End, const FPlane &Plane) |
| static bool | ClipLineSegmentByMainClipPlane (AI3DHConnector *HubConnector, FVector &Start, FVector &End) |
| static bool | ClipLineSegmentByClipPlanes (AI3DHConnector *HubConnector, FVector &Start, FVector &End) |
| static bool | IsWithEditor () |
| static bool | IsEditorStandaloneGame (const UObject *WorldContextObject) |
| static TMap< FString, FString > | GetURLQueryParams (const FString &URL) |
| static bool | IsURN (const FStringView URI) |
| static FString | ExtractNamespaceIdentifier (FStringView URI) |
| static bool | IsValidNamespaceIdentifier (FStringView NamespaceIdentifier, FString *OutValidationError=nullptr) |
| static bool | IsReservedNamespaceIdentifier (FStringView NamespaceIdentifier, FString *OutValidationError=nullptr) |
| static FStringView | GetNamespaceSpecificString (const FStringView URN, const FStringView NamespaceIdentifier) |
| static void | FindFirstUnselectedAncestor (TSharedPtr< class FI3DHConnectorAPI > API, int32 NodeId, TUniqueFunction< void(int32 AncestorId, EI3DHErrorCode ErrorCode)> OnComplete) |
Member Function Documentation
◆ AnalyzeHitResult()
|
static |
Analyzes a hit result to check if and what instant3Dhub geometry was hit.
- Parameters
-
HitResult Original hit result from e.g. a regular line trace. OutI3DHHitResult instant3Dhub-specific hit information. If no instant3Dhub geometry was hit, the value is not changed. bRequestDetailNode If true, asynchronously requests the structure mapping for the hit instance (if not already available). Once available, subsequent calls will populate FI3DHHitResult::DetailNodeId with the leaf node id.
- Returns
- true if instant3Dhub geometry was hit.
◆ ExtractNamespaceIdentifier()
|
static |
Extracts the Namespace Identifier (NID) from a URN urn:NID:NSS.
Returns an empty string if the URI is not a URN or does not contain an NID.
◆ FindFirstUnselectedAncestor()
|
static |
Finds the first ancestor node that is not selected, excluding the root node.
- Parameters
-
API The instant3Dhub API. NodeId Identifier of the node. OnComplete Callback called on completion: - OnComplete(<AncestorId>, EI3DHErrorCode::Success) if successful.
- OnComplete(-1, EI3DHErrorCode::Success) if no non-selected ancestor exists.
- OnComplete(-1, EI3DHErrorCode <error> ) on error.
◆ GetNamespaceSpecificString()
|
inlinestatic |
Returns the Namespace-Specific String (NSS) from a URN urn:NID:NSS.
◆ GetURLQueryParams()
Parse the provided URL and retrieve its URL query parameters.
- Remarks
- This is not BlueprintPure to prevent the user from accidentally re-parsing every time the output map is used directly without storing it in a local variable first.
- Parameters
-
URL URL of the resource.
- Returns
- Map of the URL query parameters.
◆ IsEditorStandaloneGame()
|
static |
Query if the current build is an Editor build of the engine and the provided 'WorldContextObject' is part of a game world.
- Parameters
-
WorldContextObject The world context object.
- Returns
- True if object is part of editor standalone game world, false if not.
◆ IsReservedNamespaceIdentifier()
|
static |
Checks whether a Namespace Identifier avoids the prefixes reserved by the plugin.
Returns true when the NID is reserved with respect to custom connector bindings. Returns false otherwise.
◆ IsURN()
|
inlinestatic |
Returns whether the string starts with the URN prefix urn:.
◆ IsValidNamespaceIdentifier()
|
static |
Validates that a Namespace Identifier can be used for Custom Material URNs.
Returns true when the NID fulfills all the following requirements:
- must be longer than 2 characters.
- may only contain letters, digits, and '-'.
◆ IsWithEditor()
|
static |
Query if the current build is an Editor build of the engine.
- Returns
- True if with editor, false if not.
◆ UEColorToWebvisAppearanceURI()
|
static |
Converts color to the matching WebVis appearanceURI.
- Parameters
-
Color The color. Mode The appearanceURI Mode.
- Returns
- A WebVis appearanceURI String, e.g. urn:X-l3d:color:rgba:983BC0D3.
◆ WebvisAppearanceURIToUEColor()
|
static |
Converts a WebVis appearanceURI (e.g.
"") to the matching color.
- Parameters
-
InURI WebVis appearanceURI String, e.g. urn:X-l3d:color:rgba:983BC0D3. OutColor The color obtained from the appearanceURI string. OutMode The appearanceURI Mode as obtained from the appearanceURI string.
- Returns
- True if the input is and output values are matching WebVis, false otherwise.
The documentation for this class was generated from the following file:
Generated by