home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Education Sampler 1992 [NeXTSTEP]
/
Education_1992_Sampler.iso
/
Programming
/
Source
/
plot3d
/
DensView.h
next >
Wrap
Text File
|
1992-08-17
|
1KB
|
39 lines
/* DensView.h Copyright 1992 Steve Ludtke */
/* This object does a density plot of a 3d data set */
/* Connect "delegate" to an object that can recieve "zoomTo:xmin :ymin :xmax */
/* :ymax messages (or leave it disconnected). Send setData::::: messages */
/* to pass data and render image. Send display messages to redisplay rendered*/
/* image. */
#import <appkit/View.h>
@interface DensView:View
{
id delegate; /* who to send -zoomTo messages to */
id image; /* image used to store the density plot */
NXPoint point; /* origin of image in view */
NXSize size; /* size of image */
float *data; /* points to array of Z values to plot */
char *buf; /* postscript command buffer */
int bufs; /* current size of buffer */
int nx,ny; /* number of data points = nx*ny */
float minZ,maxZ;/* used to determine max and min brightness */
}
/* initialization */
-initFrame:(NXRect *)myrect;
/* composites the image to the screen */
-drawSelf:(NXRect *)rects :(int)rectCount;
/* resize the view */
-superviewSizeChanged:(const NXSize *)oldsize;
/* allows user to select zoom area */
-mouseDown:(NXEvent *)oevent;
-(int)acceptsFirstMouse;
/* This routine passes the actual data to be plotted to the DensView */
/* It also does all of the actual drawing (into an Image) */
-setData:(int)Nx :(int)Ny :(float *)Data :(float)MinZ :(float)MaxZ;
@end