Class: Google::Apis::PolyV1::Format

Inherits:
Object
  • Object
show all
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

The same asset can be represented in different formats, for example, a WaveFront .obj file with its corresponding .mtl file or a Khronos glTF file with its corresponding .glb binary data. A format refers to a specific representation of an asset and contains all information needed to retrieve and describe this representation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Format

Returns a new instance of Format



244
245
246
# File 'generated/google/apis/poly_v1/classes.rb', line 244

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

Instance Attribute Details

#format_complexityGoogle::Apis::PolyV1::FormatComplexity

Information on the complexity of this Format. Corresponds to the JSON property formatComplexity



224
225
226
# File 'generated/google/apis/poly_v1/classes.rb', line 224

def format_complexity
  @format_complexity
end

#format_typeString

A short string that identifies the format type of this representation. Possible values are: FBX, GLTF, GLTF2, OBJ, and TILT. Corresponds to the JSON property formatType

Returns:

  • (String)


230
231
232
# File 'generated/google/apis/poly_v1/classes.rb', line 230

def format_type
  @format_type
end

#resourcesArray<Google::Apis::PolyV1::File>

A list of dependencies of the root element. May include, but is not limited to, materials, textures, and shader programs. Corresponds to the JSON property resources

Returns:



236
237
238
# File 'generated/google/apis/poly_v1/classes.rb', line 236

def resources
  @resources
end

#rootGoogle::Apis::PolyV1::File

Represents a file in Poly, which can be a root, resource, or thumbnail file. Corresponds to the JSON property root



242
243
244
# File 'generated/google/apis/poly_v1/classes.rb', line 242

def root
  @root
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



249
250
251
252
253
254
# File 'generated/google/apis/poly_v1/classes.rb', line 249

def update!(**args)
  @format_complexity = args[:format_complexity] if args.key?(:format_complexity)
  @format_type = args[:format_type] if args.key?(:format_type)
  @resources = args[:resources] if args.key?(:resources)
  @root = args[:root] if args.key?(:root)
end