Class: Fox::FXVec3f

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

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (FXVec3f) initialize(xx, yy, zz = 1.0)

Return an FXVec3f instance initialized with specified component values.



11
# File 'rdoc-sources/FXVec3f.rb', line 11

def initialize(xx, yy, zz=1.0); end

Instance Attribute Details

- (Object) x

Returns the value of attribute x



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

def x
  @x
end

- (Object) y

Returns the value of attribute y



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

def y
  @y
end

- (Object) z

Returns the value of attribute z



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

def z
  @z
end

Class Method Details

+ (Object) normal(a, b, c, d)

Compute approximate normal from four points a, b, c and d.



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

def FXVec3f.normal(a, b, c, d); end

Instance Method Details

- (Object) *(n)

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



52
# File 'rdoc-sources/FXVec3f.rb', line 52

def *(n); end

- (Object) +(other)

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



38
# File 'rdoc-sources/FXVec3f.rb', line 38

def +(other); end

- (Object) -(other)

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



45
# File 'rdoc-sources/FXVec3f.rb', line 45

def -(other); end

- (Object) -@

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



31
# File 'rdoc-sources/FXVec3f.rb', line 31

def -@(); end

- (Object) /(n)

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



60
# File 'rdoc-sources/FXVec3f.rb', line 60

def /(n); end

- (Object) ==(other)

Return true if this vector is equal to other.



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

def ==(other); end

- (Object) [](index)

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



22
# File 'rdoc-sources/FXVec3f.rb', line 22

def [](index); end

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

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



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

def []=(index, value); end

- (Object) clamp(lo, hi)

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



86
# File 'rdoc-sources/FXVec3f.rb', line 86

def clamp(lo, hi); end

- (Object) cross(other)

Return the cross product of this vector and other.



68
# File 'rdoc-sources/FXVec3f.rb', line 68

def cross(other); end

- (Object) dot(other)

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



65
# File 'rdoc-sources/FXVec3f.rb', line 65

def dot(other); end

- (Object) hi(other)

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



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

def hi(other); end

- (Object) inspect



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

def inspect; to_a.inspect; end

- (Object) length

Return the length (magnitude) of this vector.



81
# File 'rdoc-sources/FXVec3f.rb', line 81

def length; end

- (Object) length2

Return the square of the length of this vector.



76
# File 'rdoc-sources/FXVec3f.rb', line 76

def length2; end

- (Object) lo(other)

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



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

def lo(other); end

- (Object) normalize

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



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

def normalize; end

- (Object) to_a

Convert to array



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

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

- (Object) to_s

Convert to string



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

def to_s; to_a.to_s; end