Dart Documentationorson_chartsObject3D

Object3D class

An object in three-dimensional space. The object is defined by a list of vertices (Point3D instances) and faces (Face instances).

Subclasses

Dot3D

Static Methods

Object3D createCube(num size, num xOffset, num yOffset, num zOffset, Color color) #

Creates a cube with the specified size, color and offsets.

Object3D createBox(num x, num xdim, num y, num ydim, num z, num zdim, Color color) #

Creates a box centered on ( x, y, z) with the dimensions xdim, ydim, zdim and the specified color.

Object3D createPieSegment(num radius, num explodeRadius, num base, num height, num angle1, num angle2, num inc, Color color) #

Cretes a pie segment with the specified radius, base, height and color, between angle1 and angle2 (specified in radians).

List<Object3D> createPieLabelMarkers(num radius, num explodeRadius, num base, num height, num angle1, num angle2) #

Creates a list containing two pie label markers, one on each side of a notional pie segment.

Object3D createYSheet(num size, num x, num y, num z, Color color, bool invert) #

Creates a sheet centered on ( x, y, z), flat on the y-plane and with the specified color. If invert is true, the orientation of the sheet is reversed.

Object3D createBar(num xWidth, num zWidth, num x, num y, num z, num zero, Color barColor, Color baseColor, Color topColor, bool inverted) #

Creates a bar with the top centered on ( x, y, z) and the base at ( x, zero, z).

Constructors

new Object3D() #

Creates a new Object3D instance, initially with no vertices or faces.

Properties

final List<Face> faces #

Returns the faces for this object.

final int vertexCount #

Returns the number of vertices for this object.

Methods

void addDoubleSidedFace(List<int> vertices, Color color, bool outline) #

Adds a double-sided face to the object.

void addFace(Face face) #

Adds a face to the object.

void addVertex(Point3D vertex) #

Adds a vertex to the object.

void addVertexXYZ(num x, num y, num z) #

Adds a vertex using coordinates ( x, y, z).

List<Point3D> calculateEyeCoordinates(ViewPoint3D viewPoint) #

Transforms the vertices for the object to eye-coordinates assuming the specified viewPoint.

List<Point> calculateProjectedPoints(ViewPoint3D viewPoint, num d) #

Projects the vertices to 2D-space assuming the specified viewPoint and projection distance d.