II3DHEditDrawingInterface Class Reference
|
instant3Dhub
|
II3DHEditDrawingInterface Class Reference
#include "I3DHDataTypes.h"
Inheritance diagram for II3DHEditDrawingInterface:Detailed Description
Interface that can be implemented to provide drawing editing functionality.
- Note
- Used in conjunction with FI3DHEditDrawingAPI::EditDrawing
- Experimental
- The instant3Dhub EditDrawing API is available as a preview and is actively under development.
Public Member Functions | |
| void | BeginEditDrawing (int32 DrawingHandle, const FI3DHDrawingProperties &DrawingProperties, const UI3DHEditDrawingGeometryProvider *GeometryProvider, const AI3DHDrawing *DrawingActor) |
| void | FailedEditDrawing (int32 DrawingHandle, const FString &Reason) |
Member Function Documentation
◆ BeginEditDrawing()
| void II3DHEditDrawingInterface::BeginEditDrawing | ( | int32 | DrawingHandle, |
| const FI3DHDrawingProperties & | DrawingProperties, | ||
| const UI3DHEditDrawingGeometryProvider * | GeometryProvider, | ||
| const AI3DHDrawing * | DrawingActor ) |
Implement this function to begin editing a drawing by acquiring geometry of the drawing for modification.
This function is called on the game thread when an object that implements this interface is passed to FI3DHEditDrawingAPI::EditDrawing It must return quickly and MUST NOT block; use your own interactive editor to persist state after this call returns.
Typical flow:
- Inspect the available geometry via GeometryProvider (e.g., by PrimitiveType or Volume).
- Acquire ownership of the required geometry via UI3DHEditDrawingGeometryProvider::AcquireGeometry.
- Hand the acquired geometry to your editor or apply immediate changes.
- Create a new drawing with modified geometry via FI3DHDrawingAPI::CreateDrawing when appropriate.
Edit-copy semantics:
- During this function, calls to UI3DHEditDrawingGeometryProvider::AcquireGeometry mark geometry as "acquired" and transfer ownership to you.
- Use UI3DHEditDrawingGeometryProvider::IsEditingCopy to determine if the drawing is being edited as a copy or not.
- As soon as this function returns:
- If the caller passed bIsEditingCopy = false, all acquired geometry is removed from the original drawing. The acquired geometry is under your ownership and control.
- If the caller passed bIsEditingCopy = true, geometry was cloned and the original drawing remains unchanged.
- Note
- When editing a copy of a drawing, the original drawing will not be changed. However, when the original drawing is modified, any geometry that was acquired will be removed immediately from the original drawing
- Parameters
-
DrawingHandle Handle of the drawing to edit. DrawingProperties Properties of the drawing to edit. GeometryProvider Provides access to the drawing's geometries. Lifetime of this object is limited to the scope of this function, do not cache it. DrawingActor Optional, the associated drawing actor if available.
◆ FailedEditDrawing()
| void II3DHEditDrawingInterface::FailedEditDrawing | ( | int32 | DrawingHandle, |
| const FString & | Reason ) |
Implement this function to be notified when the edit operation failed to begin.
- Parameters
-
DrawingHandle Handle of the drawing that was meant to be edited. Reason Reason why the edit operation failed.
The documentation for this class was generated from the following file:
Generated by