Node: Outputting Points, Previous: Showing Points, Up: Point Reference



Outputting

ostream& operator<< (ostream& o, Point& p) Non-member function
Used in Path::output() for writing the x and y values of the projective_coordinates of Points to out_stream. See Path Reference; Outputting. This is a low-level function that ordinary users should never have to invoke directly.

void output (void) Function
Writes the MetaPost code for drawing or undrawing a Point to out_stream. Called by Picture::output(), when a Shape on the Picture is a Point. See Picture Reference; Outputting.

void suppress_output (void) Virtual function
Sets do_output to false, which causes a Point not to be output. This function is called in Picture::output(), when a Point cannot be projected. See Picture Reference; Outputting.

virtual void unsuppress_output (void) Virtual function
Resets do_output to true, so that a Point can potentially be output, if Picture::output() is called again for the Picture the Point is on. This function is called in Picture::output(). See Picture Reference; Outputting.

vector<shape*> extract (const Focus& f, const unsigned short proj, real factor) Function
Attempts to project the Point using the arguments passed to Picture::output(), which calls this function. If extract() succeeds, it returns a vector<shape*> containing only the Point. Otherwise, it returns an empty vector<shape*>.

bool set_extremes (void) Virtual function
Sets "extreme" values for x, y, and z in projective_coordinates. This is, of course, trivial for Points, because they only have one x, y and z-coordinate. So the maxima and minima for each coordinate are always the same.

valarray <real> get_extremes (void) Virtual inline const function
Returns projective_extremes.

real get_minimum_z (void) Virtual const function
real get_maximum_z (void) Virtual const function
real get_mean_z (void) Virtual const function
These functions return the minimum, maximum, and mean z-value of the Point. get_minimum_z() returns projective_extremes[4], get_maximum_z() returns projective_extremes[5], and get_mean_z() returns (projective_extremes[4] + projective_extremes[5]) / 2. However, since a Point has only one z-coordinate (from world_coordinates), these values will all be the same.

These functions are pure virtual functions in Shape, and are called on Points through pointers to Shape. Therefore, they must be consistent with the versions for other types derived from Shape. See Shape Reference; Outputting.