Documentation
¶
Overview ¶
Result object tracking the asynchronous result of an OpenXR Future object, you can use this object to track the result status.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsOpenXRFutureResult() Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) CancelFuture()
- func (self Instance) GetFuture() int
- func (self Instance) GetResultValue() any
- func (self Instance) GetStatus() ResultStatus
- func (self Instance) ID() ID
- func (self Instance) OnCompleted(cb func(result Instance), flags ...Signal.Flags)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetResultValue(result_value any)
- func (self Instance) Virtual(name string) reflect.Value
- type ResultStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsOpenXRFutureResult ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.OpenXRFutureResult
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsOpenXRFutureResult ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) CancelFuture ¶
func (self Instance) CancelFuture()
Cancel this future, this will interrupt and stop the asynchronous function.
func (Instance) GetResultValue ¶
Returns the result value of our asynchronous function (if set by the extension). The type of this result value depends on the function being called. Consult the documentation of the relevant function.
func (Instance) GetStatus ¶
func (self Instance) GetStatus() ResultStatus
Returns the status of this result.
func (Instance) OnCompleted ¶
func (Instance) SetResultValue ¶
Stores the result value we expose to the user.
Note: This method should only be called by an OpenXR extension that implements an asynchronous function.
type ResultStatus ¶
type ResultStatus int //gd:OpenXRFutureResult.ResultStatus
const ( // The asynchronous function is running. ResultRunning ResultStatus = 0 // The asynchronous function has finished. ResultFinished ResultStatus = 1 // The asynchronous function has been cancelled. ResultCancelled ResultStatus = 2 )