Class: Quake::Bsp::Plane

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#distObject (readonly)

Returns the value of attribute dist

Returns:

  • (Object)

    the current value of dist



13
14
15
# File 'lib/quake/bsp/types.rb', line 13

def dist
  @dist
end

#normalObject (readonly)

Returns the value of attribute normal

Returns:

  • (Object)

    the current value of normal



13
14
15
# File 'lib/quake/bsp/types.rb', line 13

def normal
  @normal
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



13
14
15
# File 'lib/quake/bsp/types.rb', line 13

def type
  @type
end

Instance Method Details

#signbitsObject



14
15
16
17
18
19
20
# File 'lib/quake/bsp/types.rb', line 14

def signbits
  bits = 0
  bits |= 1 if normal.x.negative?
  bits |= 2 if normal.y.negative?
  bits |= 4 if normal.z.negative?
  bits
end