Changeset 658 for cpp/frams/model/geometry
- Timestamp:
- 04/24/17 03:14:21 (8 years ago)
- Location:
- cpp/frams/model/geometry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/geometry/geometryutils.cpp
r375 r658 9 9 double GeometryUtils::pointPosition(const int pointIndex, const int numberOfPoints) 10 10 { 11 return pointIndex / (numberOfPoints-1.0); 11 if (numberOfPoints == 1) 12 return 0; 13 else 14 return pointIndex / (numberOfPoints-1.0); 12 15 } 13 16 -
cpp/frams/model/geometry/modelgeoclass.cpp
r548 r658 102 102 onDensityChanged(); 103 103 if (cached_sizes.x < 0) //calculate if invalid 104 ModelGeometryInfo::findSizesAndAxes OfModel(*model, density, cached_sizes, cached_axes);104 ModelGeometryInfo::findSizesAndAxes(*model, density, cached_sizes, cached_axes); 105 105 106 106 VectorObject* n = new VectorObject; -
cpp/frams/model/geometry/modelgeometryinfo.cpp
r546 r658 7 7 #include <frams/model/geometry/meshbuilder.h> 8 8 9 void ModelGeometryInfo::findSizesAndAxes OfModel(const Model &input_model, const double density,9 void ModelGeometryInfo::findSizesAndAxes(const Model &input_model, const double density, 10 10 Pt3D &sizes, Orient &axes) 11 11 { … … 25 25 } 26 26 27 boolModelGeometryInfo::boundingBox(const Model &model, Pt3D &lowerBoundary, Pt3D &upperBoundary)27 void ModelGeometryInfo::boundingBox(const Model &model, Pt3D &lowerBoundary, Pt3D &upperBoundary) 28 28 { 29 if (model.getPartCount() == 0) 29 if (model.getPartCount() == 0) //should never happen. Invalid model provided? 30 30 { 31 return false; 31 lowerBoundary = Pt3D_0; 32 upperBoundary = Pt3D_0; 33 return; 32 34 } 33 35 … … 42 44 upperBoundary.getMax(partUpperBoundary); 43 45 } 44 45 return true;46 46 } 47 47
Note: See TracChangeset
for help on using the changeset viewer.