Class: Quake::Bsp::TexInfo

Inherits:
Data
  • Object
show all
Defined in:
lib/quake/bsp/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#flagsObject (readonly)

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



29
30
31
# File 'lib/quake/bsp/types.rb', line 29

def flags
  @flags
end

#miptex_indexObject (readonly)

Returns the value of attribute miptex_index

Returns:

  • (Object)

    the current value of miptex_index



29
30
31
# File 'lib/quake/bsp/types.rb', line 29

def miptex_index
  @miptex_index
end

#s_offsetObject (readonly)

Returns the value of attribute s_offset

Returns:

  • (Object)

    the current value of s_offset



29
30
31
# File 'lib/quake/bsp/types.rb', line 29

def s_offset
  @s_offset
end

#s_vecObject (readonly)

Returns the value of attribute s_vec

Returns:

  • (Object)

    the current value of s_vec



29
30
31
# File 'lib/quake/bsp/types.rb', line 29

def s_vec
  @s_vec
end

#t_offsetObject (readonly)

Returns the value of attribute t_offset

Returns:

  • (Object)

    the current value of t_offset



29
30
31
# File 'lib/quake/bsp/types.rb', line 29

def t_offset
  @t_offset
end

#t_vecObject (readonly)

Returns the value of attribute t_vec

Returns:

  • (Object)

    the current value of t_vec



29
30
31
# File 'lib/quake/bsp/types.rb', line 29

def t_vec
  @t_vec
end

Instance Method Details

#mipadjustObject



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