Class: Google::Apis::PolyV1::Quaternion
- Inherits:
-
Object
- Object
- Google::Apis::PolyV1::Quaternion
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/poly_v1/classes.rb,
generated/google/apis/poly_v1/representations.rb,
generated/google/apis/poly_v1/representations.rb
Overview
A Quaternion. Please note: if in the response you see "w: 1" and nothing else this is the default value of [0, 0, 0, 1] where x,y, and z are 0.
Instance Attribute Summary collapse
-
#w ⇒ Float
The scalar component.
-
#x ⇒ Float
The x component.
-
#y ⇒ Float
The y component.
-
#z ⇒ Float
The z component.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Quaternion
constructor
A new instance of Quaternion.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Quaternion
Returns a new instance of Quaternion
511 512 513 |
# File 'generated/google/apis/poly_v1/classes.rb', line 511 def initialize(**args) update!(**args) end |
Instance Attribute Details
#w ⇒ Float
The scalar component.
Corresponds to the JSON property w
494 495 496 |
# File 'generated/google/apis/poly_v1/classes.rb', line 494 def w @w end |
#x ⇒ Float
The x component.
Corresponds to the JSON property x
499 500 501 |
# File 'generated/google/apis/poly_v1/classes.rb', line 499 def x @x end |
#y ⇒ Float
The y component.
Corresponds to the JSON property y
504 505 506 |
# File 'generated/google/apis/poly_v1/classes.rb', line 504 def y @y end |
#z ⇒ Float
The z component.
Corresponds to the JSON property z
509 510 511 |
# File 'generated/google/apis/poly_v1/classes.rb', line 509 def z @z end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
516 517 518 519 520 521 |
# File 'generated/google/apis/poly_v1/classes.rb', line 516 def update!(**args) @w = args[:w] if args.key?(:w) @x = args[:x] if args.key?(:x) @y = args[:y] if args.key?(:y) @z = args[:z] if args.key?(:z) end |