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.



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

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



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

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)


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

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:



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

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



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

def root
  @root
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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