Skip to content

Commit

Permalink
Identify files as .obj instead of OBJ.
Browse files Browse the repository at this point in the history
  • Loading branch information
DamrongGuoy committed Sep 27, 2018
1 parent 4dfaa7d commit 3740cd2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions geometry/proximity_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ class ProximityEngine<T>::Impl : public ShapeReifier {
}

void ImplementGeometry(const Convex& convex, void* user_data) override {
// We use tiny_obj_loader to read Obj file of the convex shape.
// We use tiny_obj_loader to read the .obj file of the convex shape.
tinyobj::attrib_t attrib;
std::vector<tinyobj::shape_t> shapes;
std::vector<tinyobj::material_t> materials;
Expand Down Expand Up @@ -745,8 +745,8 @@ class ProximityEngine<T>::Impl : public ShapeReifier {
//

if (shapes.size() != 1) {
throw std::runtime_error("For Convex geometry, the OBJ file must have one"
" and only one object defined in it");
throw std::runtime_error("For Convex geometry, the .obj file must have "
"one and only one object defined in it.");
}

std::vector<Vector3d> vertices =
Expand Down
8 changes: 4 additions & 4 deletions geometry/shape_specification.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ class Convex final : public Shape {
given _absolute_ file path. Optionally uniformly scaled by the given scale
factor.
@param absolute_filename The file name with absolute path. We only
support an OBJ file with only one polyhedron.
support an .obj file with only one polyhedron.
We assume that the polyhedron is convex.
@param scale An optional scale to coordinates.
@throws std::runtime_error if the OBJ file doesn't define a single object.
@throws std::runtime_error if the .obj file doesn't define a single object.
This can happen if it is empty, if there are
multiple object-name statements (e.g., o
object name), or if there are faces defined
multiple object-name statements (e.g.,
"o object_name"), or if there are faces defined
outside a single object-name statement.
*/
explicit Convex(const std::string& absolute_filename, double scale = 1.0);
Expand Down
4 changes: 2 additions & 2 deletions geometry/test/proximity_engine_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ GTEST_TEST(ProximityEngineTests, AddMixedGeometry) {
EXPECT_EQ(engine.num_dynamic(), 1);
}

// Tests for reading OBJ files. ------------------------------------------------
// Tests for reading .obj files.------------------------------------------------

// Tests exception when we read an OBJ file with two objects into Convex
// Tests exception when we read an .obj file with two objects into Convex
GTEST_TEST(ProximityEngineTests, ExceptionTwoObjectsInObjFileForConvex) {
ProximityEngine<double> engine;
Convex convex{drake::FindResourceOrThrow(
Expand Down

0 comments on commit 3740cd2

Please sign in to comment.