Interface: Geometry.Interfaces.Shape
Shape Interface
Description
Summary:
- Describes a shape made up of a number of lines
- A JavaScript class that should be treated as an "interface"
Usage
Constructs an instance of a shape from the supplied parameters
(abstract) new Geometry.Interfaces.Shape()
Properties:
Name | Type | Description |
---|---|---|
lines
|
Geometry.Utils.Line[] |
the set of lines that the shape is made from |
Methods
(abstract) area() → {Number}
Calculate the amount of space taken up by the shape
Returns:
the amount of space taken up by the shape
(abstract) perimeter() → {Number}
Calculate the total length of all lines of the shape
Returns:
the total length of all lines of the shape