Cube3D class

A 3D cube with optional text labels.

Inheritance
Mixed-in types

Constructors

Cube3D(double size, Vector3 position, {Color? color, String? text, TextStyle? textStyle, Vector3? textOffset, Map<CubeFace, String>? faceLabels, Map<int, String>? vertexLabels, TextStyle? labelStyle, bool textRotation = true, bool textBackground = false, Color textBackgroundColor = const Color(0x8A000000), TextAlign textAlignment = TextAlign.center})
Creates a cube with optional text labels.

Properties

color → Color?
Cube color. Defaults to InfinityModelConfig setting.
final
customLabels → Map<Vector3, String>?
Additional position-specific labels
no setteroverride
faceLabels → Map<CubeFace, String>?
Face-specific labels
final
figures → List<Model3D<Model3D>>
The list of 3D objects in a group.
finalinherited
hashCode → int
The hash code for this object.
no setteroverride
labelStyle → TextStyle?
Style for face and vertex labels
final
position → Vector3
Cube position.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → double
Cube size.
final
text → String?
Main text label
final
textAlignment → TextAlign
Text alignment
final
textBackground → bool
Whether to show text background
final
textBackgroundColor → Color
Background color for text
final
textOffset → Vector3?
Text offset from cube center
final
textRotation → bool
Whether text rotates with camera
final
textStyle → TextStyle?
Text style for main label
final
vertexLabels → Map<int, String>?
Vertex-specific labels (0-7)
final

Methods

clone() → Group3D
Get the position of a cube vertex by index (0-7)
override
copyWith({double? size, Vector3? position, Color? color}) → Cube3D
Copies the cube.
getBounds() → Aabb3
Gets bounds of a model (min and max coordinates).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(InfinityModelConfig config, InfinityModelController controller, PaintViewPort viewPort, Group3D model, Matrix4 matrix, int vertexIndex, Float32List zIndices, Int32List colors, Float32List vertices) → void
Fills the buffer with the Model3D data.
inherited
toLines() → List<Line3D>
Converts model to a List of Line3D.
inherited
toPoints() → List<Point3D>
Converts model to a List of Point3D.
inherited
toString() → String
A string representation of this object.
inherited
verticesCount() → int
Returns number of vertices.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override