

Public Types | |
| typedef ShMesh< ShObjMeshType > | ParentType |
Public Member Functions | |
| ShObjMesh () | |
| Constructs an empty mesh. | |
| ShObjMesh (std::istream &in) | |
| Constructs ShObjMesh from an input stream of an OBJ file. | |
| std::istream & | readObj (std::istream &in) |
| Deletes current mesh and reads in a new mesh from an OBJ file. | |
| void | generateFaceNormals () |
| Generates face normals by cross product. | |
| int | generateVertexNormals (bool force=false) |
| Generates normals by averaging adjacent face normals for vertices that have zero normals (or all vertices if force = true). | |
| int | generateTangents (bool force=false) |
| Generates tangents by cross product with (0,1,0) for vertices that have zero tangents (or all vertices if force = true). | |
| int | generateSphericalTexCoords (bool force=false) |
| Generates texcoords in a "spherical" shrink map centered at the average of all vertex positions only when all vertex texcoords are 0. | |
| void | normalizeNormals () |
| Normalizes all the normals held in this mesh. | |
| void | consolidateVertices () |
| Consolidates vertices whose coordinates are within 1e-5 of each other componentwise. | |
Friends | |
| std::istream & | operator>> (std::istream &in, ShObjMesh &mesh) |
| Sets mesh data to data from an OBJ file. | |
Definition at line 63 of file ShObjMesh.hpp.
|
|
Generates texcoords in a "spherical" shrink map centered at the average of all vertex positions only when all vertex texcoords are 0. (or if force = true) returns the number of texture coordinates generated Definition at line 276 of file ShObjMesh.cpp. References SH::acos(), SH::atan2(), SH::dot(), ShUtil::ShMesh< ShObjMeshType >::edges, SH::ShGeneric< N, T >::getValue(), SH::normalize(), and ShUtil::ShMesh< ShObjMeshType >::verts. Referenced by readObj(). |
|
|
Generates tangents by cross product with (0,1,0) for vertices that have zero tangents (or all vertices if force = true). returns the number of tangents generated Definition at line 264 of file ShObjMesh.cpp. References SH::cross(), SH::dot(), and ShUtil::ShMesh< ShObjMeshType >::edges. Referenced by readObj(). |
|
|
Generates normals by averaging adjacent face normals for vertices that have zero normals (or all vertices if force = true). returns the number of fixed vertex normals Definition at line 229 of file ShObjMesh.cpp. References SH::cross(), SH::dot(), ShUtil::ShMesh< ShObjMeshType >::edges, SH::length(), SH::normalize(), and SH::scale(). Referenced by readObj(). |
1.4.3-20050530