Dart Documentationorson_chartsWorld

World class

A model containing objects in 3D space.

Constructors

new World() #

Creates a new (empty) world.

Properties

final List<Face> faces #

Returns a list of all the faces in the world.

num lightX #

The x-component of the light source vector.

num lightY #

The y-component of the light source vector.

num lightZ #

The z-component of the light source vector.

List<Object3D> objects #

The objects.

final int vertexCount #

Returns the number of vertices for all the objects in the world.

Methods

void add(Object3D object) #

Adds an object to the world.

List<Point3D> calculateEyeCoordinates(ViewPoint3D vp) #

Returns a list of vertex coordinates (in 3D space) for all objects in the world as if they are viewed from the specified viewing point vp.

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

Returns a list of all projected points (in 2D space) for all objects in the world as if they are viewed from the specified viewing point vp and using the projection distance d.

void setLightSource(Point3D p) #

Sets the light source to the specified point p. This convenience method updates the values of lightX, lightY and lightZ.