18.08.2013 Views

Vega FEM Library (v1.1) User's Manual - University of Southern ...

Vega FEM Library (v1.1) User's Manual - University of Southern ...

Vega FEM Library (v1.1) User's Manual - University of Southern ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

size t getNumVertices()<br />

Returns the number <strong>of</strong> vertices in the face.<br />

Vertex getVertex(unsigned int vertex)<br />

Vertex * getVertexHandle(unsigned int vertex)<br />

Returns a copy <strong>of</strong> or a pointer to the face vertex at index vertex.<br />

bool hasFaceNormal()<br />

Returns whether the face has a precomputed face normal.<br />

void setFaceNormal(Vec3d & normal)<br />

Sets the face normal <strong>of</strong> the face.<br />

Vec3d getFaceNormal()<br />

Returns the precomputed face normal, asserting that it has previously been set.<br />

class ObjMesh::Group Constructed by the ObjMesh constructor. Stores a vector <strong>of</strong> faces constituting<br />

a group in the .obj file.<br />

void addFace(const Face& face)<br />

Adds a face to the vector <strong>of</strong> faces.<br />

size t getNumFaces()<br />

Returns the number <strong>of</strong> faces in the group.<br />

Face getFace(unsigned int face)<br />

Face getFaceHandle(unsigned int face)<br />

Returns a copy <strong>of</strong> or a pointer to the face at index face.<br />

std::string getName()<br />

Returns the name <strong>of</strong> the group.<br />

unsigned int getMaterialIndex()<br />

void setMaterialIndex(unsigned int index)<br />

Gets or sets the material index for this group. The index refers to the global array <strong>of</strong> materials in the<br />

ObjMesh.<br />

void removeFace(unsigned int i)<br />

Removes the face at index i.<br />

class ObjMesh Reads and stores the model information from an .obj file.<br />

ObjMesh(const std::string& filename, int verbose=1)<br />

Initializes the object based upon the contents <strong>of</strong> the .obj file filename. Throws an ObjMeshException<br />

if any failure occurs during the process.<br />

ObjMesh()<br />

Initializes an empty model.<br />

std::string filename()<br />

Returns the name <strong>of</strong> the .obj file used to initialize the object. Returns an empty string if the object was<br />

not constructed from a file.<br />

24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!