Class: Google::Apis::VectortileV1::TriangleStrip

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/vectortile_v1/classes.rb,
lib/google/apis/vectortile_v1/representations.rb,
lib/google/apis/vectortile_v1/representations.rb
more...

Overview

Represents a strip of triangles. Each triangle uses the last edge of the previous one. The following diagram shows an example of a triangle strip, with each vertex labeled with its index in the vertex_index array. (1)-----(3) / \ / \ / \ / \ / \ / \ (0)-----(2)-----(4) Vertices may be in either clockwise or counter-clockwise order.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TriangleStrip

Returns a new instance of TriangleStrip.

[View source]

787
788
789
# File 'lib/google/apis/vectortile_v1/classes.rb', line 787

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#vertex_indicesArray<Fixnum>

Index into the vertex_offset array representing the next vertex in the triangle strip. Corresponds to the JSON property vertexIndices

Returns:

  • (Array<Fixnum>)

785
786
787
# File 'lib/google/apis/vectortile_v1/classes.rb', line 785

def vertex_indices
  @vertex_indices
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

792
793
794
# File 'lib/google/apis/vectortile_v1/classes.rb', line 792

def update!(**args)
  @vertex_indices = args[:vertex_indices] if args.key?(:vertex_indices)
end