Class: Fox::FXVec4f

Inherits:
Object
  • Object
show all
Defined in:
lib/fox16/core.rb,
rdoc-sources/FXVec4f.rb

Direct Known Subclasses

FXQuatf

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (FXVec4f) initialize(vec3f, ww = 1.0)

Return an FXVec4f instance initialized from an FXVec3f instance and optional scalar.



12
# File 'rdoc-sources/FXVec4f.rb', line 12

def initialize(vec3f, ww=1.0); end

Instance Attribute Details

- (Object) w

Returns the value of attribute w



7
8
9
# File 'rdoc-sources/FXVec4f.rb', line 7

def w
  @w
end

- (Object) x

Returns the value of attribute x



4
5
6
# File 'rdoc-sources/FXVec4f.rb', line 4

def x
  @x
end

- (Object) y

Returns the value of attribute y



5
6
7
# File 'rdoc-sources/FXVec4f.rb', line 5

def y
  @y
end

- (Object) z

Returns the value of attribute z



6
7
8
# File 'rdoc-sources/FXVec4f.rb', line 6

def z
  @z
end

Class Method Details

+ (Object) plane(a, b, c)

Compute normalized plane equation ax + by + cz + d = 0.



115
# File 'rdoc-sources/FXVec4f.rb', line 115

def FXVec4f.plane(a, b, c); end

Instance Method Details

- (Object) *(n)

Returns a new FXVec4f instance obtained by memberwise multiplication of this vector's elements by the scalar n.



58
# File 'rdoc-sources/FXVec4f.rb', line 58

def *(n); end

- (Object) +(other)

Returns a new FXVec4f instance obtained by memberwise addition of the other FXVec4f instance with this one.



44
# File 'rdoc-sources/FXVec4f.rb', line 44

def +(other); end

- (Object) -(other)

Returns a new FXVec4f instance obtained by memberwise subtraction of the other FXVec4f instance from this one.



51
# File 'rdoc-sources/FXVec4f.rb', line 51

def -(other); end

- (Object) -@

Returns a new FXVec4f instance which is the negation of this one.



37
# File 'rdoc-sources/FXVec4f.rb', line 37

def -@(); end

- (Object) /(n)

Returns a new FXVec4f instance obtained by memberwise division of this vector's elements by the scalar n. Raises ZeroDivisionError if n is identically zero.



66
# File 'rdoc-sources/FXVec4f.rb', line 66

def /(n); end

- (Object) ==(other)

Return true if this vector is equal to other.



77
# File 'rdoc-sources/FXVec4f.rb', line 77

def ==(other); end

- (Object) [](index)

Returns the element at index, where index is 0, 1, 2 or 3. Raises IndexError if index is out of range.



28
# File 'rdoc-sources/FXVec4f.rb', line 28

def [](index); end

- (Object) []=(index, value)

Set the element at index to value and return value. Raises IndexError if index is out of range.



34
# File 'rdoc-sources/FXVec4f.rb', line 34

def []=(index, value); end

- (Object) clamp(lo, hi)

Clamp the values of this vector between limits lo and hi.



92
# File 'rdoc-sources/FXVec4f.rb', line 92

def clamp(lo, hi); end

- (Object) cross(other)

Return the cross product of this vector and other.



74
# File 'rdoc-sources/FXVec4f.rb', line 74

def cross(other); end

- (Boolean) crosses?(a, b)

Return true if edge a-b crosses plane

Returns:

  • (Boolean)


136
# File 'rdoc-sources/FXVec4f.rb', line 136

def crosses?(a, b); end

- (Object) distance(p)

Signed distance normalized plane and point



133
# File 'rdoc-sources/FXVec4f.rb', line 133

def distance(p); end

- (Object) dot(other)

Returns the dot (scalar) product of this vector and other.



71
# File 'rdoc-sources/FXVec4f.rb', line 71

def dot(other); end

- (Object) hi(other)

Return a new FXVec4f instance which is the greater of this vector and other.



110
# File 'rdoc-sources/FXVec4f.rb', line 110

def hi(other); end

- (Object) inspect



291
# File 'lib/fox16/core.rb', line 291

def inspect; to_a.inspect; end

- (Object) length

Return the length (magnitude) of this vector.



87
# File 'rdoc-sources/FXVec4f.rb', line 87

def length; end

- (Object) length2

Return the square of the length of this vector.



82
# File 'rdoc-sources/FXVec4f.rb', line 82

def length2; end

- (Object) lo(other)

Return a new FXVec4f instance which is the lesser of this vector and other.



104
# File 'rdoc-sources/FXVec4f.rb', line 104

def lo(other); end

- (Object) normalize

Return a new FXVec4f instance which is a normalized version of this one.



98
# File 'rdoc-sources/FXVec4f.rb', line 98

def normalize; end

- (Object) to_a

Convert to array



286
# File 'lib/fox16/core.rb', line 286

def to_a; [x, y, z, w]; end

- (Object) to_s

Convert to string



289
# File 'lib/fox16/core.rb', line 289

def to_s; to_a.to_s; end