Class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleSpacingOptions
- Inherits:
-
Object
- Object
- Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleSpacingOptions
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/playablelocations_v3/classes.rb,
generated/google/apis/playablelocations_v3/representations.rb,
generated/google/apis/playablelocations_v3/representations.rb
Overview
A set of options that specifies the separation between playable locations.
Instance Attribute Summary collapse
-
#min_spacing_meters ⇒ Float
Required.
-
#point_type ⇒ String
Specifies whether the minimum spacing constraint applies to the center-point or to the snapped point of playable locations.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlayablelocationsV3SampleSpacingOptions
constructor
A new instance of GoogleMapsPlayablelocationsV3SampleSpacingOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlayablelocationsV3SampleSpacingOptions
Returns a new instance of GoogleMapsPlayablelocationsV3SampleSpacingOptions.
478 479 480 |
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 478 def initialize(**args) update!(**args) end |
Instance Attribute Details
#min_spacing_meters ⇒ Float
Required. The minimum spacing between any two playable locations, measured in meters. The minimum value is 30. The maximum value is 1000. Inputs will be rounded up to the next 10 meter interval. The default value is 200m. Set this field to remove tight clusters of playable locations. Note: The spacing is a greedy algorithm. It optimizes for selecting the highest ranking locations first, not to maximize the number of locations selected. Consider the following scenario: * Rank: A: 2, B: 1, C: 3. * Distance: A--200m--B--200m--C If spacing=250, it will pick the highest ranked location [B], not [A, C]. Note: Spacing works within the game object type itself, as well as the previous ones. Suppose three game object types, each with the following spacing: * X: 400m, Y: undefined, Z: 200m. 1. Add locations for X, within 400m of each other.
- Add locations for Y, without any spacing. 3. Finally, add locations for Z
within 200m of each other as well X and Y. The distance diagram between those
locations end up as: * From->To. * X->X: 400m * Y->X, Y->Y: unspecified. * Z->
X, Z->Y, Z->Z: 200m.
Corresponds to the JSON property
minSpacingMeters
468 469 470 |
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 468 def min_spacing_meters @min_spacing_meters end |
#point_type ⇒ String
Specifies whether the minimum spacing constraint applies to the center-point
or to the snapped point of playable locations. The default value is
CENTER_POINT
. If a snapped point is not available for a playable location,
its center-point is used instead. Set this to the point type used in your game.
Corresponds to the JSON property pointType
476 477 478 |
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 476 def point_type @point_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
483 484 485 486 |
# File 'generated/google/apis/playablelocations_v3/classes.rb', line 483 def update!(**args) @min_spacing_meters = args[:min_spacing_meters] if args.key?(:min_spacing_meters) @point_type = args[:point_type] if args.key?(:point_type) end |