Changeset 1125


Ignore:
Timestamp:
04/11/21 02:09:28 (20 months ago)
Author:
Maciej Komosinski
Message:

Cosmetic

Location:
cpp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/util-string.h

    r1025 r1125  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    1313char* strmove(char *a, char *b); //strcpy that works well for overlapping strings ("Source and destination overlap")
    1414bool 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++20
     15inline bool starts_with(const string& str, const char *prefix) { return str_starts_with(str.c_str(),prefix); } //std::string.starts_with(...) since c++20
    1616
    1717string ssprintf(const char* format, ...);
  • cpp/frams/model/geometry/geometryutils.cpp

    r1056 r1125  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
    55#include "geometryutils.h"
    66#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
    710
    811double GeometryUtils::pointPosition(const int pointIndex, const int numberOfPoints)
     
    429432
    430433    part->p = Pt3D(markerLocation);
    431     part->scale = Pt3D(0.05);
     434    part->scale = Pt3D(POINT_AS_BALL_SCALE);
    432435    part->vcolor = Pt3D(1.0, 1.0, 0.0);
    433436
    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)
    435438}
    436439
  • cpp/frams/model/similarity/measure-distribution.cpp

    r1121 r1125  
    7272        int samples_taken = samples_num;
    7373
    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).
    7575        //This optimization turned out to have a minor effect, only present for very high simil_samples_num, and was not perfect anyway:
    7676        //- samples are selected randomly so there are no guarantees that they will be repeated,
Note: See TracChangeset for help on using the changeset viewer.