#import <MyOpenGLView.h>
Public Member Functions | |
(NSOpenGLPixelFormat *) | - createPixelFormat: |
Creates a new NSOpenGLPixelFormat. | |
(void) | - setSlice |
Change the currently displayed slice. | |
(void) | - drawGLScene |
Draws depending on the current renderMode the scene. | |
(void) | - setup2DTexture |
(void) | - setup3DTexture |
Creates a 3D-texture and binds it to 0. | |
(void) | - setupFrameBufferObjects |
Creates a front and back face texture and binds them to the frame buffer. | |
(void) | - setup3DGLShader |
Creates the vertex and fragment shader for 3D shading. | |
(void) | - setup2DGLShader |
Creates the vertex and fragment shader for 2D shading. | |
(void) | - setup1DTransferTexture |
Creates the transfer texture and binds it to 1. | |
(void) | - drawBoundingBox |
Draw a 3D cube. | |
(IBAction) | - valueChanged: |
IBAction method when the slice slider changes. | |
(IBAction) | - axisChanged: |
IBAction method when a other axis is selected via the radio buttons. | |
(IBAction) | - openFileChooser: |
IBAction method when the "Open" button is clicked and show a dialog to choose a other .dat file. | |
(IBAction) | - renderModeChanged: |
IBAction method when a other render mode (2D-3D) is choosen via the tab bar. | |
(IBAction) | - rotationChanged: |
IBAction method when a rotation slider changes. | |
(ViewAxis2D) | - getSelectedAxis2D |
Maps the axis radio buttons to the ViewAxis2D enumerator. | |
(void) | - update2DTexture |
Update the 2D texture. | |
(void) | - render2DScene |
Renders the 2D scene. | |
(void) | - render3DScene |
Renders the 3D scene. | |
Protected Attributes | |
int | colorBits |
int | depthBits |
GLuint | fboTextureFront |
GLuint | fboTextureBack |
GLuint | fBufferFront |
GLuint | fBufferBack |
NSSlider * | slider |
NSMatrix * | radioBtns |
NSTextField * | sliceLabel |
NSSlider * | rotationX |
NSSlider * | rotationY |
NSSlider * | rotationZ |
TransferPanel * | transferPanel |
GLuint | texture |
GLuint | transferTexture |
GLuint | dirtyTextureFront |
GLuint | dirtyTextureBack |
GLhandleARB | prog |
Properties | |
IBOutlet TransferPanel * | transferPanel |
IBOutlet NSSlider * | slider |
IBOutlet NSMatrix * | radioBtns |
IBOutlet NSTextField * | sliceLabel |
IBOutlet NSSlider * | rotationX |
IBOutlet NSSlider * | rotationY |
IBOutlet NSSlider * | rotationZ |
Volume * | volume |
TransferFunction * | transferFunction |
NSUInteger | sliceIndex |
ViewAxis2D | viewedAxis |
TextureMode | textureMode |
NSUInteger | texture2DWidth |
NSUInteger | texture2DHeight |
RenderMode | renderMode |
- (IBAction) axisChanged: | (id) | sender |
IBAction method when a other axis is selected via the radio buttons.
sender | The invoker of the method. Can be nil. |
- (NSOpenGLPixelFormat *) createPixelFormat: | (NSRect) | frame |
Creates a new NSOpenGLPixelFormat.
frame |
- (void) drawBoundingBox |
Draw a 3D cube.
- (void) drawGLScene |
Draws depending on the current renderMode the scene.
In 3D first the frame buffer objects are rendered and then the scene.
- (ViewAxis2D) getSelectedAxis2D |
Maps the axis radio buttons to the ViewAxis2D enumerator.
- (IBAction) openFileChooser: | (id) | sender |
IBAction method when the "Open" button is clicked and show a dialog to choose a other .dat file.
sender | The invoker of the method. Can be nil. |
- (void) render2DScene |
Renders the 2D scene.
- (void) render3DScene |
Renders the 3D scene.
- (IBAction) renderModeChanged: | (id) | sender |
IBAction method when a other render mode (2D-3D) is choosen via the tab bar.
sender | The invoker of the method. Can be nil. |
- (IBAction) rotationChanged: | (id) | sender |
IBAction method when a rotation slider changes.
sender | The invoker of the method. Can be nil. |
- (void) setSlice |
Change the currently displayed slice.
- (void) setup1DTransferTexture |
Creates the transfer texture and binds it to 1.
- (void) setup2DGLShader |
Creates the vertex and fragment shader for 2D shading.
- (void) setup2DTexture |
- (void) setup3DGLShader |
Creates the vertex and fragment shader for 3D shading.
- (void) setup3DTexture |
Creates a 3D-texture and binds it to 0.
- (void) setupFrameBufferObjects |
Creates a front and back face texture and binds them to the frame buffer.
The front texture is bound to 2. The back texture is bound to 3.
- (void) update2DTexture |
Update the 2D texture.
- (IBAction) valueChanged: | (id) | sender |
IBAction method when the slice slider changes.
- (int) colorBits [protected] |
- (int) depthBits [protected] |
- (GLuint) dirtyTextureBack [protected] |
- (GLuint) dirtyTextureFront [protected] |
- (GLuint) fboTextureBack [protected] |
- (GLuint) fboTextureFront [protected] |
- (GLuint) fBufferBack [protected] |
- (GLuint) fBufferFront [protected] |
- (GLhandleARB) prog [protected] |
- (NSMatrix*) radioBtns [protected] |
- (NSSlider*) rotationX [protected] |
- (NSSlider*) rotationY [protected] |
- (NSSlider*) rotationZ [protected] |
- (NSTextField*) sliceLabel [protected] |
- (NSSlider*) slider [protected] |
- (GLuint) texture [protected] |
- (TransferPanel*) transferPanel [protected] |
- (GLuint) transferTexture [protected] |
- (IBOutlet NSMatrix*) radioBtns [read, write, retain] |
- (RenderMode) renderMode [read, write, assign] |
- (IBOutlet NSSlider*) rotationX [read, write, retain] |
- (IBOutlet NSSlider*) rotationY [read, write, retain] |
- (IBOutlet NSSlider*) rotationZ [read, write, retain] |
- (NSUInteger) sliceIndex [read, write, assign] |
- (IBOutlet NSTextField*) sliceLabel [read, write, retain] |
- (IBOutlet NSSlider*) slider [read, write, retain] |
- (NSUInteger) texture2DHeight [read, write, assign] |
- (NSUInteger) texture2DWidth [read, write, assign] |
- (TextureMode) textureMode [read, write, assign] |
- (TransferFunction *) transferFunction [read, write, retain] |
- (IBOutlet TransferPanel*) transferPanel [read, write, retain] |
- (ViewAxis2D) viewedAxis [read, write, assign] |
- (Volume *) volume [read, write, retain] |