Changeset 1125
- Timestamp:
- 04/11/21 02:09:28 (4 years ago)
- Location:
- cpp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/util-string.h
r1025 r1125 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 13 13 char* strmove(char *a, char *b); //strcpy that works well for overlapping strings ("Source and destination overlap") 14 14 bool str_starts_with(const char *str, const char *prefix); 15 inline bool starts_with( string& str, const char *prefix) { return str_starts_with(str.c_str(),prefix); } //std::string.starts_with(...) since c++2015 inline bool starts_with(const string& str, const char *prefix) { return str_starts_with(str.c_str(),prefix); } //std::string.starts_with(...) since c++20 16 16 17 17 string ssprintf(const char* format, ...); -
cpp/frams/model/geometry/geometryutils.cpp
r1056 r1125 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 5 5 #include "geometryutils.h" 6 6 #include <math.h> 7 8 #define POINT_AS_BALL_SCALE 0.05 //scale (i.e., size) of balls (Part::SHAPE_ELLIPSOID). This is only used when building a Model that visualizes sampling points in another Model. 9 7 10 8 11 double GeometryUtils::pointPosition(const int pointIndex, const int numberOfPoints) … … 429 432 430 433 part->p = Pt3D(markerLocation); 431 part->scale = Pt3D( 0.05);434 part->scale = Pt3D(POINT_AS_BALL_SCALE); 432 435 part->vcolor = Pt3D(1.0, 1.0, 0.0); 433 436 434 model.addNewJoint(anchor, part, Joint::SHAPE_FIXED); 437 model.addNewJoint(anchor, part, Joint::SHAPE_FIXED); //keep all Parts in the Model connected (just for Model validity) 435 438 } 436 439 -
cpp/frams/model/similarity/measure-distribution.cpp
r1121 r1125 72 72 int samples_taken = samples_num; 73 73 74 //Check if total number of point pairs is smaller than samples number (just to avoid the calculation of the same stats for the same pairs of Parts)74 //Check if total number of point pairs is smaller than samples number (just to avoid the calculation of the same stats for the same pairs of points). 75 75 //This optimization turned out to have a minor effect, only present for very high simil_samples_num, and was not perfect anyway: 76 76 //- samples are selected randomly so there are no guarantees that they will be repeated,
Note: See TracChangeset
for help on using the changeset viewer.