00001 00005 #import <Cocoa/Cocoa.h> 00006 00007 #import "Constants.h" 00008 #import "FlowChannel.h" 00009 #import "FlowData.h" 00010 #import "FlowGeometry.h" 00011 #import "FlowShader.h" 00012 #import "FlowTexture.h" 00013 #import "SettingsController.h" 00014 00015 #include "StreamLineContainer.h" 00016 00017 @interface FlowOpenGLView : NSOpenGLView { 00018 int colorBits, depthBits; 00019 00020 float zoomFactor; 00021 float moveX; 00022 float moveY; 00023 00024 float scaleFactorX; 00025 float scaleFactorY; 00026 00027 GLuint testTexture; 00028 00029 FlowData *flowData; 00030 FlowShader *flowShader; 00031 00032 SettingsController *settings; 00033 00034 00035 00036 //StreamLineContainer *streamLineGrid; 00037 NSMutableArray *streamLineGrids; 00038 00042 GLuint textureLayers[kMaxChannels]; 00043 00047 float textureLayersMinMax[kMaxChannels][2]; 00048 00052 int idxStartTransferTexture; 00053 00057 int xChannel; 00058 int yChannel; 00059 int velChannel; 00060 } 00061 00065 - (NSOpenGLPixelFormat *) createPixelFormat:(NSRect)frame; 00066 00072 - (BOOL)initGL; 00073 00077 - (void)dataLoaded:(NSNotification *)notification; 00078 00082 - (void)layerChanged:(NSNotification *)notification; 00083 00084 00093 - (void)createTextureLayer:(int)textureUnit channel:(FlowChannel*)c width:(int)w height:(int)h; 00094 00101 - (void)createTransferFunctionTexture:(int)textureUnit colorCodingLayer:(ColorCodingLayer *)layer; 00102 00110 - (void)drawColorCodingWithTextureUnit:(int)unit transferTextureUnit:(int)transferUnit opacity:(float)opacity; 00111 00123 - (void)drawArrowPlotWithTextureUnit0:(int)unit0 textureUnit1:(int)unit1 textureUnit2:(int)unit2 steps:(int)s colorToning:(NSColor *)color arrowScaleFactor:(float)scale opacity:(float)opacity; 00124 00135 - (void)drawStreamLinesWithGridIdx:(int)gridIdx withColor:(NSColor *)color glyphMapping:(BOOL)useGlyphs tapering:(BOOL)tapering opacity:(float)opacity algo:(int)algo; 00136 00140 - (void)renderLayers; 00141 00142 @end