| COpenGLDC |
|
| private: |
|
| HWND | m_hWnd; |
| HGLRC | m_hRC; |
| HDC | m_hDC; |
| COLORREF | m_clrBk; |
| COLORREF | m_clr; |
| COLORREF | m_clrHighlight; |
| COLORREF | m_clrMaterial; |
| BOOL | m_bShading; |
| GLfloat | m_vecLight[3]; |
| BOOL | m_bSelectionMode; |
| GLuint | m_selectBuff[BUFFER_LENGTH]; |
| public: |
|
| GCamera | m_Camera; |
|
| |
| public: |
|
|
| COpenGLDC(HWND hWnd); |
| virtual | ~COpenGLDC(); |
| protected: |
|
| void | ClearBkground(); |
| void | OnShading(); |
| public: |
|
| BOOL | InitDC(); |
| void | GLResize(int cx,int cy); |
| void | GLSetupRC(); |
| void | Ready(); |
| void | Finish(); |
| void | Shading(BOOL bShading); |
| BOOL | IsShading(); |
| void | Lighting(BOOL bLighting); |
| BOOL | BOOL IsLighting(); |
| void | SetLightDirection(float dx,float dy,float dz); |
| void | GetLightDirection(float& dx,float& dy,float& dz); |
| void | SetMaterialColor(COLORREF clr); |
| void | GetMaterialColor(COLORREF& clr); |
| void | SetBkColor(COLORREF rgb); |
| void | GetBkColor(COLORREF& rgb); |
| void | SetColor(COLORREF rgb); |
| void | GetColor(COLORREF& rgb); |
| void | SetHighlightColor(COLORREF clr); |
| void | GetHighlightColor(COLORREF& clr); |
| void | Highlight(BOOL bLight = TRUE); |
| void | DrawPoint(const CPoint3D&); |
| void | DrawCoord(); |
| void | DrawLine(const CPoint3D& sp,const CPoint3D& ep); |
| void | DrawPolyline(const CPoint3D* pt,int size); |
| void | DrawBezierCurve(const CPoint3D* pt,int size); |
| void | DrawBezierSurface(const CPoint3D* pt,int uSize,int vSize); |
| void | DrawNurbsCurve(const CPoint3D* pts,int size,int order,float* knots = NULL); |
| void | DrawNurbsSurface(const CPoint3D* pts,int uSize,int vSize,int uOrder,int vOrder, |
| void | DrawTriChip(double n0,double n1,double n2,double v00,double v01,double v02,double v10,double v11,double v12,double v20,double v21,double v22); |
| void | DrawSphere(const CPoint3D& cen,double r,const CVector3D& vec); |
| void | DrawCylinder(const CPoint3D& cen,double r,const CVector3D& h); |
| void | DrawCone(const CPoint3D& cen,double r,const CVector3D& h); |
| void | DrawTorus(const CPoint3D& cen,const CVector3D& ax,double r_in,double r_out); |
| void | BeginSelection(int xPos,int yPos); |
| int | EndSelection(UINT* items); |
| BOOL | IsSelectionMode(); |
| void | InitNames(); |
| void | LoadName(UINT name); |
| void | PushName(UINT name); |
| void | PopName(); |