-
Notifications
You must be signed in to change notification settings - Fork 0
/
FeatureView.h
102 lines (90 loc) · 2.89 KB
/
FeatureView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//
// FeatureView.h
//
// Created by Grogee on 9/24/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <OpenGL/glu.h>
#import "Cluster.h"
#import "GLString.h"
static GLuint vertexBuffer;
static GLuint indexBuffer;
static GLuint colorBuffer;
static GLfloat *vertices;
static GLfloat *use_vertices;
static GLfloat *colors;
static GLfloat *use_colors;
static GLfloat base_color[3];
static GLuint *indices;
static GLfloat pickedPoint[3];
static int nvertices;
static int nindices;
static unsigned int *cids;
int draw_dims[3];
int ndraw_dims;
int rows;
int cols;
static float *minmax;
static float scale;
static float rotatex,rotatey,rotatez;
static float originx,originy,originz;
static void pushVertices();
static void drawBox();
static void modifyVertices(GLfloat *vertex_data);
static void modifyIndices(GLuint *index_data);
static void modifyColors(GLfloat *color_data);
static BOOL dataloaded;
static BOOL picked;
@interface FeatureView : NSView {
NSMutableIndexSet *indexset;
NSMutableData *highlightedPoints;
NSMutableIndexSet *highlightedClusterPoints;
NSMutableData *rotation;
@private
NSOpenGLContext* _oglContext;
NSOpenGLPixelFormat* _pixelFormat;
GLString *glabelX,*glabelY,*glabelZ;
BOOL drawAxesLabels,appendHighlights,showFrame;
Cluster *currentCluster;
NSMutableArray *selectedClusters;
}
@property (retain,readwrite) NSMutableIndexSet *indexset;
@property (retain,readwrite) NSMutableData *highlightedPoints;
@property (retain,readwrite) NSMutableIndexSet *highlightedClusterPoints;
@property (assign,readwrite) BOOL showFrame;
+(NSOpenGLPixelFormat*)defaultPixelFormat;
-(id) initWithFrame:(NSRect)frameRect pixelFormat:(NSOpenGLPixelFormat*)format;
-(void) setOpenGLContext: (NSOpenGLContext*)context;
-(NSOpenGLContext*)openGLContext;
-(void) clearGLContext;
-(void) prepareOpenGL;
-(void) update;
-(void) setPixelFormat:(NSOpenGLPixelFormat*)pixelFormat;
-(NSOpenGLPixelFormat*)pixelFormat;
-(void) _surfaceNeedsUpdate:(NSNotification *)notification;
- (void) loadVertices: (NSURL*)url;
-(void) createVertices: (NSData*)vertex_data withRows: (NSUInteger)r andColumns: (NSUInteger)c ;
-(void) selectDimensions:(NSDictionary*)dims;
-(void) showCluster: (Cluster *)cluster;
-(void) hideCluster: (Cluster *)cluster;
-(void) hideAllClusters;
-(void) showAllClusters;
-(void) setClusterColors: (GLfloat*)cluster_colors forIndices: (GLuint*)cluster_indices length:(NSUInteger)length;
-(void) highlightPoints:(NSDictionary*)params inCluster: (Cluster*)cluster;
-(void) receiveNotification:(NSNotification*)notification;
-(void) rotateY;
-(void) rotateX;
-(void) rotateZ;
-(void) zoomIn;
-(void) zoomOut;
-(void) resetZoom;
-(void) changeZoom;
-(void) drawLabels;
-(void) setDrawLabels: (BOOL)_drawLabels;
-(void) performClusterOption:(id)sender;
-(NSImage*)image;
//-(void) drawBox;
-(NSData*)getVertexData;
//-(void) pushVertices;
@end