Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #import <Cocoa/Cocoa.h>
00010 #import "Constants.h"
00011
00012 @class TransferFunction;
00013 @class TransferPanel;
00014 @class Volume;
00015
00016 @interface MyOpenGLView : NSOpenGLView <NSTabViewDelegate>{
00017
00018 int colorBits, depthBits;
00019
00020
00021 Volume *volume;
00022
00023
00024 RenderMode renderMode;
00025
00026
00027 NSUInteger texture2DWidth;
00028 NSUInteger texture2DHeight;
00029 ViewAxis2D viewedAxis;
00030 TextureMode textureMode;
00031
00032
00033 GLuint fboTextureFront;
00034 GLuint fboTextureBack;
00035
00036 GLuint fBufferFront;
00037 GLuint fBufferBack;
00038
00039
00040 NSSlider *slider;
00041 NSMatrix *radioBtns;
00042 NSTextField *sliceLabel;
00043 NSUInteger sliceIndex;
00044
00045
00046 NSSlider *rotationX;
00047 NSSlider *rotationY;
00048 NSSlider *rotationZ;
00049
00050
00051 TransferPanel *transferPanel;
00052 TransferFunction *transferFunction;
00053
00054
00055 GLuint texture;
00056 GLuint transferTexture;
00057
00058
00059 GLuint dirtyTextureFront;
00060 GLuint dirtyTextureBack;
00061
00062
00063 GLhandleARB prog;
00064 }
00065
00066
00067
00068
00069 @property (nonatomic, retain) IBOutlet TransferPanel *transferPanel;
00070
00071
00072
00073 @property (nonatomic, retain) IBOutlet NSSlider *slider;
00074
00075
00076
00077 @property (nonatomic, retain) IBOutlet NSMatrix *radioBtns;
00078
00079
00080
00081 @property (nonatomic, retain) IBOutlet NSTextField *sliceLabel;
00082
00083
00084
00085 @property (nonatomic, retain) IBOutlet NSSlider *rotationX;
00086
00087
00088
00089 @property (nonatomic, retain) IBOutlet NSSlider *rotationY;
00090
00091
00092
00093 @property (nonatomic, retain) IBOutlet NSSlider *rotationZ;
00094
00095
00096
00097 @property (nonatomic, retain) Volume *volume;
00098
00099
00100
00101 @property (nonatomic, retain) TransferFunction *transferFunction;
00102
00103
00104
00105 @property (nonatomic) NSUInteger sliceIndex;
00106
00107
00108
00109 @property (nonatomic) ViewAxis2D viewedAxis;
00110
00111
00112
00113
00114 @property (nonatomic) TextureMode textureMode;
00115
00116
00117
00118
00119 @property (nonatomic) NSUInteger texture2DWidth;
00120
00121
00122
00123
00124 @property (nonatomic) NSUInteger texture2DHeight;
00125
00126
00127
00128 @property (nonatomic) RenderMode renderMode;
00129
00137 - (NSOpenGLPixelFormat *)createPixelFormat:(NSRect)frame;
00141 - (void)setSlice;
00146 - (void)drawGLScene;
00151 - (void)setup2DTexture;
00155 - (void)setup3DTexture;
00161 - (void)setupFrameBufferObjects;
00165 - (void)setup3DGLShader;
00169 - (void)setup2DGLShader;
00173 - (void)setup1DTransferTexture;
00177 - (void)drawBoundingBox;
00181 - (IBAction)valueChanged:(id)sender;
00187 - (IBAction)axisChanged:(id)sender;
00193 - (IBAction)openFileChooser:(id)sender;
00199 - (IBAction)renderModeChanged:(id)sender;
00205 - (IBAction)rotationChanged:(id)sender;
00211 - (ViewAxis2D)getSelectedAxis2D;
00215 - (void)update2DTexture;
00219 - (void)render2DScene;
00223 - (void)render3DScene;
00224
00225 @end