Class: Fox::FXVec3d

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xx, yy, zz = 1.0) ⇒ FXVec3d

Return an FXVec3d instance initialized from specified component values.



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

def initialize; end

Instance Attribute Details

#xObject

Returns the value of attribute x.



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

def x
  @x
end

#yObject

Returns the value of attribute y.



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

def y
  @y
end

#zObject

Returns the value of attribute z.



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

def z
  @z
end

Class Method Details

.normal(a, b, c, d) ⇒ Object

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



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

def FXVec3d.normal(a, b, c); end

Instance Method Details

#*(n) ⇒ Object

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



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

def *(n); end

#+(other) ⇒ Object

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



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

def +(other); end

#-(other) ⇒ Object

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



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

def -(other); end

#-@Object

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



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

def -@(); end

#/(n) ⇒ Object

Returns a new FXVec3d 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/FXVec3d.rb', line 60

def /(n); end

#==(other) ⇒ Object

Return true if this vector is equal to other.



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

def ==(other); end

#[](index) ⇒ Object

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



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

def [](index); end

#[]=(index, value) ⇒ Object

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



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

def []=(index, value); end

#clamp(lo, hi) ⇒ Object

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



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

def clamp(lo, hi); end

#cross(other) ⇒ Object

Return the cross product of this vector and other.



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

def cross(other); end

#dot(other) ⇒ Object

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



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

def dot(other); end

#hi(other) ⇒ Object

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



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

def hi(other); end

#inspectObject



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

def inspect; to_a.inspect; end

#lengthObject

Return the length (magnitude) of this vector.



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

def length; end

#length2Object

Return the square of the length of this vector.



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

def length2; end

#lo(other) ⇒ Object

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



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

def lo(other); end

#normalizeObject

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



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

def normalize; end

#to_aObject

Convert to array



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

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

#to_sObject

Convert to string



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

def to_s; to_a.to_s; end