Class: Fox::FXVec4d

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

Direct Known Subclasses

FXQuatd

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vec3d, ww = 1.0) ⇒ FXVec4d

Return an FXVec4d instance initialized from an FXVec3d instance and optional scalar.


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

def initialize; end

Instance Attribute Details

#wObject

Returns the value of attribute w


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

def w
  @w
end

#xObject

Returns the value of attribute x


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

def x
  @x
end

#yObject

Returns the value of attribute y


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

def y
  @y
end

#zObject

Returns the value of attribute z


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

def z
  @z
end

Class Method Details

.plane(a, b, c) ⇒ Object

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


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

def FXVec4d.plane(vec); end

Instance Method Details

#*(n) ⇒ Object

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


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

def *(n); end

#+(other) ⇒ Object

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


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

def +(other); end

#-(other) ⇒ Object

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


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

def -(other); end

#[email protected]Object

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


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

def [email protected](); end

#/(n) ⇒ Object

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

def /(n); end

#==(other) ⇒ Object

Return true if this vector is equal to other.


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

def ==(other); end

#[](index) ⇒ Object

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/FXVec4d.rb', line 28

def [](index); end

#[]=(index, value) ⇒ Object

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


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

def []=(index, value); end

#clamp(lo, hi) ⇒ Object

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


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

def clamp(lo, hi); end

#cross(other) ⇒ Object

Return the cross product of this vector and other.


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

def cross(other); end

#crosses?(a, b) ⇒ Boolean

Return true if edge a-b crosses plane

Returns:

  • (Boolean)

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

def crosses?(a, b); end

#distance(p) ⇒ Object

Signed distance normalized plane and point


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

def distance(p); end

#dot(other) ⇒ Object

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


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

def dot(other); end

#hi(other) ⇒ Object

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


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

def hi(other); end

#inspectObject


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

def inspect; to_a.inspect; end

#lengthObject

Return the length (magnitude) of this vector.


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

def length; end

#length2Object

Return the square of the length of this vector.


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

def length2; end

#lo(other) ⇒ Object

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


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

def lo(other); end

#normalizeObject

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


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

def normalize; end

#to_aObject

Convert to array


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

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

#to_sObject

Convert to string


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

def to_s; to_a.to_s; end