I3DHConnector.h Source File#
|
instant3Dhub
|
I3DHConnector.h
Go to the documentation of this file.
48DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FClipPlaneCreatedDelegate, int32, ClipPlaneId, AActor*, ClipPlaneActor, bool, OwnEvent);
56DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FClipPlaneRemovedDelegate, int32, ClipPlaneId, bool, OwnEvent);
229 INSTANT3DHUB_API virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
256 INSTANT3DHUB_API void AddNetworkCredentialCookie(const FString& CookieKey, const FString& CookieValue);
273 INSTANT3DHUB_API void AddNetworkCredentialToken(const FString& TokenKey, const FString& TokenValue);
289 INSTANT3DHUB_API const TMap<FString, FString>& GetNetworkCredentialCookies() const { return NetworkCredentialCookies; }
297 INSTANT3DHUB_API const TMap<FString, FString>& GetNetworkCredentialTokens() const { return NetworkCredentialTokens; }
317 static INSTANT3DHUB_API bool ParseConnectLink(const FString& Link, FString& HubURL, FI3DHConnectOptions& ConnectOptions);
389 INSTANT3DHUB_API void ConnectToHubWithOptions(const FString& HubURL, const FI3DHConnectOptions& Options);
446 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "{instant3Dhub}|Connector", meta = (DisplayName = "GetSessionId (Deprecated)", DeprecatedFunction, DeprecationMessage = "Use GetSpaceId() instead."))
653 UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0.1", ClampMax = "120.0", UIMin = "0.1", UIMax = "120.0"), Category = "{instant3Dhub}|Clip Plane API")
728 UFUNCTION(BlueprintCallable, Category = "{instant3Dhub}|Drawing API", meta = (DisplayName = "Create Drawing Material"))
778 virtual void EditDrawing(int32 DrawingHandle, const TScriptInterface<class II3DHEditDrawingInterface>& EditDrawingInterface, bool bIsEditingCopy = false);
852 INSTANT3DHUB_EXPERIMENTAL(0.0.23, "TransformAuthorityAPI is a temporary solution suspect to changes or replacement.")
861 UFUNCTION(BlueprintCallable, Category = "{instant3Dhub}|Transform Authority", meta = (DisplayName = "Get WorldTransform With Authority (Experimental)"))
862 INSTANT3DHUB_API bool GetWorldTransformWithAuthority(const FI3DHTransformAuthorityHandle TransformAuthorityHandle, int32 NodeId, FMatrix& OutWorldTransform);
864 INSTANT3DHUB_EXPERIMENTAL(0.0.23, "TransformAuthorityAPI is a temporary solution suspect to changes or replacement.")
872 UFUNCTION(BlueprintCallable, Category = "{instant3Dhub}|Transform Authority", meta = (DisplayName = "Set WorldTransform With Authority (Experimental)"))
873 INSTANT3DHUB_API void SetWorldTransformWithAuthority(const FI3DHTransformAuthorityHandle TransformAuthorityHandle, int32 NodeId, const FMatrix& WorldTransform);
875 INSTANT3DHUB_EXPERIMENTAL(0.0.23, "TransformAuthorityAPI is a temporary solution suspect to changes or replacement.")
882 UFUNCTION(BlueprintCallable, Category = "{instant3Dhub}|Transform Authority", meta = (DisplayName = "Release TransformAuthority (Experimental)"))
883 INSTANT3DHUB_API void ReleaseTransformAuthority(const FI3DHTransformAuthorityHandle TransformAuthorityHandle);
885 INSTANT3DHUB_EXPERIMENTAL(0.0.23, "TransformAuthorityAPI is a temporary solution suspect to changes or replacement.")
891 UFUNCTION(BlueprintCallable, Category = "{instant3Dhub}|Transform Authority", meta = (DisplayName = "Is TransformAuthority Active (Experimental)"))
892 INSTANT3DHUB_API bool IsTransformAuthorityActive(const FI3DHTransformAuthorityHandle TransformAuthorityHandle) const;
904 const class UI3DHCustomMaterialURNResolver* FindCustomMaterialURNResolver(const FI3DHNamespaceIdentifier& NID) const;
910 FORCEINLINE const FI3DHGeometryMaterials& GetL3DMaterials() const { return L3DDefaultMaterials; }
916 FORCEINLINE const FI3DHGeometryMaterials& GetL3DAppearanceMaterials() const { return L3DAppearanceMaterials; }
922 FORCEINLINE const FI3DHGeometryMaterials& GetMaterialAPIMaterials() const { return MaterialAPIMaterials; }
929 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "{instant3Dhub}|Connector", meta = (ClampMin = 1, UIMin = 1))
933 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "{instant3Dhub}|Connector", meta = (ClampMin = 1, UIMin = 1))
941 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "{instant3Dhub}|Connector", meta = (ClampMin = 0, UIMin = 0, Delta = 1000000))
948 UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0.1", ClampMax = "100.0", UIMin = "0.1", UIMax = "100.0"), Category = "{instant3Dhub}|Connector")
955 UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0.1", ClampMax = "120.0", UIMin = "0.1", UIMax = "120.0"), Category = "{instant3Dhub}|Connector")
990 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "{instant3Dhub}|Appearance", meta = (DisplayName = "Default Materials"))
1000 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "{instant3Dhub}|Appearance", meta = (DisplayName = "Appearance Materials"))
1012 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "{instant3Dhub}|Appearance", meta = (DisplayName = "MaterialAPI Materials"), Experimental)
1032 UPROPERTY(EditAnywhere, Instanced, Category = "{instant3Dhub}|Appearance", meta = (ForceInlineRow, ShowInnerProperties, DisplayName = "Custom Material URN Resolver Bindings"))
1033 TMap<FI3DHNamespaceIdentifier, TObjectPtr<class UI3DHCustomMaterialURNResolver>> CustomMaterialURNResolvers;
1120 UMaterialInterface* FindMaterialInterface(const FI3DHResolvedAppearance& ResolvedAppearance, bool bIsSelected, bool bIsHovered) const;
1126 bool ResolveCustomMaterialURN_GameThread(FStringView CustomMaterialURN, FI3DHGeometryMaterials& OutMaterials) const;
1200 FStructView CreateAndSpawnPageInstance(FStructView InstanceView, const FI3DHPageInstanceHandle PageInstanceHandle, class UI3DHPageMesh* PageMesh);
1210 void SetAppearanceURI_Internal(const FString& AppearanceURI, const TArray<int32>& RootNodeIds, const TArray<struct FI3DHSubMeshEntry>& SubMeshEntries);
1219 void SetTransforms_Internal(const TArray<FMatrix>& GlobalTransforms, const TArray<FMatrix>& LeafNodeLocalToInstanceTransforms, const TArray<int32>& RootNodeIds, const TArray<struct FI3DHSubMeshEntry>& SubMeshEntries);
1228 void SetEnabled_Internal(EI3DHEnabledState EnabledState, const TArray<int32>& RootNodeIds, const TArray<struct FI3DHSubMeshEntry>& SubMeshEntries);
1238 void SetEnabled_Internal(const TArray<EI3DHEnabledState>& Enabled, const TArray<bool>& LeafNodeEnabled, const TArray<int32>& RootNodeIds, const TArray<struct FI3DHSubMeshEntry>& SubMeshEntries);
1248 void SetVariantEnabled_Internal(const TArray<bool>& VariantEnabled, const TArray<bool>& LeafNodeVariantEnabled, const TArray<int32>& RootNodeIds, const TArray<struct FI3DHSubMeshEntry>& SubMeshEntries);
1256 void SetSelected_Internal(bool bNewSelected, const TArray<int32>& RootNodeIds, const TArray<struct FI3DHSubMeshEntry>& SubMeshEntries);
1264 void SetHovered_Internal(bool bNewHovered, const TArray<int32>& RootNodeIds, const TArray<struct FI3DHSubMeshEntry>& SubMeshEntries);
1277 void SetInstanceProperties_Internal(int32 RootNodeId, const struct FI3DHInstanceProperties& Properties);
1280 void UpdatePageInstanceVisibilityAfterInstanceVisibilityChange_Internal(struct FI3DHInstance& Instance);
DECLARE_DYNAMIC_MULTICAST_DELEGATE void FErrorDelegate(const FString &ErrorMessage)
Error Delegate Type.
DECLARE_DYNAMIC_MULTICAST_DELEGATE void FClipPlaneCreatedDelegate(int32 ClipPlaneId, AActor *ClipPlaneActor, bool OwnEvent)
Delegate type invoked when a clip plane is created.
DECLARE_DYNAMIC_MULTICAST_DELEGATE void FDisconnectedDelegate()
Disconnected Delegate Type.
DECLARE_DYNAMIC_MULTICAST_DELEGATE void FClipPlaneRemovedDelegate(int32 ClipPlaneId, bool OwnEvent)
Delegate type invoked when a clip plane is removed.
DECLARE_DYNAMIC_MULTICAST_DELEGATE void FConnectErrorDelegate(const FString &ErrorMessage)
Connect Error Delegate Type.
DECLARE_DYNAMIC_MULTICAST_DELEGATE void FConnectedDelegate()
Connected Delegate Type.
@ AppearanceURI
The appearance URI of a node.
Definition I3DHDataTypes.h:136
EI3DHEnabledState
Describes, if a node is (partially) enabled.
Definition I3DHDataTypes.h:1262
virtual void BeginPlay() override
Called when play begins for the instant3Dhub Connector actor.
int32 MaxPageInstancesCreatedPerTick
Limits the number of page instances created per frame to avoid hitches in frame rate.
Definition I3DHConnector.h:934
float ViewSyncHz
Frequency to sync the camera with Hub.
Definition I3DHConnector.h:956
int32 TargetedTrianglesOnVisiblePageInstances
A target budget for the number of triangles accumulated over all page instances concurrently visible ...
Definition I3DHConnector.h:942
float CreatePageInstancesBudgetMs
Time budget (in milliseconds per tick) for creating page instances.
Definition I3DHConnector.h:949
FMatrix GetOriginToWorldTransform() const
Gets origin to world transform.
FMatrix GetWorldToOriginTransform() const
Gets world to origin transform.
int32 MaxConversionTasksCreatedPerTick
Limits the number of page conversion tasks created per frame to avoid hitches in frame rate.
Definition I3DHConnector.h:930
TObjectPtr< USceneComponent > RootComponentConnector
Expose the RootComponent as Visible to allow its properties to be modified in Details Panel.
Definition I3DHConnector.h:1055
static bool ParseConnectLink(const FString &Link, FString &HubURL, FI3DHConnectOptions &ConnectOptions)
Parses the provided connection link and extracts the hub URL and relevant connection options.
This actor is the scene representation of drawings in the session.
Definition I3DHDrawing.h:47
Actor containing mesh components used to represent instant3Dhub geometry.
Definition I3DHGeometry.h:66
Interface that can be implemented to provide drawing editing functionality.
Definition I3DHDataTypes.h:2261
Base class for resolver objects bound to Custom Material URN namespaces on an AI3DHConnector.
Definition I3DHMaterialURNResolver.h:32
TObjectPtr< class UMaterialInterface > GlobalHighlightMaterial
Global fallback material used when geometry enters hover or selection state without a dedicated highl...
Definition I3DHConnector.h:980
FI3DHGeometryMaterials MaterialAPIMaterials
Default Unreal material set used when urn:X-l3d:material:<id>.
Definition I3DHConnector.h:1013
TObjectPtr< class UMaterialParameterCollection > I3DHParameterCollection
Material parameter collection used for Hub features such as clipping plane.
Definition I3DHConnector.h:965
TSubclassOf< AI3DHGeometry > GeometryActorClass
The geometry actor class to use for instances.
Definition I3DHConnector.h:1042
const FI3DHGeometryMaterials & GetL3DAppearanceMaterials() const
Returns geometry materials used for urn:X-l3d:color overrides.
Definition I3DHConnector.h:916
const FI3DHGeometryMaterials & GetMaterialAPIMaterials() const
Returns fallback geometry materials used for MaterialAPI-backed rendering.
Definition I3DHConnector.h:922
FI3DHGeometryMaterials L3DDefaultMaterials
These materials are expected to work with instant3Dhub vertex colors.
Definition I3DHConnector.h:991
bool bSpawnedGeometryCastsShadow
The value bCastShadow is set to on spawned mesh components.
Definition I3DHConnector.h:1050
const FI3DHGeometryMaterials & GetL3DMaterials() const
Returns geometry materials used for default urn:X-l3d:color:property:default handling.
Definition I3DHConnector.h:910
FI3DHGeometryMaterials L3DAppearanceMaterials
These materials are expected to work with instant3Dhub vertex colors and appearance color overrides.
Definition I3DHConnector.h:1001
float ClipPlaneSyncHz
Frequency to sync the clip planes with the Hub.
Definition I3DHConnector.h:654
TSubclassOf< AActor > ClipPlaneActorClass
Actor class used to render a clip plane.
Definition I3DHConnector.h:661
AActor * FindClipPlaneActor(int32 ClipPlaneId)
Gets clip plane actor for a specific clip plane.
FClipPlaneCreatedDelegate OnClipPlaneCreatedDelegate
Multicast Delegate that is invoked when a clip plane is created.
Definition I3DHConnector.h:639
AActor * GetMainClipPlaneActor()
Gets the main clip plane actor.
FClipPlaneRemovedDelegate OnClipPlaneRemovedDelegate
Multicast Delegate that is invoked when a clip plane is removed.
Definition I3DHConnector.h:646
TArray< int32 > GetClipPlanes()
Returns the IDs of the currently existing clip planes.
FConnectErrorDelegate OnConnectErrorDelegate
Multicast delegate that is invoked when a connection attempt fails.
Definition I3DHConnector.h:474
bool IsDisconnected() const
Query if this HubConnector is currently disconnected.
void RemoveNetworkCredentialCookie(const FString &CookieKey)
Removes the network credential cookie identified by CookieKey.
FErrorDelegate OnErrorDelegate
Multicast delegate that is invoked when a critical error is encountered while connected.
Definition I3DHConnector.h:485
void RemoveNetworkCredentialToken(const FString &TokenKey)
Removes the network credential token identified by TokenKey.
bool IsEstablishingConnectionToHub() const
Query if this HubConnector is currently establishing a connection.
FString GetSessionId() const
Returns the SessionId of the current session.
FConnectedDelegate OnConnectedDelegate
Multicast delegate that is invoked when a connection to the instant3Dhub is successfully established.
Definition I3DHConnector.h:465
bool IsConnectedToHub() const
Query if this HubConnector is connected to an instant3Dhub session.
FString GetSpaceId() const
Returns the SpaceId of the currently open 3D space.
void AddNetworkCredentialToken(const FString &TokenKey, const FString &TokenValue)
Adds a network credential token.
void ConnectToHubWithOptions(const FString &HubURL, const FI3DHConnectOptions &Options)
Connects to an instant3Dhub instance using the provided options.
const TMap< FString, FString > & GetNetworkCredentialTokens() const
Returns the current network credential tokens used to authenticate hub requests.
Definition I3DHConnector.h:297
const TMap< FString, FString > & GetNetworkCredentialCookies() const
Returns the current network credential cookies used to authenticate hub requests.
Definition I3DHConnector.h:289
void AddNetworkCredentialCookie(const FString &CookieKey, const FString &CookieValue)
Adds a network credential cookie.
void ConnectToHub(const FString &HubURL, const FString &SpaceId)
Connects to an instant3Dhub instance and opens a 3D space.
void ConnectToHubWithLink(const FString &Link)
Connects to an instant3Dhub instance using the provided connection link.
FDisconnectedDelegate OnDisconnectedDelegate
Multicast delegate that is invoked when the connection to the instant3Dhub is closed.
Definition I3DHConnector.h:494
const TArray< FI3DHDebugMetric > & GetDebugMetrics()
Returns a list of metrics describing the internal state of the connector.
UTexture2D * GetRemoteCullerDebugStreamTexture()
Returns a texture containing the current remote culler debug image.
bool RequestRemoteCullerDebugStream()
Establishes a connection to the remote culler service and continuously streams debug images from the ...
FString GetDebugSessionInfo()
Returns a short description of the current connection for advanced troubleshooting.
void SetClipDrawingsByClipPlane(const bool bClipDrawingsByClipPlaneEnabled)
Use to globally control whether Drawings are clipped by ClipPlanes.
TObjectPtr< UMaterialInterface > DrawingBaseMaterial
Default material to render drawings.
Definition I3DHConnector.h:700
TObjectPtr< class UStaticMesh > DrawingSegmentMesh
Mesh used to render a line segment in LineStrip drawings.
Definition I3DHConnector.h:710
TObjectPtr< class UStaticMesh > DrawingJointMesh
Mesh used to render joints of LineStrip drawings.
Definition I3DHConnector.h:719
UMaterialInterface * GetDrawingMaterial(FLinearColor Color)
Returns a new Dynamic Material Instance of the AI3DHConnector::DrawingBaseMaterial with the specified...
class AI3DHDrawing * FindDrawingActor(int32 DrawingHandle)
Search the Drawing Actor for the provided DrawingHandle.
bool GetClipDrawingsByClipPlane()
Whether Drawings are clipped by ClipPlanes.
virtual void EditDrawing(int32 DrawingHandle, const TScriptInterface< class II3DHEditDrawingInterface > &EditDrawingInterface, bool bIsEditingCopy=false)
Edit a drawing matching the specified handle using the provided edit drawing interface.
void AddToHoveredNodes(int32 NodeId)
Adds the given node to the set of hovered nodes.
TArray< int32 > GetHoveredNodes()
Returns the current list of hovered nodes.
void SetHoveredNode(int32 NodeId)
Replaces the set of hovered nodes with the given node.
#define INSTANT3DHUB_DEPRECATED(Version, Message)
Macro for marking up deprecated code, functions and types.
Definition I3DHVersion.h:203
#define INSTANT3DHUB_EXPERIMENTAL(Version, Message)
Macro for marking up experimental code, functions and types.
Definition I3DHVersion.h:246
TSharedPtr< FI3DHConnectorAPI > GetAPI() const
Returns a shared pointer to the ConnectorAPI.
int32 GetGlobalRootNodeId()
Returns the NodeId of the (implicit) top-level node of the instance graph.
FI3DHClientProgress GetClientProgress()
Gives an indication of the local rendering progress.
bool GetWorldTransformWithAuthority(const FI3DHTransformAuthorityHandle TransformAuthorityHandle, int32 NodeId, FMatrix &OutWorldTransform)
Returns the World Transform as currently managed by the Transform Authority.
void ReleaseTransformAuthority(const FI3DHTransformAuthorityHandle TransformAuthorityHandle)
Releases the Transform Authority of the Unreal Client.
void SetWorldTransformWithAuthority(const FI3DHTransformAuthorityHandle TransformAuthorityHandle, int32 NodeId, const FMatrix &WorldTransform)
Immediately sets the World Transform of Actors representing the NodeId (and its child nodes) Unreal c...
bool IsTransformAuthorityActive(const FI3DHTransformAuthorityHandle TransformAuthorityHandle) const
Returns whether a TransformAuthority is still active.
const class UI3DHCustomMaterialURNResolver * FindCustomMaterialURNResolver(const FI3DHNamespaceIdentifier &NID) const
Returns the resolver object bound to a Custom Material URN namespace.
TMap< FI3DHNamespaceIdentifier, TObjectPtr< class UI3DHCustomMaterialURNResolver > > CustomMaterialURNResolvers
Binds Custom Material URN namespaces to resolver objects.
Definition I3DHConnector.h:1033
Gives an indication of the local rendering progress.
Definition I3DHDataTypes.h:2356
Contains optional parameters for connecting to the hub.
Definition I3DHConnector.h:149
FString RoleKey
If set, requests a specific member role when opening the 3D space.
Definition I3DHConnector.h:182
FString RestoreSessionId
Identifier of a stored session.
Definition I3DHConnector.h:205
FString SpaceId
If set, opens the specified 3D space.
Definition I3DHConnector.h:172
bool bCloneIntoNewSpace
If set, immediately clones the 3D space specified by SpaceId into a new space after opening it.
Definition I3DHConnector.h:194
FString SessionId
If set, connect to the specified session.
Definition I3DHConnector.h:162
Material set applied to 3D data after built-in appearance handling or Custom Material URN resolution.
Definition I3DHDataTypes.h:2431
Namespace Identifier (NID) segment of a URN urn:NID:NSS.
Definition I3DHDataTypes.h:1587
Handle obtained when acquiring transform authority over a set of Nodes.
Definition I3DHDataTypes.h:2311
Generated by