Class: Lightwave::LightwaveObject::Surface

Inherits:
ChunkReader
  • Object
show all
Defined in:
lib/lightwave.rb

Instance Attribute Summary collapse

Attributes inherited from ChunkReader

#errors

Instance Method Summary collapse

Methods inherited from ChunkReader

chunk_map, #make_defaults, #process_tags, set_chunk_length

Constructor Details

#initialize(strio) ⇒ Surface

Returns a new instance of Surface.



306
307
308
309
310
311
312
313
# File 'lib/lightwave.rb', line 306

def initialize(strio)
  @errors = []
  @name = strio.read_string
  @parent_name = strio.read_string
  @textures = []
  process_tags(strio)
  @textures.each {|t| @errors += t.errors}
end

Instance Attribute Details

#colourObject

Returns the value of attribute colour.



284
285
286
# File 'lib/lightwave.rb', line 284

def colour
  @colour
end

#commentObject

Returns the value of attribute comment.



290
291
292
# File 'lib/lightwave.rb', line 290

def comment
  @comment
end

#diffuseObject

Returns the value of attribute diffuse.



285
286
287
# File 'lib/lightwave.rb', line 285

def diffuse
  @diffuse
end

#glossinessObject

Returns the value of attribute glossiness.



288
289
290
# File 'lib/lightwave.rb', line 288

def glossiness
  @glossiness
end

#luminosityObject

Returns the value of attribute luminosity.



287
288
289
# File 'lib/lightwave.rb', line 287

def luminosity
  @luminosity
end

#nameObject

Matched up to polygons by this name



280
281
282
# File 'lib/lightwave.rb', line 280

def name
  @name
end

#parent_nameObject

and the index of this string in the Form#tags attribute.



283
284
285
# File 'lib/lightwave.rb', line 283

def parent_name
  @parent_name
end

#specularObject

Returns the value of attribute specular.



286
287
288
# File 'lib/lightwave.rb', line 286

def specular
  @specular
end

#texturesObject

Returns the value of attribute textures.



289
290
291
# File 'lib/lightwave.rb', line 289

def textures
  @textures
end