You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(144) |
Jul
(5) |
Aug
(23) |
Sep
(3) |
Oct
(8) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(34) |
Apr
(1) |
May
(10) |
Jun
(12) |
Jul
(17) |
Aug
(28) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(3) |
2011 |
Jan
(4) |
Feb
(7) |
Mar
(5) |
Apr
(1) |
May
|
Jun
(15) |
Jul
(1) |
Aug
(7) |
Sep
(9) |
Oct
(3) |
Nov
|
Dec
(1) |
2012 |
Jan
(1) |
Feb
(13) |
Mar
(6) |
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(9) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <wol...@us...> - 2009-06-23 14:26:18
|
Revision: 131 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=131&view=rev Author: wolfspindler Date: 2009-06-23 14:25:33 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Moved open gl includes outside WIN32 section to make it be used on Linux, too. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h 2009-06-23 14:22:03 UTC (rev 130) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h 2009-06-23 14:25:33 UTC (rev 131) @@ -23,6 +23,9 @@ #ifndef __UMDSO_MEASUREMENT_INIT__ #define __UMDSO_MEASUREMENT_INIT__ +#include <GL/glew.h> +#include <mlOpenGL.h> + #ifdef WIN32 //Unterdr"uckt die Warnung warning C4275: class 'SoCoordinate4' ist keine DLL-Schnittstelle @@ -55,9 +58,6 @@ #pragma warning( push, 3 ) -#include <GL/glew.h> -#include <mlOpenGL.h> - #include <XVEnterScope.h> #include "XVInventorWrapper.h" #include "XVBasics.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 14:22:19
|
Revision: 130 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=130&view=rev Author: wolfspindler Date: 2009-06-23 14:22:03 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Trial to make default usage platform independent. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/ScriptCommands/cmdStandard.cpp Property Changed: ---------------- trunk/UMD/METK/Sources/ML/Animation/ Property changes on: trunk/UMD/METK/Sources/ML/Animation ___________________________________________________________________ Added: svn:ignore + Animation.sln Animation.suo Animation.vcproj Animation.vcproj.lapsus-win.wolf.user Modified: trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/ScriptCommands/cmdStandard.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/ScriptCommands/cmdStandard.cpp 2009-06-23 14:16:41 UTC (rev 129) +++ trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/ScriptCommands/cmdStandard.cpp 2009-06-23 14:22:03 UTC (rev 130) @@ -2,10 +2,12 @@ ML_START_NAMESPACE +// Introduce a constant to avoid implicit constructor call in comparison which is not allowed under some circumstances in ISO c++. +omIDType defaultOMID = omID_DEFAULT; void AnimationExecuter::commandLayer(vector<string>* tempEntryParams, kScriptFrameEntry* currentEntry/*, int frameNr, size_t FrameEntryListIter*/) { - if (currentEntry->getObjectID() != omID_DEFAULT && currentEntry->getObjectID()!="") + if ((currentEntry->getObjectID() != defaultOMID) && (currentEntry->getObjectID()!="")) { if (currentEntry->getParamType() == kScriptFrameEntry::PARAMT_FLOAT) //INT wird als Float behandelt ... setDoubleValueInterpol(currentEntry->getObjectID(),currentEntry->getLayerID(),currentEntry->getInfoID(),(*tempEntryParams)[0],currentEntry->getCurrentFrame(), currentEntry->getFrameCount()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 14:16:56
|
Revision: 129 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=129&view=rev Author: wolfspindler Date: 2009-06-23 14:16:41 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -For platform independence glew must be included before gl.h in mlOpenGL. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h 2009-06-23 14:05:47 UTC (rev 128) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h 2009-06-23 14:16:41 UTC (rev 129) @@ -55,6 +55,7 @@ #pragma warning( push, 3 ) +#include <GL/glew.h> #include <mlOpenGL.h> #include <XVEnterScope.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 14:06:09
|
Revision: 128 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=128&view=rev Author: wolfspindler Date: 2009-06-23 14:05:47 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Made snprintf independent of ML. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp Modified: trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 13:42:18 UTC (rev 127) +++ trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 14:05:47 UTC (rev 128) @@ -9,9 +9,16 @@ */ //---------------------------------------------------------------------------------- + +// For snprintf make the typical windows compatibility stuff... +#include <stdio.h> +#ifdef WIN32 + #define snprintf _snprintf +#endif + + // Local includes #include "SoPickInfo.h" -#include <mlUtils.h> // for itoa // Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid // collisions between OpenInventor and Windows headers. @@ -114,13 +121,13 @@ std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoPointDetail</td> </tr> "); char iA[100]; // buffer large enough even for 64 bit integers - MLsnprintf(iA, 99, "%I64ld", pointDetail->getCoordinateIndex()); + snprintf(iA, 99, "%d", pointDetail->getCoordinateIndex()); details += "<tr> <td>Coordinate Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", pointDetail->getMaterialIndex()); + snprintf(iA, 99, "%d", pointDetail->getMaterialIndex()); details += "<tr> <td>Material Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", pointDetail->getNormalIndex()); + snprintf(iA, 99, "%d", pointDetail->getNormalIndex()); details += "<tr> <td>Normal Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", pointDetail->getTextureCoordIndex()); + snprintf(iA, 99, "%d", pointDetail->getTextureCoordIndex()); details += "<tr> <td>Texture Coordinate Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -135,13 +142,13 @@ std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoLineDetail</td> </tr> "); char iA[100]; // buffer large enough for 64 bit int strings - MLsnprintf(iA, 99, "%I64ld", lineDetail->getPoint0()->getCoordinateIndex()); + snprintf(iA, 99, "%d", lineDetail->getPoint0()->getCoordinateIndex()); details += "<tr> <td>Point0 Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", lineDetail->getPoint1()->getCoordinateIndex(), iA, 10); + snprintf(iA, 99, "%d", lineDetail->getPoint1()->getCoordinateIndex(), iA, 10); details += "<tr> <td>Point1 Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", lineDetail->getLineIndex()); + snprintf(iA, 99, "%d", lineDetail->getLineIndex()); details += "<tr> <td>Line Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", lineDetail->getPartIndex()); + snprintf(iA, 99, "%d", lineDetail->getPartIndex()); details += "<tr> <td>Part Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -158,14 +165,14 @@ for (int i = 0; i < faceDetail->getNumPoints(); i++) { - MLsnprintf(iA, 99, "%I64ld", i); + snprintf(iA, 99, "%d", i); details += "<tr> <td>Point " + std::string(iA); - MLsnprintf(iA, 99, "%I64ld", faceDetail->getPoint(i)->getCoordinateIndex()); + snprintf(iA, 99, "%d", faceDetail->getPoint(i)->getCoordinateIndex()); details += " Index</td> <td>" + std::string(iA) + "</td> </tr> "; } - MLsnprintf(iA, 99, "%I64ld", faceDetail->getFaceIndex()); + snprintf(iA, 99, "%d", faceDetail->getFaceIndex()); details += "<tr> <td>Face Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", faceDetail->getPartIndex()); + snprintf(iA, 99, "%d", faceDetail->getPartIndex()); details += "<tr> <td>Part Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -180,9 +187,9 @@ std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoTextDetail</td> </tr> "); char iA[100]; // buffer large enough for 64 bit int strings - MLsnprintf(iA, 99, "%I64ld", textDetail->getStringIndex()); + snprintf(iA, 99, "%d", textDetail->getStringIndex()); details += "<tr> <td>String Index</td> <td>" + std::string(iA) + "</td> </tr> "; - MLsnprintf(iA, 99, "%I64ld", textDetail->getCharacterIndex()); + snprintf(iA, 99, "%d", textDetail->getCharacterIndex()); details += "<tr> <td>Character Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -291,7 +298,7 @@ for (int i = 0; i < pickPath->getLength(); i++) { - MLsnprintf(iA, 99, "%I64ld", i); + snprintf(iA, 99, "%d", i); path += "<tr> <td>" + std::string(iA) + "</td> <td>" + pickPath->getNode(i)->getTypeId().getName().getString() + "</td> <td>" + pickPath->getNode(i)->getName().getString() + "</td> </tr> "; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 14:03:41
|
Revision: 127 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=127&view=rev Author: wolfspindler Date: 2009-06-23 13:42:18 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Collision of windows min macro and Linux template function resolved by introduction of local macro. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp 2009-06-23 13:29:59 UTC (rev 126) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp 2009-06-23 13:42:18 UTC (rev 127) @@ -20,7 +20,10 @@ #define My_MB_OK #endif +// Define a local MyMin instead of min, because there we have platform dependent collisions in headers. +#define MyMin(A,B) ((A)<(B) ? (A) : (B)) + SO_NODE_SOURCE(UMDSoMaximumExtension); void UMDSoMaximumExtension::initClass() { @@ -343,12 +346,12 @@ // suche nach diameter punkt, welcher am n\xE4chsten zum Koordinatenursprung liegt // dieser wird in den Koordinatenursprung transliert, alle anderen werden entsprechend // mit transliert - if(std::min(fDist_1,fDist_2)==fDist_1){ + if(MyMin(fDist_1,fDist_2)==fDist_1){ SbVec3f translateVec3f(-1*point_1[0],-1*point_1[1],-1*point_1[2]); // Bestimmen des Translationsvektors _sbMatrix.setTranslate(translateVec3f); } - else if(std::min(fDist_1,fDist_2)==fDist_2){ + else if(MyMin(fDist_1,fDist_2)==fDist_2){ SbVec3f translateVec3f(-1*point_2[0],-1*point_2[1],-1*point_2[2]); // Bestimmen des Translationsvektors _sbMatrix.setTranslate(translateVec3f); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bar...@us...> - 2009-06-23 13:30:04
|
Revision: 126 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=126&view=rev Author: bartdedobbelaer Date: 2009-06-23 13:29:59 +0000 (Tue, 23 Jun 2009) Log Message: ----------- - Replaced $(MODULES) by $(MLAB_UMD_METK) Modified Paths: -------------- trunk/UMD/METK/Modules/ML/MLkAviWriter/MLkAviWriter.def Modified: trunk/UMD/METK/Modules/ML/MLkAviWriter/MLkAviWriter.def =================================================================== --- trunk/UMD/METK/Modules/ML/MLkAviWriter/MLkAviWriter.def 2009-06-23 12:35:43 UTC (rev 125) +++ trunk/UMD/METK/Modules/ML/MLkAviWriter/MLkAviWriter.def 2009-06-23 13:29:59 UTC (rev 126) @@ -26,7 +26,7 @@ seeAlso = "SoExaminerViewer" documentation = "$(LOCAL)/html/kAviWriter.html" projectSource = "$(UserProjectsPath)/sources/ML/MLkAviWriter" - exampleNetwork = $(MODULES)/mevis/ML/MLkAviWriter/networks/mlkAviWriterExample.mlab + exampleNetwork = $(MLAB_UMD_METK)/Modules/ML/MLkAviWriter/networks/mlkAviWriterExample.mlab Window { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 13:12:59
|
Revision: 125 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=125&view=rev Author: wolfspindler Date: 2009-06-23 12:35:43 +0000 (Tue, 23 Jun 2009) Log Message: ----------- CHANGE: -It was necessary to leave METK in its own package group; adjusting it to the directory below Community caused too much trouble later on in the configuration of the build server and in long term maintenance. Added Paths: ----------- trunk/UMD/METK/ Removed Paths: ------------- trunk/Community/METK/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 13:04:38
|
Revision: 124 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=124&view=rev Author: wolfspindler Date: 2009-06-23 12:33:04 +0000 (Tue, 23 Jun 2009) Log Message: ----------- NEW: -New package group for UMD added. Added Paths: ----------- trunk/UMD/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 11:43:55
|
Revision: 122 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=122&view=rev Author: wolfspindler Date: 2009-06-23 11:43:35 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Lower/Capital letter usage in paths fixed. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h Property Changed: ---------------- trunk/Community/METK/Sources/Inventor/UMDmnOffscreenRenderer/ Property changes on: trunk/Community/METK/Sources/Inventor/UMDmnOffscreenRenderer ___________________________________________________________________ Added: svn:ignore + UMDmnOffscreenRenderer.sln UMDmnOffscreenRenderer.suo UMDmnOffscreenRenderer.vcproj UMDmnOffscreenRenderer.vcproj.lapsus-win.wolf.user Modified: trunk/Community/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h 2009-06-23 11:25:55 UTC (rev 121) +++ trunk/Community/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h 2009-06-23 11:43:35 UTC (rev 122) @@ -1,10 +1,11 @@ #ifndef MNOGLOFFSCREEN__H #define MNOGLOFFSCREEN__H +#ifdef WIN32 + #include <windows.h> +#endif +#include <GL/gl.h> +#include <GL/glu.h> -#include <windows.h> -#include <gl/gl.h> -#include <gl/glu.h> - #include "wglext.h" typedef struct { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 11:26:21
|
Revision: 121 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=121&view=rev Author: wolfspindler Date: 2009-06-23 11:25:55 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Missing std:: added. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp Modified: trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp 2009-06-23 11:15:22 UTC (rev 120) +++ trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp 2009-06-23 11:25:55 UTC (rev 121) @@ -343,12 +343,12 @@ // suche nach diameter punkt, welcher am n\xE4chsten zum Koordinatenursprung liegt // dieser wird in den Koordinatenursprung transliert, alle anderen werden entsprechend // mit transliert - if(min(fDist_1,fDist_2)==fDist_1){ + if(std::min(fDist_1,fDist_2)==fDist_1){ SbVec3f translateVec3f(-1*point_1[0],-1*point_1[1],-1*point_1[2]); // Bestimmen des Translationsvektors _sbMatrix.setTranslate(translateVec3f); } - else if(min(fDist_1,fDist_2)==fDist_2){ + else if(std::min(fDist_1,fDist_2)==fDist_2){ SbVec3f translateVec3f(-1*point_2[0],-1*point_2[1],-1*point_2[2]); // Bestimmen des Translationsvektors _sbMatrix.setTranslate(translateVec3f); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 11:16:04
|
Revision: 117 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=117&view=rev Author: wolfspindler Date: 2009-06-23 10:46:33 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -min/max template functions require identical types, thus using float for both sides now. Modified Paths: -------------- trunk/Community/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.cpp Modified: trunk/Community/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.cpp =================================================================== --- trunk/Community/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.cpp 2009-06-23 10:43:15 UTC (rev 116) +++ trunk/Community/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.cpp 2009-06-23 10:46:33 UTC (rev 117) @@ -81,7 +81,7 @@ if (currentComponentID==0.0) //is pixel a background pixel { - currentDistance = min(currentDistance,min(a+1,min(b+1,min(c+1,d+1)))); + currentDistance = min(static_cast<float>(currentDistance),min(a+1,min(b+1,min(c+1,d+1)))); } else { @@ -96,7 +96,7 @@ } else { - currentDistance = min(currentDistance,min(a+1,min(b+1,min(c+1,d+1)))); + currentDistance = min(static_cast<float>(currentDistance),min(a+1,min(b+1,min(c+1,d+1)))); } } _globalDistanceField->setValueAt(pos,currentDistance); @@ -118,7 +118,7 @@ if (currentComponentID==0.0) //is pixel a background pixel { - currentDistance = min(currentDistance,min(a+1,min(b+1,min(c+1,d+1)))); + currentDistance = min(static_cast<float>(currentDistance),min(a+1,min(b+1,min(c+1,d+1)))); } else { @@ -132,7 +132,7 @@ } else { - currentDistance = min(currentDistance,min(a+1,min(b+1,min(c+1,d+1)))); + currentDistance = min(static_cast<float>(currentDistance),min(a+1,min(b+1,min(c+1,d+1)))); } } _globalDistanceField->setValueAt(pos,currentDistance); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 11:14:15
|
Revision: 119 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=119&view=rev Author: wolfspindler Date: 2009-06-23 11:13:40 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Missing std:: added. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp Modified: trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 10:48:38 UTC (rev 118) +++ trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 11:13:40 UTC (rev 119) @@ -197,7 +197,7 @@ //index-stuff -> create a lookup table 'lut' IndexVector::iterator iL; - iL = max_element(convexHullIndexLUT.begin(), convexHullIndexLUT.end()); + iL = std::max_element(convexHullIndexLUT.begin(), convexHullIndexLUT.end()); int maxID = *iL; int32_t* lut = new int32_t[maxID]; for (iL = convexHullIndexLUT.begin(), i=0; iL != convexHullIndexLUT.end(); iL++, i++) lut[*iL] = i; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 10:50:50
|
Revision: 116 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=116&view=rev Author: wolfspindler Date: 2009-06-23 10:43:15 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Further missing includes and std::'s added. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp Modified: trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 10:20:53 UTC (rev 115) +++ trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 10:43:15 UTC (rev 116) @@ -19,6 +19,8 @@ // TODO: include more inventor things here #include "XVLeaveScope.h" +#include <list> + SO_NODE_SOURCE(SoQHull3D) @@ -284,7 +286,7 @@ delete[] points; points = NULL; } else { - if (debug) cout << " not enough points to render or input scene disconnected" << endl; + if (debug) std::cout << " not enough points to render or input scene disconnected" << std::endl; } } @@ -371,7 +373,7 @@ delete[] indices; indices = NULL; } else { - if (debug) cout << "not enough points to render faces or input scene disconnected" << endl; + if (debug) std::cout << "not enough points to render faces or input scene disconnected" << std::endl; } } @@ -463,7 +465,7 @@ delete[] vertexNorm_points; vertexNorm_points = NULL; } else { - if (debug) cout << "not enough points to render normals or input scene disconnected" << endl; + if (debug) std::cout << "not enough points to render normals or input scene disconnected" << std::endl; } } @@ -633,7 +635,7 @@ //no hull was found } else { state.setValue("no convex hull found"); - if (debug) cout << " no convex hull found" << endl; + if (debug) std::cout << " no convex hull found" << std::endl; } //no input This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 10:48:59
|
Revision: 118 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=118&view=rev Author: wolfspindler Date: 2009-06-23 10:48:38 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Lower/Capital letter usage fixed. Modified Paths: -------------- trunk/Community/METK/Sources/ML/Animation/AnimationParser/AnimationParser.cpp Modified: trunk/Community/METK/Sources/ML/Animation/AnimationParser/AnimationParser.cpp =================================================================== --- trunk/Community/METK/Sources/ML/Animation/AnimationParser/AnimationParser.cpp 2009-06-23 10:46:33 UTC (rev 117) +++ trunk/Community/METK/Sources/ML/Animation/AnimationParser/AnimationParser.cpp 2009-06-23 10:48:38 UTC (rev 118) @@ -9,7 +9,7 @@ //---------------------------------------------------------------------------------- -#include "stdafx.h" //DLL-Standard +#include "StdAfx.h" //DLL-Standard #include "AnimationParser.h" #include <iostream> #include <fstream> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 10:21:14
|
Revision: 115 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=115&view=rev Author: wolfspindler Date: 2009-06-23 10:20:53 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Batch file ported to MeVisLab2.0 Modified Paths: -------------- trunk/Community/METK/Sources/ML/Animation/Animation.bat Modified: trunk/Community/METK/Sources/ML/Animation/Animation.bat =================================================================== --- trunk/Community/METK/Sources/ML/Animation/Animation.bat 2009-06-23 10:14:33 UTC (rev 114) +++ trunk/Community/METK/Sources/ML/Animation/Animation.bat 2009-06-23 10:20:53 UTC (rev 115) @@ -1,3 +1,3 @@ -%MEVIS_LIB%\make\win32\createDsp.bat Animation +"%MLAB_ROOT%\MeVis\Foundation\BuildTools\Scripts\createProject.bat" Animation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 10:15:33
|
Revision: 114 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=114&view=rev Author: wolfspindler Date: 2009-06-23 10:14:33 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Platform dependent implicit cast from Windows written explicitly to make it work on non windows systems Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp Modified: trunk/Community/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp 2009-06-23 10:11:14 UTC (rev 113) +++ trunk/Community/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp 2009-06-23 10:14:33 UTC (rev 114) @@ -165,8 +165,8 @@ if (SbVec2s(_winSize[0], _winSize[1]) != SoViewportRegionElement::get(state).getWindowSize()) { _winSize[0] = SoViewportRegionElement::get(state).getWindowSize()[0]; _winSize[1] = SoViewportRegionElement::get(state).getWindowSize()[1]; - if (_pixelMatrix) delete[] _pixelMatrix; - _pixelMatrix = new SbBool[(_winSize[0] + 1) * (_winSize[1] + 1)]; + if (_pixelMatrix) delete[] _pixelMatrix; + _pixelMatrix = new SbBool[static_cast<int>((_winSize[0] + 1) * (_winSize[1] + 1))]; } // iniatilize the raster This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 10:15:33
|
Revision: 112 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=112&view=rev Author: wolfspindler Date: 2009-06-23 09:18:54 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Lower/Capital letter usage in includes fixed. -Special characters removed from some files. Modified Paths: -------------- trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.cpp trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.cpp trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.cpp trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h trunk/Community/METK/Sources/ML/Animation/UMDCampath/LinearCampath.cpp trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.cpp trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h trunk/Community/METK/Sources/ML/Animation/UMDCampath/UMDCampath.cpp Modified: trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h =================================================================== --- trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h 2009-06-23 09:18:54 UTC (rev 112) @@ -4,7 +4,7 @@ // \author Konrad M\xFChler // \date 2005-07-05 // -// +// */ //---------------------------------------------------------------------------------- @@ -19,171 +19,171 @@ #include <iostream> #include <vector> #include "kBasics.h" -#include "stdafx.h" +#include "StdAfx.h" using namespace std; -//! kScriptFrameEntry is the class for handling a single frame entry (contains i.e. command id, number of frames for instruction, current frame for this instruction). +//! kScriptFrameEntry is the class for handling a single frame entry (contains i.e. command id, number of frames for instruction, current frame for this instruction). class ANIMATION_EXPORT kScriptFrameEntry { -private: - string ObjectName; //!< Name of object (without qmarks) - string ObjectID; //!< ID of Object in ObjMgr - string LayerID; //!< Layer for propery adressed by command - string InfoID;//!< InfoLayer for property adressed by command - string CommandStr; //!< command string (not instruction!) ... i.e. 'rotate' - string ParamString; //!< parameter string - std::vector<string> Params; //!< splitted parameters +private: + string ObjectName; //!< Name of object (without qmarks) + string ObjectID; //!< ID of Object in ObjMgr + string LayerID; //!< Layer for propery adressed by command + string InfoID;//!< InfoLayer for property adressed by command + string CommandStr; //!< command string (not instruction!) ... i.e. 'rotate' + string ParamString; //!< parameter string + std::vector<string> Params; //!< splitted parameters - int CommunicationFlag; //!< a flag that is used to communicate several states of a frame like "Can be used for NEWMOVE" or "Error-DoNotExecute this frame" + int CommunicationFlag; //!< a flag that is used to communicate several states of a frame like "Can be used for NEWMOVE" or "Error-DoNotExecute this frame" - string CommandLine; //!< total instruction string - short CommandID; //!< id of command (i.e. CMD_ROTATE) - short CommandType; //!< type of command (i.e. CMDT_SYSTEM) - short ParamType; //!< type of paramerer (i.e. PARAMT_STRING) ... for LAYER-commands only - - int CurrentFrame; //!< current number of frame (0 = first frame of instruction) - int FrameCount; //!< total number of frames for instruction + string CommandLine; //!< total instruction string + short CommandID; //!< id of command (i.e. CMD_ROTATE) + short CommandType; //!< type of command (i.e. CMDT_SYSTEM) + short ParamType; //!< type of paramerer (i.e. PARAMT_STRING) ... for LAYER-commands only + int CurrentFrame; //!< current number of frame (0 = first frame of instruction) + int FrameCount; //!< total number of frames for instruction - //-------------------------------------------------------- - //Functions - //-------------------------------------------------------- - bool setCommandProperties(); - -public: - //! \defgroup Commands CMD - //@{ - static const short CMD_NONE; - static const short CMD_TRANSPARENCY; - static const short CMD_COLOR; - static const short CMD_VISIBLE; - static const short CMD_QUALITY; - static const short CMD_SELECTED; - static const short CMD_CAM_ROTATECAMZ; - static const short CMD_CAM_ROTATECAMZTO; - static const short CMD_CAM_ROTATESMURF; - static const short CMD_ROTATE; - static const short CMD_MOVE; - static const short CMD_MOVECOORD; - static const short CMD_SETCOORDSIZE; - static const short CMD_SETBACKGROUND; - static const short CMD_SETCREATEVIDEO; - static const short CMD_SHIFTX; - static const short CMD_SHIFTY; - static const short CMD_SHIFTZ; - static const short CMD_CLIP; - static const short CMD_SETSILHOUETTE; - static const short CMD_SETSILHOUETTEWIDTH; - static const short CMD_SETSILHOUETTECOLOR; - static const short CMD_COLORNEW; - static const short CMD_CAMFOCALDISTANCE; - static const short CMD_CAMHEIGHT; - static const short CMD_CAMORIENTATION; - static const short CMD_CAMPOSITION; - static const short CMD_VIEWPOINTMOVE; - static const short CMD_VIEWPOINTCLUSTERING; - static const short CMD_SHOWCLUSTERINGPATH; - static const short CMD_FADING; - static const short CMD_SETSURFACEDIST; - static const short CMD_LOOKAT; - static const short CMD_VOLREND; - static const short CMD_SETDOUBLE; - static const short CMD_SETSTRING; - static const short CMD_SETVEC3; - static const short CMD_SETBOOL; - static const short CMD_SETINT; - static const short CMD_CAMPATH; - static const short CMD_SETCAMPATH; - static const short CMD_CAMPATH_VP; - //@} - - - //! \defgroup CommandTypes CMDT - //@{ - static const short CMDT_NONE; - static const short CMDT_LAYER; - static const short CMDT_SYSTEM; - //@} - - //! \defgroup ParameterTypes PARAMT - //@{ - static const short PARAMT_NONE; - static const short PARAMT_FLOAT; - static const short PARAMT_INT; - static const short PARAMT_V3; - static const short PARAMT_STRING; - static const short PARAMT_BOOL; - //@} + //-------------------------------------------------------- + //Functions + //-------------------------------------------------------- + bool setCommandProperties(); - - //! \defgroup Parameter PARAM - //@{ - static const string PARAM_ROTATE_SAGITTAL; //!< string value for sagittal - static const string PARAM_ROTATE_AXIAL; //!< string value for axial - static const string PARAM_ROTATE_CORONAL; //!< string value for coronal - //@} +public: + //! \defgroup Commands CMD + //@{ + static const short CMD_NONE; + static const short CMD_TRANSPARENCY; + static const short CMD_COLOR; + static const short CMD_VISIBLE; + static const short CMD_QUALITY; + static const short CMD_SELECTED; + static const short CMD_CAM_ROTATECAMZ; + static const short CMD_CAM_ROTATECAMZTO; + static const short CMD_CAM_ROTATESMURF; + static const short CMD_ROTATE; + static const short CMD_MOVE; + static const short CMD_MOVECOORD; + static const short CMD_SETCOORDSIZE; + static const short CMD_SETBACKGROUND; + static const short CMD_SETCREATEVIDEO; + static const short CMD_SHIFTX; + static const short CMD_SHIFTY; + static const short CMD_SHIFTZ; + static const short CMD_CLIP; + static const short CMD_SETSILHOUETTE; + static const short CMD_SETSILHOUETTEWIDTH; + static const short CMD_SETSILHOUETTECOLOR; + static const short CMD_COLORNEW; + static const short CMD_CAMFOCALDISTANCE; + static const short CMD_CAMHEIGHT; + static const short CMD_CAMORIENTATION; + static const short CMD_CAMPOSITION; + static const short CMD_VIEWPOINTMOVE; + static const short CMD_VIEWPOINTCLUSTERING; + static const short CMD_SHOWCLUSTERINGPATH; + static const short CMD_FADING; + static const short CMD_SETSURFACEDIST; + static const short CMD_LOOKAT; + static const short CMD_VOLREND; + static const short CMD_SETDOUBLE; + static const short CMD_SETSTRING; + static const short CMD_SETVEC3; + static const short CMD_SETBOOL; + static const short CMD_SETINT; + static const short CMD_CAMPATH; + static const short CMD_SETCAMPATH; + static const short CMD_CAMPATH_VP; + //@} + //! \defgroup CommandTypes CMDT + //@{ + static const short CMDT_NONE; + static const short CMDT_LAYER; + static const short CMDT_SYSTEM; + //@} - //! \defgroup Delimiters for splitting - //@{ - static const char DELIMITER_COLOR_SCRIPT; - static const char DELIMITER_AXIS; - static const char DELIMITER_COLOR_LAYER; - static const char DELIMITER_PARAMS; - //@} - //! \defgroup Communication Flags - //@{ - static const int CFLAG_NONE; - static const int CFLAG_ERROR; - static const int CFLAG_EXECUTEVPMOVE; - static const int CFLAG_EXECUTEVPCLUSTERING; - static const int CFLAG_EXECUTEVOLREND; - static const int CFLAG_EXECUTECAMPATH; - static const int CFLAG_EXECUTECAMPATHVP; - //@} + //! \defgroup ParameterTypes PARAMT + //@{ + static const short PARAMT_NONE; + static const short PARAMT_FLOAT; + static const short PARAMT_INT; + static const short PARAMT_V3; + static const short PARAMT_STRING; + static const short PARAMT_BOOL; + //@} - //-------------------------------------------------------- - //Functions - //-------------------------------------------------------- - kScriptFrameEntry(); - kScriptFrameEntry(kScriptFrameEntry& toClone); + //! \defgroup Parameter PARAM + //@{ + static const string PARAM_ROTATE_SAGITTAL; //!< string value for sagittal + static const string PARAM_ROTATE_AXIAL; //!< string value for axial + static const string PARAM_ROTATE_CORONAL; //!< string value for coronal + //@} - bool setObjectID(string); - const string getObjectID(); - bool setObjectName(string); - const string getObjectName(); - bool setCommandStr(string); - string getCommandStr(); - bool setCommandLine(string); - string getCommandLine(); - bool setParamString(string value); - string getParamString(); - std::vector<string>* getParams(); - - bool setCommunicationFlag(int value); - int getCommunicationFlag(); - - bool setLayerID(string); - string getLayerID(); - bool setInfoID(string); - string getInfoID(); - bool setCurrentFrame(int value); - int getCurrentFrame(); - bool setFrameCount(int value); - int getFrameCount(); + //! \defgroup Delimiters for splitting + //@{ + static const char DELIMITER_COLOR_SCRIPT; + static const char DELIMITER_AXIS; + static const char DELIMITER_COLOR_LAYER; + static const char DELIMITER_PARAMS; + //@} - short getCommandType(); - short getCommandID(); - short getParamType(); + //! \defgroup Communication Flags + //@{ + static const int CFLAG_NONE; + static const int CFLAG_ERROR; + static const int CFLAG_EXECUTEVPMOVE; + static const int CFLAG_EXECUTEVPCLUSTERING; + static const int CFLAG_EXECUTEVOLREND; + static const int CFLAG_EXECUTECAMPATH; + static const int CFLAG_EXECUTECAMPATHVP; + //@} - bool isValid(); + + //-------------------------------------------------------- + //Functions + //-------------------------------------------------------- + kScriptFrameEntry(); + kScriptFrameEntry(kScriptFrameEntry& toClone); + + bool setObjectID(string); + const string getObjectID(); + bool setObjectName(string); + const string getObjectName(); + bool setCommandStr(string); + string getCommandStr(); + bool setCommandLine(string); + string getCommandLine(); + bool setParamString(string value); + string getParamString(); + std::vector<string>* getParams(); + + bool setCommunicationFlag(int value); + int getCommunicationFlag(); + + + bool setLayerID(string); + string getLayerID(); + bool setInfoID(string); + string getInfoID(); + + bool setCurrentFrame(int value); + int getCurrentFrame(); + bool setFrameCount(int value); + int getFrameCount(); + + short getCommandType(); + short getCommandID(); + short getParamType(); + + bool isValid(); }; #endif // _KSCRIPTFRAMEENTY_ Modified: trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h =================================================================== --- trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h 2009-06-23 09:18:54 UTC (rev 112) @@ -4,7 +4,7 @@ // \author Konrad M\xFChler // \date 2005-07-05 // -// +// */ //---------------------------------------------------------------------------------- @@ -18,48 +18,48 @@ #include <iostream> #include <vector> #include "kBasics.h" -#include "stdafx.h" +#include "StdAfx.h" using namespace std; //! kScriptIniObject is the class for information about a script like length or realtime. class ANIMATION_EXPORT kScriptIniObject { -private: - int LengthTimeUnit; //!< length in time units - float LengthSeconds; //!< length in seconds - bool RealTime; //!< realtime or not - bool Loop; //!< Loop realplay or not (loop is only in realtime mode possible - - //! \defgroup ParameterNames PN - //@{ - static const string PN_LENGTHTIMEUNIT; - static const string PN_LENGTHSECONDS; - static const string PN_REALTIME; - //@} +private: + int LengthTimeUnit; //!< length in time units + float LengthSeconds; //!< length in seconds + bool RealTime; //!< realtime or not + bool Loop; //!< Loop realplay or not (loop is only in realtime mode possible - static const int INI_EMPTY_VALUE; - static const char DELIMITER_EQUAL; + //! \defgroup ParameterNames PN + //@{ + static const string PN_LENGTHTIMEUNIT; + static const string PN_LENGTHSECONDS; + static const string PN_REALTIME; + //@} -public: + static const int INI_EMPTY_VALUE; + static const char DELIMITER_EQUAL; - //-------------------------------------------------------- - //Functions - //-------------------------------------------------------- +public: - kScriptIniObject(); - kScriptIniObject(int vLengthTimeUnit, float vLengthSeconds, bool vRealTime, bool vLoop); - void setLengthTimeUnit(int value); - int getLengthTimeUnit(); - void setLengthSeconds(float value); - float getLengthSeconds(); - void setRealTime(bool value); - bool getRealTime(); - void setLoop(bool value); - bool getLoop(); + //-------------------------------------------------------- + //Functions + //-------------------------------------------------------- - bool parseStr(string parseInput); - bool getIntegrity(); + kScriptIniObject(); + kScriptIniObject(int vLengthTimeUnit, float vLengthSeconds, bool vRealTime, bool vLoop); + void setLengthTimeUnit(int value); + int getLengthTimeUnit(); + void setLengthSeconds(float value); + float getLengthSeconds(); + void setRealTime(bool value); + bool getRealTime(); + void setLoop(bool value); + bool getLoop(); + + bool parseStr(string parseInput); + bool getIntegrity(); }; #endif // _KSCRIPTINIOBJECT_ Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.cpp =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.cpp 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.cpp 2009-06-23 09:18:54 UTC (rev 112) @@ -1,25 +1,25 @@ -#include "GoogleCampath.h" +#include "GoogleCampath.h" #include "kDebug.h" #include "UMDAnimation2/AnimationExecuter.h" ML_START_NAMESPACE GoogleCampath::GoogleCampath(ObjMgrCommunicator* omc,StringField* favn,kScriptFrameList* m,kCamera* mc, - AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, - Vec3fField* fttp,BoolField* fdcp,const std::string& pn): - AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) + AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, + Vec3fField* fttp,BoolField* fdcp,const std::string& pn): + AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) {} GoogleCampath::~GoogleCampath(){} void GoogleCampath::internCalcPositions(SbVec3f* bbc,double currentHeight,double targetHeight,SbVec3f* currentPosition,SbVec3f* currentLookAt,SbVec3f* targetLookAt,double prozdist,SbVec3f* vectorToTarget,SbVec3f& nextPosition,SbVec3f& nextLookAt,double& nextHeight){ - nextPosition = *currentPosition + prozdist*(*vectorToTarget); - SbVec3f direction=nextPosition-(*bbc); - nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; - nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; - double powFak=2.0*(prozdist-0.5); - nextHeight=(1.0-prozdist)*currentHeight+prozdist*targetHeight+maxHeight; - if(prozdist>=0.5){ - nextHeight=prozdist*targetHeight+(1.0-prozdist)*currentHeight+maxHeight; - } - nextHeight-=pow(powFak,2)*maxHeight; + nextPosition = *currentPosition + prozdist*(*vectorToTarget); + SbVec3f direction=nextPosition-(*bbc); + nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; + nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; + double powFak=2.0*(prozdist-0.5); + nextHeight=(1.0-prozdist)*currentHeight+prozdist*targetHeight+maxHeight; + if(prozdist>=0.5){ + nextHeight=prozdist*targetHeight+(1.0-prozdist)*currentHeight+maxHeight; + } + nextHeight-=pow(powFak,2)*maxHeight; } ML_END_NAMESPACE Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.cpp =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.cpp 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.cpp 2009-06-23 09:18:54 UTC (rev 112) @@ -1,30 +1,30 @@ -#include "GoogleRectangleCampath.h" +#include "GoogleRectangleCampath.h" #include "kDebug.h" #include "UMDAnimation2/AnimationExecuter.h" ML_START_NAMESPACE GoogleRectangleCampath::GoogleRectangleCampath(ObjMgrCommunicator* omc,StringField* favn,kScriptFrameList* m,kCamera* mc, - AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, - Vec3fField* fttp,BoolField* fdcp,const std::string& pn): - AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) + AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, + Vec3fField* fttp,BoolField* fdcp,const std::string& pn): + AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) {} GoogleRectangleCampath::~GoogleRectangleCampath(){} void GoogleRectangleCampath::internCalcPositions(SbVec3f* bbc,double currentHeight,double targetHeight,SbVec3f* currentPosition,SbVec3f* currentLookAt,SbVec3f* targetLookAt,double prozdist,SbVec3f* vectorToTarget,SbVec3f& nextPosition,SbVec3f& nextLookAt,double& nextHeight){ - nextPosition = *currentPosition + prozdist*(*vectorToTarget); - SbVec3f direction=nextPosition-(*bbc); - nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; - nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; - double powFak=2.0*(prozdist-0.5); - if(prozdist>=0.3 && prozdist<=0.7){ - nextHeight=lastHeight-((prozdist-0.3))*(currentHeight-targetHeight); - }else{ - nextHeight=(1.0-prozdist)*currentHeight+prozdist*targetHeight+maxHeight; - if(prozdist>=0.5){ - nextHeight=prozdist*targetHeight+(1.0-prozdist)*currentHeight+maxHeight; - } - nextHeight-=pow(powFak,2)*maxHeight; - lastHeight=nextHeight; - } + nextPosition = *currentPosition + prozdist*(*vectorToTarget); + SbVec3f direction=nextPosition-(*bbc); + nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; + nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; + double powFak=2.0*(prozdist-0.5); + if(prozdist>=0.3 && prozdist<=0.7){ + nextHeight=lastHeight-((prozdist-0.3))*(currentHeight-targetHeight); + }else{ + nextHeight=(1.0-prozdist)*currentHeight+prozdist*targetHeight+maxHeight; + if(prozdist>=0.5){ + nextHeight=prozdist*targetHeight+(1.0-prozdist)*currentHeight+maxHeight; + } + nextHeight-=pow(powFak,2)*maxHeight; + lastHeight=nextHeight; + } } ML_END_NAMESPACE Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h 2009-06-23 09:18:54 UTC (rev 112) @@ -1,4 +1,4 @@ -#ifndef _GOOGLERECTANGLECAMPATH_ +#ifndef _GOOGLERECTANGLECAMPATH_ #define _GOOGLERECTANGLECAMPATH_ #include "UMDCampath.h" @@ -6,12 +6,12 @@ ML_START_NAMESPACE class GoogleRectangleCampath:public AbstractCampath{ - public: - GoogleRectangleCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, - vector<SbVec3f>*,Vec3fField*,DoubleField*,Vec3fField*,BoolField*,const std::string&); - ~GoogleRectangleCampath(); - void internCalcPositions(SbVec3f* bbc,double,double,SbVec3f*,SbVec3f*,SbVec3f*,double,SbVec3f*,SbVec3f&,SbVec3f&,double&); - double lastHeight; + public: + GoogleRectangleCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, + vector<SbVec3f>*,Vec3fField*,DoubleField*,Vec3fField*,BoolField*,const std::string&); + ~GoogleRectangleCampath(); + void internCalcPositions(SbVec3f* bbc,double,double,SbVec3f*,SbVec3f*,SbVec3f*,double,SbVec3f*,SbVec3f&,SbVec3f&,double&); + double lastHeight; }; ML_END_NAMESPACE #endif Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.cpp =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.cpp 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.cpp 2009-06-23 09:18:54 UTC (rev 112) @@ -1,27 +1,27 @@ -#include "HeightCampath.h" +#include "HeightCampath.h" #include "kDebug.h" #include "UMDAnimation2/AnimationExecuter.h" ML_START_NAMESPACE HeightCampath::HeightCampath(ObjMgrCommunicator* omc,StringField* favn,kScriptFrameList* m,kCamera* mc, - AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, - Vec3fField* fttp,BoolField* fdcp,const std::string& pn): - AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) + AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, + Vec3fField* fttp,BoolField* fdcp,const std::string& pn): + AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) {} HeightCampath::~HeightCampath(){} void HeightCampath::internCalcPositions(SbVec3f* bbc,double currentHeight,double targetHeight,SbVec3f* currentPosition,SbVec3f* currentLookAt,SbVec3f* targetLookAt,double prozdist,SbVec3f* vectorToTarget,SbVec3f& nextPosition,SbVec3f& nextLookAt,double& nextHeight){ - if(prozdist<0.5){ - //Beschleunigung - nextPosition=*currentPosition+(pow(prozdist*2.0,2)/2.0)*(*vectorToTarget); - }else{ - //Abbremsen - nextPosition=*currentPosition+(1.0-(pow((1.0-prozdist)*2.0,2)/2.0))*(*vectorToTarget); - } - SbVec3f direction=nextPosition-(*bbc); - nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; - nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; - nextHeight = currentHeight - (currentHeight - targetHeight) * prozdist; - //std::cout << "NEXTHEIGHT::" << nextPosition[0] << ";" << nextPosition[1] << ";" << nextPosition[2] << "::" << nextHeight << "::" << len << std::endl; + if(prozdist<0.5){ + //Beschleunigung + nextPosition=*currentPosition+(pow(prozdist*2.0,2)/2.0)*(*vectorToTarget); + }else{ + //Abbremsen + nextPosition=*currentPosition+(1.0-(pow((1.0-prozdist)*2.0,2)/2.0))*(*vectorToTarget); + } + SbVec3f direction=nextPosition-(*bbc); + nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; + nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; + nextHeight = currentHeight - (currentHeight - targetHeight) * prozdist; + //std::cout << "NEXTHEIGHT::" << nextPosition[0] << ";" << nextPosition[1] << ";" << nextPosition[2] << "::" << nextHeight << "::" << len << std::endl; } ML_END_NAMESPACE Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h 2009-06-23 09:18:54 UTC (rev 112) @@ -1,4 +1,4 @@ -#ifndef _HEIGHTCAMPATH_ +#ifndef _HEIGHTCAMPATH_ #define _HEIGHTCAMPATH_ #include "UMDCampath.h" @@ -6,11 +6,11 @@ ML_START_NAMESPACE class HeightCampath:public AbstractCampath{ - public: - HeightCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, - vector<SbVec3f>*,Vec3fField*,DoubleField*,Vec3fField*,BoolField*,const std::string&); - ~HeightCampath(); - void internCalcPositions(SbVec3f* bbc,double,double,SbVec3f*,SbVec3f*,SbVec3f*,double,SbVec3f*,SbVec3f&,SbVec3f&,double&); + public: + HeightCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, + vector<SbVec3f>*,Vec3fField*,DoubleField*,Vec3fField*,BoolField*,const std::string&); + ~HeightCampath(); + void internCalcPositions(SbVec3f* bbc,double,double,SbVec3f*,SbVec3f*,SbVec3f*,double,SbVec3f*,SbVec3f&,SbVec3f&,double&); }; ML_END_NAMESPACE #endif Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/LinearCampath.cpp =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/LinearCampath.cpp 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/LinearCampath.cpp 2009-06-23 09:18:54 UTC (rev 112) @@ -1,27 +1,27 @@ -#include "LinearCampath.h" +#include "LinearCampath.h" #include "kDebug.h" #include "UMDAnimation2/AnimationExecuter.h" ML_START_NAMESPACE LinearCampath::LinearCampath(ObjMgrCommunicator* omc,StringField* favn,kScriptFrameList* m,kCamera* mc, - AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, - Vec3fField* fttp,BoolField* fdcp,const std::string& pn): - AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) + AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, + Vec3fField* fttp,BoolField* fdcp,const std::string& pn): + AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) {} LinearCampath::~LinearCampath(){} void LinearCampath::internCalcPositions(SbVec3f* bbc,double currentHeight,double targetHeight,SbVec3f* currentPosition,SbVec3f* currentLookAt,SbVec3f* targetLookAt,double prozdist,SbVec3f* vectorToTarget,SbVec3f& nextPosition,SbVec3f& nextLookAt,double& nextHeight){ - if(prozdist<0.5){ - //Beschleunigung - nextPosition=*currentPosition+(pow(prozdist*2.0,2)/2.0)*(*vectorToTarget); - }else{ - //Abbremsen - nextPosition=*currentPosition+(1.0-(pow((1.0-prozdist)*2.0,2)/2.0))*(*vectorToTarget); - } - SbVec3f direction=nextPosition-(*bbc); - nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; - nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; - nextHeight = currentHeight - (currentHeight - targetHeight) * prozdist; - //std::cout << "NEXTHEIGHT::" << nextPosition[0] << ";" << nextPosition[1] << ";" << nextPosition[2] << "::" << nextHeight << "::" << len << std::endl; + if(prozdist<0.5){ + //Beschleunigung + nextPosition=*currentPosition+(pow(prozdist*2.0,2)/2.0)*(*vectorToTarget); + }else{ + //Abbremsen + nextPosition=*currentPosition+(1.0-(pow((1.0-prozdist)*2.0,2)/2.0))*(*vectorToTarget); + } + SbVec3f direction=nextPosition-(*bbc); + nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; + nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * prozdist; + nextHeight = currentHeight - (currentHeight - targetHeight) * prozdist; + //std::cout << "NEXTHEIGHT::" << nextPosition[0] << ";" << nextPosition[1] << ";" << nextPosition[2] << "::" << nextHeight << "::" << len << std::endl; } ML_END_NAMESPACE Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.cpp =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.cpp 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.cpp 2009-06-23 09:18:54 UTC (rev 112) @@ -1,43 +1,43 @@ -#include "RectangleCampath.h" +#include "RectangleCampath.h" #include "kDebug.h" #include "UMDAnimation2/AnimationExecuter.h" ML_START_NAMESPACE RectangleCampath::RectangleCampath(ObjMgrCommunicator* omc,StringField* favn,kScriptFrameList* m,kCamera* mc, - AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, - Vec3fField* fttp,BoolField* fdcp,const std::string& pn): - AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) + AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, + Vec3fField* fttp,BoolField* fdcp,const std::string& pn): + AbstractCampath(omc,favn,m,mc,am,tp,ftsc,ftsr,fttp,fdcp,pn) { - lastHeight=0.0; + lastHeight=0.0; } RectangleCampath::~RectangleCampath(){} void RectangleCampath::internCalcPositions(SbVec3f* bbc,double currentHeight,double targetHeight,SbVec3f* currentPosition,SbVec3f* currentLookAt,SbVec3f* targetLookAt,double prozdist,SbVec3f* vectorToTarget,SbVec3f& nextPosition,SbVec3f& nextLookAt,double& nextHeight){ - if(prozdist<0.25){ - nextPosition=*currentPosition; - nextLookAt=*currentLookAt; - //beschleunigter Steigflug - nextHeight=currentHeight+maxHeight*pow(prozdist*4.0,2); - //nextHeight/=(1.0-prozdist); - lastHeight=nextHeight; - }else if(prozdist<0.75){ - double aktpos=2.0*(prozdist-0.25); - if(aktpos<0.5){ - //Beschleunigung - nextPosition=*currentPosition+(pow(aktpos*2.0,2)/2.0)*(*vectorToTarget); - }else{ - //Abbremsen - nextPosition=*currentPosition+(1.0-(pow((1.0-aktpos)*2.0,2)/2.0))*(*vectorToTarget); - } - SbVec3f direction=nextPosition-(*bbc); - nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; - nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * ((prozdist-0.25)*2.0); - nextHeight=lastHeight+aktpos*(targetHeight-currentHeight); - }else{ - nextPosition=*currentPosition + (*vectorToTarget); - nextLookAt=*targetLookAt; - //abgebremster Sinkflug - nextHeight=targetHeight+maxHeight*pow((1.0-prozdist)*4.0,2); - } + if(prozdist<0.25){ + nextPosition=*currentPosition; + nextLookAt=*currentLookAt; + //beschleunigter Steigflug + nextHeight=currentHeight+maxHeight*pow(prozdist*4.0,2); + //nextHeight/=(1.0-prozdist); + lastHeight=nextHeight; + }else if(prozdist<0.75){ + double aktpos=2.0*(prozdist-0.25); + if(aktpos<0.5){ + //Beschleunigung + nextPosition=*currentPosition+(pow(aktpos*2.0,2)/2.0)*(*vectorToTarget); + }else{ + //Abbremsen + nextPosition=*currentPosition+(1.0-(pow((1.0-aktpos)*2.0,2)/2.0))*(*vectorToTarget); + } + SbVec3f direction=nextPosition-(*bbc); + nextPosition+=(fldTestSphereRadius->getDoubleValue()/direction.length()-1.0)*direction; + nextLookAt = *currentLookAt - (*currentLookAt - *targetLookAt) * ((prozdist-0.25)*2.0); + nextHeight=lastHeight+aktpos*(targetHeight-currentHeight); + }else{ + nextPosition=*currentPosition + (*vectorToTarget); + nextLookAt=*targetLookAt; + //abgebremster Sinkflug + nextHeight=targetHeight+maxHeight*pow((1.0-prozdist)*4.0,2); + } } ML_END_NAMESPACE Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h 2009-06-23 09:18:54 UTC (rev 112) @@ -1,4 +1,4 @@ -#ifndef _RECTANGLECAMPATH_ +#ifndef _RECTANGLECAMPATH_ #define _RECTANGLECAMPATH_ #include "UMDCampath.h" @@ -6,12 +6,12 @@ ML_START_NAMESPACE class RectangleCampath:public AbstractCampath{ - public: - RectangleCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, - vector<SbVec3f>*,Vec3fField*,DoubleField*,Vec3fField*,BoolField*,const std::string&); - ~RectangleCampath(); - void internCalcPositions(SbVec3f* bbc,double,double,SbVec3f*,SbVec3f*,SbVec3f*,double,SbVec3f*,SbVec3f&,SbVec3f&,double&); - double lastHeight; + public: + RectangleCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, + vector<SbVec3f>*,Vec3fField*,DoubleField*,Vec3fField*,BoolField*,const std::string&); + ~RectangleCampath(); + void internCalcPositions(SbVec3f* bbc,double,double,SbVec3f*,SbVec3f*,SbVec3f*,double,SbVec3f*,SbVec3f&,SbVec3f&,double&); + double lastHeight; }; ML_END_NAMESPACE #endif Modified: trunk/Community/METK/Sources/ML/Animation/UMDCampath/UMDCampath.cpp =================================================================== --- trunk/Community/METK/Sources/ML/Animation/UMDCampath/UMDCampath.cpp 2009-06-23 09:09:29 UTC (rev 111) +++ trunk/Community/METK/Sources/ML/Animation/UMDCampath/UMDCampath.cpp 2009-06-23 09:18:54 UTC (rev 112) @@ -1,349 +1,349 @@ -#include "UMDCampath.h" +#include "UMDCampath.h" #include "kDebug.h" #include "UMDAnimation2/AnimationExecuter.h" ML_START_NAMESPACE AbstractCampath::AbstractCampath(ObjMgrCommunicator* omc,StringField* favn,kScriptFrameList* m,kCamera* mc, - AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, - Vec3fField* fttp,BoolField* fdcp,const std::string& pn){ - myObjMgr=omc; - fldAnimationViewerName=favn; - myList=m; - mainCamera=mc; - myCache=am; - testPositions=tp; - fldTestSphereCenter=ftsc; - fldTestSphereRadius=ftsr; - fldTestTargetPosition=fttp; - fldDrawCameraPath=fdcp; - pathName=pn; - framesPerScene=0; - maxHeight=0.0; + AnimationCache* am,vector<SbVec3f>* tp,Vec3fField* ftsc,DoubleField* ftsr, + Vec3fField* fttp,BoolField* fdcp,const std::string& pn){ + myObjMgr=omc; + fldAnimationViewerName=favn; + myList=m; + mainCamera=mc; + myCache=am; + testPositions=tp; + fldTestSphereCenter=ftsc; + fldTestSphereRadius=ftsr; + fldTestTargetPosition=fttp; + fldDrawCameraPath=fdcp; + pathName=pn; + framesPerScene=0; + maxHeight=0.0; } AbstractCampath::~AbstractCampath(){} -void AbstractCampath::writeCalculatedCamPathValues(vector<string>* tempEntryParams, kScriptFrameEntry* currentEntry, int frameNr, size_t FrameEntryListIter, int commandID){ - ML_TRACE_IN("GoogleCampath::writeCalculatedCamPathValues()"); +void AbstractCampath::writeCalculatedCamPathValues(vector<string>* tempEntryParams, kScriptFrameEntry* currentEntry, int frameNr, size_t FrameEntryListIter, int commandID){ + ML_TRACE_IN("GoogleCampath::writeCalculatedCamPathValues()"); - if (currentEntry->getCommunicationFlag()!=kScriptFrameEntry::CFLAG_EXECUTECAMPATH) - { - preCalcCamPathPositions(currentEntry,frameNr,commandID); - //Params werden nochmals abgefragt (für den ersten Frame der Anweisung haben sie sich ja geändert) - currentEntry = myList->FrameList[frameNr]->EntryList[FrameEntryListIter]; - tempEntryParams = currentEntry->getParams(); - } + if (currentEntry->getCommunicationFlag()!=kScriptFrameEntry::CFLAG_EXECUTECAMPATH) + { + preCalcCamPathPositions(currentEntry,frameNr,commandID); + //Params werden nochmals abgefragt (für den ersten Frame der Anweisung haben sie sich ja geändert) + currentEntry = myList->FrameList[frameNr]->EntryList[FrameEntryListIter]; + tempEntryParams = currentEntry->getParams(); + } - //Wenn die frames ordentlich in preCalcCamPathPositions() gesetzt wurden, können die neu berechneten Parameter auch hier zur Ausführung der Bewegung genutzt werden - if (currentEntry->getCommunicationFlag()==kScriptFrameEntry::CFLAG_EXECUTECAMPATH) - { - if (tempEntryParams->size()==3) - { - SbVec3f tempPosition = kBasics::StringToVec3f((*tempEntryParams)[1],','); - SbVec3f tempCurrentLookAt = mainCamera->getLookAt(); - SbVec3f newLookAt = kBasics::StringToVec3f((*tempEntryParams)[0],','); - mainCamera->setCamPosition(tempPosition,newLookAt); - writeOrientation(mainCamera->getOrientation()); // Schreibt orientation in ObjMgr - writePosition(mainCamera->getPosition()); // Schreibt position in ObjMgr + //Wenn die frames ordentlich in preCalcCamPathPositions() gesetzt wurden, können die neu berechneten Parameter auch hier zur Ausführung der Bewegung genutzt werden + if (currentEntry->getCommunicationFlag()==kScriptFrameEntry::CFLAG_EXECUTECAMPATH) + { + if (tempEntryParams->size()==3) + { + SbVec3f tempPosition = kBasics::StringToVec3f((*tempEntryParams)[1],','); + SbVec3f tempCurrentLookAt = mainCamera->getLookAt(); + SbVec3f newLookAt = kBasics::StringToVec3f((*tempEntryParams)[0],','); + mainCamera->setCamPosition(tempPosition,newLookAt); + writeOrientation(mainCamera->getOrientation()); // Schreibt orientation in ObjMgr + writePosition(mainCamera->getPosition()); // Schreibt position in ObjMgr - double focalDistance = (mainCamera->getPosition() - mainCamera->getLookAt()).length(); - myObjMgr->setObjAttribute(fldAnimationViewerName->getStringValue(),LAY_VIEWER_CAMERA,INF_VIEWER_CAMERA_FOCALDISTANCE,&focalDistance,omINFOTYPE_DOUBLE,true,true); - mainCamera->setFocalDistance(focalDistance); + double focalDistance = (mainCamera->getPosition() - mainCamera->getLookAt()).length(); + myObjMgr->setObjAttribute(fldAnimationViewerName->getStringValue(),LAY_VIEWER_CAMERA,INF_VIEWER_CAMERA_FOCALDISTANCE,&focalDistance,omINFOTYPE_DOUBLE,true,true); + mainCamera->setFocalDistance(focalDistance); - double tempHeight = kBasics::StringToDouble((*tempEntryParams)[2]); - myObjMgr->setObjAttribute(fldAnimationViewerName->getStringValue(),LAY_VIEWER_CAMERA,INF_VIEWER_CAMERA_HEIGHT,&tempHeight,omINFOTYPE_DOUBLE,true,true); - mainCamera->setHeight(tempHeight); - } - } + double tempHeight = kBasics::StringToDouble((*tempEntryParams)[2]); + myObjMgr->setObjAttribute(fldAnimationViewerName->getStringValue(),LAY_VIEWER_CAMERA,INF_VIEWER_CAMERA_HEIGHT,&tempHeight,omINFOTYPE_DOUBLE,true,true); + mainCamera->setHeight(tempHeight); + } + } } void AbstractCampath::preCalcCamPathPositions(kScriptFrameEntry* frameEntry, int globalFrameNr, int /*commandID*/){ - ML_TRACE_IN("GoogleCampath::preCalcCamPathPositions()"); - testPositions->clear(); + ML_TRACE_IN("GoogleCampath::preCalcCamPathPositions()"); + testPositions->clear(); - //1. Testen und Auslesen der Parameter - readParameter(frameEntry); - //2. Build surrounding sphere ('All') - SbVec3f BBCenter; - double radius; - AnimationCache::Measures MasterBB; - MasterBB = myCache->getMeasuresFromHT("ALL"); // watch for uppercase - BBCenter = myCache->getBoundingCenter(MasterBB); - radius = (BBCenter-MasterBB.BB_min).length(); + //1. Testen und Auslesen der Parameter + readParameter(frameEntry); + //2. Build surrounding sphere ('All') + SbVec3f BBCenter; + double radius; + AnimationCache::Measures MasterBB; + MasterBB = myCache->getMeasuresFromHT("ALL"); // watch for uppercase + BBCenter = myCache->getBoundingCenter(MasterBB); + radius = (BBCenter-MasterBB.BB_min).length(); - //Durch die Ausgabe der Koordinaten an die TestSphere, kann man optisch im 3D überprüfen, ob die BB richtig ermittelt wurde - fldTestSphereCenter->setStringValue(kBasics::Vec3fToString(BBCenter)); - fldTestSphereRadius->setDoubleValue(radius); - if (fldDrawCameraPath->getBoolValue()) - { - myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "SphereCenter", new vec3(BBCenter[0],BBCenter[1],BBCenter[2]), omINFOTYPE_VEC3, true, false); - myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "SphereRadius", new double(radius), omINFOTYPE_DOUBLE, true, false); - } + //Durch die Ausgabe der Koordinaten an die TestSphere, kann man optisch im 3D überprüfen, ob die BB richtig ermittelt wurde + fldTestSphereCenter->setStringValue(kBasics::Vec3fToString(BBCenter)); + fldTestSphereRadius->setDoubleValue(radius); + if (fldDrawCameraPath->getBoolValue()) + { + myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "SphereCenter", new vec3(BBCenter[0],BBCenter[1],BBCenter[2]), omINFOTYPE_VEC3, true, false); + myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "SphereRadius", new double(radius), omINFOTYPE_DOUBLE, true, false); + } - SbVec3f currentPosition,currentLookAt,targetPosition,targetLookAt; - double currentHeight=-1.0,targetHeight; - int frameFrom=0; - int frameTo=framesPerScene; - string tempObjName=objectName; + SbVec3f currentPosition,currentLookAt,targetPosition,targetLookAt; + double currentHeight=-1.0,targetHeight; + int frameFrom=0; + int frameTo=framesPerScene; + string tempObjName=objectName; - AnimationCache::Measures lookAtBB = myCache->getMeasuresFromHT(tempObjName); - AnimationCache::MEASURESLIST myMeasureList; + AnimationCache::Measures lookAtBB = myCache->getMeasuresFromHT(tempObjName); + AnimationCache::MEASURESLIST myMeasureList; - for(int oid=0;oid<scenePosition.objects.size();oid++) - { - tempObjName=scenePosition.objects[oid]; - if(!tempObjName.empty()){ - AnimationCache::Measures lookAtBBTmp = myCache->getMeasuresFromHT(tempObjName); - myMeasureList.push_back(lookAtBBTmp); - } - } - if(!myMeasureList.empty()) - { - lookAtBB=myCache->getMasterBoundingBox(&myMeasureList); - } + for(int oid=0;oid<scenePosition.objects.size();oid++) + { + tempObjName=scenePosition.objects[oid]; + if(!tempObjName.empty()){ + AnimationCache::Measures lookAtBBTmp = myCache->getMeasuresFromHT(tempObjName); + myMeasureList.push_back(lookAtBBTmp); + } + } + if(!myMeasureList.empty()) + { + lookAtBB=myCache->getMasterBoundingBox(&myMeasureList); + } - //3. Get current values - currentPosition = mainCamera->getPosition(); - currentLookAt = mainCamera->getLookAt(); - currentHeight = mainCamera->getHeight(); + //3. Get current values + currentPosition = mainCamera->getPosition(); + currentLookAt = mainCamera->getLookAt(); + currentHeight = mainCamera->getHeight(); - //4. Get target Postiotion from polar coords and BBCenter OR take the given one - if (scenePosition.polarCoord) - { - targetPosition = BBCenter; - targetPosition[2]=targetPosition[2]+radius; //genau die entfernung des Kugelradius' vom BBCenter (=targetPos) entfernt. + //4. Get target Postiotion from polar coords and BBCenter OR take the given one + if (scenePosition.polarCoord) + { + targetPosition = BBCenter; + targetPosition[2]=targetPosition[2]+radius; //genau die entfernung des Kugelradius' vom BBCenter (=targetPos) entfernt. - //Rotation der Target-Position aus dem Original heraus - double angle; - double xAxis=scenePosition.position[0]; - double zAxis=scenePosition.position[1]; - //Rotation sagittal = x-Axis - angle = xAxis*2.0*kBasics::PI/360.0; - SbRotation* posRot1 = new SbRotation(SbVec3f(1.0,0.0,0.0),angle); - posRot1->multVec(targetPosition-BBCenter,targetPosition); - targetPosition = targetPosition + BBCenter; - //Rotation axial = -z-Axis - angle = zAxis*2.0*kBasics::PI/360.0; - SbRotation* posRot2 = new SbRotation(SbVec3f(0.0,0.0,-1.0),angle); - posRot2->multVec(targetPosition-BBCenter,targetPosition); - targetPosition = targetPosition + BBCenter; - delete posRot1; delete posRot2; - } - else - { - targetPosition[0] = scenePosition.position[0]; - targetPosition[1] = scenePosition.position[1]; - targetPosition[2] = scenePosition.position[2]; - } + //Rotation der Target-Position aus dem Original heraus + double angle; + double xAxis=scenePosition.position[0]; + double zAxis=scenePosition.position[1]; + //Rotation sagittal = x-Axis + angle = xAxis*2.0*kBasics::PI/360.0; + SbRotation* posRot1 = new SbRotation(SbVec3f(1.0,0.0,0.0),angle); + posRot1->multVec(targetPosition-BBCenter,targetPosition); + targetPosition = targetPosition + BBCenter; + //Rotation axial = -z-Axis + angle = zAxis*2.0*kBasics::PI/360.0; + SbRotation* posRot2 = new SbRotation(SbVec3f(0.0,0.0,-1.0),angle); + posRot2->multVec(targetPosition-BBCenter,targetPosition); + targetPosition = targetPosition + BBCenter; + delete posRot1; delete posRot2; + } + else + { + targetPosition[0] = scenePosition.position[0]; + targetPosition[1] = scenePosition.position[1]; + targetPosition[2] = scenePosition.position[2]; + } - double height = scenePosition.height; + double height = scenePosition.height; - //Testweise Ausgabe der Zielposition um auch das optisch durch ne Kugel o.ä. zu testen - fldTestTargetPosition->setStringValue(kBasics::Vec3fToString(targetPosition)); - //5. Get lookAtPosition and calc cam height - targetLookAt = myCache->getBoundingCenter(lookAtBB); - //targetHeight = height * (targetLookAt-lookAtBB.BB_min).length(); //Durchmesser lokale Kugel - targetHeight = 2* height * (targetLookAt-MasterBB.BB_min).length(); //Durchmesser global ALL-Kugel - //6. Calc positions for every frame - calcPositions(&BBCenter,frameEntry,globalFrameNr,currentHeight,targetHeight,¤tPosition,&targetPosition,¤tLookAt,&targetLookAt,frameFrom,frameTo); + //Testweise Ausgabe der Zielposition um auch das optisch durch ne Kugel o.ä. zu testen + fldTestTargetPosition->setStringValue(kBasics::Vec3fToString(targetPosition)); + //5. Get lookAtPosition and calc cam height + targetLookAt = myCache->getBoundingCenter(lookAtBB); + //targetHeight = height * (targetLookAt-lookAtBB.BB_min).length(); //Durchmesser lokale Kugel + targetHeight = 2* height * (targetLookAt-MasterBB.BB_min).length(); //Durchmesser global ALL-Kugel + //6. Calc positions for every frame + calcPositions(&BBCenter,frameEntry,globalFrameNr,currentHeight,targetHeight,¤tPosition,&targetPosition,¤tLookAt,&targetLookAt,frameFrom,frameTo); - frameTo+=framesPerScene; - if (fldDrawCameraPath->getBoolValue()) myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "PositionCount", new int(frameEntry->getFrameCount()), omINFOTYPE_INT32, true, false); - currentPosition=targetPosition; - currentLookAt=targetLookAt; - currentHeight=targetHeight; + frameTo+=framesPerScene; + if (fldDrawCameraPath->getBoolValue()) myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "PositionCount", new int(frameEntry->getFrameCount()), omINFOTYPE_INT32, true, false); + currentPosition=targetPosition; + currentLookAt=targetLookAt; + currentHeight=targetHeight; } void AbstractCampath::calcPositions(SbVec3f* bbc,kScriptFrameEntry* frameEntry,int globalFrameNr,double currentHeight,double targetHeight,SbVec3f* currentPosition,SbVec3f* targetPosition,SbVec3f* currentLookAt,SbVec3f* targetLookAt,int frameFrom,int frameTo){ - if(frameFrom<0 || frameTo>frameEntry->getFrameCount() || frameTo<frameFrom) - return; - maxHeight = (*currentPosition - *targetPosition).length(); - double distance,nextHeight,prozdist; - SbVec3f vectorToTarget = *targetPosition - *currentPosition; - SbVec3f nextPosition,nextLookAt; - int framecnt=frameTo-frameFrom; - if(maxHeight<=0.0) - { - nextPosition=*targetPosition; - nextLookAt=*targetLookAt; - nextHeight=targetHeight; - for (int i=frameFrom; i<=frameTo; i++) - { - testPositions->push_back(nextPosition); - setParameters(globalFrameNr,i,frameEntry,nextHeight,&nextLookAt,&nextPosition); - } - } - else - { - for (int i=frameFrom; i<=frameTo; i++) - { - distance = AnimationExecuter::getRotationAngleByType(maxHeight,"BEZIER2",i-frameFrom,framecnt); - prozdist=distance/maxHeight; - internCalcPositions(bbc,currentHeight,targetHeight,currentPosition,currentLookAt,targetLookAt,prozdist,&vectorToTarget,nextPosition,nextLookAt,nextHeight); - testPositions->push_back(nextPosition); - //Write camera values as parameter in corresponding FrameEntry - setParameters(globalFrameNr,i,frameEntry,nextHeight,&nextLookAt,&nextPosition); - } - } + if(frameFrom<0 || frameTo>frameEntry->getFrameCount() || frameTo<frameFrom) + return; + maxHeight = (*currentPosition - *targetPosition).length(); + double distance,nextHeight,prozdist; + SbVec3f vectorToTarget = *targetPosition - *currentPosition; + SbVec3f nextPosition,nextLookAt; + int framecnt=frameTo-frameFrom; + if(maxHeight<=0.0) + { + nextPosition=*targetPosition; + nextLookAt=*targetLookAt; + nextHeight=targetHeight; + for (int i=frameFrom; i<=frameTo; i++) + { + testPositions->push_back(nextPosition); + setParameters(globalFrameNr,i,frameEntry,nextHeight,&nextLookAt,&nextPosition); + } + } + else + { + for (int i=frameFrom; i<=frameTo; i++) + { + distance = AnimationExecuter::getRotationAngleByType(maxHeight,"BEZIER2",i-frameFrom,framecnt); + prozdist=distance/maxHeight; + internCalcPositions(bbc,currentHeight,targetHeight,currentPosition,currentLookAt,targetLookAt,prozdist,&vectorToTarget,nextPosition,nextLookAt,nextHeight); + testPositions->push_back(nextPosition); + //Write camera values as parameter in corresponding FrameEntry + setParameters(globalFrameNr,i,frameEntry,nextHeight,&nextLookAt,&nextPosition); + } + } } bool AbstractCampath::testParameters(kScriptFrameEntry* frameEntry) { - if(frameEntry->getParams()->size()!=2){ - kDebug::Debug("Wrong number of parameter in UMDCampath",kDebug::DL_NONE); - kDebug::Debug(frameEntry->getParamString(),kDebug::DL_NONE); - for(int i=0;i<frameEntry->getParams()->size();i++){ - kDebug::Debug((*frameEntry->getParams())[i],kDebug::DL_NONE); - } - kDebug::Debug("Usage: [time1,time2] 'Cam' campath 'Object' Point(X,Y,Height)",kDebug::DL_NONE); - return false; - } - return true; + if(frameEntry->getParams()->size()!=2){ + kDebug::Debug("Wrong number of parameter in UMDCampath",kDebug::DL_NONE); + kDebug::Debug(frameEntry->getParamString(),kDebug::DL_NONE); + for(int i=0;i<frameEntry->getParams()->size();i++){ + kDebug::Debug((*frameEntry->getParams())[i],kDebug::DL_NONE); + } + kDebug::Debug("Usage: [time1,time2] 'Cam' campath 'Object' Point(X,Y,Height)",kDebug::DL_NONE); + return false; + } + return true; } void AbstractCampath::readParameter(kScriptFrameEntry* frameEntry) { - //Parameter: StructureName alpha;beta;zoom - //ODER: StructureName x;y;z;zoom - if(!testParameters(frameEntry)) - return; - objectName=(*frameEntry->getParams())[0]; - std::vector<std::string> bothparams; - kBasics::split((*frameEntry->getParams())[1],',',-1,&bothparams); - if(bothparams.size()>=1) - { - std::vector<std::string> actvector; - kBasics::split(bothparams[0],';',-1,&actvector); - if(actvector.size()==3) - { - vec3 pos(kBasics::StringToDouble(actvector[0]),kBasics::StringToDouble(actvector[1]),0); - double height = kBasics::StringToDouble(actvector[2]); - vec4 v(0,0,0,0); - std::vector<std::string> objs; - if(bothparams.size()>=2){ - std::vector<std::string> orientvector; - kBasics::split(bothparams[1],';',4,&orientvector); - if(orientvector.size()==4){ - for(int g=0;g<4;g++){ - v[g]=kBasics::StringToFloat(orientvector[g]); - } - if(bothparams.size()>=3){ - kBasics::split(bothparams[2],';',-1,&objs); - } - } - } - ScenePosition sp(pos,height,v,true,objs); - scenePosition=sp; - } - else if (actvector.size()==4) - { - vec3 pos(kBasics::StringToDouble(actvector[0]),kBasics::StringToDouble(actvector[1]),kBasics::StringToDouble(actvector[2])); - double height = kBasics::StringToDouble(actvector[3]); - vec4 v(0,0,0,0); - std::vector<std::string> objs; - if(bothparams.size()>=2){ - std::vector<std::string> orientvector; - kBasics::split(bothparams[1],';',4,&orientvector); - if(orientvector.size()==4){ - for(int g=0;g<4;g++){ - v[g]=kBasics::StringToFloat(orientvector[g]); - } - if(bothparams.size()>=3){ - kBasics::split(bothparams[2],';',-1,&objs); - } - } - } - ScenePosition sp(pos,height,v,false,objs); - scenePosition=sp; - } - else - { - std::cout << "ERROR in campath: use alpha;beta;zoom or x;y;z;zoom" << std::endl; - } - } - calcFramesPerScene(frameEntry->getFrameCount()); + //Parameter: StructureName alpha;beta;zoom + //ODER: StructureName x;y;z;zoom + if(!testParameters(frameEntry)) + return; + objectName=(*frameEntry->getParams())[0]; + std::vector<std::string> bothparams; + kBasics::split((*frameEntry->getParams())[1],',',-1,&bothparams); + if(bothparams.size()>=1) + { + std::vector<std::string> actvector; + kBasics::split(bothparams[0],';',-1,&actvector); + if(actvector.size()==3) + { + vec3 pos(kBasics::StringToDouble(actvector[0]),kBasics::StringToDouble(actvector[1]),0); + double height = kBasics::StringToDouble(actvector[2]); + vec4 v(0,0,0,0); + std::vector<std::string> objs; + if(bothparams.size()>=2){ + std::vector<std::string> orientvector; + kBasics::split(bothparams[1],';',4,&orientvector); + if(orientvector.size()==4){ + for(int g=0;g<4;g++){ + v[g]=kBasics::StringToFloat(orientvector[g]); + } + if(bothparams.size()>=3){ + kBasics::split(bothparams[2],';',-1,&objs); + } + } + } + ScenePosition sp(pos,height,v,true,objs); + scenePosition=sp; + } + else if (actvector.size()==4) + { + vec3 pos(kBasics::StringToDouble(actvector[0]),kBasics::StringToDouble(actvector[1]),kBasics::StringToDouble(actvector[2])); + double height = kBasics::StringToDouble(actvector[3]); + vec4 v(0,0,0,0); + std::vector<std::string> objs; + if(bothparams.size()>=2){ + std::vector<std::string> orientvector; + kBasics::split(bothparams[1],';',4,&orientvector); + if(orientvector.size()==4){ + for(int g=0;g<4;g++){ + v[g]=kBasics::StringToFloat(orientvector[g]); + } + if(bothparams.size()>=3){ + kBasics::split(bothparams[2],';',-1,&objs); + } + } + } + ScenePosition sp(pos,height,v,false,objs); + scenePosition=sp; + } + else + { + std::cout << "ERROR in campath: use alpha;beta;zoom or x;y;z;zoom" << std::endl; + } + } + calcFramesPerScene(frameEntry->getFrameCount()); } void AbstractCampath::calcFramesPerScene(int count) { - framesPerScene=count; + framesPerScene=count; } -void AbstractCampath::setParameters(int globalFrameNr,int i,kScriptFrameEntry* frameEntry,double nextHeight,SbVec3f* nextLookAt,SbVec3f* nextPosition){ - if(i+globalFrameNr>=myList->FrameList.size()) - return; - int j = myList->FrameList[globalFrameNr+i]->getEntryIDByCommandLine(frameEntry->getCommandLine()); - if (j!=-1) { - if (!nextLookAt || ! nextPosition) - { - std::cout << "NULL nextLookAt or NULL nextPosition ... return " << std::endl; - } - string ParamStr; - ParamStr = kBasics::Vec3fToString(*nextLookAt,','); - ParamStr = ParamStr + " " + kBasics::Vec3fToString(*nextPosition,','); - ParamStr = ParamStr + " " + kBasics::DoubleToString(nextHeight); - myList->FrameList[globalFrameNr+i]->EntryList[j]->setParamString(ParamStr); - myList->FrameList[globalFrameNr+i]->EntryList[j]->setCommunicationFlag(kScriptFrameEntry::CFLAG_EXECUTECAMPATH); +void AbstractCampath::setParameters(int globalFrameNr,int i,kScriptFrameEntry* frameEntry,double nextHeight,SbVec3f* nextLookAt,SbVec3f* nextPosition){ + if(i+globalFrameNr>=myList->FrameList.size()) + return; + int j = myList->FrameList[globalFrameNr+i]->getEntryIDByCommandLine(frameEntry->getCommandLine()); + if (j!=-1) { + if (!nextLookAt || ! nextPosition) + { + std::cout << "NULL nextLookAt or NULL nextPosition ... return " << std::endl; + } + string ParamStr; + ParamStr = kBasics::Vec3fToString(*nextLookAt,','); + ParamStr = ParamStr + " " + kBasics::Vec3fToString(*nextPosition,','); + ParamStr = ParamStr + " " + kBasics::DoubleToString(nextHeight); + myList->FrameList[globalFrameNr+i]->EntryList[j]->setParamString(ParamStr); + myList->FrameList[globalFrameNr+i]->EntryList[j]->setCommunicationFlag(kScriptFrameEntry::CFLAG_EXECUTECAMPATH); - if (fldDrawCameraPath->getBoolValue()){ - /**Berechnung der Debugkamerapositionen mit Höhenangaben**/ - /*SbVec3f v3f=(*nextPosition)-(*nextLookAt); - vec3 v((*nextPosition)[0],(*nextPosition)[1],(*nextPosition)[2]); - v3f.normalize(); - v[0]+=v3f[0]*nextHeight; - v[1]+=v3f[1]*nextHeight; - v[2]+=v3f[2]*nextHeight; - myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Position"+kBasics::leadingZero(i,6), &v, omINFOTYPE_VEC3, true, false);*/ + if (fldDrawCameraPath->getBoolValue()){ + /**Berechnung der Debugkamerapositionen mit Höhenangaben**/ + /*SbVec3f v3f=(*nextPosition)-(*nextLookAt); + vec3 v((*nextPosition)[0],(*nextPosition)[1],(*nextPosition)[2]); + v3f.normalize(); + v[0]+=v3f[0]*nextHeight; + v[1]+=v3f[1]*nextHeight; + v[2]+=v3f[2]*nextHeight; + myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Position"+kBasics::leadingZero(i,6), &v, omINFOTYPE_VEC3, true, false);*/ - //Berechnung der Debugkamerapositionen mit Höhenangaben - //Eine Höhe = BBox-Höhe liegt auf der Kugeloberfläche - if (nextPosition) - { - myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Position"+kBasics::leadingZero(i,6), new vec3((*nextPosition)[0],(*nextPosition)[1],(*nextPosition)[2]), omINFOTYPE_VEC3, true, false); - myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Height"+kBasics::leadingZero(i,6), new double(nextHeight), omINFOTYPE_DOUBLE, true, false); - //myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Color",new vec3(1,1,1),omIn omINFOTYPE_VEC3,true,false); - //Calc Orientation - kCamera tempCam; - tempCam.setCamPosition(*nextPosition,*nextLookAt); - SbVec3f axis; float x,y,z,radians; - tempCam.getOrientation().getValue(axis,radians); - axis.getValue(x,y,z); - vec4* tempVec4 = new vec4((double)x,(double)y,(double)z,(double)radians); - myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Orientation"+kBasics::leadingZero(i,6), tempVec4, omINFOTYPE_VEC4, true, false); - delete tempVec4; - } - } - } - else kDebug::Debug("Frame entry which should be there isnt :-(",kDebug::DL_HIGH); + //Berechnung der Debugkamerapositionen mit Höhenangaben + //Eine Höhe = BBox-Höhe liegt auf der Kugeloberfläche + if (nextPosition) + { + myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Position"+kBasics::leadingZero(i,6), new vec3((*nextPosition)[0],(*nextPosition)[1],(*nextPosition)[2]), omINFOTYPE_VEC3, true, false); + myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Height"+kBasics::leadingZero(i,6), new double(nextHeight), omINFOTYPE_DOUBLE, true, false); + //myObjMgr->setObjAttribute(O_ANIMATION, "DebugCameraPath", "Color",new vec3(1,1,1),omIn omINFOTYPE_VEC3,true,false); + //Calc Orientation + kCamera tempCam; + tempCam.setCamPosition(*nextPosition,*nextLookAt); + SbVec3f axis; float x,y,z,radians; + tempCam.getOrientation().getValue(axis,radians); + axis.getValue(x,y,z); + ... [truncated message content] |
From: <wol...@us...> - 2009-06-23 10:11:53
|
Revision: 113 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=113&view=rev Author: wolfspindler Date: 2009-06-23 10:11:14 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Platform dependent _itoa replaced.BUG: -Platform dependent type replaced by independent one. -Some comments and errors added about 64 bit issues. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.cpp trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.cpp trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h Property Changed: ---------------- trunk/Community/METK/Sources/Inventor/UMDPickInfo/ trunk/Community/METK/Sources/ML/METKMessaging/ trunk/Community/METK/Sources/ML/UMDInventorPointer/ trunk/Community/METK/Sources/ML/UMDRegionDistanceTransformation/ Property changes on: trunk/Community/METK/Sources/Inventor/UMDPickInfo ___________________________________________________________________ Added: svn:ignore + UMDPickInfo.sln UMDPickInfo.suo UMDPickInfo.vcproj UMDPickInfo.vcproj.lapsus-win.wolf.user Modified: trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 09:18:54 UTC (rev 112) +++ trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 10:11:14 UTC (rev 113) @@ -11,7 +11,7 @@ // Local includes #include "SoPickInfo.h" -#include <stdlib.h> // for itoa +#include <mlUtils.h> // for itoa // Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid // collisions between OpenInventor and Windows headers. @@ -24,14 +24,6 @@ # define SO_TRACE_IN(__classAndMethod___) #endif #include "XVLeaveScope.h" - -// Resolve platform dependent itoa function. -#ifdef WIN32 - #define myIToA(A, B, C) _itoa(A, B, C) -#else - #define myIToA(A, B, C) itoa(A, B, C) -#endif - #include <string> // for concatenation, also uses non-standard function itoa SO_NODE_SOURCE(SoPickInfo) @@ -120,15 +112,15 @@ { SoPointDetail *pointDetail = (SoPointDetail*) pickDetail; std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoPointDetail</td> </tr> "); - char iA[33]; // buffer for 32-bit int + 0 + char iA[100]; // buffer large enough even for 64 bit integers - myIToA(pointDetail->getCoordinateIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", pointDetail->getCoordinateIndex()); details += "<tr> <td>Coordinate Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(pointDetail->getMaterialIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", pointDetail->getMaterialIndex()); details += "<tr> <td>Material Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(pointDetail->getNormalIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", pointDetail->getNormalIndex()); details += "<tr> <td>Normal Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(pointDetail->getTextureCoordIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", pointDetail->getTextureCoordIndex()); details += "<tr> <td>Texture Coordinate Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -141,15 +133,15 @@ { SoLineDetail *lineDetail = (SoLineDetail*) pickDetail; std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoLineDetail</td> </tr> "); - char iA[33]; // buffer for 32-bit int + 0 + char iA[100]; // buffer large enough for 64 bit int strings - myIToA(lineDetail->getPoint0()->getCoordinateIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", lineDetail->getPoint0()->getCoordinateIndex()); details += "<tr> <td>Point0 Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(lineDetail->getPoint1()->getCoordinateIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", lineDetail->getPoint1()->getCoordinateIndex(), iA, 10); details += "<tr> <td>Point1 Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(lineDetail->getLineIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", lineDetail->getLineIndex()); details += "<tr> <td>Line Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(lineDetail->getPartIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", lineDetail->getPartIndex()); details += "<tr> <td>Part Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -162,18 +154,18 @@ { SoFaceDetail *faceDetail = (SoFaceDetail*) pickDetail; std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoFaceDetail</td> </tr> "); - char iA[33]; // buffer for 32-bit int + 0 + char iA[100]; // buffer large enough for 64 bit int strings for (int i = 0; i < faceDetail->getNumPoints(); i++) { - myIToA(i, iA, 10); + MLsnprintf(iA, 99, "%I64ld", i); details += "<tr> <td>Point " + std::string(iA); - myIToA(faceDetail->getPoint(i)->getCoordinateIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", faceDetail->getPoint(i)->getCoordinateIndex()); details += " Index</td> <td>" + std::string(iA) + "</td> </tr> "; } - myIToA(faceDetail->getFaceIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", faceDetail->getFaceIndex()); details += "<tr> <td>Face Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(faceDetail->getPartIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", faceDetail->getPartIndex()); details += "<tr> <td>Part Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -186,11 +178,11 @@ { SoTextDetail *textDetail = (SoTextDetail*) pickDetail; std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoTextDetail</td> </tr> "); - char iA[33]; // buffer for 32-bit int + 0 + char iA[100]; // buffer large enough for 64 bit int strings - myIToA(textDetail->getStringIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", textDetail->getStringIndex()); details += "<tr> <td>String Index</td> <td>" + std::string(iA) + "</td> </tr> "; - myIToA(textDetail->getCharacterIndex(), iA, 10); + MLsnprintf(iA, 99, "%I64ld", textDetail->getCharacterIndex()); details += "<tr> <td>Character Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -295,11 +287,11 @@ if (pickPath) { std::string path("<table border=1 cellpadding=4> <tr> <th>i</th> <th>Node</th> <th>Name</th> </tr> "); - char iA[33]; // buffer for 32-bit int + 0 + char iA[100]; // buffer large enough for 64 bit int strings for (int i = 0; i < pickPath->getLength(); i++) { - myIToA(i, iA, 10); + MLsnprintf(iA, 99, "%I64ld", i); path += "<tr> <td>" + std::string(iA) + "</td> <td>" + pickPath->getNode(i)->getTypeId().getName().getString() + "</td> <td>" + pickPath->getNode(i)->getName().getString() + "</td> </tr> "; Property changes on: trunk/Community/METK/Sources/ML/METKMessaging ___________________________________________________________________ Added: svn:ignore + METKMessaging.sln METKMessaging.suo METKMessaging.vcproj METKMessaging.vcproj.lapsus-win.wolf.user Property changes on: trunk/Community/METK/Sources/ML/UMDInventorPointer ___________________________________________________________________ Added: svn:ignore + UMDInventorPointer.sln UMDInventorPointer.suo UMDInventorPointer.vcproj UMDInventorPointer.vcproj.lapsus-win.wolf.user Modified: trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.cpp =================================================================== --- trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.cpp 2009-06-23 09:18:54 UTC (rev 112) +++ trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.cpp 2009-06-23 10:11:14 UTC (rev 113) @@ -125,7 +125,13 @@ if (&obj) { if (!obj.hasAttribute(fieldLayerID->getStringValue(), fieldInfoID->getStringValue())) { omAttribute& attrNew = (*oc)[fieldObjectID->getStringValue()][fieldLayerID->getStringValue()][fieldInfoID->getStringValue()]; - attrNew.set_MLint32(_pointer->getIntValue()); + attrNew.set_MLint32(_pointer->getIntValue()); + #pragma message("error in UMDPointerToInventor::writePointer(): This function will fail for pointers larger than 2^31 and requires porting (see e.g. MLStringToPtr())!") + #ifdef MEVIS_64BIT + ML_PRINT_ERROR("UMDPointerToInventor::writePointer()", + ML_BAD_DATA_TYPE, + "This function will fail for pointers larger than 2^31 and requires porting (see e.g. MLStringToPtr())!"); + #endif attrNew.flags().markPersistent(false); } else{ Modified: trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.cpp =================================================================== --- trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.cpp 2009-06-23 09:18:54 UTC (rev 112) +++ trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.cpp 2009-06-23 10:11:14 UTC (rev 113) @@ -156,8 +156,16 @@ if (obj.isValid()) { bool pValid = obj.hasAttribute(fieldLayerID->getStringValue(), fieldInfoID->getStringValue()); - if (pValid) + if (pValid){ _myPointer = obj[fieldLayerID->getStringValue()][fieldInfoID->getStringValue()].get_MLint32(); + #pragma message("error in UMDPointerToInventor::getPointer(): This function will fail for pointers larger than 2^31 and requires porting (see e.g. MLStringToPtr())!") + #ifdef MEVIS_64BIT + ML_PRINT_ERROR("UMDPointerToInventor::getPointer()", + ML_BAD_DATA_TYPE, + "This function will fail for pointers larger than 2^31 and requires porting (see e.g. MLStringToPtr())!"); + #endif + } + } } } Modified: trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h =================================================================== --- trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h 2009-06-23 09:18:54 UTC (rev 112) +++ trunk/Community/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h 2009-06-23 10:11:14 UTC (rev 113) @@ -67,7 +67,7 @@ typedef ObjMgrClient inherited; - __int64 _myPointer; + MLint64 _myPointer; //! Implements interface for the runtime type system of the ML. ML_CLASS_HEADER(UMDPointerToInventor) Property changes on: trunk/Community/METK/Sources/ML/UMDRegionDistanceTransformation ___________________________________________________________________ Added: svn:ignore + UMDRegionDistanceTransformation.vcproj UMDRegionDistanceTransformation.vcproj.lapsus-win.wolf.user This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 09:10:45
|
Revision: 111 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=111&view=rev Author: wolfspindler Date: 2009-06-23 09:09:29 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Missing include of stdlib.h added. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp Modified: trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 09:03:27 UTC (rev 110) +++ trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 09:09:29 UTC (rev 111) @@ -11,6 +11,7 @@ // Local includes #include "SoPickInfo.h" +#include <stdlib.h> // for itoa // Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid // collisions between OpenInventor and Windows headers. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 09:05:00
|
Revision: 110 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=110&view=rev Author: wolfspindler Date: 2009-06-23 09:03:27 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Missing std namespace added before stl class. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp Modified: trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 08:46:32 UTC (rev 109) +++ trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 09:03:27 UTC (rev 110) @@ -142,8 +142,8 @@ unsigned int i = 0; //for vertex normals - list <SbVec3f> normalList; - list <SbVec3f>::iterator iN; + std::list <SbVec3f> normalList; + std::list <SbVec3f>::iterator iN; normalList.clear(); SbVec3f tmp_normal = SbVec3f(0, 0, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 08:49:55
|
Revision: 109 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=109&view=rev Author: wolfspindler Date: 2009-06-23 08:46:32 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Platform dependent Message box not replaced, using better debug error output of Open Inventor instead. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp Property Changed: ---------------- trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/ trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/tmp/ Property changes on: trunk/Community/METK/Sources/Inventor/UMDSoMeasurement ___________________________________________________________________ Added: svn:ignore + UMDSoMeasurement.sln UMDSoMeasurement.suo UMDSoMeasurement.vcproj UMDSoMeasurement.vcproj.lapsus-win.wolf.user Modified: trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp 2009-06-23 08:24:23 UTC (rev 108) +++ trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.cpp 2009-06-23 08:46:32 UTC (rev 109) @@ -5,13 +5,22 @@ // ############################# +#include <Inventor/errors/SoDebugError.h> #include "UMDSoDistanceLine.h" #include "UMDSoShapeToPointSet.h" #include "UMDSoMaximumExtension.h" #include "SoQHull3D.h" #include <stdio.h> +#ifdef WIN32 + #define MyMessageBox(A, B, C, D) MessageBox(A, B, C, D) + #define My_MB_OK MB_OK +#else + #define MyMessageBox(A, B, C, D) SoDebugError::post("File %s, line %d: %d %s %s", __FILE__, __LINE__, A, B, C ); + #define My_MB_OK +#endif + SO_NODE_SOURCE(UMDSoMaximumExtension); void UMDSoMaximumExtension::initClass() { @@ -196,7 +205,7 @@ pWidth_1.setValue(defaultPoint); pWidth_2.setValue(defaultPoint); - MessageBox (NULL, L"No Points available for computing the maximum extension!", L"UMDSoMaximumExtension::computeMaxExtensionBruteForce", MB_OK); + MyMessageBox (NULL, L"No Points available for computing the maximum extension!", L"UMDSoMaximumExtension::computeMaxExtensionBruteForce", My_MB_OK); } //display(); return fMaxExtension; @@ -286,7 +295,7 @@ } else{ fDistance = 0.0; - MessageBox (NULL, L"Points are identical, there is no distance between them!", L"UMDSoMaximumExtension::computeDistance", MB_OK); + MyMessageBox (NULL, L"Points are identical, there is no distance between them!", L"UMDSoMaximumExtension::computeDistance", My_MB_OK); } return fDistance; } @@ -298,7 +307,7 @@ } else{ fDistance = 0.0; - MessageBox (NULL, L"Points are identical, there is no distance between them!", L"UMDSoMaximumExtension::computeDistance", MB_OK); + MyMessageBox (NULL, L"Points are identical, there is no distance between them!", L"UMDSoMaximumExtension::computeDistance", My_MB_OK); } return fDistance; } Property changes on: trunk/Community/METK/Sources/Inventor/UMDSoMeasurement/tmp ___________________________________________________________________ Added: svn:ignore + debug release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 08:25:44
|
Revision: 108 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=108&view=rev Author: wolfspindler Date: 2009-06-23 08:24:23 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Incorrect capital letter replaced by lower one. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h Modified: trunk/Community/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h 2009-06-23 08:22:23 UTC (rev 107) +++ trunk/Community/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h 2009-06-23 08:24:23 UTC (rev 108) @@ -5,7 +5,7 @@ // \author Konrad M\xFChler // \date 2005-04-23 // -// +// */ // -------------------------------------------------------------------------- @@ -21,7 +21,7 @@ // collisions between OpenInventor and Windows headers. #include "XVEnterScope.h" #include <Inventor/nodes/SoSubNode.h> -#include <Inventor/Sensors/SoFieldSensor.h> +#include <Inventor/sensors/SoFieldSensor.h> #include <Inventor/nodes/SoSeparator.h> #include <Inventor/fields/SoSFString.h> #include <Inventor/elements/SoCacheElement.h> @@ -30,37 +30,37 @@ //! Module to control the rendering status of an ExaminerViewer class UMDVIEWERTRIGGER_EXPORT SoUMDViewerTrigger : public SoSeparator -{ - SO_NODE_HEADER(SoUMDViewerTrigger); //!< Implements the runtime type system interface of this new node. +{ + SO_NODE_HEADER(SoUMDViewerTrigger); //!< Implements the runtime type system interface of this new node. -public: - SoUMDViewerTrigger(); - - static void initClass(); +public: + SoUMDViewerTrigger(); - virtual void GLRenderBelowPath(SoGLRenderAction* action); - - //SoSFString ViewerNameFld; //!< Relay Name of Viewer to ViewerWriter - SoSFString StatusFld; //!< Rendering/Ready - //SoSFString PongFld; - //SoSFVec3f PositionFld; //!< Postion of the camera - //SoSFRotation OrientationFld;//!< Orientation of the camera + static void initClass(); - //SoSFTrigger ForceRedrawFld; + virtual void GLRenderBelowPath(SoGLRenderAction* action); -protected: - virtual ~SoUMDViewerTrigger(); + //SoSFString ViewerNameFld; //!< Relay Name of Viewer to ViewerWriter + SoSFString StatusFld; //!< Rendering/Ready + //SoSFString PongFld; + //SoSFVec3f PositionFld; //!< Postion of the camera + //SoSFRotation OrientationFld;//!< Orientation of the camera + //SoSFTrigger ForceRedrawFld; + +protected: + virtual ~SoUMDViewerTrigger(); + private: - bool frameRendered; //!< Sets FALSE before RenderPath and TRUE after coming back - //SoGLRenderAction* globalAction; - bool currentlyLeft; //!< Denies a rerendering after a direct call of rendering - SoTimerSensor* timerSensor; //!< Delays the "Ready" of status a little bit to let a change proceed - - static void timerEvent(void* data, SoDataSensor* a); - void render(SoDataSensor* sensor); + bool frameRendered; //!< Sets FALSE before RenderPath and TRUE after coming back + //SoGLRenderAction* globalAction; + bool currentlyLeft; //!< Denies a rerendering after a direct call of rendering + SoTimerSensor* timerSensor; //!< Delays the "Ready" of status a little bit to let a change proceed + static void timerEvent(void* data, SoDataSensor* a); + void render(SoDataSensor* sensor); + //! node sensor: to react on field changes //SoNodeSensor* _nodeSensor; //! static callback function called on node change This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 08:23:29
|
Revision: 107 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=107&view=rev Author: wolfspindler Date: 2009-06-23 08:22:23 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Trial to fix matching problem by using explicit MLDataType instead of element of MLPhysicalDataTypeIds enumerator. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h Property Changed: ---------------- trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/ Property changes on: trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions ___________________________________________________________________ Added: svn:ignore + UMDSoView2DExtensions.sln UMDSoView2DExtensions.suo UMDSoView2DExtensions.vcproj UMDSoView2DExtensions.vcproj.lapsus-win.wolf.user Modified: trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp 2009-06-23 08:11:05 UTC (rev 106) +++ trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp 2009-06-23 08:22:23 UTC (rev 107) @@ -242,7 +242,7 @@ oPointer = (_ML_UINT8 *) originalData; // get original - oOk = dsl->getInputImage()->getTile3D(originalData, MLuint8Type, 0, 0, currentSlice.getValue(), ox, oy, 1); + oOk = dsl->getInputImage()->getTile3D(originalData, static_cast<MLDataType>(MLuint8Type), 0, 0, currentSlice.getValue(), ox, oy, 1); // compute texture, if not done already if (!textureOK) computeTexture(); @@ -362,14 +362,14 @@ if (tc == 3) { inTexture.getTile6D(textureData, - MLuint8Type, + static_cast<MLDataType>(MLuint8Type), XVImageSize(0, 0, 0, 0, 0, 0), XVImageSize(tx, ty, tz, 3, 1, 1)); } else if (tc == 1) { inTexture.getTile3D(textureData, - MLuint8Type, + static_cast<MLDataType>(MLuint8Type), 0, 0, 0, tx, ty, tz); } @@ -428,7 +428,7 @@ // get mask - mOk = inMask.getTile3D(maskData, MLuint8Type, 0, 0, currentSlice.getValue(), mx, my, 1); + mOk = inMask.getTile3D(maskData, static_cast<MLDataType>(MLuint8Type), 0, 0, currentSlice.getValue(), mx, my, 1); // tile the small texture onto a big one ... //if ( (tx<ox) || (ty<oy) ) Modified: trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h 2009-06-23 08:11:05 UTC (rev 106) +++ trunk/Community/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h 2009-06-23 08:22:23 UTC (rev 107) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoTextureMaskedArea derived from SoView2DExtension +//! The Inventor module class SoTextureMaskedArea derived from SoView2DExtension. /*! // \file SoTextureMaskedArea.h // \author Bj\xF6rn Meyer @@ -49,7 +49,7 @@ -//! +//! The Inventor module class SoTextureMaskedArea derived from SoView2DExtension. class UMDSOVIEW2DEXTENSIONS_EXPORT SoTextureMaskedArea : public SoView2DExtension { //! Implements the runtime type system interface of this new node. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 08:11:40
|
Revision: 106 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=106&view=rev Author: wolfspindler Date: 2009-06-23 08:11:05 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Missing std namespace added before vector. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h Property Changed: ---------------- trunk/Community/METK/Sources/Inventor/SoQHull3D/ Property changes on: trunk/Community/METK/Sources/Inventor/SoQHull3D ___________________________________________________________________ Added: svn:ignore + UMDQHull3D.sln UMDQHull3D.suo UMDQHull3D.vcproj UMDQHull3D.vcproj.lapsus-win.wolf.user Modified: trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h =================================================================== --- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h 2009-06-23 08:06:06 UTC (rev 105) +++ trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h 2009-06-23 08:11:05 UTC (rev 106) @@ -50,19 +50,19 @@ } //QHull: global vector for input points -typedef vector <realT> realTVector; +typedef std::vector <realT> realTVector; static realTVector inputPointList; //global vectors for point values -typedef vector <SbVec3f> PointVector; +typedef std::vector <SbVec3f> PointVector; static PointVector convexHullPoints; static PointVector convexHullFaceNormals; static PointVector convexHullVertexNormals; //... and for index values -typedef vector <int> IndexVector; +typedef std::vector <int> IndexVector; static IndexVector convexHullIndexLUT; static IndexVector convexHullFaceIndexList; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 08:07:10
|
Revision: 105 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=105&view=rev Author: wolfspindler Date: 2009-06-23 08:06:06 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Platform dependent _itoa replaced by locally written independent macro version. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp Modified: trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 07:59:00 UTC (rev 104) +++ trunk/Community/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.cpp 2009-06-23 08:06:06 UTC (rev 105) @@ -24,6 +24,13 @@ #endif #include "XVLeaveScope.h" +// Resolve platform dependent itoa function. +#ifdef WIN32 + #define myIToA(A, B, C) _itoa(A, B, C) +#else + #define myIToA(A, B, C) itoa(A, B, C) +#endif + #include <string> // for concatenation, also uses non-standard function itoa SO_NODE_SOURCE(SoPickInfo) @@ -114,13 +121,13 @@ std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoPointDetail</td> </tr> "); char iA[33]; // buffer for 32-bit int + 0 - _itoa(pointDetail->getCoordinateIndex(), iA, 10); + myIToA(pointDetail->getCoordinateIndex(), iA, 10); details += "<tr> <td>Coordinate Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(pointDetail->getMaterialIndex(), iA, 10); + myIToA(pointDetail->getMaterialIndex(), iA, 10); details += "<tr> <td>Material Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(pointDetail->getNormalIndex(), iA, 10); + myIToA(pointDetail->getNormalIndex(), iA, 10); details += "<tr> <td>Normal Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(pointDetail->getTextureCoordIndex(), iA, 10); + myIToA(pointDetail->getTextureCoordIndex(), iA, 10); details += "<tr> <td>Texture Coordinate Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -135,13 +142,13 @@ std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoLineDetail</td> </tr> "); char iA[33]; // buffer for 32-bit int + 0 - _itoa(lineDetail->getPoint0()->getCoordinateIndex(), iA, 10); + myIToA(lineDetail->getPoint0()->getCoordinateIndex(), iA, 10); details += "<tr> <td>Point0 Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(lineDetail->getPoint1()->getCoordinateIndex(), iA, 10); + myIToA(lineDetail->getPoint1()->getCoordinateIndex(), iA, 10); details += "<tr> <td>Point1 Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(lineDetail->getLineIndex(), iA, 10); + myIToA(lineDetail->getLineIndex(), iA, 10); details += "<tr> <td>Line Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(lineDetail->getPartIndex(), iA, 10); + myIToA(lineDetail->getPartIndex(), iA, 10); details += "<tr> <td>Part Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -158,14 +165,14 @@ for (int i = 0; i < faceDetail->getNumPoints(); i++) { - _itoa(i, iA, 10); + myIToA(i, iA, 10); details += "<tr> <td>Point " + std::string(iA); - _itoa(faceDetail->getPoint(i)->getCoordinateIndex(), iA, 10); + myIToA(faceDetail->getPoint(i)->getCoordinateIndex(), iA, 10); details += " Index</td> <td>" + std::string(iA) + "</td> </tr> "; } - _itoa(faceDetail->getFaceIndex(), iA, 10); + myIToA(faceDetail->getFaceIndex(), iA, 10); details += "<tr> <td>Face Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(faceDetail->getPartIndex(), iA, 10); + myIToA(faceDetail->getPartIndex(), iA, 10); details += "<tr> <td>Part Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -180,9 +187,9 @@ std::string details("<table border=1 cellpadding=4> <tr> <td colspan=2>SoTextDetail</td> </tr> "); char iA[33]; // buffer for 32-bit int + 0 - _itoa(textDetail->getStringIndex(), iA, 10); + myIToA(textDetail->getStringIndex(), iA, 10); details += "<tr> <td>String Index</td> <td>" + std::string(iA) + "</td> </tr> "; - _itoa(textDetail->getCharacterIndex(), iA, 10); + myIToA(textDetail->getCharacterIndex(), iA, 10); details += "<tr> <td>Character Index</td> <td>" + std::string(iA) + "</td> </tr> "; details += "</table>"; @@ -291,7 +298,7 @@ for (int i = 0; i < pickPath->getLength(); i++) { - _itoa(i, iA, 10); + myIToA(i, iA, 10); path += "<tr> <td>" + std::string(iA) + "</td> <td>" + pickPath->getNode(i)->getTypeId().getName().getString() + "</td> <td>" + pickPath->getNode(i)->getName().getString() + "</td> </tr> "; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |