Class: AsposeSlidesCloud::Camera
- Inherits:
-
BaseObject
- Object
- BaseObject
- AsposeSlidesCloud::Camera
- Defined in:
- lib/aspose_slides_cloud/models/camera.rb
Overview
Camera
Instance Attribute Summary collapse
-
#camera_type ⇒ Object
Camera type.
-
#field_of_view_angle ⇒ Object
Camera FOV.
-
#x_rotation ⇒ Object
XRotation.
-
#y_rotation ⇒ Object
YRotation.
-
#z_rotation ⇒ Object
ZRotation.
-
#zoom ⇒ Object
Camera zoom.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Camera
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Camera
Initializes the object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 72 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'CameraType') self.camera_type = attributes[:'CameraType'] end if attributes.has_key?(:'FieldOfViewAngle') self.field_of_view_angle = attributes[:'FieldOfViewAngle'] end if attributes.has_key?(:'Zoom') self.zoom = attributes[:'Zoom'] end if attributes.has_key?(:'XRotation') self.x_rotation = attributes[:'XRotation'] end if attributes.has_key?(:'YRotation') self.y_rotation = attributes[:'YRotation'] end if attributes.has_key?(:'ZRotation') self.z_rotation = attributes[:'ZRotation'] end end |
Instance Attribute Details
#camera_type ⇒ Object
Camera type
29 30 31 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 29 def camera_type @camera_type end |
#field_of_view_angle ⇒ Object
Camera FOV
32 33 34 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 32 def field_of_view_angle @field_of_view_angle end |
#x_rotation ⇒ Object
XRotation
38 39 40 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 38 def x_rotation @x_rotation end |
#y_rotation ⇒ Object
YRotation
41 42 43 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 41 def y_rotation @y_rotation end |
#z_rotation ⇒ Object
ZRotation
44 45 46 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 44 def z_rotation @z_rotation end |
#zoom ⇒ Object
Camera zoom
35 36 37 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 35 def zoom @zoom end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 47 def self.attribute_map { :'camera_type' => :'CameraType', :'field_of_view_angle' => :'FieldOfViewAngle', :'zoom' => :'Zoom', :'x_rotation' => :'XRotation', :'y_rotation' => :'YRotation', :'z_rotation' => :'ZRotation', } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 59 def self.swagger_types { :'camera_type' => :'String', :'field_of_view_angle' => :'Float', :'zoom' => :'Float', :'x_rotation' => :'Float', :'y_rotation' => :'Float', :'z_rotation' => :'Float', } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
130 131 132 133 134 135 136 137 138 139 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 130 def ==(o) return true if self.equal?(o) self.class == o.class && camera_type == o.camera_type && field_of_view_angle == o.field_of_view_angle && zoom == o.zoom && x_rotation == o.x_rotation && y_rotation == o.y_rotation && z_rotation == o.z_rotation end |
#eql?(o) ⇒ Boolean
143 144 145 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 143 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
149 150 151 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 149 def hash [camera_type, field_of_view_angle, zoom, x_rotation, y_rotation, z_rotation].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
105 106 107 108 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 105 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
112 113 114 115 116 |
# File 'lib/aspose_slides_cloud/models/camera.rb', line 112 def valid? camera_type_validator = EnumAttributeValidator.new('String', ['IsometricBottomDown', 'IsometricBottomUp', 'IsometricLeftDown', 'IsometricLeftUp', 'IsometricOffAxis1Left', 'IsometricOffAxis1Right', 'IsometricOffAxis1Top', 'IsometricOffAxis2Left', 'IsometricOffAxis2Right', 'IsometricOffAxis2Top', 'IsometricOffAxis3Bottom', 'IsometricOffAxis3Left', 'IsometricOffAxis3Right', 'IsometricOffAxis4Bottom', 'IsometricOffAxis4Left', 'IsometricOffAxis4Right', 'IsometricRightDown', 'IsometricRightUp', 'IsometricTopDown', 'IsometricTopUp', 'LegacyObliqueBottom', 'LegacyObliqueBottomLeft', 'LegacyObliqueBottomRight', 'LegacyObliqueFront', 'LegacyObliqueLeft', 'LegacyObliqueRight', 'LegacyObliqueTop', 'LegacyObliqueTopLeft', 'LegacyObliqueTopRight', 'LegacyPerspectiveBottom', 'LegacyPerspectiveBottomLeft', 'LegacyPerspectiveBottomRight', 'LegacyPerspectiveFront', 'LegacyPerspectiveLeft', 'LegacyPerspectiveRight', 'LegacyPerspectiveTop', 'LegacyPerspectiveTopLeft', 'LegacyPerspectiveTopRight', 'ObliqueBottom', 'ObliqueBottomLeft', 'ObliqueBottomRight', 'ObliqueLeft', 'ObliqueRight', 'ObliqueTop', 'ObliqueTopLeft', 'ObliqueTopRight', 'OrthographicFront', 'PerspectiveAbove', 'PerspectiveAboveLeftFacing', 'PerspectiveAboveRightFacing', 'PerspectiveBelow', 'PerspectiveContrastingLeftFacing', 'PerspectiveContrastingRightFacing', 'PerspectiveFront', 'PerspectiveHeroicExtremeLeftFacing', 'PerspectiveHeroicExtremeRightFacing', 'PerspectiveHeroicLeftFacing', 'PerspectiveHeroicRightFacing', 'PerspectiveLeft', 'PerspectiveRelaxed', 'PerspectiveRelaxedModerately', 'PerspectiveRight', 'NotDefined']) return false unless camera_type_validator.valid?(@camera_type) true end |