Class: Lightwave::LightwaveObject::Opacity

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

Constant Summary collapse

TYPEMAP =
[:normal,:subtractive,:difference,:multiply,:divide,:alpha,:texture_displacement,:additive]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(strio) ⇒ Opacity

Returns a new instance of Opacity.



173
174
175
176
# File 'lib/lightwave.rb', line 173

def initialize(strio)
  @type = TYPEMAP[strio.read_u2]
  @opacity = strio.read_float
end

Instance Attribute Details

#opacityObject

Returns the value of attribute opacity.



171
172
173
# File 'lib/lightwave.rb', line 171

def opacity
  @opacity
end

#typeObject

Returns the value of attribute type.



170
171
172
# File 'lib/lightwave.rb', line 170

def type
  @type
end