Cube class
A class representing a cube in 3D space.
- Inheritance
-
- Object
- Geometry
- SolidGeometry
- Cube
Constructors
- Cube(double sideLength, {Point? center})
- Constructor for the Cube class.
- Cube.fromSurfaceArea(double surfaceArea, {Point? center})
- Constructor for the Cube class from surface area.
- Cube.fromVolume(double volume, {Point? center})
- Constructor for the Cube class from volume.
Properties
- center ↔ Point
-
The center point of the cube.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- name ↔ String
-
The name of the geometric shape.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sideLength ↔ double
-
The length of each side of the cube.
getter/setter pair
Methods
-
area(
) → double -
Calculates the area of the geometric shape.
override
-
boundingBox(
) → BoundingBox3D -
Calculates the axis-aligned bounding box (AABB) of the 3D shape.
override
-
edges(
) → List< Line> - Calculates and returns the edges of the cube.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
perimeter(
) → double -
Calculates the perimeter of the 3D geometric shape.
inherited
-
spaceDiagonals(
) → List< Line> - Calculates and returns the space diagonals of the cube.
-
surfaceArea(
) → double -
Calculates the surface area of the 3D geometric shape.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
vertices(
) → List< Point> - Calculates and returns the vertices of the cube.
-
volume(
) → double -
Calculates the volume of the 3D geometric shape.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited