cutego/sensors/qrotationreading.go

65 lines
1.3 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package sensors
//#include "qrotationreading.h"
import "C"
import (
"github.com/therecipe/qt"
"unsafe"
)
type QRotationReading struct {
QSensorReading
}
2015-11-09 20:23:42 +03:00
type QRotationReading_ITF interface {
QSensorReading_ITF
QRotationReading_PTR() *QRotationReading
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func PointerFromQRotationReading(ptr QRotationReading_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QRotationReading_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQRotationReadingFromPointer(ptr unsafe.Pointer) *QRotationReading {
2015-10-24 18:18:24 +03:00
var n = new(QRotationReading)
n.SetPointer(ptr)
2015-11-19 21:29:30 +03:00
if n.ObjectName() == "" {
2015-10-24 18:18:24 +03:00
n.SetObjectName("QRotationReading_" + qt.RandomIdentifier())
}
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QRotationReading) QRotationReading_PTR() *QRotationReading {
2015-10-24 18:18:24 +03:00
return ptr
}
2015-11-09 20:23:42 +03:00
func (ptr *QRotationReading) X() float64 {
if ptr.Pointer() != nil {
return float64(C.QRotationReading_X(ptr.Pointer()))
}
return 0
}
func (ptr *QRotationReading) Y() float64 {
if ptr.Pointer() != nil {
return float64(C.QRotationReading_Y(ptr.Pointer()))
}
return 0
}
func (ptr *QRotationReading) Z() float64 {
if ptr.Pointer() != nil {
return float64(C.QRotationReading_Z(ptr.Pointer()))
}
return 0
}
func (ptr *QRotationReading) SetFromEuler(x float64, y float64, z float64) {
if ptr.Pointer() != nil {
C.QRotationReading_SetFromEuler(ptr.Pointer(), C.double(x), C.double(y), C.double(z))
}
}