Revision: 51712
http://brlcad.svn.sourceforge.net/brlcad/?rev=51712&view=rev
Author: starseeker
Date: 2012-07-30 12:12:05 +0000 (Mon, 30 Jul 2012)
Log Message:
-----------
Revert r51707 - the OpenGL type in dm_util.c is causing problems.
Revision Links:
--------------
http://brlcad.svn.sourceforge.net/brlcad/?rev=51707&view=rev
Modified Paths:
--------------
brlcad/trunk/src/libdm/CMakeLists.txt
brlcad/trunk/src/libdm/Makefile.am
brlcad/trunk/src/libdm/dm-X.c
brlcad/trunk/src/libdm/dm-ogl.c
brlcad/trunk/src/libdm/dm-plot.c
brlcad/trunk/src/libdm/dm-ps.c
brlcad/trunk/src/libdm/dm-rtgl.c
brlcad/trunk/src/libdm/dm-wgl.c
Removed Paths:
-------------
brlcad/trunk/src/libdm/dm_util.c
brlcad/trunk/src/libdm/dm_util.h
Modified: brlcad/trunk/src/libdm/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/libdm/CMakeLists.txt 2012-07-30 12:06:06 UTC (rev
51711)
+++ brlcad/trunk/src/libdm/CMakeLists.txt 2012-07-30 12:12:05 UTC (rev
51712)
@@ -72,7 +72,6 @@
dm-plot.c
dm-ps.c
dm_obj.c
- dm_util.c
focus.c
grid.c
knob.c
@@ -100,7 +99,6 @@
TODO
)
CMAKEFILES(${libdm_ignore_files})
-CMAKEFILES(dm_util.h)
CMAKEFILES(Makefile.am)
# Local Variables:
Modified: brlcad/trunk/src/libdm/Makefile.am
===================================================================
--- brlcad/trunk/src/libdm/Makefile.am 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/Makefile.am 2012-07-30 12:12:05 UTC (rev 51712)
@@ -51,7 +51,6 @@
dm-ps.c \
dm-wgl.c \
dm_obj.c \
- dm_util.c \
focus.c \
grid.c \
knob.c \
@@ -85,7 +84,6 @@
EXTRA_DIST = \
TODO \
- dm_util.h \
CMakeLists.txt
DEPENDS = src/librt src/libfb src/libged
Modified: brlcad/trunk/src/libdm/dm-X.c
===================================================================
--- brlcad/trunk/src/libdm/dm-X.c 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm-X.c 2012-07-30 12:12:05 UTC (rev 51712)
@@ -62,7 +62,6 @@
#include "dm_xvars.h"
#include "solid.h"
-#include "./dm_util.h"
#define PLOTBOUND 1000.0 /* Max magnification in Rot matrix */
@@ -1206,7 +1205,14 @@
HIDDEN int
X_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
- return draw_Line3D(dmp, pt1, pt2);
+ if (!dmp)
+ return TCL_ERROR;
+
+ if (bn_pt3_pt3_equal(pt1, pt2, NULL)) {
+ /* nothing to do for a singular point */
+ return TCL_OK;
+ }
+ return TCL_OK;
}
Modified: brlcad/trunk/src/libdm/dm-ogl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-ogl.c 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm-ogl.c 2012-07-30 12:12:05 UTC (rev 51712)
@@ -79,7 +79,6 @@
#include "dm_xvars.h"
#include "solid.h"
-#include "./dm_util.h"
#define VIEWFACTOR (1.0/(*dmp->dm_vp))
#define VIEWSIZE (2.0*(*dmp->dm_vp))
@@ -1771,7 +1770,32 @@
HIDDEN int
ogl_drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, fastf_t Y2)
{
- return drawLine2D(dmp, X1, Y1, X2, Y2, "ogl_drawLine2D()\n");
+ if (dmp->dm_debugLevel)
+ bu_log("ogl_drawLine2D()\n");
+
+ if (dmp->dm_debugLevel) {
+ GLfloat pmat[16];
+
+ glGetFloatv(GL_PROJECTION_MATRIX, pmat);
+ bu_log("projection matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
+ bu_log("modelview matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ }
+
+ glBegin(GL_LINES);
+ glVertex2f(X1, Y1);
+ glVertex2f(X2, Y2);
+ glEnd();
+
+ return TCL_OK;
}
@@ -1782,7 +1806,44 @@
HIDDEN int
ogl_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
- return drawLine3D(dmp, pt1, pt2, "ogl_drawLine3D()\n", wireColor);
+ static float black[4] = {0.0, 0.0, 0.0, 0.0};
+
+ if (dmp->dm_debugLevel)
+ bu_log("ogl_drawLine3D()\n");
+
+ if (dmp->dm_debugLevel) {
+ GLfloat pmat[16];
+
+ glGetFloatv(GL_PROJECTION_MATRIX, pmat);
+ bu_log("projection matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
+ bu_log("modelview matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ }
+
+ if (dmp->dm_light) {
+ glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, wireColor);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, black);
+
+ if (dmp->dm_transparency)
+ glDisable(GL_BLEND);
+ }
+
+ glBegin(GL_LINES);
+ glVertex3dv(pt1);
+ glVertex3dv(pt2);
+ glEnd();
+
+ return TCL_OK;
}
@@ -1793,7 +1854,53 @@
HIDDEN int
ogl_drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag)
{
- return drawLines3D(dmp, npoints, points, sflag, "ogl_drawLine3D()\n",
wireColor);
+ int i;
+ static float black[4] = {0.0, 0.0, 0.0, 0.0};
+
+ if (dmp->dm_debugLevel)
+ bu_log("ogl_drawLine3D()\n");
+
+ if (dmp->dm_debugLevel) {
+ GLfloat pmat[16];
+
+ glGetFloatv(GL_PROJECTION_MATRIX, pmat);
+ bu_log("projection matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
+ bu_log("modelview matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ }
+
+ if (npoints < 2 || (!sflag && npoints%2))
+ return TCL_OK;
+
+ if (dmp->dm_light) {
+ glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, wireColor);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, black);
+
+ if (dmp->dm_transparency)
+ glDisable(GL_BLEND);
+ }
+
+ if (sflag)
+ glBegin(GL_LINE_STRIP);
+ else
+ glBegin(GL_LINES);
+
+ for (i = 0; i < npoints; ++i)
+ glVertex3dv(points[i]);
+
+ glEnd();
+
+ return TCL_OK;
}
Modified: brlcad/trunk/src/libdm/dm-plot.c
===================================================================
--- brlcad/trunk/src/libdm/dm-plot.c 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm-plot.c 2012-07-30 12:12:05 UTC (rev 51712)
@@ -51,8 +51,6 @@
#include "solid.h"
#include "plot3.h"
-#include "./dm_util.h"
-
/* Display Manager package interface */
#define PLOTBOUND 1000.0 /* Max magnification in Rot matrix */
@@ -400,7 +398,15 @@
HIDDEN int
plot_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
- return draw_Line3D(dmp, pt1, pt2);
+ if (!dmp)
+ return TCL_ERROR;
+
+ if (bn_pt3_pt3_equal(pt1, pt2, NULL)) {
+ /* nothing to do for a singular point */
+ return TCL_OK;
+ }
+
+ return TCL_OK;
}
Modified: brlcad/trunk/src/libdm/dm-ps.c
===================================================================
--- brlcad/trunk/src/libdm/dm-ps.c 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm-ps.c 2012-07-30 12:12:05 UTC (rev 51712)
@@ -48,8 +48,6 @@
#include "dm-ps.h"
#include "solid.h"
-#include "./dm_util.h"
-
#define EPSILON 0.0001
/* Display Manager package interface */
@@ -412,7 +410,15 @@
HIDDEN int
ps_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
- return draw_Line3D(dmp, pt1, pt2);
+ if (!dmp)
+ return TCL_ERROR;
+
+ if (bn_pt3_pt3_equal(pt1, pt2, NULL)) {
+ /* nothing to do for a singular point */
+ return TCL_OK;
+ }
+
+ return TCL_OK;
}
Modified: brlcad/trunk/src/libdm/dm-rtgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-rtgl.c 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm-rtgl.c 2012-07-30 12:12:05 UTC (rev 51712)
@@ -59,8 +59,6 @@
#include "dm_xvars.h"
#include "solid.h"
-#include "./dm_util.h"
-
#define VIEWFACTOR (1.0/(*dmp->dm_vp))
#define VIEWSIZE (2.0*(*dmp->dm_vp))
@@ -2040,7 +2038,32 @@
rtgl_drawLine2D(struct dm *dmp, fastf_t x1, fastf_t y1, fastf_t x2, fastf_t y2)
{
- return drawLine2D(dmp, X1, Y1, X2, Y2, "rtgl_drawLine2D()\n");
+ if (dmp->dm_debugLevel)
+ bu_log("rtgl_drawLine2D()\n");
+
+ if (dmp->dm_debugLevel) {
+ GLfloat pmat[16];
+
+ glGetFloatv(GL_PROJECTION_MATRIX, pmat);
+ bu_log("projection matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
+ bu_log("modelview matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ }
+
+ glBegin(GL_LINES);
+ glVertex2f(x1, y1);
+ glVertex2f(x2, y2);
+ glEnd();
+
+ return TCL_OK;
}
Modified: brlcad/trunk/src/libdm/dm-wgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-wgl.c 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm-wgl.c 2012-07-30 12:12:05 UTC (rev 51712)
@@ -47,8 +47,6 @@
#include "dm_xvars.h"
#include "solid.h"
-#include "./dm_util.h"
-
#define VIEWFACTOR (1.0/(*dmp->dm_vp))
#define VIEWSIZE (2.0*(*dmp->dm_vp))
@@ -1348,7 +1346,44 @@
HIDDEN int
wgl_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
- return drawLine3D(dmp, pt1, pt2, "wgl_drawLine3D()\n", wireColor);
+ static float black[4] = {0.0, 0.0, 0.0, 0.0};
+
+ if (dmp->dm_debugLevel)
+ bu_log("wgl_drawLine3D()\n");
+
+ if (dmp->dm_debugLevel) {
+ GLfloat pmat[16];
+
+ glGetFloatv(GL_PROJECTION_MATRIX, pmat);
+ bu_log("projection matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
+ bu_log("modelview matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ }
+
+ if (dmp->dm_light) {
+ glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, wireColor);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, black);
+
+ if (dmp->dm_transparency)
+ glDisable(GL_BLEND);
+ }
+
+ glBegin(GL_LINES);
+ glVertex3dv(pt1);
+ glVertex3dv(pt2);
+ glEnd();
+
+ return TCL_OK;
}
@@ -1359,7 +1394,53 @@
HIDDEN int
wgl_drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag)
{
- return drawLines3D(dmp, npoints, points, sflag, "wgl_drawLine3D()\n",
wireColor);
+ register int i;
+ static float black[4] = {0.0, 0.0, 0.0, 0.0};
+
+ if (dmp->dm_debugLevel)
+ bu_log("wgl_drawLine3D()\n");
+
+ if (dmp->dm_debugLevel) {
+ GLfloat pmat[16];
+
+ glGetFloatv(GL_PROJECTION_MATRIX, pmat);
+ bu_log("projection matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
+ bu_log("modelview matrix:\n");
+ bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
+ bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
+ bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
+ bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
+ }
+
+ if (npoints < 2 || (!sflag && npoints%2))
+ return TCL_OK;
+
+ if (dmp->dm_light) {
+ glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, wireColor);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, black);
+
+ if (dmp->dm_transparency)
+ glDisable(GL_BLEND);
+ }
+
+ if (sflag)
+ glBegin(GL_LINE_STRIP);
+ else
+ glBegin(GL_LINES);
+
+ for (i = 0; i < npoints; ++i)
+ glVertex3dv(points[i]);
+
+ glEnd();
+
+ return TCL_OK;
}
Deleted: brlcad/trunk/src/libdm/dm_util.c
===================================================================
--- brlcad/trunk/src/libdm/dm_util.c 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm_util.c 2012-07-30 12:12:05 UTC (rev 51712)
@@ -1,178 +0,0 @@
-/* D M _ U T I L . C
- * BRL-CAD
- *
- * Copyright (c) 1988-2012 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-/** @file libdm/dm_util.c
- */
-
-#include "bu.h"
-#include "bn.h"
-#include "dm.h"
-
-#include "./dm_util.h"
-
-int
-drawLine3D(struct dm *dmp, point_t pt1, point_t pt2, char *log_bu, float
*wireColor)
-{
- static float black[4] = {0.0, 0.0, 0.0, 0.0};
-
- if (dmp->dm_debugLevel)
- bu_log(log_bu);
-
- if (dmp->dm_debugLevel) {
- GLfloat pmat[16];
-
- glGetFloatv(GL_PROJECTION_MATRIX, pmat);
- bu_log("projection matrix:\n");
- bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
- bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
- bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
- bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
- glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
- bu_log("modelview matrix:\n");
- bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
- bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
- bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
- bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
- }
-
- if (dmp->dm_light) {
- glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, wireColor);
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, black);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, black);
-
- if (dmp->dm_transparency)
- glDisable(GL_BLEND);
- }
-
- glBegin(GL_LINES);
- glVertex3dv(pt1);
- glVertex3dv(pt2);
- glEnd();
-
- return TCL_OK;
-}
-
-int
-drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag, char
*log_bu, float *wireColor)
-{
- register int i;
- static float black[4] = {0.0, 0.0, 0.0, 0.0};
-
- if (dmp->dm_debugLevel)
- bu_log(log_bu);
-
- if (dmp->dm_debugLevel) {
- GLfloat pmat[16];
-
- glGetFloatv(GL_PROJECTION_MATRIX, pmat);
- bu_log("projection matrix:\n");
- bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
- bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
- bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
- bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
- glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
- bu_log("modelview matrix:\n");
- bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
- bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
- bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
- bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
- }
-
- if (npoints < 2 || (!sflag && npoints%2))
- return TCL_OK;
-
- if (dmp->dm_light) {
- glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, wireColor);
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, black);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, black);
-
- if (dmp->dm_transparency)
- glDisable(GL_BLEND);
- }
-
- if (sflag)
- glBegin(GL_LINE_STRIP);
- else
- glBegin(GL_LINES);
-
- for (i = 0; i < npoints; ++i)
- glVertex3dv(points[i]);
-
- glEnd();
-
- return TCL_OK;
-}
-
-int
-drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, fastf_t Y2,
char *log_bu)
-{
- if (dmp->dm_debugLevel)
- bu_log(log_bu);
-
- if (dmp->dm_debugLevel) {
- GLfloat pmat[16];
-
- glGetFloatv(GL_PROJECTION_MATRIX, pmat);
- bu_log("projection matrix:\n");
- bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
- bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
- bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
- bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
- glGetFloatv(GL_MODELVIEW_MATRIX, pmat);
- bu_log("modelview matrix:\n");
- bu_log("%g %g %g %g\n", pmat[0], pmat[4], pmat[8], pmat[12]);
- bu_log("%g %g %g %g\n", pmat[1], pmat[5], pmat[9], pmat[13]);
- bu_log("%g %g %g %g\n", pmat[2], pmat[6], pmat[10], pmat[14]);
- bu_log("%g %g %g %g\n", pmat[3], pmat[7], pmat[11], pmat[15]);
- }
-
- glBegin(GL_LINES);
- glVertex2f(X1, Y1);
- glVertex2f(X2, Y2);
- glEnd();
-
- return TCL_OK;
-}
-
-
-inline int
-draw_Line3D(struct dm *dmp, point_t pt1, point_t pt2)
-{
- if (!dmp)
- return TCL_ERROR;
-
- if (bn_pt3_pt3_equal(pt1, pt2, NULL)) {
- /* nothing to do for a singular point */
- return TCL_OK;
- }
-
- return TCL_OK;
-}
-
-/*
- * Local Variables:
- * mode: C
- * tab-width: 8
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
Deleted: brlcad/trunk/src/libdm/dm_util.h
===================================================================
--- brlcad/trunk/src/libdm/dm_util.h 2012-07-30 12:06:06 UTC (rev 51711)
+++ brlcad/trunk/src/libdm/dm_util.h 2012-07-30 12:12:05 UTC (rev 51712)
@@ -1,47 +0,0 @@
-/* D M _ U T I L . H
- * BRL-CAD
- *
- * Copyright (c) 1988-2012 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-/** @file libdm/dm_util.h
- */
-
-#include "vmath.h"
-#include "dm.h"
-
-
-int
-drawLine3D(struct dm *dmp, point_t pt1, point_t pt2, char *log_bu, float
*wireColor);
-
-int
-drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag, char
*log_bu, float *wireColor);
-
-int
-drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, fastf_t Y2,
char *log_bu);
-
-int
-draw_Line3D(struct dm *dmp, point_t pt1, point_t pt2);
-
-/*
- * Local Variables:
- * mode: C
- * tab-width: 8
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits