-
Notifications
You must be signed in to change notification settings - Fork 4
class Vertex
dyama edited this page Oct 31, 2016
·
7 revisions
Siren::Vertex (バーテックス) とは、3次元の点を表わすオブジェクトです。Siren::Shape クラスの派生クラスです。
xyz -> [x, y, z]
to_a -> [x, y, z]
Siren::Vertex の3次元座標値を配列として返します。
point = Siren.vertex [1, 2, 3]
p point.xyz # => [1, 2, 3]
p point.to_a # => [1, 2, 3]
to_v -> Vec
バーテックスの3次元座標値の x, y, z 要素を持つ Vec 型のオブジェクトを返します。
point = Siren.vertex [1, 2, 3]
p point.to_v # => #<Vec:0x1f9bf50 @x=1.000000, @y=2.000000, @z=3.000000>