X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FBilatTools_Cuda_Image%2Fsrc%2Fcore%2FcudaImageTools%2Ffonctionel%2Fcpp%2FImageFonctionel.cpp;h=899519f7926d1f645fce1f02b358af12a1cc4ae4;hb=2fd5d915e8a9de4d957d6031d2d68088784eac3c;hp=b00290406a9a7a661fe09e5311c9ccb3292d8ef0;hpb=8d08c12b29c2a14684f35c023ee39e694bb80d25;p=GPU.git diff --git a/WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/fonctionel/cpp/ImageFonctionel.cpp b/WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/fonctionel/cpp/ImageFonctionel.cpp index b002904..899519f 100755 --- a/WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/fonctionel/cpp/ImageFonctionel.cpp +++ b/WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/fonctionel/cpp/ImageFonctionel.cpp @@ -34,17 +34,24 @@ using std::endl; \*-------------------------------------*/ ImageFonctionel::ImageFonctionel(AnimableFonctionel_I* ptrAnimable, ColorRGB_01* ptrColorTitreRGB) : - ImageFonctionelMOOs_A(ptrAnimable->getW(), ptrAnimable->getH(), *ptrAnimable->getDomaineMathInit()) + ImageFonctionelMOOs_A( + ptrAnimable->getW(), + ptrAnimable->getH(), + *ptrAnimable->getDomaineMathInit() + ) { this->ptrAnimable = ptrAnimable; this->ptrColorTitreRGB = ptrColorTitreRGB; + this->valueNames = ptrAnimable->getNames(); + this->values = new float[this->valueNames.size()]; setEnableDomaineOverlay(true); } ImageFonctionel::~ImageFonctionel(void) { - delete ptrAnimable; + delete this->ptrAnimable; + delete[] this->values; } /** @@ -82,9 +89,16 @@ void ImageFonctionel::paintPrimitives(Graphic2Ds& graphic2D) // redefinition // top { - float t = ptrAnimable->getT(); - string message = "t = " + StringTools::toString(t); - graphic2D.drawTitleTop(message, ptrfont); + string title; + this->ptrAnimable->getValues(this->values); + for (int i = 0; i < this->valueNames.size(); i++) + { + if (i != 0) + title += ", "; + title += this->valueNames[i]; + title += StringTools::toString(this->values[i]); + } + graphic2D.drawTitleTop(title, ptrfont); } // bottom