I3DHInteractiveSplineDrawing.h Source File#
|
instant3Dhub
|
I3DHInteractiveSplineDrawing.h
Go to the documentation of this file.
24DECLARE_DYNAMIC_DELEGATE_TwoParams(FSplineDrawingCreatedDelegate, const FI3DHDrawingResult&, DrawingResult, const FI3DHDrawingProperties&, DrawingProperties);
26class INSTANT3DHUB_EXPERIMENTAL(0.0.27, "The instant3Dhub Drawings feature is available as a preview and is actively under development.") AI3DHInteractiveSplineDrawing;
50UCLASS(Experimental, Abstract, NotPlaceable, meta = (DisplayName = "I3DH Interactive SplineDrawing (Experimental)"))
65 UFUNCTION(BlueprintCallable, meta = (DefaultToSelf = "HubConnector", DeterminesOutputType = "DrawingClass"), Category = "{instant3DhubDrawings}")
66 static AI3DHInteractiveSplineDrawing* CreateInteractiveSplineDrawing(AI3DHConnector* HubConnector, TSubclassOf<AI3DHInteractiveSplineDrawing> DrawingClass);
85 UFUNCTION(BlueprintCallable, meta = (AutoCreateRefTerm = "Color"), Category = "{instant3DhubDrawings}")
99 UFUNCTION(BlueprintCallable, meta = (AutoCreateRefTerm = "Color"), Category = "{instant3DhubDrawings}")
170 void CreateHubDrawingAndDestroy(const FString& Name, TUniqueFunction<void(int32 DrawingHandle, EI3DHErrorCode ErrorCode)> OnComplete);
187 virtual bool IsReadyForFinishDestroy() override { return Super::IsReadyForFinishDestroy() && (!AsyncTaskFence.IsValid() || AsyncTaskFence->GetRefCount() <= 1); }
190 // Updates the active spline to end at the new location. Its last segment is updated to spawn from the second-last
192 bool UpdateActiveSplineEndSegment(const FVector& NewEndLocation, const FVector& NewEndUpVector);
241 // Store pointer instead of value so we can hold a pointer to the active spline without having to worry about it
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
A helper for creating spline-based drawings in the scene that are synced to the session when finished...
Definition I3DHInteractiveSplineDrawing.h:52
void InitializePreSpawn(AI3DHConnector *ParentHubConnector)
Call before (deferred) spawning.
FString ThumbnailBase64DataURI
Data-URI string, e.g.
Definition I3DHInteractiveSplineDrawing.h:181
void FinishActiveSpline()
Detaches the currently edited spline from the cursor.
void FinalizeDrawing(TUniqueFunction< void(FI3DHDrawingResult)> OnComplete)
Finalizes the drawing and builds the drawing geometry.
void SetDrawingColor(const FLinearColor &Color)
Sets the color used for drawing and applies it to the active spline.
FLinearColor GetDrawingColor() const
Retrieves the color currently used for drawing.
void SetDrawingScale(const FVector2D &Scale)
Sets the scale used for drawing and applies it to the active spline.
void SetCursorHiddenInGame(bool bIsHiddenInGame)
Hides the cursor in game.
double CursorNormalOffset
Offset along the normal when moving the cursor (in world units).
Definition I3DHInteractiveSplineDrawing.h:177
FVector2D GetDrawingScale() const
Retrieves the scale currently used for drawing.
static AI3DHInteractiveSplineDrawing * CreateInteractiveSplineDrawing(AI3DHConnector *HubConnector, TSubclassOf< AI3DHInteractiveSplineDrawing > DrawingClass)
Creates an actor which can be used for drawing and syncing to the Hub when finished.
AI3DHConnector * GetHubConnector() const
Returns the parent hub connector.
Definition I3DHInteractiveSplineDrawing.h:79
void CreateHubDrawingAndDestroy(const FString &Name, TUniqueFunction< void(int32 DrawingHandle, EI3DHErrorCode ErrorCode)> OnComplete)
Finalizes the drawing, synchronizes it with the hub and destroys this actor.
void RemoveLastSegmentFromActiveSpline()
Removes the last segment of the active spline, which was following the cursor.
void MoveCursorTo(const FVector &Location, const FVector &Normal)
Sets the cursor position.
void AddSplinePointAtCursor()
Adds a spline point at the cursor position to the active spline.
#define INSTANT3DHUB_EXPERIMENTAL(Version, Message)
Macro for marking up experimental code, functions and types.
Definition I3DHVersion.h:246
Encapsulates the result of an instant3Dhub drawing.
Definition I3DHDataTypes.h:2093
Generated by