module
PF::Shape
Defined in:
shape.crClass Method Summary
-
.average_radius(points : Enumerable(PF2d::Vec))
calculate length from center for all points, and then get the average
-
.circle(num_points : Int, size = 1.0, jitter = 0.0)
Generate an array of points that form a circle
-
.rotate(points : Enumerable(PF2d::Vec), rotation : Float64)
Rotate points by rotation
-
.scale(points : Enumerable(PF2d::Vec), amount : PF2d::Vec)
Scale points by a certain amount
-
.translate(points : Enumerable(PF2d::Vec), translation : PF2d::Vec)
Translate points by translation
-
.translate(*points : PF2d::Vec, translation : PF2d::Vec)
ditto
Class Method Detail
def self.average_radius(points : Enumerable(PF2d::Vec))
#
calculate length from center for all points, and then get the average
Generate an array of points that form a circle
def self.scale(points : Enumerable(PF2d::Vec), amount : PF2d::Vec)
#
Scale points by a certain amount
def self.translate(points : Enumerable(PF2d::Vec), translation : PF2d::Vec)
#
Translate points by translation