Public Member Functions | Protected Attributes | Properties

MyOpenGLView Class Reference

#import <MyOpenGLView.h>

List of all members.

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
TransferPaneltransferPanel
GLuint texture
GLuint transferTexture
GLuint dirtyTextureFront
GLuint dirtyTextureBack
GLhandleARB prog

Properties

IBOutlet TransferPaneltransferPanel
IBOutlet NSSlider * slider
IBOutlet NSMatrix * radioBtns
IBOutlet NSTextField * sliceLabel
IBOutlet NSSlider * rotationX
IBOutlet NSSlider * rotationY
IBOutlet NSSlider * rotationZ
Volumevolume
TransferFunctiontransferFunction
NSUInteger sliceIndex
ViewAxis2D viewedAxis
TextureMode textureMode
NSUInteger texture2DWidth
NSUInteger texture2DHeight
RenderMode renderMode

Member Function Documentation

- (IBAction) axisChanged: (id)  sender

IBAction method when a other axis is selected via the radio buttons.

Parameters:
senderThe invoker of the method. Can be nil.
- (NSOpenGLPixelFormat *) createPixelFormat: (NSRect)  frame

Creates a new NSOpenGLPixelFormat.

Parameters:
frame
Returns:
A new NSOpenGLPixelFormat
- (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.

Returns:
The selected axis
- (IBAction) openFileChooser: (id)  sender

IBAction method when the "Open" button is clicked and show a dialog to choose a other .dat file.

Parameters:
senderThe 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.

Parameters:
senderThe invoker of the method. Can be nil.
- (IBAction) rotationChanged: (id)  sender

IBAction method when a rotation slider changes.

Parameters:
senderThe 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
Deprecated:
Creates a 2D-texture
- (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.


Member Data Documentation

- (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]

Property Documentation

- (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]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines