Skip to content
Daisuke YAMAGUCHI edited this page Oct 26, 2015 · 47 revisions

要約

ベクトルを扱うためのクラスです。これは Open CASCADE の gp_Vec クラスの機能をラッピングしたクラスであり、Ruby の Vector クラスとは別のものです。

特異メソッド

  • new(x, y, z) -> Vec

    • Vec オブジェクトを作成します。 引数を省略すると、 [0, 0, 0] の要素を持つベクトルが作成されます。
  • zero -> Vec, origin -> Vec

    • [0, 0, 0] の要素のベクトルを返します。
  • xdir -> Vec, ydir -> Vec, zdir -> Vec

    • それぞれ [1, 0, 0], [0, 1, 0], [0, 0, 1] の要素のベクトルを返します。

インスタンスメソッド

  • self == other -> bool
  • self + other -> Vec
  • self - other -> Vec
  • -self -> Vec
  • self * float -> Vec
  • self / float -> Vec
  • inspect -> nil
    • .
  • to_s -> nil
    • .
  • x -> nil
    • .
  • x= -> nil
    • .
  • y -> nil
    • .
  • y= -> nil
    • .
  • z -> nil
    • .
  • z= -> nil
    • .
  • to_a -> nil
    • .
  • to_ary -> nil
    • .
  • to_xyz -> nil
    • .
  • equal? -> nil
    • .
  • normal? -> nil
    • .
  • opposite? -> nil
    • .
  • parallel? -> nil
    • .
  • normalize -> nil
    • .
  • normalize! -> nil
    • .
  • reverse -> nil
    • .
  • reverse! -> nil
    • .
  • angle -> nil
    • .
  • magnitude -> nil
    • .
  • size -> nil
    • .
  • length -> nil
    • .

Clone this wiki locally