Revision: 56358
http://sourceforge.net/p/brlcad/code/56358
Author: vladbogo
Date: 2013-07-30 20:13:20 +0000 (Tue, 30 Jul 2013)
Log Message:
-----------
Implemented qt_loadMatrix and qt_setWinBounds.
Modified Paths:
--------------
brlcad/trunk/include/dm-qt.h
brlcad/trunk/src/libdm/dm-qt.cpp
Modified: brlcad/trunk/include/dm-qt.h
===================================================================
--- brlcad/trunk/include/dm-qt.h 2013-07-30 19:57:01 UTC (rev 56357)
+++ brlcad/trunk/include/dm-qt.h 2013-07-30 20:13:20 UTC (rev 56358)
@@ -26,6 +26,8 @@
#ifndef __DM_QT__
#define __DM_QT__
+#include "vmath.h"
+
#ifdef DM_QT
# include <QApplication>
# include <QPainter>
@@ -62,6 +64,7 @@
QPixmap *pix;
QPainter *painter;
QFont *font;
+ mat_t qmat;
};
#endif /* DM_QT */
Modified: brlcad/trunk/src/libdm/dm-qt.cpp
===================================================================
--- brlcad/trunk/src/libdm/dm-qt.cpp 2013-07-30 19:57:01 UTC (rev 56357)
+++ brlcad/trunk/src/libdm/dm-qt.cpp 2013-07-30 20:13:20 UTC (rev 56358)
@@ -1,4 +1,4 @@
-/* D M - Q T . C
+/* D M - Q T . C P P
* BRL-CAD
*
* Copyright (c) 2013 United States Government as represented by
@@ -36,7 +36,6 @@
#include "tcl.h"
#include "tk.h"
#include "bu.h"
-#include "vmath.h"
#include "dm.h"
#include "dm_xvars.h"
@@ -111,9 +110,13 @@
HIDDEN int
-qt_loadMatrix(struct dm *UNUSED(dmp), fastf_t *UNUSED(mat), int
UNUSED(which_eye))
+qt_loadMatrix(struct dm *dmp, fastf_t *mat, int UNUSED(which_eye))
{
- bu_log("qt_loadMatrix not implemented\n");
+ struct qt_vars *privars = (struct qt_vars *)dmp->dm_vars.priv_vars;
+
+ MAT_COPY(privars->qmat, mat);
+
+ bu_log("qt_loadMatrix called\n");
return 0;
}
@@ -375,10 +378,17 @@
HIDDEN int
-qt_setWinBounds(struct dm *UNUSED(dmp), fastf_t *UNUSED(w))
+qt_setWinBounds(struct dm *dmp, fastf_t *w)
{
- bu_log("qt_setWinBounds not implemented\n");
- return 0;
+ dmp->dm_clipmin[0] = w[0];
+ dmp->dm_clipmin[1] = w[2];
+ dmp->dm_clipmin[2] = w[4];
+ dmp->dm_clipmax[0] = w[1];
+ dmp->dm_clipmax[1] = w[3];
+ dmp->dm_clipmax[2] = w[5];
+
+ bu_log("qt_setWinBounds called\n");
+ return TCL_OK;
}
@@ -781,6 +791,8 @@
qt_setFGColor(dmp, 1, 0, 0, 0, 0);
qt_setBGColor(dmp, 0, 0, 0);
+ MAT_IDN(privars->qmat);
+
bu_log("qt_open called\n");
return dmp;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits