Changeset 1173 for cpp/frams/model/geometry/geometryutils.cpp
- Timestamp:
- 04/22/22 18:14:32 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/geometry/geometryutils.cpp
r1125 r1173 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 1Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2022 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 428 428 void GeometryUtils::addPointToModel(const Pt3D &markerLocation, Model &model) 429 429 { 430 Part *anchor = model.getPart(0);431 430 Part *part = model.addNewPart(Part::SHAPE_ELLIPSOID); 432 431 … … 435 434 part->vcolor = Pt3D(1.0, 1.0, 0.0); 436 435 437 model.addNewJoint(anchor, part, Joint::SHAPE_FIXED); //keep all Parts in the Model connected (just for Model validity) 436 if (model.getPartCount() > 1) // keep all Parts in the Model connected (just for Model validity) 437 { 438 Part* prevpart = model.getPart(model.getPartCount() - 2); 439 model.addNewJoint(prevpart, part, Joint::SHAPE_FIXED); 440 } 438 441 } 439 442
Note: See TracChangeset
for help on using the changeset viewer.