Class: Quake::Bsp::TexInfo
- Inherits:
-
Data
- Object
- Data
- Quake::Bsp::TexInfo
- Defined in:
- lib/quake/bsp/types.rb
Instance Attribute Summary collapse
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#miptex_index ⇒ Object
readonly
Returns the value of attribute miptex_index.
-
#s_offset ⇒ Object
readonly
Returns the value of attribute s_offset.
-
#s_vec ⇒ Object
readonly
Returns the value of attribute s_vec.
-
#t_offset ⇒ Object
readonly
Returns the value of attribute t_offset.
-
#t_vec ⇒ Object
readonly
Returns the value of attribute t_vec.
Instance Method Summary collapse
Instance Attribute Details
#flags ⇒ Object (readonly)
Returns the value of attribute flags
29 30 31 |
# File 'lib/quake/bsp/types.rb', line 29 def flags @flags end |
#miptex_index ⇒ Object (readonly)
Returns the value of attribute miptex_index
29 30 31 |
# File 'lib/quake/bsp/types.rb', line 29 def miptex_index @miptex_index end |
#s_offset ⇒ Object (readonly)
Returns the value of attribute s_offset
29 30 31 |
# File 'lib/quake/bsp/types.rb', line 29 def s_offset @s_offset end |
#s_vec ⇒ Object (readonly)
Returns the value of attribute s_vec
29 30 31 |
# File 'lib/quake/bsp/types.rb', line 29 def s_vec @s_vec end |
#t_offset ⇒ Object (readonly)
Returns the value of attribute t_offset
29 30 31 |
# File 'lib/quake/bsp/types.rb', line 29 def t_offset @t_offset end |
#t_vec ⇒ Object (readonly)
Returns the value of attribute t_vec
29 30 31 |
# File 'lib/quake/bsp/types.rb', line 29 def t_vec @t_vec end |
Instance Method Details
#mipadjust ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/quake/bsp/types.rb', line 31 def mipadjust scale = (s_vec.length + t_vec.length) / 2.0 return 4 if scale < 0.32 return 3 if scale < 0.49 return 2 if scale < 0.99 1 end |