Drawings are freeform 2D or 3D markups that are stored in the session.
In addition to this API the Instant3DHubDrawings module provides many tools to help you build a first-class drawing experience in Unreal. See AI3DHDrawingEditor for more information.
|
| UMaterialInterface * | AI3DHConnector::GetDrawingMaterial (FLinearColor Color) |
| class AI3DHDrawing * | AI3DHConnector::FindDrawingActor (int32 DrawingHandle) |
| void | AI3DHConnector::SetClipDrawingsByClipPlane (const bool bClipDrawingsByClipPlaneEnabled) |
| bool | AI3DHConnector::GetClipDrawingsByClipPlane () |
| void | FI3DHDrawingAPI::CreateDrawing (FI3DHDrawingResult DrawingResult, const FI3DHDrawingProperties &Properties, TUniqueFunction< void(int32 DrawingHandle, EI3DHErrorCode ErrorCode)> OnComplete) |
| virtual void | FI3DHDrawingAPI::CreateDrawing (FI3DHDrawingResult DrawingResult, const FI3DHDrawingProperties &Properties, TSubclassOf< class AI3DHDrawing > OverrideDrawingClass, TUniqueFunction< void(int32 DrawingHandle, EI3DHErrorCode ErrorCode)> OnComplete)=0 |
| virtual void | FI3DHDrawingAPI::RemoveDrawing (int32 DrawingHandle, TUniqueFunction< void(EI3DHRemoveState RemoveState, EI3DHErrorCode ErrorCode)> OnComplete)=0 |
| virtual void | FI3DHDrawingAPI::ChangeDrawing (int32 DrawingHandle, const FI3DHDrawingProperties &Properties, TUniqueFunction< void(const FI3DHDrawingProperties &Properties, EI3DHErrorCode ErrorCode)> OnComplete)=0 |
| virtual void | FI3DHDrawingAPI::GetDrawings (TUniqueFunction< void(TArray< int32 > Drawings, EI3DHErrorCode ErrorCode)> OnComplete)=0 |
| virtual void | FI3DHDrawingAPI::RequestDrawingData (int32 DrawingHandle, bool bSkipDrawingResultParsing, TUniqueFunction< void(FI3DHDrawingData DrawingData, EI3DHErrorCode ErrorCode)> OnComplete)=0 |
◆ ChangeDrawing()
Change the properties of a drawing.
- Parameters
-
| DrawingHandle | Handle of the drawing. |
| Properties | The properties. |
| OnComplete | Callback called on completion:
|
◆ CreateDrawing() [1/2]
Creates a drawing in the instant3Dhub session and spawns an Actor of provided OverrideDrawingClass if successful.
- Parameters
-
| DrawingResult | The drawing result containing the drawing geometry. |
| Properties | The drawing properties. |
| OverrideDrawingClass | A subclass of AI3DHDrawing to use when spawning the Drawing Actor. |
| OnComplete | Callback called on completion with the following arguments.
|
◆ CreateDrawing() [2/2]
Creates a drawing in the instant3Dhub session and spawns an Actor of type AI3DHDrawing if successful.
- Parameters
-
| DrawingResult | The drawing result containing the drawing geometry. |
| Properties | The drawing properties. |
| OnComplete | Callback called on completion:
|
◆ FindDrawingActor()
| class AI3DHDrawing * AI3DHConnector::FindDrawingActor |
( |
int32 | DrawingHandle | ) |
|
Search the Drawing Actor for the provided DrawingHandle.
- Note
- Must be called from the game thread.
- Parameters
-
| DrawingHandle | Handle of the drawing. |
- Returns
- Nullptr if it fails, else the found drawing actor.
◆ GetClipDrawingsByClipPlane()
| bool AI3DHConnector::GetClipDrawingsByClipPlane |
( |
| ) |
|
Whether Drawings are clipped by ClipPlanes.
- Note
- This only applies to Unreal Engine and is not synced with the instant3Dhub Session.
- Returns
- True if drawings are clipped by ClipPlanes, false if not.
◆ GetDrawingMaterial()
Returns a new Dynamic Material Instance of the AI3DHConnector::DrawingBaseMaterial with the specified color.
- Note
- Must be called from the game thread.
- Parameters
-
| Color | Color of the Drawing. |
- Returns
- The drawing material.
◆ GetDrawings()
Gets a list of all drawing handles.
- Parameters
-
| OnComplete | Callback called on completion:
|
◆ RemoveDrawing()
Removes a drawing matching the specified drawing handle.
- Parameters
-
| DrawingHandle | Handle of the drawing. |
| OnComplete | Callback called on completion. |
◆ RequestDrawingData()
Request the drawing data of a specified Drawing.
- Parameters
-
| DrawingHandle | Handle of the drawing. |
| bSkipDrawingResultParsing | True to skip drawing result parsing. In this case the result only contains the Drawing Properties. |
| OnComplete | Callback called on completion:
|
◆ SetClipDrawingsByClipPlane()
| void AI3DHConnector::SetClipDrawingsByClipPlane |
( |
const bool | bClipDrawingsByClipPlaneEnabled | ) |
|
Use to globally control whether Drawings are clipped by ClipPlanes.
- Note
- This only applies to Unreal Engine and is not synced with the instant3Dhub Session.
- Parameters
-
| bClipDrawingsByClipPlaneEnabled | True to enable drawings being clipped by ClipPlanes, false to disable it. |
◆ DrawingBaseMaterial
Default material to render drawings.
Requires a specific layout and parameters to support correct rendering of drawings.
- DrawingColor Vector parameter to set the color of the drawing.
- bIsHovered Scalar parameter (0.f for false, 1.f for true) to display the hovered state of the drawing.
- Note
- Use the material delivered with the plugin or at least copy it for support.
◆ DrawingJointMesh
Mesh used to render joints of LineStrip drawings.
- Note
- Should have simple colliders for performance reasons.
- Important
- Must be a sphere with 1cm diameter to match the visualization in the 3DSpace.
◆ DrawingSegmentMesh
Mesh used to render a line segment in LineStrip drawings.
- Note
- Should have simple colliders for performance reasons.
- Important
- Must be a cylinder with 1cm diameter and pivot at base of Up-Axis to match the visualization in the 3DSpace.