, m_Arcball(
CVect3<
float>(0.0
f, 0.0
f, 0.0
f), 2.0
f)
54, m_CenterPoint(0.0
f, 0.0
f, 0.0
f)
59m_Camera.Init3dDefault();
64wxSize
size=
event.GetSize();
65 inth =
size.GetHeight();
66 intw =
size.GetWidth();
123glTranslatef(0.0f, 0.0f, -40.0f);
128glTranslatef(0.0f, 0.0f,
m_Zoom* 40.0f);
138glRotatef(
m_XRot, 1.0f, 0.0f, 0.0f);
139glRotatef(
m_YRot, 0.0f, 1.0f, 0.0f);
140glRotatef(
m_ZRot, 0.0f, 0.0f, 1.0f);
152wxSize
size= GetClientSize();
153 inth =
size.GetHeight();
154 intw =
size.GetWidth();
156glViewport(0, 0, w, h);
158glClearColor(0.2f, 0.2f, 0.4f, 0);
159glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
162glEnable(GL_DEPTH_TEST);
163glEnable(GL_LIGHTING);
165glEnable(GL_COLOR_MATERIAL);
166glEnable(GL_POLYGON_SMOOTH);
198glColor3f(1.0f, 0.5f, 0.0f);
199glTranslatef(5.0f, 0.0f, 0.0f);
207glColor3f(0.0f, 1.0f, 0.0f);
208glTranslatef(-5.0f, 0.0f, 0.0f);
220glColor3f (1.0f, 0.0f, 0.0f);
221glVertex3f( 1.0f, 0.0f, 0.0f);
222glVertex3f(-1.0f, 0.0f, 0.0f);
224glColor3f (0.0f, 1.0f, 0.0f);
225glVertex3f(0.0f, 1.0f, 0.0f);
226glVertex3f(0.0f, -1.0f, 0.0f);
228glColor3f (0.0f, 0.0f, 1.0f);
229glVertex3f(0.0f, 0.0f, 1.0f);
230glVertex3f(0.0f, 0.0f, -1.0f);
243 if(event.ShiftDown()) {
246 x_Zoom(event.m_x, event.m_y);
247}
else if(event.ControlDown()) {
250 x_Pan(event.m_x, event.m_y);
261 if( !event.ShiftDown() && !event.ControlDown()) {
275 if(event.ControlDown()) {
276 x_Pan(event.m_x, event.m_y);
288 if(event.ShiftDown()) {
289 x_Zoom(event.m_x, event.m_y);
335 m_Zoom+= float(
delta) / float(GetClientSize().GetHeight());
345wxSize
size= GetClientSize();
346 inth =
size.GetHeight();
347 intw =
size.GetWidth();
348glViewport(0, 0, w, h);
354GLdouble modelview[16];
355GLdouble projection[16];
357glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
358glGetDoublev(GL_PROJECTION_MATRIX, projection);
359glGetIntegerv(GL_VIEWPORT, viewport);
366modelview, projection, viewport,
380modelview, projection, viewport,
void x_Rotate(long x, long y)
void OnMouseDown(wxMouseEvent &event)
int m_PrevMouseX
previous mouse position
void x_Pan(long x, long y)
void OnMouseUp(wxMouseEvent &event)
void OnMouseMove(wxMouseEvent &event)
CVect3< float > m_CenterPoint
void OnSize(wxSizeEvent &event)
float m_XRot
we also combine Euler angles with this
void x_Zoom(long x, long y)
class CRgbaColor provides a simple abstraction for managing colors.
int gluProjectX(GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz)
void Resolution(int x, int y)
void SetLayout(EType type)
static void DrawCylinder(const CVect3< float > &from, const CVect3< float > &to, float radius, int rings, int slices)
void Update(int x, int y)
void SetShininess(GLfloat vl)
void SetCutoff(const GLfloat vl)
void MakeCurrent(bool save_matrices=false)
static bool CheckGlError()
Check if there are any OpenGL errors.
bool IsDragging(void) const
void On(void)
light on/off switches
void SetDirection(const TVect vt)
void SetSpecular(const CRgbaColor cl)
void SetAspectRatio(GLdouble f)
void SetPosition(const TVect vt)
int gluUnProjectX(GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz)
void SetDiffuse(const CRgbaColor cl)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
Int4 delta(size_t dimension_, const Int4 *score_)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4