Public Member Functions

PolyLineProc Class Reference

Search for all occurrences

Detailed Description

This is a callback used to draw a series of lines.

A developer would implement a class derived from this one that has a GraphicsWindow pointer within it. This is the base class used by DrawLineProc and BoxLineProc. Below is the code from DrawLineProc showing how this is used: class DrawLineProc:public PolyLineProc {

GraphicsWindow *gw;



DrawLineProc() { gw = NULL; }

DrawLineProc(GraphicsWindow *g) { gw = g; }

int proc(Point3 *p, int n)

{ gw->polyline(n, p, NULL, NULL, 0, NULL); return 0; }

void SetLineColor(float r, float g, float b)

{gw->setColor(LINE_COLOR,r,g,b);}

};

Typically a developer would not have to use this class, but would rather use Class DrawLineProc, and Class BoxLineProc.

See also:
Class DrawLineProc, Class BoxLineProc, Class GraphicsWindow.

#include <object.h>

Inheritance diagram for PolyLineProc:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual  ~PolyLineProc ()
  Destructor.
virtual int  proc (Point3 *p, int n)=0
  Draws a polyline between the specified points.
virtual void  SetLineColor (float r, float g, float b)
  Sets the color used to draw the polyline.
virtual void  SetLineColor (Point3 c)
virtual void  Marker (Point3 *p, MarkerType type)

Constructor & Destructor Documentation

virtual ~PolyLineProc ( ) [inline, virtual]

Destructor.

{;}

Member Function Documentation

virtual int proc ( Point3 p,
int  n 
) [pure virtual]

Draws a polyline between the specified points.

Parameters:
p Array of vertices of the polyline.
n Number of vertices in the polyline.

Implemented in DrawLineProc, and BoxLineProc.

virtual void SetLineColor ( float  r,
float  g,
float  b 
) [inline, virtual]

Sets the color used to draw the polyline.

Parameters:
r Red component in the range 0.0 to 1.0
g Green component in the range 0.0 to 1.0
b Blue component in the range 0.0 to 1.0

Reimplemented in DrawLineProc.

{}
virtual void SetLineColor ( Point3  c ) [inline, virtual]
virtual void Marker ( Point3 p,
MarkerType  type 
) [inline, virtual]

PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc
PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc PolyLineProc