Vision and Mobile Robotics Laboratory | Software
Home | Members | Projects | Publications | Software | Videos Internal

Orient

Description

This program provides methods for setting the orientatation of surface normals in a mesh. In the wrl files, the normals are not represented explicitly. Instead, they are encoded in the ordering of the points within each triangle. Within the MeshToolbox, we define triangles in counter clockwise order when viewed from the top (i.e., if a triangle contains points p1, p2, and p3, normals are computed from the cross product of p2-p1 with p3-p1).

Usually, a sensor will output triangles in a consistent fashion, and the resulting wrl file can be used as is. The other programs within the MeshToolbox (e.g., CleanMesh, IntegrateMeshes) will produce surface meshes with consistent normals provided their input meshes have consistent normals. On the rare occasion that the normals in a surface mesh are found to be inconsistent, the Orient program can be used to correct the problem. This is the only place in the MeshToolbox where normals are changed. The ShowNormals program can be used to verify the correctness of surface normal orientation.

Files

Orient.c - the main program. Just a command line interface for calling routines in the surfaceMesh library.

Usage

By typing Orient - the following options (format description default) are printed:

Usage: Orient (see orient.html for complete usage)

Detailed Usage

%S in mesh filename [required]

%S out mesh filename [required]

-flip reverse order of points in triangles

-toPoint %F %F %F point to orient normals to

-out orient normals out

-in orient normals in

Examples

To flip all the normals in orig_mesh.wrl:

up


The VMR Lab is part of the Vision and Autonomous Systems Center within the Robotics Institute in the School of Computer Science, Carnegie Mellon University.