Object3D class

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

Static Methods

Object3DcreateCube(num size, num xOffset, num yOffset, num zOffset, Color color) #

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

Object3DcreateBox(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.

Object3DcreatePieSegment(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.

Object3DcreateYSheet(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.

Object3DcreateBar(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.

Adds a face to the object.

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.