From 44260d6c42bfc6be5cf0779bfd8209ab15ae16df Mon Sep 17 00:00:00 2001 From: mtarini Date: Fri, 21 Dec 2007 12:29:34 +0000 Subject: [PATCH] *** empty log message *** --- wrap/gui/trackball.cpp | 5 ++++- wrap/gui/trackball.h | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/wrap/gui/trackball.cpp b/wrap/gui/trackball.cpp index 60b6632e..c3cd8b8c 100644 --- a/wrap/gui/trackball.cpp +++ b/wrap/gui/trackball.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.23 2007/10/12 14:02:39 corsini +solve memory leak in dtor + Revision 1.22 2007/07/09 22:47:18 benedetti Removed using namespace std and modified accordingly. @@ -232,7 +235,7 @@ void Trackball::ToAscii(char* result){ f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8] ); } -bool Trackball::SetFromAscii(char * st){ +bool Trackball::SetFromAscii(const char * st){ float * f = (float*) &track; int res= sscanf(st, "trackball(%f,%f,%f,%f,%f,%f,%f,%f,%f)", f+0,f+1,f+2,f+3,f+4,f+5,f+6,f+7,f+8 ); diff --git a/wrap/gui/trackball.h b/wrap/gui/trackball.h index 83e021da..6e964d53 100644 --- a/wrap/gui/trackball.h +++ b/wrap/gui/trackball.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.16 2007/07/14 12:43:44 benedetti +Added Doxygen documentation. + Revision 1.15 2007/06/13 17:15:08 benedetti Added one-level undo system and sticky trackmodes. @@ -412,20 +415,22 @@ public: TRACK_SCALE = 13 }; */ - // loads/stores current status from/to ascii stings + // loads stores current status from/to ascii stings /*! - @brief Currently not in use. + @brief Stores current status into an ascii stings - @param st Currently not in use. + Stores current status into an ascii stings. This is useful for example to implement cut-and-paste operations of trackball status, or to embed used trackball into a comment inside a screenshot, etc. + @param st The string where to export (must be allocated). */ void ToAscii(char * st); /*! - @brief Currently not in use. + @brief Loads current status from an ascii stings - @param st Currently not in use. - @return A meaningless boolean value. + Loads current status from an ascii stings. This is useful for example to implement cut-and-paste operations of trackball status, or to embed used trackball into a comment inside a screenshot, etc. + @param st The string where to read from (must be allocated). Use ToAscii() method to set it. + @return True iff the trackball was successfully recovered. */ - bool SetFromAscii(char * st); + bool SetFromAscii(const char * st); //protected: /// The reference for point projection and unprojection from screen space to modelspace.