Main Page   Class Hierarchy   Compound List   File List   Compound Members  

ClothApp Class Reference

Demonstration application for Freecloth simulator. More...

#include <freecloth/clothApp/clothApp.h>

Inheritance diagram for ClothApp:

Inheritance graph
[legend]
Collaboration diagram for ClothApp:

Collaboration graph
[legend]
List of all members.

Public Methods

 ClothApp ()
void runApp ()

Protected Methods

void keyPressed (GfxWindow &, GfxWindow::KeyID, GfxWindow::ModBitfield)
void windowResized (GfxWindow &, UInt32 x, UInt32 y, UInt32 w, UInt32 h)
void displayReceived (GfxWindow &)
void closeReceived (GfxWindow &)
void uiReceived (GfxWindow &, UInt32 uid)
 GLUI user interface event.

void idleReceived ()
void render (bool debug_stretch, bool debug_shear, bool debug_bend)
void snap (bool debug)

Private Types

enum  {
  ID_CAMERA_ROTATE, ID_ZOOM, ID_LIGHT, ID_FOG_START,
  ID_FOG_END, ID_AXES, ID_WIREFRAME, ID_CLOTH_SIZE,
  ID_RUN, ID_STOP, ID_STEP, ID_REWIND,
  ID_TIME, ID_PATCHES, ID_TIMESTEP, ID_PCG_TOLERANCE,
  ID_PAR_K_STRETCH, ID_PAR_K_SHEAR, ID_PAR_K_BEND_U, ID_PAR_K_BEND_V,
  ID_PAR_K_DAMP, ID_PAR_K_DRAG, ID_PAR_B_U, ID_PAR_B_V,
  ID_PAR_RHO, ID_PAR_G, ID_PAR_RESET, ID_CONSTRAINTS,
  ID_EN_STRETCH, ID_EN_SHEAR, ID_EN_BEND, ID_TRI_STRETCH,
  ID_TRI_SHEAR, ID_TRI_BEND, ID_VERT_VEL, ID_VERT_FORCE,
  ID_VERT_FORCE_DAMP, ID_VERT_FORCE_STRETCH, ID_VERT_FORCE_SHEAR, ID_VERT_FORCE_BEND,
  ID_VERT_FORCE_GRAVITY, ID_VERT_FORCE_DRAG, ID_SNAPSHOT, ID_MOVIE,
  ID_QUIT
}
 Control IDs.

enum  ConstraintType {
  CON_NONE, CON_CENTRE, CON_CORNERS4, CON_CORNERS3a,
  CON_CORNERS3b, CON_CORNERS1c, CON_CORNERS1d, CON_CORNERYANK,
  CON_TABLE_SQUARE, CON_TABLE_CIRCLE, NB_CONSTRAINTS
}
 Constraint IDs.


Private Methods

void setupMesh ()
void setupSimulator ()
void setConstraints ()
void setupWindow ()
void initGL ()
void calcNormals ()
void renderCloth ()
void renderClothTriDebug (bool showStretch, bool showShear, bool showBend)
void renderClothVertDebug ()
void renderClothOutline ()
void renderAxes ()
void renderFloor ()
void updateParamsUI ()

Static Private Methods

RCShdPtr< GeMeshcreateRectMesh (Float size, UInt32 nbRows, UInt32 nbColumns)
void initMeshIndices (const GeMesh &mesh, std::vector< UInt32 > &indices)

Private Attributes

RCShdPtr< GeMesh_initialMesh
RCShdPtr< GfxGLWindowGLUI_glWindow
RCShdPtr< GfxGLTexture_floorTexture
RCShdPtr< GfxGLTexture_clothTexture
RCShdPtr< SimSimulator_simulator
GfxConfig _config
std::vector< UInt32 > _meshIndices
 Preprocessed list of indices into mesh vertex array.

std::vector< GeVector_meshNormals
std::vector< GePoint_meshTextureVertices
RCShdPtr< GeMeshWingedEdge_meshWE
GePoint _meshPos
SimSimulator::Params _params
UInt32 _nbPatches
Float _clothSize
Float _h
Float _rho
Float _pcgTolerance
ConstraintType _constraints
bool _quitFlag
bool _rewindFlag
bool _freeRunFlag
bool _stopFlag
bool _stepFlag
bool _snapFlag
UInt32 _snapCount
UInt32 _nextMovieFrame
bool _subStepFlag

Detailed Description

Demonstration application for Freecloth simulator.

This demonstration application shows off the capabilities of the Freecloth simulator. A lot of auxiliary classes are needed to pull this off, mostly in the gfx/ subdirectory.

Definition at line 81 of file clothApp.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 16:51:15 2003 for Freecloth by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002