The set of four homogeneous coordinates x, y, z, and w that represent the position of the
Point
within 3DLDF's global coordinate system.
The set of four homogeneous coordinates x, y, z, and w that represent the position of the projection of the
Point
onto a two-dimensional plane for output. The x and y values are used in the MetaPost code written toout_stream
. The z value is used in the hidden surface algorithm (which is currently rather primitive and doesn't work very well. see Surface Hiding). The w value can be != 1 , depending on the projection used; the perspective projection is non-affine, so w can take on other values.
A set of four homogeneous coordinates x, y, z, and w.
user_coordinates
currently has no function. It is intended for use in user-defined coordinate systems. For example, a coordinate system could be defined with respect to a plane surface that isn't parallel to one of the major planes. Such a coordinate system would be convenient for drawing on the plane. ATransform
would make it possible to convert betweenuser_coordinates
andworld_coordinates
.
A set of four homogeneous coordinates x, y, z, and w.
view_coordinates
currently has no function. It may be useful for displaying multiple views in an interactive graphical user interface, or for some other purpose.
Contains the product of the transformations applied to the
Point
. Whenapply_transform()
is called for thePoint
, directly or indirectly, theworld_coordinates
are updated andtransform
is reset to the identityTransform
. See Point Reference; Applying Transformations.
Returns
on_free_store
. This should only betrue
if thePoint
was dynamically allocated on the free store.Points
should only ever be dynamically allocated bycreate_new<Point>()
, which usesset_on_free_store()
to seton_free_store
totrue
. See Point Reference; Constructors and Setting Functions, and Point Reference; Modifying.
Used to tell
Point::output()
what MetaPost drawing command (drawdot()
orundrawdot()
) to write toout_stream
when outputting aPoint
.When
drawdot()
orundrawdot()
is called on aPoint
, thePoint
is copied and put onto thePicture
, which was passed todrawdot()
orundrawdot()
as an argument (current_picture
by default).drawdot_value
is either set toShape::DRAWDOT
orShape::UNDRAWDOT
on the copy;this->drawdot
is not set.
Used to tell
Point::output()
what string to write toout_stream
for the color when outputting aPoint
.
Used to tell
Point::output()
what string to write toout_stream
for the pen when outputting aPoint
.
A set of 6
real
values indicating the maximum and minumum x, y, and z-coordinates of thePoint
. Used for determining whether aPoint
is projectable with the parameters of a particular invocation ofPicture::output()
. See Picture Reference; Outputting.Obviously, the maxima and minima will always be the same for a
Point
, namely the x, y, and z-coordinates. However,set_extremes()
andget_extremes()
, the functions that accessprojective_extremes
, are pure virtual functions inclass Shape
, so thePoint
versions must be consistent with the versions for other types derived fromShape
.
true
by default. Set tofalse
bysuppress_output()
, which is called on aShape
byPicture::output()
, if theShape
is not projectable. See Picture Reference; Outputting.
The unit of measurement for all distances within a
Picture
,"cm"
(for centimeters) by default. The x and y-coordinates of the projectedPoints
are always followed bymeasurement_units
when they're written toout_stream
. Unlike Metafont, units of measurement cannot be indicated for individual coordinates. Nor canmeasurement_unit
be changed within aPicture
.When I write an input routine, I plan to make it behave the way Metafont does, however, 3DLDF will probably also convert all of the input values to a standard unit, as Metafont does.
Default values for the y and z-coordinate of
Points
, when the x-coordinate, or the x and y-coordinates only are specified. Both are 0 by default.These values only used in the constructor and setting function taking one required
real
value (for the x-coordinate), and two optionalreal
values (for the y and z-coordinates). They are not used when aPoint
is declared using the default constructor with no arguments. In this case, the x, y, and z-coordinates will all be 0. See Point Reference; Constructors and Setting Functions.Point A(1); A.show("A:"); -| A: (1, 0, 0); CURR_Y = 5; A.set(2); A.show("A:"); -| A: (2, 5, 0); CURR_Z = 12; Point B(3); B.show("B:"); -| B: (3, 5, 12); Point C; C.show("C:"); -| C: (0, 0, 0);