aboutsummaryrefslogtreecommitdiff
path: root/cvs/cvsweb.cgi/code/client/Attic/move_listener.h?rev=1.1&content-type=text
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /cvs/cvsweb.cgi/code/client/Attic/move_listener.h?rev=1.1&content-type=text
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'cvs/cvsweb.cgi/code/client/Attic/move_listener.h?rev=1.1&content-type=text')
-rw-r--r--cvs/cvsweb.cgi/code/client/Attic/move_listener.h?rev=1.1&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html166
1 files changed, 166 insertions, 0 deletions
diff --git a/cvs/cvsweb.cgi/code/client/Attic/move_listener.h?rev=1.1&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html b/cvs/cvsweb.cgi/code/client/Attic/move_listener.h?rev=1.1&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html
new file mode 100644
index 00000000..4306982f
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/client/Attic/move_listener.h?rev=1.1&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/client/move_listener.h - view - 1.1</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="move_listener.h?hideattic=0&amp;sortby=date"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="move_listener.h?hideattic=0&amp;sortby=date">move_listener.h</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?hideattic=0&amp;sortby=date">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?hideattic=0&amp;sortby=date">code</a> / <a href="/cvs/cvsweb.cgi/code/client/?hideattic=0&amp;sortby=date">client</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?hideattic=0&amp;sortby=date">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?hideattic=0&amp;sortby=date">code</a> / <a href="/cvs/cvsweb.cgi/code/client/?hideattic=0&amp;sortby=date">client</a> / <a href="/cvs/cvsweb.cgi/code/client/Attic/?hideattic=0&amp;sortby=date">Attic</a> / <a href="/cvs/cvsweb.cgi/code/client/Attic/move_listener.h?hideattic=0&amp;sortby=date">move_listener.h</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/client/Attic/move_listener.h?rev=1.1&amp;hideattic=0&amp;sortby=date" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/client/Attic/move_listener.h?rev=1.1','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.1</B>, <i>Mon Dec 4 10:56:01 2000 UTC</i> (19 months, 3 weeks ago) by <i>coutelas</i>
+<BR>Branch: <b>MAIN</b>
+<PRE>
+no message
+</PRE>
+</td></tr></table><HR noshade><PRE>/** \file move_listener.h
+ * &lt;File description&gt;
+ *
+ * $Id: move_listener.h,v 1.1 2000/12/04 10:56:01 coutelas Exp $
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NEL.
+ * NEVRAX NEL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+
+ * NEVRAX NEL is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NEL; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#ifndef NL_MOVE_LISTENER_H
+#define NL_MOVE_LISTENER_H
+
+#include &quot;nel/misc/types_nl.h&quot;
+#include &quot;nel/misc/event_listener.h&quot;
+#include &quot;nel/misc/matrix.h&quot;
+#include &quot;nel/3d/viewport.h&quot;
+
+
+namespace NL3D
+{
+
+
+/**
+ * CMoveListener is a listener that handle a 3d matrix with mouse events.
+ * \author Stephane Coutelas
+ * \author Nevrax France
+ * \date 2000
+ */
+class CMoveListener : public NLMISC::IEventListener
+{
+public:
+ &nbsp; &nbsp; &nbsp; &nbsp;
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Constructor.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* You should call setViewMatrix + setFrustrum or setCamera, setViewport, setHotStop and setMouseMode to initialize
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* the whole object. By default, the viewmatrix is identity, the frustrum is (1,1,1,1,1), the hot spot is (0,0,0)
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* and the viewport is fullscreen. The mouse mode is set to the NelStyle.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;CMoveListener();
+
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Set the current view matrix to use.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param matrix is the matrix to set.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \see setWithCamera() getViewMatrix()
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;void setViewMatrix (const NLMISC::CMatrix&amp; matrix)
+ &nbsp; &nbsp; &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_ViewMatrix=matrix;
+ &nbsp; &nbsp; &nbsp; &nbsp;}
+
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Set the current frustrum to use.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param left is the left border of the frustrum.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param right is the right border of the frustrum.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param top is the top border of the frustrum.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param bottom is the bottom border of the frustrum.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param depth is the depth coordinate left, right, top and bottom values.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \see setWithCamera()
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;void setFrustrum (float left, float right, float bottom, float top, float depth)
+ &nbsp; &nbsp; &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_Left=left;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_Right=right;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_Bottom=bottom;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_Top=top;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_Depth=depth;
+ &nbsp; &nbsp; &nbsp; &nbsp;}
+
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Set the view matrix and the frustrum with a camera.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param camera is the camera use to copy view matrix and frustrum.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \see setViewMatrix() setFrustrum()
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;void setWithCamera &nbsp;(const class CCamera&amp; camera);
+
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Set the viewport in use in the window. By default, the viewport is fullwindow.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \param viewport is the viewport to use. All events outside the viewport are ignored.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;void setViewport (const NL3D::CViewport&amp; viewport)
+ &nbsp; &nbsp; &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_Viewport=viewport;
+ &nbsp; &nbsp; &nbsp; &nbsp;}
+
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Get the current view matrix. This matrix is updated with mouse events.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \return The current view matrix.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* \see setViewMatrix()
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;const NLMISC::CMatrix&amp; getViewMatrix () const
+ &nbsp; &nbsp; &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return _ViewMatrix;
+ &nbsp; &nbsp; &nbsp; &nbsp;}
+
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Register the listener to the server.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;void addToServer (NLMISC::CEventServer&amp; server);
+
+ &nbsp; &nbsp; &nbsp; &nbsp;/**
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Unregister the listener to the server.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/
+ &nbsp; &nbsp; &nbsp; &nbsp;void removeFromServer (NLMISC::CEventServer&amp; server);
+
+private:
+ &nbsp; &nbsp; &nbsp; &nbsp;/// Internal use
+ &nbsp; &nbsp; &nbsp; &nbsp;virtual void operator ()(const NLMISC::CEvent&amp; event);
+
+ &nbsp; &nbsp; &nbsp; &nbsp;NLMISC::CMatrix &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_ViewMatrix;
+ &nbsp; &nbsp; &nbsp; &nbsp;NL3D::CViewport &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_Viewport;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _Top;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _Bottom;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _Left;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _Right;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _Depth;
+ &nbsp; &nbsp; &nbsp; &nbsp;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _X;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _Y;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _Z;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _RotZ;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _RotX;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _MouseX;
+ &nbsp; &nbsp; &nbsp; &nbsp;float _MouseY;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;static const float _StepTransX;
+ &nbsp; &nbsp; &nbsp; &nbsp;static const float _StepTransY;
+ &nbsp; &nbsp; &nbsp; &nbsp;static const float _StepTransZ;
+ &nbsp; &nbsp; &nbsp; &nbsp;static const float _StepRotZ;
+ &nbsp; &nbsp; &nbsp; &nbsp;static const float _StepRotX;
+
+}; // NL3D
+
+}
+
+#endif // NL_MOVE_LISTENER_H
+
+/* End of move_listener.h */
+</PRE> \ No newline at end of file