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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
|
#ifndef shaveHairUI_h
#define shaveHairUI_h
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962
#include <maya/MPxSurfaceShapeUI.h>
#ifdef OSMac_MachO_
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
#elif defined LINUX
# include <GL/gl.h>
# include <GL/glu.h>
//# include <GL/glext.h>
# include <GL/glx.h>
#else
# include <GL/gl.h>
# include <GL/glu.h>
#endif
#if MAYA_API_VERSION < 20180000
class M3dView;
class MDrawInfo;
class MDrawRequest;
#endif
#define NEW_DISPLAY
#define NEW_INSTNACE_DISPLAY
#ifndef GL_CLAMP_TO_EDGE
#define GL_CLAMP_TO_EDGE 0x812F
#endif
#ifndef GL_REPEAT
#define GL_REPEAT 0x2901
#endif
#ifndef GL_TEXTURE0
#define GL_TEXTURE0 0x84C0
#endif
/// glsl defines
#ifndef GL_VERTEX_SHADER
#define GL_VERTEX_SHADER 0x8B31
#endif
#ifndef GL_FRAGMENT_SHADER
#define GL_FRAGMENT_SHADER 0x8B30
#endif
#ifndef GL_COMPILE_STATUS
#define GL_COMPILE_STATUS 0x8B81
#endif
#ifndef GL_VALIDATE_STATUS
#define GL_VALIDATE_STATUS 0x8B83
#endif
#ifndef GL_INFO_LOG_LENGTH
#define GL_INFO_LOG_LENGTH 0x8B84
#endif
#ifndef GL_LINK_STATUS
#define GL_LINK_STATUS 0x8B82
#endif
//BFO defines
#ifndef GL_FRAMEBUFFER_EXT
#define GL_FRAMEBUFFER_EXT 0x8D40
#endif
#ifndef GL_RENDERBUFFER_EXT
#define GL_RENDERBUFFER_EXT 0x8D41
#endif
#ifndef GL_COLOR_ATTACHMENT0_EXT
#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
#endif
#ifndef GL_COLOR_ATTACHMENT1_EXT
#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
#endif
#ifndef GL_COLOR_ATTACHMENT2_EXT
#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
#endif
#ifndef GL_COLOR_ATTACHMENT3_EXT
#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
#endif
#ifndef GL_COLOR_ATTACHMENT4_EXT
#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
#endif
#ifndef GL_DEPTH_ATTACHMENT_EXT
#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
#endif
#ifndef GL_STENCIL_ATTACHMENT_EXT
#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
#endif
#ifndef GL_MAX_COLOR_ATTACHMENTS_EXT
#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
#endif
#ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
#endif
#ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
#endif
#ifndef GL_RENDERBUFFER_WIDTH_EXT
#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
#endif
#ifndef GL_RENDERBUFFER_HEIGHT_EXT
#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
#endif
#ifndef GL_RENDERBUFFER_INTERNAL_FORMAT_EXT
#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
#endif
#ifndef GL_FRAMEBUFFER_COMPLETE_EXT
#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
#endif
#ifndef GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
#endif
#ifndef GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
#endif
#ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
#endif
#ifndef GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
#endif
#ifndef GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
#endif
#ifndef GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
#endif
#ifndef GL_FRAMEBUFFER_UNSUPPORTED_EXT
#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
#endif
#ifndef GL_READ_FRAMEBUFFER_EXT
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#endif
#ifndef GL_DRAW_FRAMEBUFFER_EXT
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
#endif
#ifdef NEW_INSTNACE_DISPLAY
#if defined(WIN32) || defined(LINUX)
#ifndef GL_ACTIVE_TEXTURE
typedef void (APIENTRY * PFNGLATCIVETEXTUREPROC) (GLenum texture);
extern PFNGLATCIVETEXTUREPROC glActiveTexture;
#endif
#endif
#if defined WIN32
# define getGlFncPtr(name) wglGetProcAddress((LPCSTR)name)
#elif defined OSMac_
// nothing is defined for osx
// # define getGlFncPtr(name) aglGetProcAddress(name)
#elif defined LINUX
# ifdef GLX_GLXEXT_LEGACY
# define getGlFncPtr(name) (*glXGetProcAddressARB)((const GLubyte*)name)
# else
# define getGlFncPtr(name) (*glXGetProcAddress)((const GLubyte*)name)
# endif
#endif
#endif
///////////////////////////// Profiling //////////////////////////////////////
//#define DO_PROFILE
#ifdef DO_PROFILE
namespace Profile {
class LStrFile;
LStrFile* OpenDiagFile();
LStrFile* GetDiagFile();
void ProfileStart(LStrFile* f);
void ProfileDump(char* msg, LStrFile* f);
void ProfileEnd(LStrFile* f);
}
#endif
/////////////////////////////////////////////////////////////////////////////
bool GLFunctionsInited();
bool InitGLFunctionPointers();
////////////////////////////// GLSL ///////////////////////////////////////////
class glslShader {
public:
virtual ~glslShader(){}
virtual bool LoadShaders() = 0;
virtual void UnLoadShaders() = 0;
virtual bool UseProgram() = 0;
virtual bool UnUseProgram() = 0;
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
| glslGenericProgram - generic glsl shader program |
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
class glslGenericProgram : public glslShader {
public:
glslGenericProgram();
virtual ~glslGenericProgram();
bool IsVadlid() const;
//loads shaders from external files and preparing the stuff for run
bool LoadShaders(char* vShaderFile, char* fShaderFile);
//loads build-in shaders and prepares stuff for run;
bool LoadShaders();
void UnLoadShaders();
bool UseProgram();
bool UnUseProgram();
//misc parameters
bool AddLight();
bool SetLightDir(int idx, float x, float y, float z);
bool SetLightDir(int idx, const MVector& p);
bool SetLightPos(int idx, float x, float y, float z);
bool SetLightPos(int idx, const MVector& p);
int GetNumLigths() const;
const MVector& GetLightDir(int idx) const;
const MVector& GetLightPos(int idx) const;
GLuint GetProgram() const {return program();}
enum _e_parameters
{
eMaxNumLights = 6
};
protected:
bool s_vertexErrDumped;
bool s_fragErrDumped;
bool s_linkErrDumped;
bool s_varErrDumped;
//shader and program generation
enum
{
eVertShader,
eFragShader
};
bool loadShader( GLuint shader, char* fn); //loades shader from external file
bool compileShader(GLuint shader, int vert_or_frag);//vert_or_frags is used to reduce error dumps
bool linkProgram (GLuint glprog);
virtual void loadVertShader(GLuint shader) = 0; //loads internal vert shader
virtual void loadFragShader(GLuint shader) = 0; //loads internal frag shader
//setups
virtual bool setupUniformVariables() = 0;
//const member acces
inline const MVector& lightDir(int i) const {return m_lightDir[i];}
inline int numLights() const {return m_numLights;}
inline const MVector& lightPos(int i) const {return m_lightPos[i];}
inline GLuint vShader() const {return m_vShader;}
inline GLuint fShader() const {return m_fShader;}
inline GLuint program() const {return m_program;}
//member access
inline MVector& _lightDir(int i) {return m_lightDir[i];}
inline int& _numLights() {return m_numLights;}
inline MVector& _lightPos(int i) {return m_lightPos[i];}
inline GLuint& _vShader() {return m_vShader;}
inline GLuint& _fShader() {return m_fShader;}
inline GLuint& _program() {return m_program;}
private:
GLuint m_vShader; //view render shader
GLuint m_fShader; //view render shader
GLuint m_program; //veiw render program
MVector m_lightDir[eMaxNumLights];
int m_numLights;
MVector m_lightPos[eMaxNumLights];
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
| glslHairProgram - default glsl shader program |
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
class glslHairProgram : public glslGenericProgram {
public:
glslHairProgram();
~glslHairProgram();
inline GLint GetTangentLoc() const {return tangentLoc();}
void SetSpecularTint(const MColor& c) {_specTint() = c;}
void SetSpecularTint2(const MColor& c) {_specTint2() = c;}
//void SetUseSpecular2 (bool b) {_useSpec2() = b;}
//bool GetUseSpecular2() {return useSpec2();}
void SetAmbDiff (float f) {_ambdiff() = f;}
float GetAmbDiff() {return ambdiff();}
void SetSpecular (float f) {
_specular() = f;
//printf("specular (glossines) %f\n",f);fflush(stdout);
}
float GetSpecular() {return specular();}
void SetSpecularAmt (float f) {
_specAmt() = f;
//printf("specularAmt %f\n",f);fflush(stdout);
}
float GetSpecularAmt() {return specAmt();}
inline void SetUseSSAO(bool use){_useSSAO() = use;}
inline bool GetUseSSAO() const { return useSSAO(); }
inline void SetViewSize(int w, int h){_viewWidth()=(float)w; _viewHeight()=(float)h;}
inline void SetUseLights(bool use, int num) {_useLights() = use; _numLights() = num;}
protected:
//from glslGenericProgram
void loadVertShader(GLuint shader); //loads internal vert shader
void loadFragShader(GLuint shader); //loads internal frag shader
void loadVertShadowShader(GLuint shader); //loads internal vert shader
void loadFragShadowShader(GLuint shader); //loads internal frag shader
bool setupUniformVariables();
inline const MColor& specTint() const {return m_specTint;}
inline const MColor& specTint2() const {return m_specTint2;}
inline bool useSpec2() const {return m_useSpec2;}
inline float ambdiff() const {return m_ambdiff;}
inline float specular() const {return m_specular;}
inline float specAmt() const {return m_specAmt;}
inline bool useSSAO() const {return m_useSSAO;}
inline float viewWidth() const {return m_viewWidth;}
inline float viewHeight() const {return m_viewHeight;}
inline bool useLights() const {return m_useLights;}
inline int numLights() const {return m_numLights;}
inline GLint tangentLoc() const {return m_tangentLoc;}
inline MColor& _specTint() {return m_specTint;}
inline MColor& _specTint2() {return m_specTint2;}
inline bool& _useSpec2() {return m_useSpec2;}
inline float& _ambdiff() {return m_ambdiff;}
inline float& _specular() {return m_specular;}
inline float& _specAmt() {return m_specAmt;}
inline bool& _useSSAO() {return m_useSSAO;}
inline float& _viewWidth() {return m_viewWidth;}
inline float& _viewHeight(){return m_viewHeight;}
inline bool& _useLights() {return m_useLights;}
inline int& _numLights() {return m_numLights;}
inline GLint& _tangentLoc() {return m_tangentLoc;}
private:
MColor m_specTint;
MColor m_specTint2;
bool m_useSpec2;
float m_ambdiff;
float m_specular;
float m_specAmt;
bool m_useSSAO;
float m_viewWidth;
float m_viewHeight;
bool m_useLights;
int m_numLights;
GLint m_tangentLoc;
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
| glslSSAOdepthShader - SSAO pass 1 |
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
class glslSSAOdepthShader : public glslGenericProgram {
public:
glslSSAOdepthShader(){}
virtual ~glslSSAOdepthShader(){}
void SetFarNear(GLfloat f, GLfloat n){_zfar() = f; _znear() = n;}
protected:
//from glslGenericProgram
//
void loadVertShader(GLuint shader); //loads internal vert shader
void loadFragShader(GLuint shader); //loads internal frag shader
bool setupUniformVariables();
//const member access
inline GLfloat zfar() const {return m_zfar;}
inline GLfloat znear() const {return m_znear;}
//member access
inline GLfloat& _zfar() {return m_zfar;}
inline GLfloat& _znear() {return m_znear;}
private:
GLfloat m_zfar;
GLfloat m_znear;
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
| glslSSAOshader - for ssao pass 2 |
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
class glslSSAOshader : public glslGenericProgram {
public:
glslSSAOshader();
virtual ~glslSSAOshader(){}
void SetRadius (GLfloat r) {_radius() = r;}
void SetSamples(GLint s) {_samples() = s;}
protected:
//from glslGenericProgram
//
void loadVertShader(GLuint shader); //loads internal vert shader
void loadFragShader(GLuint shader); //loads internal frag shader
bool setupUniformVariables();
////const member accesss
inline GLfloat radius() const {return m_radius;}
inline GLint samples()const {return m_samples;}
////member access
inline GLfloat& _radius() {return m_radius;}
inline GLint& _samples(){return m_samples;}
private:
GLfloat m_radius;
GLint m_samples;
};
//////////////////////////// SSAO ////////////////////////////////////////////
class Matrix4 {
public:
float entries[16];
Matrix4(){ LoadIdentity(); }
Matrix4(float e0, float e1, float e2, float e3,
float e4, float e5, float e6, float e7,
float e8, float e9, float e10, float e11,
float e12, float e13, float e14, float e15)
{
entries[0]=e0;
entries[1]=e1;
entries[2]=e2;
entries[3]=e3;
entries[4]=e4;
entries[5]=e5;
entries[6]=e6;
entries[7]=e7;
entries[8]=e8;
entries[9]=e9;
entries[10]=e10;
entries[11]=e11;
entries[12]=e12;
entries[13]=e13;
entries[14]=e14;
entries[15]=e15;
}
Matrix4(const float * rhs)
{
memcpy(entries, rhs, 16*sizeof(float));
}
Matrix4(const Matrix4& rhs)
{
memcpy(entries, rhs.entries, 16*sizeof(float));
}
void LoadIdentity()
{
memset(entries, 0, 16*sizeof(float));
entries[0]=1.0f;
entries[5]=1.0f;
entries[10]=1.0f;
entries[15]=1.0f;
}
void LoadZero()
{
memset(entries, 0, 16*sizeof(float));
}
//cast to pointer to a (float *) for glGetFloatv etc
operator float* () const {return (float*) this;}
operator const float* () const {return (const float*) this;}
};
class ssaoFBO {
public:
ssaoFBO(unsigned int w = 512, unsigned int h = 512);
~ssaoFBO();
void Init();
bool MakeCurrent();
bool ResetCurrent();
bool ActivateTexture(int samplerIdx);
void Destroy();
GLuint GetTexHandle() const { return texid(); }
unsigned int GetWidth() const { return width(); }
unsigned int GetHeight() const { return height(); }
bool IsInitOK() const { return initOK(); }
protected:
//const membe access
inline unsigned int width() const {return m_width;}
inline unsigned int height() const {return m_height;}
inline GLuint texid() const {return m_texid;}
inline GLuint fboid() const {return m_fboid;}
inline GLuint rboid() const {return m_rboid;}
inline const Matrix4& cameraProjectionMatrix()const {return m_cameraProjectionMatrix; }
inline const Matrix4& cameraViewMatrix() const {return m_cameraViewMatrix; }
inline GLint* origView() const {return m_origView;}
inline bool initOK() const {return m_initOK;}
//member access
inline unsigned int& _width() {return m_width;}
inline unsigned int& _height() {return m_height;}
inline GLuint& _texid() {return m_texid;}
inline GLuint& _fboid() {return m_fboid;}
inline GLuint& _rboid() {return m_rboid;}
inline Matrix4& _cameraProjectionMatrix(){return m_cameraProjectionMatrix; }
inline Matrix4& _cameraViewMatrix() {return m_cameraViewMatrix; }
inline GLint*& _origView() {return m_origView;}
inline bool& _initOK() {return m_initOK;}
private:
unsigned int m_width;
unsigned int m_height;
GLuint m_texid;
GLuint m_fboid; //frame buffer object id
GLuint m_rboid; //render buffer object id
GLuint m_depthRB; //render buffer object id
GLuint m_colorRB; //render buffer object id
GLuint m_resolveFB; //render buffer object id
Matrix4 m_cameraProjectionMatrix;
Matrix4 m_cameraViewMatrix;
GLint* m_origView;
bool m_initOK;
};
////////////////////// LEGACY DISPLAY STUFF //////////////////////////////////
extern bool incrementaldraw;
class shaveHairUI : public MPxSurfaceShapeUI
{
public:
enum
{
kDrawNone,
kDrawBBox,
kDrawGuides,
kDrawActiveGuides,
kDrawInactiveGuides,
kDrawHairs,
kDrawActiveShadedHairs,
kDrawInactiveShadedHairs,
kDrawActiveRoots,
kDrawInactiveRoots,
kDrawActiveTips,
kDrawInactiveTips,
kDrawActiveVerts,
kDrawInactiveVerts,
kDrawInstancedWire,
kDrawInstancedShaded,
kDrawInstancedShadedOffset,
//////// incremental update trick ///////
kFirstCacheUpdate,
kNextCacheUpdate
};
static void* creator()
{
InitGlsl();
return new shaveHairUI;
}
static bool InitGlsl();
virtual void draw(const MDrawRequest& request, M3dView& view) const;
virtual void getDrawRequests(
const MDrawInfo& drawInfo,
bool objAndActive,
MDrawRequestQueue& requests
);
virtual bool select(
MSelectInfo &selectInfo,
MSelectionList &selectionList,
MPointArray &worldSpaceSelectPts
) const;
static void setBrushActive(bool isActive);
protected:
//
// Utility Methods
//
void drawBoundingBox() const;
void drawGuides(int drawToken, M3dView& view) const;
void drawHairs(int drawToken, M3dView& view) const;
//ssao passes
void drawSsaoDepth( int drawToken, M3dView& view, const shaveHairShape::DisplayHairCache& cache, const MVector& viewDir) const;
void drawSsao( int drawToken, M3dView& view, const shaveHairShape::DisplayHairCache& cache, const MVector& viewDir ) const ;
#ifdef NEW_INSTNACE_DISPLAY
void drawInstances(int drawToken, M3dView& view) const;
#endif
void drawVerts(int drawToken) const;
bool selectGuides(
MSelectInfo& selectInfo,
MSelectionList& selectionList,
MPointArray& worldSpaceSelectPts
) const;
bool selectObjByGuides(
MSelectInfo& selectInfo,
MSelectionList& selectionList,
MPointArray& worldSpaceSelectPts
) const;
bool selectObjByHairs(
MSelectInfo& selectInfo,
MSelectionList& selectionList,
MPointArray& worldSpaceSelectPts
) const;
bool selectObjByGeom(
MSelectInfo& selectInfo,
MSelectionList& selectionList,
MPointArray& worldSpaceSelectPts
) const;
bool selectVerts(
MString selectMode,
MSelectInfo& selectInfo,
MSelectionList& selectionList,
MPointArray& worldSpaceSelectPts
) const;
void setWireframeColor(
MDrawRequest& request,
M3dView& view,
M3dView::DisplayStatus dStatus
) const;
static bool mBrushIsActive;
};
#endif
|