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.

double * QDot, double * SDot, const double * MDotDot=NULL,<br />

double * omegaDot=NULL, double * QDotDot = NULL)<br />

Takes as input matrices M, Q, S (such that M = QS is the polar decomposition), 3 × 3 derivative <strong>of</strong> M<br />

MDot, and optionally the 3 × 3 second derivative MDotDot. Calculates 3 × 3 derivatives QDot and SDot, and<br />

3-vector <strong>of</strong> rotational velocity omega, along with second derivatives QDotDot and omegaDot if MDotDot is<br />

provided and the output pointers are not NULL. Again, all matrices are stored as row-major arrays, and all<br />

non-optional output matrix arrays must be pre-allocated.<br />

2.20 sceneObject<br />

Allows for easy rendering <strong>of</strong> .obj meshes, either in their original state or under user-specified deformations.<br />

File-loading and mesh-rendering functionality is provided by the obj library. All indices taken or returned<br />

by the classes below are zero-indexed.<br />

class SceneObject Stores the model from an .obj file and provides tools to render the entire model or<br />

its constituent features.<br />

SceneObject(char * filename)<br />

Constructs the object from the .obj file at filename. Calls exit upon failure.<br />

virtual void Render()<br />

Renders the entire model with an ObjMeshRender object.<br />

virtual void RenderVertices()<br />

virtual void RenderEdges()<br />

virtual void RenderNormals()<br />

Render the specified components <strong>of</strong> the model using ObjMeshRender.<br />

virtual void RenderVertex(int vertex)<br />

Renders the vertex at index vertex in the mesh.<br />

void HighlightVertex(int i)<br />

Renders vertex i with a large green dot.<br />

void BuildDisplayList()<br />

Builds a display list for the model to speed up rendering. If a list has been built, it is automatically used<br />

by the Render function above.<br />

void PurgeDisplayList()<br />

Deletes the display list, if there currently is one.<br />

ObjMesh * GetMesh()<br />

Returns a pointer to the underlying ObjMesh object from the obj library, for more direct access to the<br />

mesh.<br />

void ComputeMeshRadius(Vec3d & centroid, double * radius)<br />

Writes to *radius the smallest radius <strong>of</strong> a sphere centered at centroid that contains the entire mesh.<br />

void ComputeMeshGeometricParameters(Vec3d * centroid, double * radius)<br />

Writes the coordinates <strong>of</strong> the center <strong>of</strong> the mesh (the average <strong>of</strong> its vertices) to *centroid, and the<br />

smallest radius <strong>of</strong> a sphere around this center which contains the entire mesh to *radius.<br />

void ExportMeshGeometry(int * numVertices, double ** vertices,<br />

int * numTriangles, int ** triangles)<br />

28

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

Saved successfully!

Ooh no, something went wrong!