chore: Add basic skeleton of the Xreal driver
This commit is contained in:
parent
b22931ffaf
commit
ad3045fc29
26 changed files with 4470 additions and 2 deletions
22
ardriver/commons/interface.go
Normal file
22
ardriver/commons/interface.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package commons
|
||||
|
||||
type AREventListener struct {
|
||||
PitchCallback func(float32)
|
||||
YawCallback func(float32)
|
||||
RollCallback func(float32)
|
||||
}
|
||||
|
||||
type ARDevice interface {
|
||||
// Initializes the AR device's sensors.
|
||||
Initialize() error
|
||||
// Ends the AR device's sensors.
|
||||
End() error
|
||||
// Polls the AR device's sensors.
|
||||
Poll() error
|
||||
// Checks if the underlying AR library is polling-based.
|
||||
IsPollingLibrary() bool
|
||||
// Checks if the underlying AR library is event-based.
|
||||
IsEventBasedLibrary() bool
|
||||
// Registers event listeners for the AR device.
|
||||
RegisterEventListeners(eventListener *AREventListener)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue