From ad3d90fafe5ee79964bdfe1f1e0704c3ffcdfd5f Mon Sep 17 00:00:00 2001 From: Miles Macklin Date: Fri, 10 Mar 2017 14:51:31 +1300 Subject: Initial 1.1.0 binary release --- doc/_static/api/_nv_flex_8h.html | 4230 ++++++++++++++++++++ doc/_static/api/_nv_flex_8h_source.html | 736 ++++ doc/_static/api/_nv_flex_device_8h.html | 123 + doc/_static/api/_nv_flex_device_8h_source.html | 99 + doc/_static/api/_nv_flex_ext_8h.html | 2121 ++++++++++ doc/_static/api/_nv_flex_ext_8h_source.html | 625 +++ doc/_static/api/arrowdown.png | Bin 0 -> 242 bytes doc/_static/api/arrowright.png | Bin 0 -> 229 bytes doc/_static/api/bc_s.png | Bin 0 -> 675 bytes doc/_static/api/bdwn.png | Bin 0 -> 147 bytes doc/_static/api/closed.png | Bin 0 -> 133 bytes .../api/dir_d44c64559bbebec7f509842c48db8b23.html | 60 + doc/_static/api/doc.png | Bin 0 -> 763 bytes doc/_static/api/doxygen.css | 1449 +++++++ doc/_static/api/doxygen.png | Bin 0 -> 3872 bytes doc/_static/api/dynsections.js | 97 + doc/_static/api/files.html | 53 + doc/_static/api/flex.css | 67 + doc/_static/api/folderclosed.png | Bin 0 -> 637 bytes doc/_static/api/folderopen.png | Bin 0 -> 629 bytes doc/_static/api/globals.html | 530 +++ doc/_static/api/globals_enum.html | 74 + doc/_static/api/globals_eval.html | 160 + doc/_static/api/globals_func.html | 355 ++ doc/_static/api/globals_type.html | 71 + doc/_static/api/index.html | 51 + doc/_static/api/jquery.js | 68 + doc/_static/api/nav_f.png | Bin 0 -> 153 bytes doc/_static/api/nav_g.png | Bin 0 -> 95 bytes doc/_static/api/nav_h.png | Bin 0 -> 99 bytes doc/_static/api/nvidia.png | Bin 0 -> 13497 bytes doc/_static/api/open.png | Bin 0 -> 123 bytes doc/_static/api/splitbar.png | Bin 0 -> 313 bytes .../api/struct_nv_flex_solver_callback.html | 85 + doc/_static/api/struct_nv_flex_vector.html | 693 ++++ doc/_static/api/sync_off.png | Bin 0 -> 859 bytes doc/_static/api/sync_on.png | Bin 0 -> 847 bytes doc/_static/api/tab_a.png | Bin 0 -> 142 bytes doc/_static/api/tab_b.png | Bin 0 -> 169 bytes doc/_static/api/tab_h.png | Bin 0 -> 176 bytes doc/_static/api/tab_s.png | Bin 0 -> 180 bytes doc/_static/api/tabs.css | 60 + 42 files changed, 11807 insertions(+) create mode 100644 doc/_static/api/_nv_flex_8h.html create mode 100644 doc/_static/api/_nv_flex_8h_source.html create mode 100644 doc/_static/api/_nv_flex_device_8h.html create mode 100644 doc/_static/api/_nv_flex_device_8h_source.html create mode 100644 doc/_static/api/_nv_flex_ext_8h.html create mode 100644 doc/_static/api/_nv_flex_ext_8h_source.html create mode 100644 doc/_static/api/arrowdown.png create mode 100644 doc/_static/api/arrowright.png create mode 100644 doc/_static/api/bc_s.png create mode 100644 doc/_static/api/bdwn.png create mode 100644 doc/_static/api/closed.png create mode 100644 doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html create mode 100644 doc/_static/api/doc.png create mode 100644 doc/_static/api/doxygen.css create mode 100644 doc/_static/api/doxygen.png create mode 100644 doc/_static/api/dynsections.js create mode 100644 doc/_static/api/files.html create mode 100644 doc/_static/api/flex.css create mode 100644 doc/_static/api/folderclosed.png create mode 100644 doc/_static/api/folderopen.png create mode 100644 doc/_static/api/globals.html create mode 100644 doc/_static/api/globals_enum.html create mode 100644 doc/_static/api/globals_eval.html create mode 100644 doc/_static/api/globals_func.html create mode 100644 doc/_static/api/globals_type.html create mode 100644 doc/_static/api/index.html create mode 100644 doc/_static/api/jquery.js create mode 100644 doc/_static/api/nav_f.png create mode 100644 doc/_static/api/nav_g.png create mode 100644 doc/_static/api/nav_h.png create mode 100644 doc/_static/api/nvidia.png create mode 100644 doc/_static/api/open.png create mode 100644 doc/_static/api/splitbar.png create mode 100644 doc/_static/api/struct_nv_flex_solver_callback.html create mode 100644 doc/_static/api/struct_nv_flex_vector.html create mode 100644 doc/_static/api/sync_off.png create mode 100644 doc/_static/api/sync_on.png create mode 100644 doc/_static/api/tab_a.png create mode 100644 doc/_static/api/tab_b.png create mode 100644 doc/_static/api/tab_h.png create mode 100644 doc/_static/api/tab_s.png create mode 100644 doc/_static/api/tabs.css (limited to 'doc/_static/api') diff --git a/doc/_static/api/_nv_flex_8h.html b/doc/_static/api/_nv_flex_8h.html new file mode 100644 index 0000000..837b040 --- /dev/null +++ b/doc/_static/api/_nv_flex_8h.html @@ -0,0 +1,4230 @@ + + + + + + +FLEX: NvFlex.h File Reference + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + + +
+
+ +
+
NvFlex.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Structures

struct  NvFlexParams
 
struct  NvFlexTimers
 
struct  NvFlexSolverCallbackParams
 
struct  NvFlexInitDesc
 
struct  NvFlexSolverCallback
 
struct  NvFlexSphereGeometry
 
struct  NvFlexCapsuleGeometry
 
struct  NvFlexBoxGeometry
 
struct  NvFlexConvexMeshGeometry
 
struct  NvFlexTriangleMeshGeometry
 
struct  NvFlexSDFGeometry
 
union  NvFlexCollisionGeometry
 
struct  NvFlexDetailTimer
 
+ + + + + + + + + + + + + + + +

+Typedefs

typedef struct NvFlexLibrary NvFlexLibrary
 
typedef struct NvFlexSolver NvFlexSolver
 
typedef struct NvFlexBuffer NvFlexBuffer
 
typedef void(* NvFlexErrorCallback) (NvFlexErrorSeverity type, const char *msg, const char *file, int line)
 
typedef unsigned int NvFlexTriangleMeshId
 
typedef unsigned int NvFlexDistanceFieldId
 
typedef unsigned int NvFlexConvexMeshId
 
+ + + + + + + + + + + + + + + + + + + +

+Enumerations

enum  NvFlexMapFlags {
+  eNvFlexMapWait = 0, +
+  eNvFlexMapDoNotWait = 1, +
+  eNvFlexMapDiscard = 2 +
+ }
 
enum  NvFlexBufferType {
+  eNvFlexBufferHost = 0, +
+  eNvFlexBufferDevice = 1 +
+ }
 
enum  NvFlexRelaxationMode {
+  eNvFlexRelaxationGlobal = 0, +
+  eNvFlexRelaxationLocal = 1 +
+ }
 
enum  NvFlexPhase {
+  eNvFlexPhaseGroupMask = 0x00ffffff, +
+  eNvFlexPhaseSelfCollide = 1 << 24, +
+  eNvFlexPhaseSelfCollideFilter = 1 << 25, +
+  eNvFlexPhaseFluid = 1 << 26 +
+ }
 
enum  NvFlexErrorSeverity {
+  eNvFlexLogError = 0, +
+  eNvFlexLogInfo = 1, +
+  eNvFlexLogWarning = 2, +
+  eNvFlexLogDebug = 4, +
+  eNvFlexLogAll = -1 +
+ }
 
enum  NvFlexSolverCallbackStage {
+  eNvFlexStageIterationStart, +
+  eNvFlexStageIterationEnd, +
+  eNvFlexStageSubstepBegin, +
+  eNvFlexStageSubstepEnd, +
+  eNvFlexStageUpdateEnd, +
+  eNvFlexStageCount +
+ }
 
enum  NvFlexComputeType {
+  eNvFlexCUDA, +
+  eNvFlexD3D11, +
+  eNvFlexD3D12 +
+ }
 
enum  NvFlexCollisionShapeType {
+  eNvFlexShapeSphere = 0, +
+  eNvFlexShapeCapsule = 1, +
+  eNvFlexShapeBox = 2, +
+  eNvFlexShapeConvexMesh = 3, +
+  eNvFlexShapeTriangleMesh = 4, +
+  eNvFlexShapeSDF = 5 +
+ }
 
enum  NvFlexCollisionShapeFlags {
+  eNvFlexShapeFlagTypeMask = 0x7, +
+  eNvFlexShapeFlagDynamic = 8, +
+  eNvFlexShapeFlagTrigger = 16, +
+  eNvFlexShapeFlagReserved = 0xffffff00 +
+ }
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

NV_FLEX_API int NvFlexMakePhase (int group, int flags)
 
NV_FLEX_API NvFlexLibraryNvFlexInit (int version=NV_FLEX_VERSION, NvFlexErrorCallback errorFunc=0, NvFlexInitDesc *desc=0)
 
NV_FLEX_API void NvFlexShutdown (NvFlexLibrary *lib)
 
NV_FLEX_API int NvFlexGetVersion ()
 
NV_FLEX_API NvFlexSolverNvFlexCreateSolver (NvFlexLibrary *lib, int maxParticles, int maxDiffuseParticles, int maxNeighborsPerParticle=96)
 
NV_FLEX_API void NvFlexDestroySolver (NvFlexSolver *solver)
 
NV_FLEX_API NvFlexLibraryNvFlexGetSolverLibrary (NvFlexSolver *solver)
 
NV_FLEX_API NvFlexSolverCallback NvFlexRegisterSolverCallback (NvFlexSolver *solver, NvFlexSolverCallback function, NvFlexSolverCallbackStage stage)
 
NV_FLEX_API void NvFlexUpdateSolver (NvFlexSolver *solver, float dt, int substeps, bool enableTimers)
 
NV_FLEX_API void NvFlexSetParams (NvFlexSolver *solver, const NvFlexParams *params)
 
NV_FLEX_API void NvFlexGetParams (NvFlexSolver *solver, NvFlexParams *params)
 
NV_FLEX_API void NvFlexSetActive (NvFlexSolver *solver, NvFlexBuffer *indices, int n)
 
NV_FLEX_API void NvFlexGetActive (NvFlexSolver *solver, NvFlexBuffer *indices)
 
NV_FLEX_API int NvFlexGetActiveCount (NvFlexSolver *solver)
 
NV_FLEX_API void NvFlexSetParticles (NvFlexSolver *solver, NvFlexBuffer *p, int n)
 
NV_FLEX_API void NvFlexGetParticles (NvFlexSolver *solver, NvFlexBuffer *p, int n)
 
NV_FLEX_API void NvFlexSetRestParticles (NvFlexSolver *solver, NvFlexBuffer *p, int n)
 
NV_FLEX_API void NvFlexGetRestParticles (NvFlexSolver *solver, NvFlexBuffer *p, int n)
 
NV_FLEX_API void NvFlexGetSmoothParticles (NvFlexSolver *solver, NvFlexBuffer *p, int n)
 
NV_FLEX_API void NvFlexSetVelocities (NvFlexSolver *solver, NvFlexBuffer *v, int n)
 
NV_FLEX_API void NvFlexGetVelocities (NvFlexSolver *solver, NvFlexBuffer *v, int n)
 
NV_FLEX_API void NvFlexSetPhases (NvFlexSolver *solver, NvFlexBuffer *phases, int n)
 
NV_FLEX_API void NvFlexGetPhases (NvFlexSolver *solver, NvFlexBuffer *phases, int n)
 
NV_FLEX_API void NvFlexSetNormals (NvFlexSolver *solver, NvFlexBuffer *normals, int n)
 
NV_FLEX_API void NvFlexGetNormals (NvFlexSolver *solver, NvFlexBuffer *normals, int n)
 
NV_FLEX_API void NvFlexSetSprings (NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)
 
NV_FLEX_API void NvFlexGetSprings (NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)
 
NV_FLEX_API void NvFlexSetRigids (NvFlexSolver *solver, NvFlexBuffer *offsets, NvFlexBuffer *indices, NvFlexBuffer *restPositions, NvFlexBuffer *restNormals, NvFlexBuffer *stiffness, NvFlexBuffer *rotations, NvFlexBuffer *translations, int numRigids, int numIndices)
 
NV_FLEX_API void NvFlexGetRigidTransforms (NvFlexSolver *solver, NvFlexBuffer *rotations, NvFlexBuffer *translations)
 
NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh (NvFlexLibrary *lib)
 
NV_FLEX_API void NvFlexDestroyTriangleMesh (NvFlexLibrary *lib, NvFlexTriangleMeshId mesh)
 
NV_FLEX_API void NvFlexUpdateTriangleMesh (NvFlexLibrary *lib, NvFlexTriangleMeshId mesh, NvFlexBuffer *vertices, NvFlexBuffer *indices, int numVertices, int numTriangles, const float *lower, const float *upper)
 
NV_FLEX_API void NvFlexGetTriangleMeshBounds (NvFlexLibrary *lib, const NvFlexTriangleMeshId mesh, float *lower, float *upper)
 
NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField (NvFlexLibrary *lib)
 
NV_FLEX_API void NvFlexDestroyDistanceField (NvFlexLibrary *lib, NvFlexDistanceFieldId sdf)
 
NV_FLEX_API void NvFlexUpdateDistanceField (NvFlexLibrary *lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer *field)
 
NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh (NvFlexLibrary *lib)
 
NV_FLEX_API void NvFlexDestroyConvexMesh (NvFlexLibrary *lib, NvFlexConvexMeshId convex)
 
NV_FLEX_API void NvFlexUpdateConvexMesh (NvFlexLibrary *lib, NvFlexConvexMeshId convex, NvFlexBuffer *planes, int numPlanes, float *lower, float *upper)
 
NV_FLEX_API void NvFlexGetConvexMeshBounds (NvFlexLibrary *lib, NvFlexConvexMeshId mesh, float *lower, float *upper)
 
NV_FLEX_API int NvFlexMakeShapeFlags (NvFlexCollisionShapeType type, bool dynamic)
 
NV_FLEX_API void NvFlexSetShapes (NvFlexSolver *solver, NvFlexBuffer *geometry, NvFlexBuffer *shapePositions, NvFlexBuffer *shapeRotations, NvFlexBuffer *shapePrevPositions, NvFlexBuffer *shapePrevRotations, NvFlexBuffer *shapeFlags, int numShapes)
 
NV_FLEX_API void NvFlexSetDynamicTriangles (NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)
 
NV_FLEX_API void NvFlexGetDynamicTriangles (NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)
 
NV_FLEX_API void NvFlexSetInflatables (NvFlexSolver *solver, NvFlexBuffer *startTris, NvFlexBuffer *numTris, NvFlexBuffer *restVolumes, NvFlexBuffer *overPressures, NvFlexBuffer *constraintScales, int numInflatables)
 
NV_FLEX_API void NvFlexGetDensities (NvFlexSolver *solver, NvFlexBuffer *densities, int n)
 
NV_FLEX_API void NvFlexGetAnisotropy (NvFlexSolver *solver, NvFlexBuffer *q1, NvFlexBuffer *q2, NvFlexBuffer *q3)
 
NV_FLEX_API int NvFlexGetDiffuseParticles (NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, NvFlexBuffer *indices)
 
NV_FLEX_API void NvFlexSetDiffuseParticles (NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, int n)
 
NV_FLEX_API void NvFlexGetContacts (NvFlexSolver *solver, NvFlexBuffer *planes, NvFlexBuffer *velocities, NvFlexBuffer *indices, NvFlexBuffer *counts)
 
NV_FLEX_API void NvFlexGetBounds (NvFlexSolver *solver, NvFlexBuffer *lower, NvFlexBuffer *upper)
 
NV_FLEX_API float NvFlexGetDeviceLatency (NvFlexSolver *solver)
 
NV_FLEX_API void NvFlexGetTimers (NvFlexSolver *solver, NvFlexTimers *timers)
 
NV_FLEX_API int NvFlexGetDetailTimers (NvFlexSolver *solver, NvFlexDetailTimer **timers)
 
NV_FLEX_API NvFlexBufferNvFlexAllocBuffer (NvFlexLibrary *lib, int elementCount, int elementByteStride, NvFlexBufferType type)
 
NV_FLEX_API void NvFlexFreeBuffer (NvFlexBuffer *buf)
 
NV_FLEX_API void * NvFlexMap (NvFlexBuffer *buffer, int flags)
 
NV_FLEX_API void NvFlexUnmap (NvFlexBuffer *buffer)
 
NV_FLEX_API NvFlexBufferNvFlexRegisterOGLBuffer (NvFlexLibrary *lib, int buf, int elementCount, int elementByteStride)
 
NV_FLEX_API void NvFlexUnregisterOGLBuffer (NvFlexBuffer *buf)
 
NV_FLEX_API NvFlexBufferNvFlexRegisterD3DBuffer (NvFlexLibrary *lib, void *buffer, int elementCount, int elementByteStride)
 
NV_FLEX_API void NvFlexUnregisterD3DBuffer (NvFlexBuffer *buf)
 
NV_FLEX_API void NvFlexAcquireContext (NvFlexLibrary *lib)
 
NV_FLEX_API void NvFlexRestoreContext (NvFlexLibrary *lib)
 
NV_FLEX_API const char * NvFlexGetDeviceName (NvFlexLibrary *lib)
 
NV_FLEX_API void NvFlexGetDeviceAndContext (NvFlexLibrary *lib, void **device, void **context)
 
NV_FLEX_API void NvFlexFlush (NvFlexLibrary *lib)
 
+

Detailed Description

+

The main include file for the core Flex solver.

+

Data Structure Documentation

+ +
+
+ + + + +
struct NvFlexParams
+
+

Simulation parameters for a solver

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+int +numIterations +Number of solver iterations to perform per-substep.
+float +gravity[3] +Constant acceleration applied to all particles.
+float +radius +The maximum interaction radius for particles.
+float +solidRestDistance +The distance non-fluid particles attempt to maintain from each other, must be in the range (0, radius].
+float +fluidRestDistance +The distance fluid particles are spaced at the rest density, must be in the range (0, radius], for fluids this should generally be 50-70% of mRadius, for rigids this can simply be the same as the particle radius.
+float +dynamicFriction +Coefficient of friction used when colliding against shapes.
+float +staticFriction +Coefficient of static friction used when colliding against shapes.
+float +particleFriction +Coefficient of friction used when colliding particles.
+float +restitution +Coefficient of restitution used when colliding against shapes, particle collisions are always inelastic.
+float +adhesion +Controls how strongly particles stick to surfaces they hit, default 0.0, range [0.0, +inf].
+float +sleepThreshold +Particles with a velocity magnitude < this threshold will be considered fixed.
+float +maxSpeed +The magnitude of particle velocity will be clamped to this value at the end of each step.
+float +maxAcceleration +The magnitude of particle acceleration will be clamped to this value at the end of each step (limits max velocity change per-second), useful to avoid popping due to large interpenetrations.
+float +shockPropagation +Artificially decrease the mass of particles based on height from a fixed reference point, this makes stacks and piles converge faster.
+float +dissipation +Damps particle velocity based on how many particle contacts it has.
+float +damping +Viscous drag force, applies a force proportional, and opposite to the particle velocity.
+float +wind[3] +Constant acceleration applied to particles that belong to dynamic triangles, drag needs to be > 0 for wind to affect triangles.
+float +drag +Drag force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in the negative velocity direction.
+float +lift +Lift force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in the direction perpendicular to velocity and (if possible), parallel to the plane normal.
+bool +fluid +If true then particles with phase 0 are considered fluid particles and interact using the position based fluids method.
+float +cohesion +Control how strongly particles hold each other together, default: 0.025, range [0.0, +inf].
+float +surfaceTension +Controls how strongly particles attempt to minimize surface area, default: 0.0, range: [0.0, +inf].
+float +viscosity +Smoothes particle velocities using XSPH viscosity.
+float +vorticityConfinement +Increases vorticity by applying rotational forces to particles.
+float +anisotropyScale +Control how much anisotropy is present in resulting ellipsoids for rendering, if zero then anisotropy will not be calculated, see NvFlexGetAnisotropy()
+float +anisotropyMin +Clamp the anisotropy scale to this fraction of the radius.
+float +anisotropyMax +Clamp the anisotropy scale to this fraction of the radius.
+float +smoothing +Control the strength of Laplacian smoothing in particles for rendering, if zero then smoothed positions will not be calculated, see NvFlexGetSmoothParticles()
+float +solidPressure +Add pressure from solid surfaces to particles.
+float +freeSurfaceDrag +Drag force applied to boundary fluid particles.
+float +buoyancy +Gravity is scaled by this value for fluid particles.
+float +diffuseThreshold +Particles with kinetic energy + divergence above this threshold will spawn new diffuse particles.
+float +diffuseBuoyancy +Scales force opposing gravity that diffuse particles receive.
+float +diffuseDrag +Scales force diffuse particles receive in direction of neighbor fluid particles.
+int +diffuseBallistic +The number of neighbors below which a diffuse particle is considered ballistic.
+float +diffuseSortAxis[3] +Diffuse particles will be sorted by depth along this axis if non-zero.
+float +diffuseLifetime +Time in seconds that a diffuse particle will live for after being spawned, particles will be spawned with a random lifetime in the range [0, diffuseLifetime].
+float +plasticThreshold +Particles belonging to rigid shapes that move with a position delta magnitude > threshold will be permanently deformed in the rest pose.
+float +plasticCreep +Controls the rate at which particles in the rest pose are deformed for particles passing the deformation threshold.
+float +collisionDistance +Distance particles maintain against shapes, note that for robust collision against triangle meshes this distance should be greater than zero.
+float +particleCollisionMargin +Increases the radius used during neighbor finding, this is useful if particles are expected to move significantly during a single step to ensure contacts aren't missed on subsequent iterations.
+float +shapeCollisionMargin +Increases the radius used during contact finding against kinematic shapes.
+float +planes[8][4] +Collision planes in the form ax + by + cz + d = 0.
+int +numPlanes +Num collision planes.
+NvFlexRelaxationMode +relaxationMode +How the relaxation is applied inside the solver.
+float +relaxationFactor +Control the convergence rate of the parallel solver, default: 1, values greater than 1 may lead to instability.
+ +
+
+ +
+
+ + + + +
struct NvFlexTimers
+
+

Time spent in each section of the solver update, times in GPU seconds, see NvFlexUpdateSolver()

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+float +predict +Time spent in prediction.
+float +createCellIndices +Time spent creating grid indices.
+float +sortCellIndices +Time spent sorting grid indices.
+float +createGrid +Time spent creating grid.
+float +reorder +Time spent reordering particles.
+float +collideParticles +Time spent finding particle neighbors.
+float +collideShapes +Time spent colliding convex shapes.
+float +collideTriangles +Time spent colliding triangle shapes.
+float +collideFields +Time spent colliding signed distance field shapes.
+float +calculateDensity +Time spent calculating fluid density.
+float +solveDensities +Time spent solving density constraints.
+float +solveVelocities +Time spent solving velocity constraints.
+float +solveShapes +Time spent solving rigid body constraints.
+float +solveSprings +Time spent solving distance constraints.
+float +solveContacts +Time spent solving contact constraints.
+float +solveInflatables +Time spent solving pressure constraints.
+float +applyDeltas +Time spent adding position deltas to particles.
+float +calculateAnisotropy +Time spent calculating particle anisotropy for fluid.
+float +updateDiffuse +Time spent updating diffuse particles.
+float +updateTriangles +Time spent updating dynamic triangles.
+float +updateNormals +Time spent updating vertex normals.
+float +finalize +Time spent finalizing state.
+float +updateBounds +Time spent updating particle bounds.
+float +total +Sum of all timers above.
+ +
+
+ +
+
+ + + + +
struct NvFlexSolverCallbackParams
+
+

Structure containing pointers to the internal solver data that is passed to each registered solver callback

+
Remarks
Pointers to internal data are only valid for the lifetime of the callback and should not be stored. However, it is safe to launch kernels and memory transfers using the device pointers.
+
+Because Flex re-orders particle data internally for performance, the particle data in the callback is not in the same order as it was provided to the API. The callback provides arrays which map original particle indices to sorted positions and vice-versa.
+
+Particle positions may be modified during any callback, but velocity modifications should only occur during the eNvFlexStageUpdateEnd stage, otherwise any velocity changes will be discarded.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+NvFlexSolver * +solver +Pointer to the solver that the callback is registered to.
+void * +userData +Pointer to the user data provided to NvFlexRegisterSolverCallback()
+float * +particles +Device pointer to the active particle basic data in the form x,y,z,1/m.
+float * +velocities +Device pointer to the active particle velocity data in the form x,y,z,w (last component is not used)
+int * +phases +Device pointer to the active particle phase data.
+int +numActive +The number of active particles returned, the callback data only return pointers to active particle data, this is the same as NvFlexGetActiveCount()
+float +dt +The per-update time-step, this is the value passed to NvFlexUpdateSolver()
+const int * +originalToSortedMap +Device pointer that maps the sorted callback data to the original position given by SetParticles()
+const int * +sortedToOriginalMap +Device pointer that maps the original particle index to the index in the callback data structure.
+ +
+
+ +
+
+ + + + +
struct NvFlexInitDesc
+
+

Descriptor used to initialize Flex

+
+ + + + + + + + + + + + + + + + +
Data Fields
+int +deviceIndex +The GPU device index that should be used, if there is already a CUDA context on the calling thread then this parameter will be ignored and the active CUDA context used. Otherwise a new context will be created using the suggested device ordinal.
+bool +enableExtensions +Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance.
+void * +renderDevice +Direct3D device to use for simulation, if none is specified a new device and context will be created.
+void * +renderContext +Direct3D context to use for simulation, if none is specified a new context will be created, in DirectX 12 this should be a pointer to the ID3D12CommandQueue where compute operations will take place.
+NvFlexComputeType +computeType +Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the libraries used to link the application.
+ +
+
+ +
+
+ + + + +
struct NvFlexSphereGeometry
+
+

A basic sphere shape with origin at the center of the sphere and radius

+
+ + + + +
Data Fields
+float +radius +
+ +
+
+ +
+
+ + + + +
struct NvFlexCapsuleGeometry
+
+

A collision capsule extends along the x-axis with its local origin at the center of the capsule

+
+ + + + + + + +
Data Fields
+float +radius +
+float +halfHeight +
+ +
+
+ +
+
+ + + + +
struct NvFlexBoxGeometry
+
+

A simple box with interior [-halfHeight, +halfHeight] along each dimension

+
+ + + + +
Data Fields
+float +halfExtents[3] +
+ +
+
+ +
+
+ + + + +
struct NvFlexConvexMeshGeometry
+
+

A convex mesh instance with non-uniform scale

+
+ + + + + + + +
Data Fields
+float +scale[3] +
+NvFlexConvexMeshId +mesh +
+ +
+
+ +
+
+ + + + +
struct NvFlexTriangleMeshGeometry
+
+

A scaled triangle mesh instance with non-uniform scale

+
+ + + + + + + +
Data Fields
+float +scale[3] +The scale of the object from local space to world space.
+NvFlexTriangleMeshId +mesh +A triangle mesh pointer created by NvFlexCreateTriangleMesh()
+ +
+
+ +
+
+ + + + +
struct NvFlexSDFGeometry
+
+

A scaled signed distance field instance, the local origin of the SDF is at corner of the field corresponding to the first voxel. The field is mapped to the local space volume [0, 1] in each dimension.

+
+ + + + + + + +
Data Fields
+float +scale +Uniform scale of SDF, this corresponds to the world space width of the shape.
+NvFlexDistanceFieldId +field +A signed distance field pointer created by NvFlexCreateDistanceField()
+ +
+
+ +
+
+ + + + +
union NvFlexCollisionGeometry
+
+

This union allows collision geometry to be sent to Flex as a flat array of 16-byte data structures, the shape flags array specifies the type for each shape, see NvFlexSetShapes().

+
+ + + + + + + + + + + + + + + + + + + +
Data Fields
+NvFlexSphereGeometry +sphere +
+NvFlexCapsuleGeometry +capsule +
+NvFlexBoxGeometry +box +
+NvFlexConvexMeshGeometry +convexMesh +
+NvFlexTriangleMeshGeometry +triMesh +
+NvFlexSDFGeometry +sdf +
+ +
+
+ +
+
+ + + + +
struct NvFlexDetailTimer
+
+

Holds the execution time for a specfic shader

+
+ + + + + + + +
Data Fields
+char * +name +
+float +time +
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef struct NvFlexLibrary NvFlexLibrary
+
+

Opaque type representing a library that can create FlexSolvers, FlexTriangleMeshes, and NvFlexBuffers

+ +
+
+ +
+
+ + + + +
typedef struct NvFlexSolver NvFlexSolver
+
+

Opaque type representing a collection of particles and constraints

+ +
+
+ +
+
+ + + + +
typedef struct NvFlexBuffer NvFlexBuffer
+
+

Opaque type representing a data buffer, type and contents depends on usage, see NvFlexAllocBuffer()

+ +
+
+ +
+
+ + + + +
typedef void(* NvFlexErrorCallback) (NvFlexErrorSeverity type, const char *msg, const char *file, int line)
+
+

Function pointer type for error reporting callbacks

+ +
+
+ +
+
+ + + + +
typedef unsigned int NvFlexTriangleMeshId
+
+

An opaque type representing a static triangle mesh in the solver

+ +
+
+ +
+
+ + + + +
typedef unsigned int NvFlexDistanceFieldId
+
+

An opaque type representing a signed distance field collision shape in the solver.

+ +
+
+ +
+
+ + + + +
typedef unsigned int NvFlexConvexMeshId
+
+

An opaque type representing a convex mesh collision shape in the solver. Convex mesh shapes may consist of up to 64 planes of the form a*x + b*y + c*z + d = 0, particles will be constrained to the outside of the shape.

+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum NvFlexMapFlags
+
+

Controls behavior of NvFlexMap()

+ + + + +
Enumerator
eNvFlexMapWait  +

Calling thread will be blocked until buffer is ready for access, default.

+
eNvFlexMapDoNotWait  +

Calling thread will check if buffer is ready for access, if not ready then the method will return NULL immediately.

+
eNvFlexMapDiscard  +

Buffer contents will be discarded, this allows for efficent buffer reuse.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexBufferType
+
+

Controls memory space of a NvFlexBuffer, see NvFlexAllocBuffer()

+ + + +
Enumerator
eNvFlexBufferHost  +

Host mappable buffer, pinned memory on CUDA, staging buffer on DX.

+
eNvFlexBufferDevice  +

Device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a buffer pointer on DX.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexRelaxationMode
+
+

Controls the relaxation method used by the solver to ensure convergence

+ + + +
Enumerator
eNvFlexRelaxationGlobal  +

The relaxation factor is a fixed multiplier on each constraint's position delta.

+
eNvFlexRelaxationLocal  +

The relaxation factor is a fixed multiplier on each constraint's delta divided by the particle's constraint count, convergence will be slower but more reliable.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexPhase
+
+

Flags that control the a particle's behavior and grouping, use NvFlexMakePhase() to construct a valid 32bit phase identifier

+ + + + + +
Enumerator
eNvFlexPhaseGroupMask  +

Low 24 bits represent the particle group for controlling collisions.

+
eNvFlexPhaseSelfCollide  +

If set this particle will interact with particles of the same group.

+
eNvFlexPhaseSelfCollideFilter  +

If set this particle will ignore collisions with particles closer than the radius in the rest pose, this flag should not be specified unless valid rest positions have been specified using NvFlexSetRestParticles()

+
eNvFlexPhaseFluid  +

If set this particle will generate fluid density constraints for its overlapping neighbors.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexErrorSeverity
+
+

Flex error return codes

+ + + + + + +
Enumerator
eNvFlexLogError  +

Error messages.

+
eNvFlexLogInfo  +

Information messages.

+
eNvFlexLogWarning  +

Warning messages.

+
eNvFlexLogDebug  +

Used only in debug version of dll.

+
eNvFlexLogAll  +

All log types.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexSolverCallbackStage
+
+

Defines the set of stages at which callbacks may be registered

+ + + + + + + +
Enumerator
eNvFlexStageIterationStart  +

Called at the beginning of each constraint iteration.

+
eNvFlexStageIterationEnd  +

Called at the end of each constraint iteration.

+
eNvFlexStageSubstepBegin  +

Called at the beginning of each substep after the prediction step has been completed.

+
eNvFlexStageSubstepEnd  +

Called at the end of each substep after the velocity has been updated by the constraints.

+
eNvFlexStageUpdateEnd  +

Called at the end of solver update after the final substep has completed.

+
eNvFlexStageCount  +

Number of stages.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexComputeType
+
+

Defines the different DirectX compute modes that Flex can use

+ + + + +
Enumerator
eNvFlexCUDA  +

Use CUDA compute for Flex, the application must link against the CUDA libraries.

+
eNvFlexD3D11  +

Use DirectX 11 compute for Flex, the application must link against the D3D libraries.

+
eNvFlexD3D12  +

Use DirectX 12 compute for Flex, the application must link against the D3D libraries.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexCollisionShapeType
+
+ + + + + + + +
Enumerator
eNvFlexShapeSphere  +

A sphere shape, see FlexSphereGeometry.

+
eNvFlexShapeCapsule  +

A capsule shape, see FlexCapsuleGeometry.

+
eNvFlexShapeBox  +

A box shape, see FlexBoxGeometry.

+
eNvFlexShapeConvexMesh  +

A convex mesh shape, see FlexConvexMeshGeometry.

+
eNvFlexShapeTriangleMesh  +

A triangle mesh shape, see FlexTriangleMeshGeometry.

+
eNvFlexShapeSDF  +

A signed distance field shape, see FlexSDFGeometry.

+
+ +
+
+ +
+
+ + + + +
enum NvFlexCollisionShapeFlags
+
+ + + + + +
Enumerator
eNvFlexShapeFlagTypeMask  +

Lower 3 bits holds the type of the collision shape.

+
eNvFlexShapeFlagDynamic  +

Indicates the shape is dynamic and should have lower priority over static collision shapes.

+
eNvFlexShapeFlagTrigger  +

Indicates that the shape is a trigger volume, this means it will not perform any collision response, but will be reported in the contacts array (see NvFlexGetContacts())

+
eNvFlexShapeFlagReserved  +
+ +
+
+

Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexMakePhase (int group,
int flags 
)
+
+inline
+
+

Generate a bit set for the particle phase, the group should be an integer < 2^24, and the flags should be a combination of FlexPhase enum values

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexLibrary* NvFlexInit (int version = NV_FLEX_VERSION,
NvFlexErrorCallback errorFunc = 0,
NvFlexInitDescdesc = 0 
)
+
+

Initialize library, should be called before any other API function.

+
Parameters
+ + + + +
[in]versionThe version number the app is expecting, should almost always be NV_FLEX_VERSION
[in]errorFuncThe callback used for reporting errors.
[in]descThe NvFlexInitDesc struct defining the device ordinal, D3D device/context and the type of D3D compute being used
+
+
+
Returns
A pointer to a library instance that can be used to allocate shared object such as triangle meshes, buffers, etc
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexShutdown (NvFlexLibrarylib)
+
+

Shutdown library, users should manually destroy any previously created solvers to ensure memory is freed before calling this method. If a new CUDA context was created during NvFlexInit() then it will be destroyed.

+
Parameters
+ + +
[in]libThe library intance to use
+
+
+ +
+
+ +
+
+ + + + + + + +
NV_FLEX_API int NvFlexGetVersion ()
+
+

Get library version number

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexSolver* NvFlexCreateSolver (NvFlexLibrarylib,
int maxParticles,
int maxDiffuseParticles,
int maxNeighborsPerParticle = 96 
)
+
+

Create a new particle solver

+
Parameters
+ + + + + +
[in]libThe library instance to use
[in]maxParticlesMaximum number of simulation particles possible for this solver
[in]maxDiffuseParticlesMaximum number of diffuse (non-simulation) particles possible for this solver
[in]maxNeighborsPerParticleMaximum number of neighbors per particle possible for this solver
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexDestroySolver (NvFlexSolversolver)
+
+

Delete a particle solver

+
Parameters
+ + +
[in]solverA valid solver pointer created from NvFlexCreateSolver()
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexLibrary* NvFlexGetSolverLibrary (NvFlexSolversolver)
+
+

Return the library associated with a solver

+
Parameters
+ + +
[in]solverA valid solver created with NvFlexCreateSolver()
+
+
+
Returns
A library pointer
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexSolverCallback NvFlexRegisterSolverCallback (NvFlexSolversolver,
NvFlexSolverCallback function,
NvFlexSolverCallbackStage stage 
)
+
+

Registers a callback for a solver stage, the callback will be invoked from the same thread that calls NvFlexUpdateSolver().

+
Parameters
+ + + + +
[in]solverA valid solver
[in]functionA pointer to a function that will be called during the solver update
[in]stageThe stage of the update at which the callback function will be called
+
+
+
Returns
The previously registered callback for this slot, this allows multiple users to chain callbacks together
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexUpdateSolver (NvFlexSolversolver,
float dt,
int substeps,
bool enableTimers 
)
+
+

Integrate particle solver forward in time. Below is an example of how to step Flex in the context of a simple game loop:

+
+
NvFlexSolver* solver = NvFlexCreateSolver(library);
+
+
NvFlexBuffer* particleBuffer = NvFlexAllocBuffer(library, n, sizeof(Vec4), eNvFlexBufferHost);
+
NvFlexBuffer* velocityBuffer = NvFlexAllocBuffer(library, n, sizeof(Vec4), eNvFlexBufferHost);
+
NvFlexBuffer* phaseBuffer = NvFlexAllocBuffer(library, n, sizeof(int), eNvFlexBufferHost);
+
+
while(!done)
+
{
+
// map buffers for reading / writing
+
float4* particles = (float4*)NvFlexMap(particles, eNvFlexMapWait);
+
float3* velocities = (float3*)NvFlexMap(velocities, eNvFlexMapWait);
+
int* phases = (int*)NvFlexMap(phases, eNvFlexMapWait);
+
+
// spawn (user method)
+
SpawnParticles(particles, velocities, phases);
+
+
// render (user method)
+
RenderParticles(particles, velocities, phases);
+
+
// unmap buffers
+
NvFlexUnmap(particleBuffer);
+
NvFlexUnmap(velocityBuffer);
+
NvFlexUnmap(phaseBuffer);
+
+
// write to device (async)
+
NvFlexSetParticles(particleBuffer, n);
+
NvFlexSetVelocities(velocityBuffer, n);
+
NvFlexSetPhases(phaseBuffer, n);
+
+
// tick
+
NvFlexUpdateSolver(solver, dt, 1, NULL);
+
+
// read back (async)
+
NvFlexGetParticles(particleBuffer, n);
+
NvFlexGetVelocities(velocityBuffer, n);
+
NvFlexGetPhases(phaseBuffer, n);
+
}
+
+
NvFlexFreeBuffer(particleBuffer);
+
NvFlexFreeBuffer(velocityBuffer);
+
NvFlexFreeBuffer(phaseBuffer);
+
+ +
NvFlexShutdown(library);
+
Parameters
+ + + + + +
[in]solverA valid solver
[in]dtTime to integrate the solver forward in time by
[in]substepsThe time dt will be divided into the number of sub-steps given by this parameter
[in]enableTimersWhether to enable per-kernel timers for profiling. Note that profiling can substantially slow down overall performance so this param should only be true in non-release builds
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetParams (NvFlexSolversolver,
const NvFlexParamsparams 
)
+
+

Update solver paramters

+
Parameters
+ + + +
[in]solverA valid solver
[in]paramsParameters structure in host memory, see NvFlexParams
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetParams (NvFlexSolversolver,
NvFlexParamsparams 
)
+
+

Retrieve solver paramters, default values will be set at solver creation time

+
Parameters
+ + + +
[in]solverA valid solver
[out]paramsParameters structure in host memory, see NvFlexParams
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetActive (NvFlexSolversolver,
NvFlexBufferindices,
int n 
)
+
+

Set the active particles indices in the solver

+
Parameters
+ + + + +
[in]solverA valid solver
[in]indicesHolds the indices of particles that have been made active
[in]nNumber of particles to allocate
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetActive (NvFlexSolversolver,
NvFlexBufferindices 
)
+
+

Return the active particle indices

+
Parameters
+ + + +
[in]solverA valid solver
[out]indicesa buffer of indices at least activeCount in length
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API int NvFlexGetActiveCount (NvFlexSolversolver)
+
+

Return the number of active particles in the solver

+
Parameters
+ + +
[in]solverA valid solver
+
+
+
Returns
The number of active particles in the solver
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetParticles (NvFlexSolversolver,
NvFlexBufferp,
int n 
)
+
+

Set the particles state of the solver, a particle consists of 4 floating point numbers, its x,y,z position followed by its inverse mass (1/m)

+
Parameters
+ + + + +
[in]solverA valid solver
[in]pPointer to a buffer of particle data, should be 4*n in length
[in]nThe number of particles to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetParticles (NvFlexSolversolver,
NvFlexBufferp,
int n 
)
+
+

Get the particles state of the solver, a particle consists of 4 floating point numbers, its x,y,z position followed by its inverse mass (1/m)

+
Parameters
+ + + + +
[in]solverA valid solver
[out]pPointer to a buffer of 4*n floats that will be filled out with the particle data, can be either a host or device pointer
[in]nThe number of particles to get, must be less than max particles passed to NvFlexCreateSolver
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetRestParticles (NvFlexSolversolver,
NvFlexBufferp,
int n 
)
+
+

Set the particle positions in their rest state, if eNvFlexPhaseSelfCollideFilter is set on the particle's phase attribute then particles that overlap in the rest state will not generate collisions with each other

+
Parameters
+ + + + +
[in]solverA valid solver
[in]pPointer to a buffer of particle data, should be 4*n in length
[in]nThe number of particles to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetRestParticles (NvFlexSolversolver,
NvFlexBufferp,
int n 
)
+
+

Get the particle positions in their rest state

+
Parameters
+ + + + +
[in]solverA valid solver
[in]pPointer to a buffer of particle data, should be 4*n in length
[in]nThe number of particles to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetSmoothParticles (NvFlexSolversolver,
NvFlexBufferp,
int n 
)
+
+

Get the Laplacian smoothed particle positions for rendering, see NvFlexParams::smoothing

+
Parameters
+ + + + +
[in]solverA valid solver
[out]pPointer to a buffer of 4*n floats that will be filled out with the data, can be either a host or device pointer
[in]nThe number of smooth particles to return
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetVelocities (NvFlexSolversolver,
NvFlexBufferv,
int n 
)
+
+

Set the particle velocities, each velocity is a 3-tuple of x,y,z floating point values

+
Parameters
+ + + + +
[in]solverA valid solver
[in]vPointer to a buffer of 3*n floats
[in]nThe number of velocities to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetVelocities (NvFlexSolversolver,
NvFlexBufferv,
int n 
)
+
+

Get the particle velocities, each velocity is a 3-tuple of x,y,z floating point values

+
Parameters
+ + + + +
[in]solverA valid solver
[out]vPointer to a buffer of 3*n floats that will be filled out with the data, can be either a host or device pointer
[in]nThe number of velocities to get
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetPhases (NvFlexSolversolver,
NvFlexBufferphases,
int n 
)
+
+

Set the particles phase id array, each particle has an associated phase id which controls how it interacts with other particles. Particles with phase 0 interact with all other phase types.

+

Particles with a non-zero phase id only interact with particles whose phase differs from theirs. This is useful, for example, to stop particles belonging to a single rigid shape from interacting with each other.

+

Phase 0 is used to indicate fluid particles when NvFlexParams::mFluid is set.

+
Parameters
+ + + + +
[in]solverA valid solver
[in]phasesPointer to a buffer of n integers containing the phases
[in]nThe number of phases to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetPhases (NvFlexSolversolver,
NvFlexBufferphases,
int n 
)
+
+

Get the particle phase ids

+
Parameters
+ + + + +
[in]solverA valid solver
[out]phasesPointer to a buffer of n integers that will be filled with the phase data, can be either a host or device pointer
[in]nThe number of phases to get
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetNormals (NvFlexSolversolver,
NvFlexBuffernormals,
int n 
)
+
+

Set per-particle normals to the solver, these will be overwritten after each simulation step, but can be used to initialize the normals to valid values

+
Parameters
+ + + + +
[in]solverA valid solver
[in]normalsPointer to a buffer of normals, should be 4*n in length
[in]nThe number of normals to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetNormals (NvFlexSolversolver,
NvFlexBuffernormals,
int n 
)
+
+

Get per-particle normals from the solver, these are the world-space normals computed during surface tension, cloth, and rigid body calculations

+
Parameters
+ + + + +
[in]solverA valid solver
[out]normalsPointer to a buffer of normals, should be 4*n in length
[in]nThe number of normals to get
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetSprings (NvFlexSolversolver,
NvFlexBufferindices,
NvFlexBufferrestLengths,
NvFlexBufferstiffness,
int numSprings 
)
+
+

Set distance constraints for the solver. Each distance constraint consists of two particle indices stored consecutively, a rest-length, and a stiffness value. These are not springs in the traditional sense, but behave somewhat like a traditional spring when lowering the stiffness coefficient.

+
Parameters
+ + + + + + +
[in]solverA valid solver
[in]indicesPointer to the spring indices array, should be 2*numSprings length, 2 indices per-spring
[in]restLengthsPointer to a buffer of rest lengths, should be numSprings length
[in]stiffnessPointer to the spring stiffness coefficents, should be numSprings in length, a negative stiffness value represents a tether constraint
[in]numSpringsThe number of springs to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetSprings (NvFlexSolversolver,
NvFlexBufferindices,
NvFlexBufferrestLengths,
NvFlexBufferstiffness,
int numSprings 
)
+
+

Get the distance constraints from the solver

+
Parameters
+ + + + + + +
[in]solverA valid solver
[out]indicesPointer to the spring indices array, should be 2*numSprings length, 2 indices per-spring
[out]restLengthsPointer to a buffer of rest lengths, should be numSprings length
[out]stiffnessPointer to the spring stiffness coefficents, should be numSprings in length, a negative stiffness value represents a unilateral tether constraint (only resists stretching, not compression), valid range [-1, 1]
[in]numSpringsThe number of springs to get
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetRigids (NvFlexSolversolver,
NvFlexBufferoffsets,
NvFlexBufferindices,
NvFlexBufferrestPositions,
NvFlexBufferrestNormals,
NvFlexBufferstiffness,
NvFlexBufferrotations,
NvFlexBuffertranslations,
int numRigids,
int numIndices 
)
+
+

Set rigid body constraints for the solver.

Note
A particle should not belong to more than one rigid body at a time.
+
Parameters
+ + + + + + + + + + + +
[in]solverA valid solver
[in]offsetsPointer to a buffer of start offsets for a rigid in the indices array, should be numRigids+1 in length, the first entry must be 0
[in]indicesPointer to a buffer of indices for the rigid bodies, the indices for the jth rigid body start at indices[offsets[j]] and run to indices[offsets[j+1]] exclusive
[in]restPositionsPointer to a buffer of local space positions relative to the rigid's center of mass (average position), this should be at least 3*numIndices in length in the format x,y,z
[in]restNormalsPointer to a buffer of local space normals, this should be at least 4*numIndices in length in the format x,y,z,w where w is the (negative) signed distance of the particle inside its shape
[in]stiffnessPointer to a buffer of rigid stiffness coefficents, should be numRigids in length, valid values in range [0, 1]
[in]rotationsPointer to a buffer of quaternions (4*numRigids in length)
[in]translationsPointer to a buffer of translations of the center of mass (3*numRigids in length)
[in]numRigidsThe number of rigid bodies to set
[in]numIndicesThe number of indices in the indices array
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetRigidTransforms (NvFlexSolversolver,
NvFlexBufferrotations,
NvFlexBuffertranslations 
)
+
+

Get the rotation matrices for the rigid bodies in the solver

+
Parameters
+ + + + +
[in]solverA valid solver
[out]rotationsPointer to a buffer of quaternions, should be 4*numRigids floats in length
[out]translationsPointer to a buffer of vectors to hold the rigid translations, should be 3*numRigids floats in length
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh (NvFlexLibrarylib)
+
+

Create triangle mesh geometry, note that meshes may be used by multiple solvers if desired

+
Parameters
+ + +
[in]libThe library instance to use
+
+
+
Returns
A pointer to a triangle mesh object
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexDestroyTriangleMesh (NvFlexLibrarylib,
NvFlexTriangleMeshId mesh 
)
+
+

Destroy a triangle mesh created with NvFlexCreateTriangleMesh()

+
Parameters
+ + + +
[in]libThe library instance to use
[in]meshA triangle mesh created with NvFlexCreateTriangleMesh()
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexUpdateTriangleMesh (NvFlexLibrarylib,
NvFlexTriangleMeshId mesh,
NvFlexBuffervertices,
NvFlexBufferindices,
int numVertices,
int numTriangles,
const float * lower,
const float * upper 
)
+
+

Specifies the triangle mesh geometry (vertices and indices), this method will cause any internal data structures (e.g.: bounding volume hierarchies) to be rebuilt.

+
Parameters
+ + + + + + + + + +
[in]libThe library instance to use
[in]meshA triangle mesh created with NvFlexCreateTriangleMesh()
[in]verticesPointer to a buffer of float3 vertex positions
[in]indicesPointer to a buffer of triangle indices, should be length numTriangles*3
[in]numVerticesThe number of vertices in the vertices array
[in]numTrianglesThe number of triangles in the mesh
[in]lowerA pointer to a float3 vector holding the lower spatial bounds of the mesh
[in]upperA pointer to a float3 vector holding the upper spatial bounds of the mesh
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetTriangleMeshBounds (NvFlexLibrarylib,
const NvFlexTriangleMeshId mesh,
float * lower,
float * upper 
)
+
+

Retrieve the local space bounds of the mesh, these are the same values specified to NvFlexUpdateTriangleMesh()

+
Parameters
+ + + + + +
[in]libThe library instance to use
[in]meshPointer to a triangle mesh object
[out]lowerPointer to a buffer of 3 floats that the lower mesh bounds will be written to
[out]upperPointer to a buffer of 3 floats that the upper mesh bounds will be written to
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField (NvFlexLibrarylib)
+
+

Create a signed distance field collision shape, see NvFlexDistanceFieldId for details.

+
Parameters
+ + +
[in]libThe library instance to use
+
+
+
Returns
A pointer to a signed distance field object
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexDestroyDistanceField (NvFlexLibrarylib,
NvFlexDistanceFieldId sdf 
)
+
+

Destroy a signed distance field

+
Parameters
+ + + +
[in]libThe library instance to use
[in]sdfA signed distance field created with NvFlexCreateDistanceField()
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexUpdateDistanceField (NvFlexLibrarylib,
NvFlexDistanceFieldId sdf,
int dimx,
int dimy,
int dimz,
NvFlexBufferfield 
)
+
+

Update the signed distance field volume data, this method will upload the field data to a 3D texture on the GPU

+
Parameters
+ + + + + + + +
[in]libThe library instance to use
[in]sdfA signed distance field created with NvFlexCreateDistanceField()
[in]dimxThe x-dimension of the volume data in voxels
[in]dimyThe y-dimension of the volume data in voxels
[in]dimzThe z-dimension of the volume data in voxels
[in]fieldThe volume data stored such that the voxel at the x,y,z coordinate is addressed as field[z*dimx*dimy + y*dimx + x]
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh (NvFlexLibrarylib)
+
+

Create a convex mesh collision shapes, see NvFlexConvexMeshId for details.

+
Parameters
+ + +
[in]libThe library instance to use
+
+
+
Returns
A pointer to a signed distance field object
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexDestroyConvexMesh (NvFlexLibrarylib,
NvFlexConvexMeshId convex 
)
+
+

Destroy a convex mesh

+
Parameters
+ + + +
[in]libThe library instance to use
[in]convexA a convex mesh created with NvFlexCreateConvexMesh()
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexUpdateConvexMesh (NvFlexLibrarylib,
NvFlexConvexMeshId convex,
NvFlexBufferplanes,
int numPlanes,
float * lower,
float * upper 
)
+
+

Update the convex mesh geometry

+
Parameters
+ + + + + + + +
[in]libThe library instance to use
[in]convexA valid convex mesh shape created from NvFlexCreateConvexMesh()
[in]planesAn array of planes, each plane consists of 4 floats in the form a*x + b*y + c*z + d = 0
[in]numPlanesThe number of planes in the convex
[in]lowerThe local space lower bound of the convex shape
[in]upperThe local space upper bound of the convex shape
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetConvexMeshBounds (NvFlexLibrarylib,
NvFlexConvexMeshId mesh,
float * lower,
float * upper 
)
+
+

Retrieve the local space bounds of the mesh, these are the same values specified to NvFlexUpdateConvexMesh()

+
Parameters
+ + + + + +
[in]libThe library instance to use
[in]meshPointer to a convex mesh object
[out]lowerPointer to a buffer of 3 floats that the lower mesh bounds will be written to
[out]upperPointer to a buffer of 3 floats that the upper mesh bounds will be written to
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexMakeShapeFlags (NvFlexCollisionShapeType type,
bool dynamic 
)
+
+inline
+
+

Combines geometry type and static/dynamic flags

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetShapes (NvFlexSolversolver,
NvFlexBuffergeometry,
NvFlexBuffershapePositions,
NvFlexBuffershapeRotations,
NvFlexBuffershapePrevPositions,
NvFlexBuffershapePrevRotations,
NvFlexBuffershapeFlags,
int numShapes 
)
+
+

Set the collision shapes for the solver

+
Parameters
+ + + + + + + + + +
[in]solverA valid solver
[in]geometryPointer to a buffer of NvFlexCollisionGeometry entries, the type of each shape determines how many entries it has in the array
[in]shapePositionsPointer to a buffer of translations for each shape in world space, should be 4*numShapes in length
[in]shapeRotationsPointer to an a buffer of rotations for each shape stored as quaternion, should be 4*numShapes in length
[in]shapePrevPositionsPointer to a buffer of translations for each shape at the start of the time step, should be 4*numShapes in length
[in]shapePrevRotationsPointer to an a buffer of rotations for each shape stored as a quaternion at the start of the time step, should be 4*numShapees in length
[in]shapeFlagsThe type and behavior of the shape, NvFlexCollisionShapeFlags for more detail
[in]numShapesThe number of shapes
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetDynamicTriangles (NvFlexSolversolver,
NvFlexBufferindices,
NvFlexBuffernormals,
int numTris 
)
+
+

Set dynamic triangles mesh indices, typically used for cloth. Flex will calculate normals and apply wind and drag effects to connected particles. See NvFlexParams::drag, NvFlexParams::wind.

+
Parameters
+ + + + + +
[in]solverA valid solver
[in]indicesPointer to a buffer of triangle indices into the particles array, should be 3*numTris in length
[in]normalsPointer to a buffer of triangle normals, should be 3*numTris in length, can be NULL
[in]numTrisThe number of dynamic triangles s
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetDynamicTriangles (NvFlexSolversolver,
NvFlexBufferindices,
NvFlexBuffernormals,
int numTris 
)
+
+

Get the dynamic triangle indices and normals.

+
Parameters
+ + + + + +
[in]solverA valid solver
[out]indicesPointer to a buffer of triangle indices into the particles array, should be 3*numTris in length, if NULL indices will not be returned
[out]normalsPointer to a buffer of triangle normals, should be 3*numTris in length, if NULL normals will be not be returned
[in]numTrisThe number of dynamic triangles
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetInflatables (NvFlexSolversolver,
NvFlexBufferstartTris,
NvFlexBuffernumTris,
NvFlexBufferrestVolumes,
NvFlexBufferoverPressures,
NvFlexBufferconstraintScales,
int numInflatables 
)
+
+

Set inflatable shapes, an inflatable is a range of dynamic triangles (wound CCW) that represent a closed mesh. Each inflatable has a given rest volume, constraint scale (roughly equivalent to stiffness), and "over pressure" that controls how much the shape is inflated.

+
Parameters
+ + + + + + + + +
[in]solverA valid solver
[in]startTrisPointer to a buffer of offsets into the solver's dynamic triangles for each inflatable, should be numInflatables in length
[in]numTrisPointer to a buffer of triangle counts for each inflatable, should be numInflatablesin length
[in]restVolumesPointer to a buffer of rest volumes for the inflatables, should be numInflatables in length
[in]overPressuresPointer to a buffer of floats specifying the pressures for each inflatable, a value of 1.0 means the rest volume, > 1.0 means over-inflated, and < 1.0 means under-inflated, should be numInflatables in length
[in]constraintScalesPointer to a buffer of scaling factors for the constraint, this is roughly equivalent to stiffness but includes a constraint scaling factor from position-based dynamics, see helper code for details, should be numInflatables in length
[in]numInflatablesNumber of inflatables to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetDensities (NvFlexSolversolver,
NvFlexBufferdensities,
int n 
)
+
+

Get the density values for fluid particles

+
Parameters
+ + + + +
[in]solverA valid solver
[in]nThe number of particle densities to return
[out]densitiesPointer to a buffer of floats, should be maxParticles in length, density values are normalized between [0, 1] where 1 represents the rest density
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetAnisotropy (NvFlexSolversolver,
NvFlexBufferq1,
NvFlexBufferq2,
NvFlexBufferq3 
)
+
+

Get the anisotropy of fluid particles, the particle distribution for a particle is represented by 3 orthogonal vectors. Each 3-vector has unit length with the variance along that axis packed into the w component, i.e.: x,y,z,lambda.

+

The anisotropy defines an oriented ellipsoid in worldspace that can be used for rendering or surface extraction.

+
Parameters
+ + + + + +
[in]solverA valid solver
[out]q1Pointer to a buffer of floats that receive the first basis vector and scale, should be 4*maxParticles in length
[out]q2Pointer to a buffer of floats that receive the second basis vector and scale, should be 4*maxParticles in length
[out]q3Pointer to a buffer of floats that receive the third basis vector and scale, should be 4*maxParticles in length
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexGetDiffuseParticles (NvFlexSolversolver,
NvFlexBufferp,
NvFlexBufferv,
NvFlexBufferindices 
)
+
+

Get the state of the diffuse particles. Diffuse particles are passively advected by the fluid velocity field.

+
Parameters
+ + + + + +
[in]solverA valid solver
[out]pPointer to a buffer of floats, should be 4*maxParticles in length, the w component represents the particles lifetime with 1 representing a new particle, and 0 representing an inactive particle
[out]vPointer to a buffer of floats, should be 4*maxParticles in length, the w component is not used
[out]indicesPointer to a buffer of ints that specify particle indices in depth sorted order, should be maxParticles in length, see NvFlexParams::mDiffuseSortDir
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexSetDiffuseParticles (NvFlexSolversolver,
NvFlexBufferp,
NvFlexBufferv,
int n 
)
+
+

Set the state of the diffuse particles. Diffuse particles are passively advected by the fluid velocity field.

+
Parameters
+ + + + + +
[in]solverA valid solver
[in]pPointer to a buffer of floats, should be 4*n in length, the w component represents the particles lifetime with 1 representing a new particle, and 0 representing an inactive particle
[in]vPointer to a buffer of floats, should be 4*n in length, the w component is not used
[in]nNumber of diffuse particles to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetContacts (NvFlexSolversolver,
NvFlexBufferplanes,
NvFlexBuffervelocities,
NvFlexBufferindices,
NvFlexBuffercounts 
)
+
+

Get the particle contact planes. Note this will only include contacts that were active on the last substep of an update, and will include all contact planes generated within NvFlexParams::shapeCollisionMargin.

+
Parameters
+ + + + + + +
[in]solverA valid solver
[out]planesPointer to a destination buffer containing the contact planes for the particle, each particle can have up to 4 contact planes so this buffer should be 16*maxParticles in length
[out]velocitiesPointer to a destination buffer containing the velocity of the contact point on the shape in world space, the index of the shape (corresponding to the shape in NvFlexSetShapes() is stored in the w component), each particle can have up to 4 contact planes so this buffer should be 16*maxParticles in length
[out]indicesPointer to a buffer of indices into the contacts buffer, the first contact plane for the i'th particle is given by planes[indices[i]*sizeof(float)*4] and subsequent contacts for that particle are stored sequentially, this array should be maxParticles in length
[out]countsPointer to a buffer of contact counts for each particle (will be <= 4), this buffer should be maxParticles in length
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetBounds (NvFlexSolversolver,
NvFlexBufferlower,
NvFlexBufferupper 
)
+
+

Get the world space AABB of all particles in the solver, note that the bounds are calculated during the update (see NvFlexUpdateSolver()) so only become valid after an update has been performed. The returned bounds represent bounds of the particles in their predicted positions before the constraint solve.

+
Parameters
+ + + + +
[in]solverA valid solver
[out]lowerPointer to a buffer of 3 floats to receive the lower bounds
[out]upperPointer to a buffer of 3 floats to receive the upper bounds
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API float NvFlexGetDeviceLatency (NvFlexSolversolver)
+
+
Parameters
+ + +
[in]solverA valid solver
+
+
+
Returns
The time in seconds between the first and last GPU operations executed by the last NvFlexUpdateSolver.
+
Note
This method causes the CPU to wait until the GPU has finished any outstanding work. To avoid blocking the calling thread it should be called after work has completed, e.g.: directly after a NvFlexMap().
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetTimers (NvFlexSolversolver,
NvFlexTimerstimers 
)
+
+

Fetch high-level GPU timers.

+
Parameters
+ + + +
[in]solverThe solver instance to use
[out]timersA struct containing the GPU latency of each stage in the physics pipeline.
+
+
+
Note
This method causes the CPU to wait until the GPU has finished any outstanding work. To avoid blocking the calling thread it should be called after work has completed, e.g.: directly after a NvFlexMap(). To capture there timers you must pass true for enableTimers in NvFlexUpdateSolver()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexGetDetailTimers (NvFlexSolversolver,
NvFlexDetailTimer ** timers 
)
+
+

Fetch per-shader GPU timers.

+
Parameters
+ + + +
[in]solverThe solver instance to use
[out]timersAn array of NvFlexDetailTimer structures, each representing a unique shader.
+
+
+
Returns
The number of detail timers in the timers array
+
Note
This method causes the CPU to wait until the GPU has finished any outstanding work. To avoid blocking the calling thread it should be called after work has completed, e.g.: directly after a NvFlexMap(). To capture there timers you must pass true for enableTimers in NvFlexUpdateSolver() Timers are valid until the next call to NvFlexGetDetailTimers
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexBuffer* NvFlexAllocBuffer (NvFlexLibrarylib,
int elementCount,
int elementByteStride,
NvFlexBufferType type 
)
+
+

Allocate a Flex buffer. Buffers are used to pass data to the API in an efficient manner.

+
Parameters
+ + + + + +
[in]libThe library instance to use
[in]elementCountThe number of elements in the buffer
[in]elementByteStrideThe size of each element in bytes
[in]typeThe type of buffer to allocate, can be either host memory or device memory
+
+
+
Returns
A pointer to a NvFlexBuffer
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexFreeBuffer (NvFlexBufferbuf)
+
+

Free a Flex buffer

+
Parameters
+ + +
[in]bufA buffer to free, must be allocated with NvFlexAllocBuffer()
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void* NvFlexMap (NvFlexBufferbuffer,
int flags 
)
+
+

Maps a buffer for reading and writing. When the buffer is created with NvFlexBufferType::eHost, then the returned pointer will be a host memory address that can be read/written. Mapping a buffer implicitly synchronizes with the GPU to ensure that any reads or writes from the buffer (e.g.: from the NvFlexGet*() or NvFlexSet*()) methods have completed.

+
Parameters
+ + + +
[in]bufferA buffer allocated with NvFlexAllocBuffer()
[in]flagsHints to Flex how the buffer is to be accessed, typically this should be eNvFlexMapWait (0)
+
+
+
Returns
A pointer to the mapped memory
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexUnmap (NvFlexBufferbuffer)
+
+

Unmaps a buffer that was mapped through NvFlexMap(), note that buffers must be unmapped before they can be passed to a NvFlexGet*() or NvFlexSet*() method

+
Parameters
+ + +
[in]bufferA valid buffer allocated through NvFlexAllocBuffer()
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexBuffer* NvFlexRegisterOGLBuffer (NvFlexLibrarylib,
int buf,
int elementCount,
int elementByteStride 
)
+
+

Registers an OpenGL buffer to Flex which can be used to copy directly into a graphics resource. Example usage is below

+
GLuint vbo;
+
glGenBuffers(1, &vbo);
+
glBindBuffer(GL_ARRAY_BUFFER, vbo);
+
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW)
+
+
NvFlexBuffer* vboBuffer = NvFlexRegisterOGLBuffer(lib, vbo, n, sizeof(float)*4);
+
+
// simulate
+
...
+
+
// copy directly from Flex into render buffer
+
NvFlexGetParticles(vboBuffer, n);
+
+
// render
+
...
+
Parameters
+ + + + + +
[in]libThe library instance to use
[in]bufAn OpenGL buffer identifier
[in]elementCountThe number of elements in the buffer
[in]elementByteStridethe size of each element in bytes
+
+
+
Returns
A valid NvFlexBuffer pointer that may be used with NvFlexGet*() methods to populate the render buffer using direct GPU-GPU copies
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexUnregisterOGLBuffer (NvFlexBufferbuf)
+
+

Unregister a NvFlexBuffer allocated through NvFlexRegisterOGLBuffer()

+
Parameters
+ + +
[in]bufA valid buffer
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexBuffer* NvFlexRegisterD3DBuffer (NvFlexLibrarylib,
void * buffer,
int elementCount,
int elementByteStride 
)
+
+

Registers a Direct3D buffer to Flex which can be used to copy directly into a graphics resource

+
Parameters
+ + + + + +
[in]libThe library instance to use
[in]bufferA pointer to either an ID3D11Buffer or ID3D12Resource object
[in]elementCountThe number of elements in the buffer
[in]elementByteStridethe size of each element in bytes
+
+
+
Returns
A valid NvFlexBuffer pointer that may be used with NvFlexGet*() methods to populate the render buffer using direct GPU-GPU copies
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexUnregisterD3DBuffer (NvFlexBufferbuf)
+
+

Unregister a NvFlexBuffer allocated through NvFlexRegistereD3DBuffer()

+
Parameters
+ + +
[in]bufA valid buffer
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexAcquireContext (NvFlexLibrarylib)
+
+

Ensures that the CUDA context the library was initialized with is present on the current thread

+
Parameters
+ + +
[in]libThe library instance to use
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexRestoreContext (NvFlexLibrarylib)
+
+

Restores the CUDA context (if any) that was present on the last call to NvFlexAcquireContext() Note: the acquire/restore pair of calls must come from the same thread

+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API const char* NvFlexGetDeviceName (NvFlexLibrarylib)
+
+

Returns a null-terminated string with the compute device name

+
Parameters
+ + +
[in]libThe library instance to use
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexGetDeviceAndContext (NvFlexLibrarylib,
void ** device,
void ** context 
)
+
+

Retrieve the device and context for the the library. On CUDA the context pointer will be filled with a pointer to a CUcontext structure On D3D the device and context pointers will be filled with pointers to a NvFlex::Device, and NvFlex::Context wrapper

+
Parameters
+ + + + +
[in]libPointer to a valid library returned from NvFlexInit()
[out]devicePointer to a device pointer, see description
[out]contextPointer to a context pointer, see description
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexFlush (NvFlexLibrarylib)
+
+

Force a pipeline flush to ensure any queued work is submitted to the GPU

+
Parameters
+ + +
[in]libThe library instance to use
+
+
+ +
+
+
+ + + + diff --git a/doc/_static/api/_nv_flex_8h_source.html b/doc/_static/api/_nv_flex_8h_source.html new file mode 100644 index 0000000..434a362 --- /dev/null +++ b/doc/_static/api/_nv_flex_8h_source.html @@ -0,0 +1,736 @@ + + + + + + +FLEX: NvFlex.h Source File + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + + +
+
+
+
NvFlex.h
+
+
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
+
2 // under a form of NVIDIA software license agreement provided separately to you.
+
3 //
+
4 // Notice
+
5 // NVIDIA Corporation and its licensors retain all intellectual property and
+
6 // proprietary rights in and to this software and related documentation and
+
7 // any modifications thereto. Any use, reproduction, disclosure, or
+
8 // distribution of this software and related documentation without an express
+
9 // license agreement from NVIDIA Corporation is strictly prohibited.
+
10 //
+
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+
15 //
+
16 // Information and code furnished is believed to be accurate and reliable.
+
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+
18 // information or for any infringement of patents or other rights of third parties that may
+
19 // result from its use. No license is granted by implication or otherwise under any patent
+
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+
21 // This code supersedes and replaces all information previously supplied.
+
22 // NVIDIA Corporation products are not authorized for use as critical
+
23 // components in life support devices or systems without express written approval of
+
24 // NVIDIA Corporation.
+
25 //
+
26 // Copyright (c) 2013-2017 NVIDIA Corporation. All rights reserved.
+
27 
+
28 #ifndef NV_FLEX_H
+
29 #define NV_FLEX_H
+
30 
+
32 #if _WIN32
+
33 #define NV_FLEX_API __declspec(dllexport)
+
34 #else
+
35 #define NV_FLEX_API
+
36 #endif
+
37 
+
38 // least 2 significant digits define minor version, eg: 10 -> version 0.10
+
39 #define NV_FLEX_VERSION 110
+
40 
+
42 
+
47 extern "C" {
+
48 
+ +
53 
+
57 typedef struct NvFlexSolver NvFlexSolver;
+
58 
+
62 typedef struct NvFlexBuffer NvFlexBuffer;
+
63 
+ +
68 {
+ + + +
72 };
+
73 
+ +
78 {
+ + +
81 };
+
82 
+ +
87 {
+ + +
90 };
+
91 
+
92 
+ +
97 {
+ +
99 
+
100  float gravity[3];
+
101  float radius;
+ + +
104 
+
105  // common params
+ + + +
109  float restitution;
+
110  float adhesion;
+ +
112 
+
113  float maxSpeed;
+ +
115 
+ +
117  float dissipation;
+
118  float damping;
+
119 
+
120  // cloth params
+
121  float wind[3];
+
122  float drag;
+
123  float lift;
+
124 
+
125  // fluid params
+
126  bool fluid;
+
127  float cohesion;
+ +
129  float viscosity;
+ + + + +
134  float smoothing;
+ + +
137  float buoyancy;
+
138 
+
139  // diffuse params
+ + +
142  float diffuseDrag;
+ +
144  float diffuseSortAxis[3];
+ +
146 
+
147  // rigid params
+ +
149  float plasticCreep;
+
150 
+
151  // collision params
+ + + +
155 
+
156  float planes[8][4];
+
157  int numPlanes;
+
158 
+ + +
161 };
+
162 
+ +
167 {
+
168  eNvFlexPhaseGroupMask = 0x00ffffff,
+
169 
+ + +
172  eNvFlexPhaseFluid = 1 << 26,
+
173 };
+
174 
+
178 NV_FLEX_API inline int NvFlexMakePhase(int group, int flags) { return (group & eNvFlexPhaseGroupMask) | flags; }
+
179 
+
180 
+ +
185 {
+
186  float predict;
+ + +
189  float createGrid;
+
190  float reorder;
+ + + + + + + +
198  float solveShapes;
+
199  float solveSprings;
+ + +
202  float applyDeltas;
+ + + + +
207  float finalize;
+
208  float updateBounds;
+
209  float total;
+
210 };
+
211 
+ +
216 {
+ + + + + +
222 };
+
223 
+
224 
+ +
228 {
+ + + + + + +
235 };
+
236 
+ +
240 {
+ + + +
244 };
+
245 
+ +
259 {
+ +
261  void* userData;
+
262 
+
263  float* particles;
+
264  float* velocities;
+
265  int* phases;
+
266 
+
267  int numActive;
+
268 
+
269  float dt;
+
270 
+
271  const int* originalToSortedMap;
+
272  const int* sortedToOriginalMap;
+
273 };
+
274 
+ +
278 {
+ + +
281  void* renderDevice;
+ +
283 
+ +
285 };
+
286 
+ +
290 {
+
292  void* userData;
+
293 
+
295  void (*function)(NvFlexSolverCallbackParams params);
+
296 };
+
297 
+
301 typedef void (*NvFlexErrorCallback)(NvFlexErrorSeverity type, const char* msg, const char* file, int line);
+
302 
+
312 NV_FLEX_API NvFlexLibrary* NvFlexInit(int version = NV_FLEX_VERSION, NvFlexErrorCallback errorFunc = 0, NvFlexInitDesc * desc = 0);
+
313 
+
320 NV_FLEX_API void NvFlexShutdown(NvFlexLibrary* lib);
+
321 
+
325 NV_FLEX_API int NvFlexGetVersion();
+
326 
+
335 NV_FLEX_API NvFlexSolver* NvFlexCreateSolver(NvFlexLibrary* lib, int maxParticles, int maxDiffuseParticles, int maxNeighborsPerParticle = 96);
+
341 NV_FLEX_API void NvFlexDestroySolver(NvFlexSolver* solver);
+
342 
+ +
350 
+ +
360 
+
420 NV_FLEX_API void NvFlexUpdateSolver(NvFlexSolver* solver, float dt, int substeps, bool enableTimers);
+
421 
+
428 NV_FLEX_API void NvFlexSetParams(NvFlexSolver* solver, const NvFlexParams* params);
+
429 
+
437 NV_FLEX_API void NvFlexGetParams(NvFlexSolver* solver, NvFlexParams* params);
+
438 
+
446 NV_FLEX_API void NvFlexSetActive(NvFlexSolver* solver, NvFlexBuffer* indices, int n);
+
447 
+
454 NV_FLEX_API void NvFlexGetActive(NvFlexSolver* solver, NvFlexBuffer* indices);
+
455 
+
462 NV_FLEX_API int NvFlexGetActiveCount(NvFlexSolver* solver);
+
463 
+
472 NV_FLEX_API void NvFlexSetParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+
473 
+
481 NV_FLEX_API void NvFlexGetParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+
482 
+
492 NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+
493 
+
502 NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+
503 
+
504 
+
512 NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver* solver, NvFlexBuffer* p, int n);
+
513 
+
522 NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, int n);
+
530 NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, int n);
+
531 
+
548 NV_FLEX_API void NvFlexSetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, int n);
+
556 NV_FLEX_API void NvFlexGetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, int n);
+
557 
+
566 NV_FLEX_API void NvFlexSetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, int n);
+
567 
+
575 NV_FLEX_API void NvFlexGetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, int n);
+
576 
+
577 
+
590 NV_FLEX_API void NvFlexSetSprings(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* restLengths, NvFlexBuffer* stiffness, int numSprings);
+
600 NV_FLEX_API void NvFlexGetSprings(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* restLengths, NvFlexBuffer* stiffness, int numSprings);
+
601 
+
618 NV_FLEX_API void NvFlexSetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* rotations, NvFlexBuffer* translations, int numRigids, int numIndices);
+
619 
+
620 
+
628 NV_FLEX_API void NvFlexGetRigidTransforms(NvFlexSolver* solver, NvFlexBuffer* rotations, NvFlexBuffer* translations);
+
629 
+
633 typedef unsigned int NvFlexTriangleMeshId;
+
634 
+
638 typedef unsigned int NvFlexDistanceFieldId;
+
639 
+
645 typedef unsigned int NvFlexConvexMeshId;
+
646 
+
653 NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh(NvFlexLibrary* lib);
+
654 
+
661 NV_FLEX_API void NvFlexDestroyTriangleMesh(NvFlexLibrary* lib, NvFlexTriangleMeshId mesh);
+
662 
+
676 NV_FLEX_API void NvFlexUpdateTriangleMesh(NvFlexLibrary* lib, NvFlexTriangleMeshId mesh, NvFlexBuffer* vertices, NvFlexBuffer* indices, int numVertices, int numTriangles, const float* lower, const float* upper);
+
677 
+
686 NV_FLEX_API void NvFlexGetTriangleMeshBounds(NvFlexLibrary* lib, const NvFlexTriangleMeshId mesh, float* lower, float* upper);
+
687 
+
694 NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField(NvFlexLibrary* lib);
+
695 
+
702 NV_FLEX_API void NvFlexDestroyDistanceField(NvFlexLibrary* lib, NvFlexDistanceFieldId sdf);
+
703 
+
715 NV_FLEX_API void NvFlexUpdateDistanceField(NvFlexLibrary* lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer* field);
+
716 
+
723 NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh(NvFlexLibrary* lib);
+
724 
+
731 NV_FLEX_API void NvFlexDestroyConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex);
+
732 
+
743 NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex, NvFlexBuffer* planes, int numPlanes, float* lower, float* upper);
+
744 
+
753 NV_FLEX_API void NvFlexGetConvexMeshBounds(NvFlexLibrary* lib, NvFlexConvexMeshId mesh, float* lower, float* upper);
+
754 
+ +
759 {
+
760  float radius;
+
761 };
+
762 
+ +
767 {
+
768  float radius;
+
769  float halfHeight;
+
770 };
+
771 
+ +
776 {
+
777  float halfExtents[3];
+
778 };
+
779 
+ +
784 {
+
785  float scale[3];
+
786  NvFlexConvexMeshId mesh;
+
787 };
+
788 
+ +
793 {
+
794  float scale[3];
+
795  NvFlexTriangleMeshId mesh;
+
796 };
+
797 
+ +
803 {
+
804  float scale;
+
805  NvFlexDistanceFieldId field;
+
806 };
+
807 
+ +
813 {
+ + + + + + +
820 };
+
821 
+ +
823 {
+ + + + + + +
830 };
+
831 
+ +
833 {
+ + + +
837 
+ +
839 };
+
840 
+
844 NV_FLEX_API inline int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic) { return type | (dynamic?eNvFlexShapeFlagDynamic:0); }
+
845 
+
859 NV_FLEX_API void NvFlexSetShapes(NvFlexSolver* solver, NvFlexBuffer* geometry, NvFlexBuffer* shapePositions, NvFlexBuffer* shapeRotations, NvFlexBuffer* shapePrevPositions, NvFlexBuffer* shapePrevRotations, NvFlexBuffer* shapeFlags, int numShapes);
+
860 
+
871 NV_FLEX_API void NvFlexSetDynamicTriangles(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* normals, int numTris);
+
880 NV_FLEX_API void NvFlexGetDynamicTriangles(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* normals, int numTris);
+
881 
+
896 NV_FLEX_API void NvFlexSetInflatables(NvFlexSolver* solver, NvFlexBuffer* startTris, NvFlexBuffer* numTris, NvFlexBuffer* restVolumes, NvFlexBuffer* overPressures, NvFlexBuffer* constraintScales, int numInflatables);
+
897 
+
905 NV_FLEX_API void NvFlexGetDensities(NvFlexSolver* solver, NvFlexBuffer* densities, int n);
+
906 
+
920 NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver* solver, NvFlexBuffer* q1, NvFlexBuffer* q2, NvFlexBuffer* q3);
+
930 NV_FLEX_API int NvFlexGetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, NvFlexBuffer* indices);
+
931 
+
942 NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, int n);
+
943 
+
953 NV_FLEX_API void NvFlexGetContacts(NvFlexSolver* solver, NvFlexBuffer* planes, NvFlexBuffer* velocities, NvFlexBuffer* indices, NvFlexBuffer* counts);
+
954 
+
963 NV_FLEX_API void NvFlexGetBounds(NvFlexSolver* solver, NvFlexBuffer* lower, NvFlexBuffer* upper);
+
964 
+
973 NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver* solver);
+
974 
+
985 NV_FLEX_API void NvFlexGetTimers(NvFlexSolver* solver, NvFlexTimers* timers);
+
986 
+ +
991 {
+
992  char* name;
+
993  float time;
+
994 };
+
995 
+
1008 NV_FLEX_API int NvFlexGetDetailTimers(NvFlexSolver* solver, NvFlexDetailTimer** timers);
+
1009 
+
1019 NV_FLEX_API NvFlexBuffer* NvFlexAllocBuffer(NvFlexLibrary* lib, int elementCount, int elementByteStride, NvFlexBufferType type);
+
1020 
+
1026 NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer* buf);
+
1027 
+
1037 NV_FLEX_API void* NvFlexMap(NvFlexBuffer* buffer, int flags);
+
1038 
+
1044 NV_FLEX_API void NvFlexUnmap(NvFlexBuffer* buffer);
+
1045 
+
1075 NV_FLEX_API NvFlexBuffer* NvFlexRegisterOGLBuffer(NvFlexLibrary* lib, int buf, int elementCount, int elementByteStride);
+
1076 
+
1082 NV_FLEX_API void NvFlexUnregisterOGLBuffer(NvFlexBuffer* buf);
+
1083 
+
1093 NV_FLEX_API NvFlexBuffer* NvFlexRegisterD3DBuffer(NvFlexLibrary* lib, void* buffer, int elementCount, int elementByteStride);
+
1094 
+
1100 NV_FLEX_API void NvFlexUnregisterD3DBuffer(NvFlexBuffer* buf);
+
1101 
+
1107 NV_FLEX_API void NvFlexAcquireContext(NvFlexLibrary* lib);
+
1108 
+
1113 NV_FLEX_API void NvFlexRestoreContext(NvFlexLibrary* lib);
+
1114 
+
1120 NV_FLEX_API const char* NvFlexGetDeviceName(NvFlexLibrary* lib);
+
1121 
+
1131 NV_FLEX_API void NvFlexGetDeviceAndContext(NvFlexLibrary* lib, void** device, void** context);
+
1132 
+
1133 
+
1139 NV_FLEX_API void NvFlexFlush(NvFlexLibrary* lib);
+
1140 
+
1142 
+
1147 NV_FLEX_API void NvFlexSetDebug(NvFlexSolver* solver, bool enable);
+
1148 NV_FLEX_API void NvFlexGetShapeBVH(NvFlexSolver* solver, void* bvh);
+
1149 NV_FLEX_API void NvFlexCopySolver(NvFlexSolver* dst, NvFlexSolver* src);
+
1150 
+
1152 
+
1153 } // extern "C"
+
1154 
+
1155 #endif // NV_FLEX_H
+
NV_FLEX_API int NvFlexGetActiveCount(NvFlexSolver *solver)
+
float solveShapes
Time spent solving rigid body constraints.
Definition: NvFlex.h:198
+
NV_FLEX_API NvFlexSolverCallback NvFlexRegisterSolverCallback(NvFlexSolver *solver, NvFlexSolverCallback function, NvFlexSolverCallbackStage stage)
+
float radius
Definition: NvFlex.h:760
+
Warning messages.
Definition: NvFlex.h:219
+
float solveSprings
Time spent solving distance constraints.
Definition: NvFlex.h:199
+
NvFlexMapFlags
Definition: NvFlex.h:67
+
NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)
+
void(* NvFlexErrorCallback)(NvFlexErrorSeverity type, const char *msg, const char *file, int line)
Definition: NvFlex.h:301
+
Information messages.
Definition: NvFlex.h:218
+
float smoothing
Control the strength of Laplacian smoothing in particles for rendering, if zero then smoothed positio...
Definition: NvFlex.h:134
+
NV_FLEX_API void NvFlexSetParams(NvFlexSolver *solver, const NvFlexParams *params)
+
Called at the end of solver update after the final substep has completed.
Definition: NvFlex.h:233
+
NV_FLEX_API void NvFlexSetRigids(NvFlexSolver *solver, NvFlexBuffer *offsets, NvFlexBuffer *indices, NvFlexBuffer *restPositions, NvFlexBuffer *restNormals, NvFlexBuffer *stiffness, NvFlexBuffer *rotations, NvFlexBuffer *translations, int numRigids, int numIndices)
+
NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)
+
NV_FLEX_API void NvFlexUpdateTriangleMesh(NvFlexLibrary *lib, NvFlexTriangleMeshId mesh, NvFlexBuffer *vertices, NvFlexBuffer *indices, int numVertices, int numTriangles, const float *lower, const float *upper)
+
NV_FLEX_API void NvFlexUnmap(NvFlexBuffer *buffer)
+
If set this particle will interact with particles of the same group.
Definition: NvFlex.h:170
+
float createCellIndices
Time spent creating grid indices.
Definition: NvFlex.h:187
+
float shapeCollisionMargin
Increases the radius used during contact finding against kinematic shapes.
Definition: NvFlex.h:154
+
float scale
Uniform scale of SDF, this corresponds to the world space width of the shape.
Definition: NvFlex.h:804
+
NV_FLEX_API void NvFlexGetActive(NvFlexSolver *solver, NvFlexBuffer *indices)
+
int diffuseBallistic
The number of neighbors below which a diffuse particle is considered ballistic.
Definition: NvFlex.h:143
+
NvFlexRelaxationMode
Definition: NvFlex.h:86
+
float drag
Drag force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...
Definition: NvFlex.h:122
+
NvFlexErrorSeverity
Definition: NvFlex.h:215
+
float maxSpeed
The magnitude of particle velocity will be clamped to this value at the end of each step...
Definition: NvFlex.h:113
+
float planes[8][4]
Collision planes in the form ax + by + cz + d = 0.
Definition: NvFlex.h:156
+
float cohesion
Control how strongly particles hold each other together, default: 0.025, range [0.0, +inf].
Definition: NvFlex.h:127
+
float staticFriction
Coefficient of static friction used when colliding against shapes.
Definition: NvFlex.h:107
+
float collideParticles
Time spent finding particle neighbors.
Definition: NvFlex.h:191
+
NvFlexCapsuleGeometry capsule
Definition: NvFlex.h:815
+
float predict
Time spent in prediction.
Definition: NvFlex.h:186
+
Definition: NvFlex.h:783
+
float updateDiffuse
Time spent updating diffuse particles.
Definition: NvFlex.h:204
+
NvFlexSphereGeometry sphere
Definition: NvFlex.h:814
+
float collisionDistance
Distance particles maintain against shapes, note that for robust collision against triangle meshes th...
Definition: NvFlex.h:152
+
NvFlexTriangleMeshGeometry triMesh
Definition: NvFlex.h:818
+
float solveContacts
Time spent solving contact constraints.
Definition: NvFlex.h:200
+
Definition: NvFlex.h:838
+
NvFlexComputeType computeType
Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the li...
Definition: NvFlex.h:284
+
NV_FLEX_API void NvFlexDestroyDistanceField(NvFlexLibrary *lib, NvFlexDistanceFieldId sdf)
+
Use DirectX 11 compute for Flex, the application must link against the D3D libraries.
Definition: NvFlex.h:242
+
NV_FLEX_API void NvFlexDestroySolver(NvFlexSolver *solver)
+
Lower 3 bits holds the type of the collision shape.
Definition: NvFlex.h:834
+
const int * originalToSortedMap
Device pointer that maps the sorted callback data to the original position given by SetParticles() ...
Definition: NvFlex.h:271
+
float halfHeight
Definition: NvFlex.h:769
+
Calling thread will be blocked until buffer is ready for access, default.
Definition: NvFlex.h:69
+
NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, int n)
+
struct NvFlexSolver NvFlexSolver
Definition: NvFlex.h:57
+
Called at the end of each substep after the velocity has been updated by the constraints.
Definition: NvFlex.h:232
+
float * particles
Device pointer to the active particle basic data in the form x,y,z,1/m.
Definition: NvFlex.h:263
+
NV_FLEX_API void NvFlexSetInflatables(NvFlexSolver *solver, NvFlexBuffer *startTris, NvFlexBuffer *numTris, NvFlexBuffer *restVolumes, NvFlexBuffer *overPressures, NvFlexBuffer *constraintScales, int numInflatables)
+
Definition: NvFlex.h:758
+
Called at the beginning of each constraint iteration.
Definition: NvFlex.h:229
+
NV_FLEX_API void NvFlexGetTriangleMeshBounds(NvFlexLibrary *lib, const NvFlexTriangleMeshId mesh, float *lower, float *upper)
+
Definition: NvFlex.h:258
+
NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh(NvFlexLibrary *lib)
+
NV_FLEX_API void * NvFlexMap(NvFlexBuffer *buffer, int flags)
+
float time
Definition: NvFlex.h:993
+
Definition: NvFlex.h:812
+
float updateNormals
Time spent updating vertex normals.
Definition: NvFlex.h:206
+
unsigned int NvFlexTriangleMeshId
Definition: NvFlex.h:633
+
The relaxation factor is a fixed multiplier on each constraint's delta divided by the particle's cons...
Definition: NvFlex.h:89
+
NV_FLEX_API NvFlexBuffer * NvFlexRegisterD3DBuffer(NvFlexLibrary *lib, void *buffer, int elementCount, int elementByteStride)
+
Buffer contents will be discarded, this allows for efficent buffer reuse.
Definition: NvFlex.h:71
+
Indicates that the shape is a trigger volume, this means it will not perform any collision response...
Definition: NvFlex.h:836
+
A sphere shape, see FlexSphereGeometry.
Definition: NvFlex.h:824
+
A signed distance field shape, see FlexSDFGeometry.
Definition: NvFlex.h:829
+
int deviceIndex
The GPU device index that should be used, if there is already a CUDA context on the calling thread th...
Definition: NvFlex.h:279
+
bool fluid
If true then particles with phase 0 are considered fluid particles and interact using the position ba...
Definition: NvFlex.h:126
+
float viscosity
Smoothes particle velocities using XSPH viscosity.
Definition: NvFlex.h:129
+
NvFlexTriangleMeshId mesh
A triangle mesh pointer created by NvFlexCreateTriangleMesh()
Definition: NvFlex.h:795
+
NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, int n)
+
NV_FLEX_API int NvFlexMakePhase(int group, int flags)
Definition: NvFlex.h:178
+
float adhesion
Controls how strongly particles stick to surfaces they hit, default 0.0, range [0.0, +inf].
Definition: NvFlex.h:110
+
NV_FLEX_API void NvFlexUnregisterOGLBuffer(NvFlexBuffer *buf)
+
float halfExtents[3]
Definition: NvFlex.h:777
+
Definition: NvFlex.h:775
+
NV_FLEX_API void NvFlexGetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, int n)
+
NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField(NvFlexLibrary *lib)
+
int * phases
Device pointer to the active particle phase data.
Definition: NvFlex.h:265
+
NV_FLEX_API void NvFlexFlush(NvFlexLibrary *lib)
+
NV_FLEX_API void NvFlexGetBounds(NvFlexSolver *solver, NvFlexBuffer *lower, NvFlexBuffer *upper)
+
Host mappable buffer, pinned memory on CUDA, staging buffer on DX.
Definition: NvFlex.h:79
+
int numActive
The number of active particles returned, the callback data only return pointers to active particle da...
Definition: NvFlex.h:267
+
NV_FLEX_API NvFlexLibrary * NvFlexGetSolverLibrary(NvFlexSolver *solver)
+
struct NvFlexBuffer NvFlexBuffer
Definition: NvFlex.h:62
+
float sortCellIndices
Time spent sorting grid indices.
Definition: NvFlex.h:188
+
float radius
The maximum interaction radius for particles.
Definition: NvFlex.h:101
+
NV_FLEX_API void NvFlexGetContacts(NvFlexSolver *solver, NvFlexBuffer *planes, NvFlexBuffer *velocities, NvFlexBuffer *indices, NvFlexBuffer *counts)
+
NvFlexBoxGeometry box
Definition: NvFlex.h:816
+
float * velocities
Device pointer to the active particle velocity data in the form x,y,z,w (last component is not used) ...
Definition: NvFlex.h:264
+
float anisotropyMin
Clamp the anisotropy scale to this fraction of the radius.
Definition: NvFlex.h:132
+
float applyDeltas
Time spent adding position deltas to particles.
Definition: NvFlex.h:202
+
NvFlexDistanceFieldId field
A signed distance field pointer created by NvFlexCreateDistanceField()
Definition: NvFlex.h:805
+
float calculateDensity
Time spent calculating fluid density.
Definition: NvFlex.h:195
+
void * userData
Definition: NvFlex.h:292
+
A capsule shape, see FlexCapsuleGeometry.
Definition: NvFlex.h:825
+
NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh(NvFlexLibrary *lib)
+
NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)
+
NV_FLEX_API void NvFlexShutdown(NvFlexLibrary *lib)
+
NvFlexSolver * solver
Pointer to the solver that the callback is registered to.
Definition: NvFlex.h:260
+
If set this particle will generate fluid density constraints for its overlapping neighbors.
Definition: NvFlex.h:172
+
NvFlexPhase
Definition: NvFlex.h:166
+
NV_FLEX_API void NvFlexUnregisterD3DBuffer(NvFlexBuffer *buf)
+
float sleepThreshold
Particles with a velocity magnitude < this threshold will be considered fixed.
Definition: NvFlex.h:111
+
NV_FLEX_API void NvFlexGetDensities(NvFlexSolver *solver, NvFlexBuffer *densities, int n)
+
NV_FLEX_API int NvFlexGetVersion()
+
float anisotropyMax
Clamp the anisotropy scale to this fraction of the radius.
Definition: NvFlex.h:133
+
float collideTriangles
Time spent colliding triangle shapes.
Definition: NvFlex.h:193
+
NV_FLEX_API int NvFlexGetDetailTimers(NvFlexSolver *solver, NvFlexDetailTimer **timers)
+
NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, int n)
+
NV_FLEX_API void NvFlexGetConvexMeshBounds(NvFlexLibrary *lib, NvFlexConvexMeshId mesh, float *lower, float *upper)
+
Indicates the shape is dynamic and should have lower priority over static collision shapes...
Definition: NvFlex.h:835
+
Calling thread will check if buffer is ready for access, if not ready then the method will return NUL...
Definition: NvFlex.h:70
+
NV_FLEX_API void NvFlexGetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, int n)
+
float shockPropagation
Artificially decrease the mass of particles based on height from a fixed reference point...
Definition: NvFlex.h:116
+
NV_FLEX_API const char * NvFlexGetDeviceName(NvFlexLibrary *lib)
+
NV_FLEX_API void NvFlexDestroyConvexMesh(NvFlexLibrary *lib, NvFlexConvexMeshId convex)
+
float collideFields
Time spent colliding signed distance field shapes.
Definition: NvFlex.h:194
+
float calculateAnisotropy
Time spent calculating particle anisotropy for fluid.
Definition: NvFlex.h:203
+
void * renderContext
Direct3D context to use for simulation, if none is specified a new context will be created...
Definition: NvFlex.h:282
+
struct NvFlexLibrary NvFlexLibrary
Definition: NvFlex.h:52
+
NV_FLEX_API void NvFlexAcquireContext(NvFlexLibrary *lib)
+
NV_FLEX_API NvFlexLibrary * NvFlexInit(int version=NV_FLEX_VERSION, NvFlexErrorCallback errorFunc=0, NvFlexInitDesc *desc=0)
+
float freeSurfaceDrag
Drag force applied to boundary fluid particles.
Definition: NvFlex.h:136
+
NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver *solver)
+
NvFlexSDFGeometry sdf
Definition: NvFlex.h:819
+
float maxAcceleration
The magnitude of particle acceleration will be clamped to this value at the end of each step (limits ...
Definition: NvFlex.h:114
+
float wind[3]
Constant acceleration applied to particles that belong to dynamic triangles, drag needs to be > 0 for...
Definition: NvFlex.h:121
+
NV_FLEX_API void NvFlexUpdateDistanceField(NvFlexLibrary *lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer *field)
+
Definition: NvFlex.h:184
+
float surfaceTension
Controls how strongly particles attempt to minimize surface area, default: 0.0, range: [0...
Definition: NvFlex.h:128
+
float dt
The per-update time-step, this is the value passed to NvFlexUpdateSolver()
Definition: NvFlex.h:269
+
float diffuseSortAxis[3]
Diffuse particles will be sorted by depth along this axis if non-zero.
Definition: NvFlex.h:144
+
float fluidRestDistance
The distance fluid particles are spaced at the rest density, must be in the range (0...
Definition: NvFlex.h:103
+
float reorder
Time spent reordering particles.
Definition: NvFlex.h:190
+
unsigned int NvFlexDistanceFieldId
Definition: NvFlex.h:638
+
A triangle mesh shape, see FlexTriangleMeshGeometry.
Definition: NvFlex.h:828
+
If set this particle will ignore collisions with particles closer than the radius in the rest pose...
Definition: NvFlex.h:171
+
NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver *solver, NvFlexBuffer *q1, NvFlexBuffer *q2, NvFlexBuffer *q3)
+
NV_FLEX_API void NvFlexGetTimers(NvFlexSolver *solver, NvFlexTimers *timers)
+
NvFlexConvexMeshId mesh
Definition: NvFlex.h:786
+
NvFlexConvexMeshGeometry convexMesh
Definition: NvFlex.h:817
+
NvFlexSolverCallbackStage
Definition: NvFlex.h:227
+
float dissipation
Damps particle velocity based on how many particle contacts it has.
Definition: NvFlex.h:117
+
NvFlexCollisionShapeType
Definition: NvFlex.h:822
+
Used only in debug version of dll.
Definition: NvFlex.h:220
+
Use CUDA compute for Flex, the application must link against the CUDA libraries.
Definition: NvFlex.h:241
+
NvFlexRelaxationMode relaxationMode
How the relaxation is applied inside the solver.
Definition: NvFlex.h:159
+
float lift
Lift force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...
Definition: NvFlex.h:123
+
NV_FLEX_API void NvFlexGetDeviceAndContext(NvFlexLibrary *lib, void **device, void **context)
+
void * renderDevice
Direct3D device to use for simulation, if none is specified a new device and context will be created...
Definition: NvFlex.h:281
+
A box shape, see FlexBoxGeometry.
Definition: NvFlex.h:826
+
float damping
Viscous drag force, applies a force proportional, and opposite to the particle velocity.
Definition: NvFlex.h:118
+
NV_FLEX_API void NvFlexSetDynamicTriangles(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)
+
NvFlexCollisionShapeFlags
Definition: NvFlex.h:832
+
int numPlanes
Num collision planes.
Definition: NvFlex.h:157
+
NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary *lib, NvFlexConvexMeshId convex, NvFlexBuffer *planes, int numPlanes, float *lower, float *upper)
+
NV_FLEX_API NvFlexBuffer * NvFlexAllocBuffer(NvFlexLibrary *lib, int elementCount, int elementByteStride, NvFlexBufferType type)
+
Definition: NvFlex.h:96
+
float collideShapes
Time spent colliding convex shapes.
Definition: NvFlex.h:192
+
float particleFriction
Coefficient of friction used when colliding particles.
Definition: NvFlex.h:108
+
NV_FLEX_API void NvFlexUpdateSolver(NvFlexSolver *solver, float dt, int substeps, bool enableTimers)
+
NV_FLEX_API void NvFlexSetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, int n)
+
NV_FLEX_API void NvFlexGetRigidTransforms(NvFlexSolver *solver, NvFlexBuffer *rotations, NvFlexBuffer *translations)
+
float createGrid
Time spent creating grid.
Definition: NvFlex.h:189
+
Low 24 bits represent the particle group for controlling collisions.
Definition: NvFlex.h:168
+
NV_FLEX_API void NvFlexGetParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)
+
float buoyancy
Gravity is scaled by this value for fluid particles.
Definition: NvFlex.h:137
+
All log types.
Definition: NvFlex.h:221
+
NV_FLEX_API void NvFlexSetShapes(NvFlexSolver *solver, NvFlexBuffer *geometry, NvFlexBuffer *shapePositions, NvFlexBuffer *shapeRotations, NvFlexBuffer *shapePrevPositions, NvFlexBuffer *shapePrevRotations, NvFlexBuffer *shapeFlags, int numShapes)
+
NV_FLEX_API void NvFlexSetParticles(NvFlexSolver *solver, NvFlexBuffer *p, int n)
+
Use DirectX 12 compute for Flex, the application must link against the D3D libraries.
Definition: NvFlex.h:243
+
float scale[3]
The scale of the object from local space to world space.
Definition: NvFlex.h:794
+
float solveDensities
Time spent solving density constraints.
Definition: NvFlex.h:196
+
float plasticThreshold
Particles belonging to rigid shapes that move with a position delta magnitude > threshold will be per...
Definition: NvFlex.h:148
+
NV_FLEX_API void NvFlexDestroyTriangleMesh(NvFlexLibrary *lib, NvFlexTriangleMeshId mesh)
+
float gravity[3]
Constant acceleration applied to all particles.
Definition: NvFlex.h:100
+
Called at the end of each constraint iteration.
Definition: NvFlex.h:230
+
Error messages.
Definition: NvFlex.h:217
+
NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer *buf)
+
float solveInflatables
Time spent solving pressure constraints.
Definition: NvFlex.h:201
+
Called at the beginning of each substep after the prediction step has been completed.
Definition: NvFlex.h:231
+
NV_FLEX_API void NvFlexSetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, int n)
+
Definition: NvFlex.h:277
+
The relaxation factor is a fixed multiplier on each constraint's position delta.
Definition: NvFlex.h:88
+
Definition: NvFlex.h:766
+
float total
Sum of all timers above.
Definition: NvFlex.h:209
+
void * userData
Pointer to the user data provided to NvFlexRegisterSolverCallback()
Definition: NvFlex.h:261
+
float radius
Definition: NvFlex.h:768
+
NV_FLEX_API void NvFlexGetDynamicTriangles(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)
+
NV_FLEX_API int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic)
Definition: NvFlex.h:844
+
NV_FLEX_API NvFlexBuffer * NvFlexRegisterOGLBuffer(NvFlexLibrary *lib, int buf, int elementCount, int elementByteStride)
+
Definition: NvFlex.h:990
+
float relaxationFactor
Control the convergence rate of the parallel solver, default: 1, values greater than 1 may lead to in...
Definition: NvFlex.h:160
+
NV_FLEX_API void NvFlexSetSprings(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)
+
float finalize
Time spent finalizing state.
Definition: NvFlex.h:207
+
const int * sortedToOriginalMap
Device pointer that maps the original particle index to the index in the callback data structure...
Definition: NvFlex.h:272
+
NvFlexComputeType
Definition: NvFlex.h:239
+
NV_FLEX_API void NvFlexSetActive(NvFlexSolver *solver, NvFlexBuffer *indices, int n)
+
float dynamicFriction
Coefficient of friction used when colliding against shapes.
Definition: NvFlex.h:106
+
float plasticCreep
Controls the rate at which particles in the rest pose are deformed for particles passing the deformat...
Definition: NvFlex.h:149
+
Definition: NvFlex.h:802
+
float scale[3]
Definition: NvFlex.h:785
+
Definition: NvFlex.h:289
+
float diffuseBuoyancy
Scales force opposing gravity that diffuse particles receive.
Definition: NvFlex.h:141
+
float updateBounds
Time spent updating particle bounds.
Definition: NvFlex.h:208
+
char * name
Definition: NvFlex.h:992
+
float solidRestDistance
The distance non-fluid particles attempt to maintain from each other, must be in the range (0...
Definition: NvFlex.h:102
+
float solidPressure
Add pressure from solid surfaces to particles.
Definition: NvFlex.h:135
+
float solveVelocities
Time spent solving velocity constraints.
Definition: NvFlex.h:197
+
Number of stages.
Definition: NvFlex.h:234
+
float restitution
Coefficient of restitution used when colliding against shapes, particle collisions are always inelast...
Definition: NvFlex.h:109
+
Definition: NvFlex.h:792
+
int numIterations
Number of solver iterations to perform per-substep.
Definition: NvFlex.h:98
+
NV_FLEX_API void NvFlexRestoreContext(NvFlexLibrary *lib)
+
NV_FLEX_API void NvFlexGetParams(NvFlexSolver *solver, NvFlexParams *params)
+
NV_FLEX_API NvFlexSolver * NvFlexCreateSolver(NvFlexLibrary *lib, int maxParticles, int maxDiffuseParticles, int maxNeighborsPerParticle=96)
+
float anisotropyScale
Control how much anisotropy is present in resulting ellipsoids for rendering, if zero then anisotropy...
Definition: NvFlex.h:131
+
float vorticityConfinement
Increases vorticity by applying rotational forces to particles.
Definition: NvFlex.h:130
+
NV_FLEX_API int NvFlexGetDiffuseParticles(NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, NvFlexBuffer *indices)
+
float diffuseLifetime
Time in seconds that a diffuse particle will live for after being spawned, particles will be spawned ...
Definition: NvFlex.h:145
+
float diffuseDrag
Scales force diffuse particles receive in direction of neighbor fluid particles.
Definition: NvFlex.h:142
+
float particleCollisionMargin
Increases the radius used during neighbor finding, this is useful if particles are expected to move s...
Definition: NvFlex.h:153
+
float diffuseThreshold
Particles with kinetic energy + divergence above this threshold will spawn new diffuse particles...
Definition: NvFlex.h:140
+
Device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a buf...
Definition: NvFlex.h:80
+
NV_FLEX_API void NvFlexGetSprings(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)
+
A convex mesh shape, see FlexConvexMeshGeometry.
Definition: NvFlex.h:827
+
float updateTriangles
Time spent updating dynamic triangles.
Definition: NvFlex.h:205
+
NvFlexBufferType
Definition: NvFlex.h:77
+
bool enableExtensions
Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance.
Definition: NvFlex.h:280
+
unsigned int NvFlexConvexMeshId
Definition: NvFlex.h:645
+
+ + + + diff --git a/doc/_static/api/_nv_flex_device_8h.html b/doc/_static/api/_nv_flex_device_8h.html new file mode 100644 index 0000000..20f041b --- /dev/null +++ b/doc/_static/api/_nv_flex_device_8h.html @@ -0,0 +1,123 @@ + + + + + + +FLEX: NvFlexDevice.h File Reference + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + + +
+
+ +
+
NvFlexDevice.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

NV_FLEX_API int NvFlexDeviceGetSuggestedOrdinal ()
 
NV_FLEX_API bool NvFlexDeviceCreateCudaContext (int ordinal)
 
NV_FLEX_API void NvFlexDeviceDestroyCudaContext ()
 
+

Detailed Description

+

NvFlexDevice is an optional helper library that performs some initialization tasks related to GPU device management. The library can be used to query the NVIDIA PhysX control panel for the selected "PhysX" GPU, and to create an optimized CUDA context. Currently the library is a closed source component but is purely optional. See the FlexDemo for an example of how to use the device API.

+

Function Documentation

+ +
+
+ + + + + + + +
NV_FLEX_API int NvFlexDeviceGetSuggestedOrdinal ()
+
+

Returns the CUDA ordinal of the GPU selected as "PhysX" in the NVIDIA control panel. Returns -1 if there is no NVIDIA CUDA device available.

+
Note
The returned ordinal is a CUDA ordinal and does not correspond to the DXGI ordinal. D3D users should use their own device selection method and pass the appropriate DXGI device index or custom D3D devices to NvFlexInit().
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API bool NvFlexDeviceCreateCudaContext (int ordinal)
+
+

Creates a CUDA context optimized for Flex, returns true on success and sets the context as current on the calling thread. If using this method to initialize CUDA then you should ensure that no prior CUDA calls are made prior to avoid creating multiple contexts.

+
Parameters
+ + +
[in]ordinalThe CUDA ordinal of the GPU to create the context on, this can be the suggested ordinal (see flexDeviceGetSuggestedOrdinal()), or a manually selected ordinal.
+
+
+ +
+
+ +
+
+ + + + + + + +
NV_FLEX_API void NvFlexDeviceDestroyCudaContext ()
+
+

Destroy the context associated with the current thread, can be used to destroy the CUDA context created by flexDeviceCreateCudaContext().

+ +
+
+
+ + + + diff --git a/doc/_static/api/_nv_flex_device_8h_source.html b/doc/_static/api/_nv_flex_device_8h_source.html new file mode 100644 index 0000000..42e8d54 --- /dev/null +++ b/doc/_static/api/_nv_flex_device_8h_source.html @@ -0,0 +1,99 @@ + + + + + + +FLEX: NvFlexDevice.h Source File + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + + +
+
+
+
NvFlexDevice.h
+
+
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
+
2 // under a form of NVIDIA software license agreement provided separately to you.
+
3 //
+
4 // Notice
+
5 // NVIDIA Corporation and its licensors retain all intellectual property and
+
6 // proprietary rights in and to this software and related documentation and
+
7 // any modifications thereto. Any use, reproduction, disclosure, or
+
8 // distribution of this software and related documentation without an express
+
9 // license agreement from NVIDIA Corporation is strictly prohibited.
+
10 //
+
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+
15 //
+
16 // Information and code furnished is believed to be accurate and reliable.
+
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+
18 // information or for any infringement of patents or other rights of third parties that may
+
19 // result from its use. No license is granted by implication or otherwise under any patent
+
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+
21 // This code supersedes and replaces all information previously supplied.
+
22 // NVIDIA Corporation products are not authorized for use as critical
+
23 // components in life support devices or systems without express written approval of
+
24 // NVIDIA Corporation.
+
25 //
+
26 // Copyright (c) 2013-2017 NVIDIA Corporation. All rights reserved.
+
27 
+
28 #ifndef NV_FLEX_DEVICE_H
+
29 #define NV_FLEX_DEVICE_H
+
30 
+
32 #ifndef NV_FLEX_API
+
33 #if _WIN32
+
34 #define NV_FLEX_API __declspec(dllexport)
+
35 #else
+
36 #define NV_FLEX_API
+
37 #endif
+
38 #endif
+
39 
+
58 NV_FLEX_API int NvFlexDeviceGetSuggestedOrdinal();
+
59 
+
67 NV_FLEX_API bool NvFlexDeviceCreateCudaContext(int ordinal);
+
68 
+
72 NV_FLEX_API void NvFlexDeviceDestroyCudaContext();
+
73 
+
74 
+
75 #endif // NV_FLEX_DEVICE_H
+
NV_FLEX_API int NvFlexDeviceGetSuggestedOrdinal()
+
NV_FLEX_API bool NvFlexDeviceCreateCudaContext(int ordinal)
+
NV_FLEX_API void NvFlexDeviceDestroyCudaContext()
+
+ + + + diff --git a/doc/_static/api/_nv_flex_ext_8h.html b/doc/_static/api/_nv_flex_ext_8h.html new file mode 100644 index 0000000..fc0433a --- /dev/null +++ b/doc/_static/api/_nv_flex_ext_8h.html @@ -0,0 +1,2121 @@ + + + + + + +FLEX: NvFlexExt.h File Reference + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + + +
+
+ +
+
NvFlexExt.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + +

+Data Structures

struct  NvFlexVector< T >
 
struct  NvFlexExtMovingFrame
 
struct  NvFlexExtAsset
 
struct  NvFlexExtInstance
 
struct  NvFlexExtTearingParticleClone
 
struct  NvFlexExtTearingMeshEdit
 
struct  NvFlexExtParticleData
 
struct  NvFlexExtTriangleData
 
struct  NvFlexExtShapeData
 
struct  NvFlexExtForceField
 
+ + + + + +

+Typedefs

typedef struct NvFlexExtContainer NvFlexExtContainer
 
typedef struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback
 
+ + + +

+Enumerations

enum  NvFlexExtForceMode {
+  eNvFlexExtModeForce = 0, +
+  eNvFlexExtModeImpulse = 1, +
+  eNvFlexExtModeVelocityChange = 2 +
+ }
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

NV_FLEX_API void NvFlexExtMovingFrameInit (NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation)
 
NV_FLEX_API void NvFlexExtMovingFrameUpdate (NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation, float dt)
 
NV_FLEX_API void NvFlexExtMovingFrameApply (NvFlexExtMovingFrame *frame, float *positions, float *velocities, int numParticles, float linearScale, float angularScale, float dt)
 
NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices (const float *vertices, int numVertices, int *uniqueVerts, int *originalToUniqueMap, float threshold)
 
NV_FLEX_API NvFlexExtAssetNvFlexExtCreateClothFromMesh (const float *particles, int numParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float tetherStiffness, float tetherGive, float pressure)
 
NV_FLEX_API NvFlexExtAssetNvFlexExtCreateTearingClothFromMesh (const float *particles, int numParticles, int maxParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float pressure)
 
NV_FLEX_API void NvFlexExtDestroyTearingCloth (NvFlexExtAsset *asset)
 
NV_FLEX_API void NvFlexExtTearClothMesh (NvFlexExtAsset *asset, float maxStrain, int maxSplits, NvFlexExtTearingParticleClone *particleCopies, int *numParticleCopies, int maxCopies, NvFlexExtTearingMeshEdit *triangleEdits, int *numTriangleEdits, int maxEdits)
 
NV_FLEX_API NvFlexExtAssetNvFlexExtCreateRigidFromMesh (const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float radius, float expand)
 
NV_FLEX_API NvFlexExtAssetNvFlexExtCreateSoftFromMesh (const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness)
 
NV_FLEX_API void NvFlexExtDestroyAsset (NvFlexExtAsset *asset)
 
NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning (const float *vertices, int numVertices, const float *bones, int numBones, float falloff, float maxDistance, float *skinningWeights, int *skinningIndices)
 
NV_FLEX_API NvFlexExtContainerNvFlexExtCreateContainer (NvFlexLibrary *lib, NvFlexSolver *solver, int maxParticles)
 
NV_FLEX_API void NvFlexExtDestroyContainer (NvFlexExtContainer *container)
 
NV_FLEX_API int NvFlexExtAllocParticles (NvFlexExtContainer *container, int n, int *indices)
 
NV_FLEX_API void NvFlexExtFreeParticles (NvFlexExtContainer *container, int n, const int *indices)
 
NV_FLEX_API int NvFlexExtGetActiveList (NvFlexExtContainer *container, int *indices)
 
NV_FLEX_API NvFlexExtParticleData NvFlexExtMapParticleData (NvFlexExtContainer *container)
 
NV_FLEX_API void NvFlexExtUnmapParticleData (NvFlexExtContainer *container)
 
NV_FLEX_API NvFlexExtTriangleData NvFlexExtMapTriangleData (NvFlexExtContainer *container)
 
NV_FLEX_API void NvFlexExtUnmapTriangleData (NvFlexExtContainer *container)
 
NV_FLEX_API NvFlexExtShapeData NvFlexExtMapShapeData (NvFlexExtContainer *container)
 
NV_FLEX_API void NvFlexExtUnmapShapeData (NvFlexExtContainer *container)
 
NV_FLEX_API NvFlexExtInstanceNvFlexExtCreateInstance (NvFlexExtContainer *container, NvFlexExtParticleData *particleData, const NvFlexExtAsset *asset, const float *transform, float vx, float vy, float vz, int phase, float invMassScale)
 
NV_FLEX_API void NvFlexExtDestroyInstance (NvFlexExtContainer *container, const NvFlexExtInstance *instance)
 
NV_FLEX_API void NvFlexExtNotifyAssetChanged (NvFlexExtContainer *container, const NvFlexExtAsset *asset)
 
NV_FLEX_API void NvFlexExtTickContainer (NvFlexExtContainer *container, float dt, int numSubsteps, bool enableTimers=false)
 
NV_FLEX_API void NvFlexExtPushToDevice (NvFlexExtContainer *container)
 
NV_FLEX_API void NvFlexExtPullFromDevice (NvFlexExtContainer *container)
 
NV_FLEX_API void NvFlexExtUpdateInstances (NvFlexExtContainer *container)
 
NV_FLEX_API NvFlexExtForceFieldCallbackNvFlexExtCreateForceFieldCallback (NvFlexSolver *solver)
 
NV_FLEX_API void NvFlexExtDestroyForceFieldCallback (NvFlexExtForceFieldCallback *callback)
 
NV_FLEX_API void NvFlexExtSetForceFields (NvFlexExtForceFieldCallback *callback, const NvFlexExtForceField *forceFields, int numForceFields)
 
+

Detailed Description

+

The main include file for the Flex extensions API, this is a collection of helper functions for asset creation, scene management, and sample code that builds on the Flex core API.

+

Data Structure Documentation

+ +
+
+ + + + +
struct NvFlexExtMovingFrame
+
+

Helper struct for storing the state of a moving frame, see NvFlexExtMovingFrameInit()

+
+ + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+float +position[3] +
+float +rotation[4] +
+float +velocity[3] +
+float +omega[3] +
+float +acceleration[3] +
+float +tau[3] +
+float +delta[4][4] +
+ +
+
+ +
+
+ + + + +
struct NvFlexExtAsset
+
+

Represents a group of particles and constraints, each asset can be instanced into a container using NvFlexExtCreateInstance()

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+float * +particles +Local space particle positions, x,y,z,1/mass.
+int +numParticles +Number of particles.
+int +maxParticles +Maximum number of particles, allows extra space for tearable assets which duplicate particles.
+int * +springIndices +Spring indices.
+float * +springCoefficients +Spring coefficients.
+float * +springRestLengths +Spring rest-lengths.
+int +numSprings +Number of springs.
+int * +shapeIndices +The indices of the shape matching constraints.
+int +numShapeIndices +Total number of indices for shape constraints.
+int * +shapeOffsets +Each entry stores the end of the shape's indices in the indices array (exclusive prefix sum of shape lengths)
+float * +shapeCoefficients +The stiffness coefficient for each shape.
+float * +shapeCenters +The position of the center of mass of each shape, an array of vec3s mNumShapes in length.
+int +numShapes +The number of shape matching constraints.
+int * +triangleIndices +Indexed triangle mesh indices for clothing.
+int +numTriangles +Number of triangles.
+bool +inflatable +Whether an inflatable constraint should be added.
+float +inflatableVolume +The rest volume for the inflatable constraint.
+float +inflatablePressure +How much over the rest volume the inflatable should attempt to maintain.
+float +inflatableStiffness +How stiff the inflatable is.
+ +
+
+ +
+
+ + + + +
struct NvFlexExtInstance
+
+

Represents an instance of a FlexAsset in a container

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+int * +particleIndices +Simulation particle indices.
+int +numParticles +Number of simulation particles.
+int +triangleIndex +Index in the container's triangle array.
+int +shapeIndex +Index in the container's shape body constraints array.
+int +inflatableIndex +Index in the container's inflatables array.
+float * +shapeTranslations +Shape matching group translations (vec3s)
+float * +shapeRotations +Shape matching group rotations (quaternions)
+const NvFlexExtAsset * +asset +Source asset used to create this instance.
+void * +userData +User data pointer.
+ +
+
+ +
+
+ + + + +
struct NvFlexExtTearingParticleClone
+
+

Particles and vertices may need to be copied during tearing. Because the user may maintain particle data outside of Flex, this structure describes how to update the particle data. The application should copy each existing particle given by srcIndex (in the asset's particle array) to the destIndex (also in the asset's array).

+
+ + + + + + + +
Data Fields
+int +srcIndex +
+int +destIndex +
+ +
+
+ +
+
+ + + + +
struct NvFlexExtTearingMeshEdit
+
+

The mesh topology may need to be updated to reference new particles during tearing. Because the user may maintain mesh topology outside of Flex, this structure describes the necessary updates that should be performed on the mesh. The triIndex member is the index of the index to be updated, e.g.: a triIndex value of 4 refers to the index 1 vertex (4%3) of the index 1 triangle (4/3). This entry in the indices array should be updated to point to the newParticleIndex.

+
+ + + + + + + +
Data Fields
+int +triIndex +
+int +newParticleIndex +
+ +
+
+ +
+
+ + + + +
struct NvFlexExtParticleData
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+float * +particles +Receives a pointer to the particle position / mass data.
+float * +restParticles +Receives a pointer to the particle's rest position (used for self collision culling)
+float * +velocities +Receives a pointer to the particle velocity data.
+int * +phases +Receives a pointer to the particle phase data.
+float * +normals +Receives a pointer to the particle normal data with 16 byte stride in format [nx, ny, nz, nw].
+const float * +lower +Receive a pointer to the particle lower bounds [x, y, z].
+const float * +upper +Receive a pointer to the particle upper bounds [x, y, z].
+ +
+
+ +
+
+ + + + +
struct NvFlexExtTriangleData
+
+
+ + + + + + + +
Data Fields
+int * +indices +Receives a pointer to the array of triangle index data.
+float * +normals +Receives a pointer to an array of triangle normal data stored with 16 byte stride, i.e.: [nx, ny, nz].
+ +
+
+ +
+
+ + + + +
struct NvFlexExtShapeData
+
+
+ + + + + + + + + + +
Data Fields
+float * +rotations +Receives a pointer to the array quaternion rotation data in [x, y z, w] format.
+float * +positions +Receives a pointer to an array of shape body translations in [x, y, z] format.
+int +n +Number of valid tranforms.
+ +
+
+ +
+
+ + + + +
struct NvFlexExtForceField
+
+

Force field data, currently just supports radial fields

+
+ + + + + + + + + + + + + + + + +
Data Fields
+float +mPosition[3] +Center of force field.
+float +mRadius +Radius of the force field.
+float +mStrength +Strength of the force field.
+NvFlexExtForceMode +mMode +Mode of field application.
+bool +mLinearFalloff +Linear or no falloff.
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef struct NvFlexExtContainer NvFlexExtContainer
+
+

Opaque type representing a simulation

+ +
+
+ +
+
+

Opaque type representing a force field callback structure that ecapsulates the force field kernels and associated data applied as a callback during the Flex update

+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum NvFlexExtForceMode
+
+

Controls the way that force fields affect particles

+ + + + +
Enumerator
eNvFlexExtModeForce  +

Apply field value as a force.

+
eNvFlexExtModeImpulse  +

Apply field value as an impulse.

+
eNvFlexExtModeVelocityChange  +

Apply field value as a velocity change.

+
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtMovingFrameInit (NvFlexExtMovingFrameframe,
const float * worldTranslation,
const float * worldRotation 
)
+
+

Creates a new moving frame struct. This helper method is used to calculate inertial forces for particles inside an attached parent frame. For example, when simulating cloth attached to the character, we would like to perform a local space simulation of the cloth to avoid excessive stretching and collision issues during fast animations. However, we would still like the cloth to respond to character movements in at least a limited, or controlled fashion. The NvFlexExtMovingFrame provides a way to include or remove these inertial forces. The basic usage is as follows:

+
+
NvFlexExtMovingFrameInit(&frame, initialTranslation, initialRotation);
+
+
const linearInertiaScale = 0.25f;
+
const angularInertiaScale 0.5;
+
+
while(simulating)
+
{
+
float3 newPosition;
+
float4 newRotation;
+
+
// move parent frame (character / emitter) according to application's animation system
+
Animate(newPosition, newRotation);
+
+
// update the frame
+
NvFlexExtMovingFrameUpdate(frame, newPosition, newRotation, dt);
+
+
// apply inertial forces and update particles
+
NvFlexExtMovingFrameApply(frame, particlePositions, particleVelocities, numParticles, linearInertiaScale, angularInertiaScale, dt);
+
}
+
Parameters
+ + + + +
[in]frameA pointer to a user-allocated NvFlexExtMovingFrame struct
[in]worldTranslationA pointer to a vec3 storing the frame's initial translation in world space
[in]worldRotationA pointer to a quaternion storing the frame's initial rotation in world space
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtMovingFrameUpdate (NvFlexExtMovingFrameframe,
const float * worldTranslation,
const float * worldRotation,
float dt 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtMovingFrameApply (NvFlexExtMovingFrameframe,
float * positions,
float * velocities,
int numParticles,
float linearScale,
float angularScale,
float dt 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices (const float * vertices,
int numVertices,
int * uniqueVerts,
int * originalToUniqueMap,
float threshold 
)
+
+

Create an index buffer of unique vertices in the mesh (collapses vertices in the same position even if they have different normals / texcoords). This can be used to create simulation meshes from render meshes, and is typically done as a pre-pass before calling NvFlexExtCreateClothFromMesh().

+
Parameters
+ + + + + + +
[in]verticesA pointer to an array of float3 positions
[in]numVerticesThe number of vertices in the mesh
[out]uniqueVertsA list of unique mesh vertex indices, should be numVertices in length (worst case all verts are unique)
[out]originalToUniqueMapMapping from the original vertex index to the unique vertex index, should be numVertices in length
[in]thresholdThe distance below which two vertices are considered duplicates
+
+
+
Returns
The number of unique vertices in the mesh
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateClothFromMesh (const float * particles,
int numParticles,
const int * indices,
int numTriangles,
float stretchStiffness,
float bendStiffness,
float tetherStiffness,
float tetherGive,
float pressure 
)
+
+

Create a cloth asset consisting of stretch and bend distance constraints given an indexed triangle mesh. Stretch constraints will be placed along triangle edges, while bending constraints are placed over two edges.

+
Parameters
+ + + + + + + + + + +
[in]particlesPositions and masses of the particles in the format [x, y, z, 1/m]
[in]numParticlesThe number of particles
[in]indicesThe triangle indices, these should be 'welded' using NvFlexExtCreateWeldedMeshIndices() first
[in]numTrianglesThe number of triangles
[in]stretchStiffnessThe stiffness coefficient for stretch constraints
[in]bendStiffnessThe stiffness coefficient used for bending constraints
[in]tetherStiffnessIf > 0.0f then the function will create tethers attached to particles with zero inverse mass. These are unilateral, long-range attachments, which can greatly reduce stretching even at low iteration counts.
[in]tetherGiveBecause tether constraints are so effective at reducing stiffness, it can be useful to allow a small amount of extension before the constraint activates.
[in]pressureIf > 0.0f then a volume (pressure) constraint will also be added to the asset, the rest volume and stiffness will be automatically computed by this function
+
+
+
Returns
A pointer to an asset structure holding the particles and constraints
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateTearingClothFromMesh (const float * particles,
int numParticles,
int maxParticles,
const int * indices,
int numTriangles,
float stretchStiffness,
float bendStiffness,
float pressure 
)
+
+

Create a cloth asset consisting of stretch and bend distance constraints given an indexed triangle mesh. This creates an asset with the same structure as NvFlexExtCreateClothFromMesh(), however tether constraints are not supported, and additional information regarding mesh topology will be stored with the asset to allow tearing.

+
Note
: Typically each instance of a tearable cloth mesh will have it's own asset. This is because the asset holds the topology of the mesh which is unique for each instance.
+
Parameters
+ + + + + + + + + +
[in]particlesPositions and masses of the particles in the format [x, y, z, 1/m]
[in]numParticlesThe number of particles
[in]maxParticlesThe maximum number of particles for this asset, this will limit the amount of tearing that can be performed.
[in]indicesThe triangle indices, these should be 'welded' using NvFlexExtCreateWeldedMeshIndices() first
[in]numTrianglesThe number of triangles
[in]stretchStiffnessThe stiffness coefficient for stretch constraints
[in]bendStiffnessThe stiffness coefficient used for bending constraints
[in]pressureIf > 0.0f then a volume (pressure) constraint will also be added to the asset, the rest volume and stiffness will be automatically computed by this function
+
+
+
Returns
A pointer to an asset structure holding the particles and constraints
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtDestroyTearingCloth (NvFlexExtAssetasset)
+
+

Destroy an asset created with NvFlexExtCreateTearingClothFromMesh()

Parameters
+ + +
[in]assetThe asset to be destroyed.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtTearClothMesh (NvFlexExtAssetasset,
float maxStrain,
int maxSplits,
NvFlexExtTearingParticleCloneparticleCopies,
int * numParticleCopies,
int maxCopies,
NvFlexExtTearingMeshEdittriangleEdits,
int * numTriangleEdits,
int maxEdits 
)
+
+

Perform cloth mesh tearing, this function will calculate the strain on each distance constraint and perform splits if it is above a certain strain threshold (i.e.: length/restLength > maxStrain).

+
Parameters
+ + + + + + + + + + +
[in]assetThe asset describing the cloth constraint network, this must be created with NvFlexExtCreateTearingClothFromMesh()
[in]maxStrainThe maximum allowable strain on each edge
[in]maxSplitsThe maximum number of constraint breaks that will be performed, this controls the 'rate' of mesh tearing
[in]particleCopiesPointer to an array of NvFlexExtTearingParticleClone structures that describe the particle copies that need to be performed
[in]numParticleCopiesPointer to an integer that will have the number of copies performed written to it
[in]maxCopiesThe maximum number of particle copies that will be performed, multiple particles copies may be performed in response to one split
[in]triangleEditsPointer to an array of NvFlexExtTearingMeshEdit structures that describe the topology updates that need to be performed
[in]numTriangleEditsPointer to an integer that will have the number of topology updates written to it
[in]maxEditsThe maximum number of index buffer edits that will be output
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateRigidFromMesh (const float * vertices,
int numVertices,
const int * indices,
int numTriangleIndices,
float radius,
float expand 
)
+
+

Create a shape body asset from a closed triangle mesh. The mesh is first voxelized at a spacing specified by the radius, and particles are placed at occupied voxels.

+
Parameters
+ + + + + + + +
[in]verticesVertices of the triangle mesh
[in]numVerticesThe number of vertices
[in]indicesThe triangle indices
[in]numTriangleIndicesThe number of triangles indices (triangles*3)
[in]radiusThe spacing used for voxelization, note that the number of voxels grows proportional to the inverse cube of radius, currently this method limits construction to resolutions < 64^3
[in]expandParticles will be moved inwards (if negative) or outwards (if positive) from the surface of the mesh according to this factor
+
+
+
Returns
A pointer to an asset structure holding the particles and constraints
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateSoftFromMesh (const float * vertices,
int numVertices,
const int * indices,
int numTriangleIndices,
float particleSpacing,
float volumeSampling,
float surfaceSampling,
float clusterSpacing,
float clusterRadius,
float clusterStiffness,
float linkRadius,
float linkStiffness,
float globalStiffness 
)
+
+

Create a shape body asset from a closed triangle mesh. The mesh is first voxelized at a spacing specified by the radius, and particles are placed at occupied voxels.

+
Parameters
+ + + + + + + + + + + + + + +
[in]verticesVertices of the triangle mesh
[in]numVerticesThe number of vertices
[in]indicesThe triangle indices
[in]numTriangleIndicesThe number of triangles indices (triangles*3)
[in]particleSpacingThe spacing to use when creating particles
[in]volumeSamplingControl the resolution the mesh is voxelized at in order to generate interior sampling, if the mesh is not closed then this should be set to zero and surface sampling should be used instead
[in]surfaceSamplingControls how many samples are taken of the mesh surface, this is useful to ensure fine features of the mesh are represented by particles, or if the mesh is not closed
[in]clusterSpacingThe spacing for shape-matching clusters, should be at least the particle spacing
[in]clusterRadiusControls the overall size of the clusters, this controls how much overlap the clusters have which affects how smooth the final deformation is, if parts of the body are detaching then it means the clusters are not overlapping sufficiently to form a fully connected set of clusters
[in]clusterStiffnessControls the stiffness of the resulting clusters
[in]linkRadiusAny particles below this distance will have additional distance constraints created between them
[in]linkStiffnessThe stiffness of distance links
[in]globalStiffnessIf this parameter is > 0.0f, adds an additional global cluster that consists of all particles in the shape. The stiffness of this cluster is the globalStiffness.
+
+
+
Returns
A pointer to an asset structure holding the particles and constraints
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtDestroyAsset (NvFlexExtAssetasset)
+
+

Frees all memory associated with an asset created by one of the creation methods param[in] asset The asset to destroy.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning (const float * vertices,
int numVertices,
const float * bones,
int numBones,
float falloff,
float maxDistance,
float * skinningWeights,
int * skinningIndices 
)
+
+

Creates information for linear blend skining a graphics mesh to a set of transforms (bones)

+
Parameters
+ + + + + + + + + +
[in]verticesVertices of the triangle mesh
[in]numVerticesThe number of vertices
[in]bonesPointer to an array of vec3 positions representing the bone positions
[in]numBonesThen number of bones
[in]falloffThe speed at which the bone's influence on a vertex falls off with distance
[in]maxDistanceThe maximum distance a bone can be from a vertex before it will not influence it any more
[out]skinningWeightsThe normalized weights for each bone, there are up to 4 weights per-vertex so this should be numVertices*4 in length
[out]skinningIndicesThe indices of each bone corresponding to the skinning weight, will be -1 if this weight is not used
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexExtContainer* NvFlexExtCreateContainer (NvFlexLibrarylib,
NvFlexSolversolver,
int maxParticles 
)
+
+

Creates a wrapper object around a Flex solver that can hold assets / instances, the container manages sending and retrieving partical data from the solver

+
Parameters
+ + + + +
[in]libThe library instance to use
[in]solverThe solver to wrap
[in]maxParticlesThe maximum number of particles to manage
+
+
+
Returns
A pointer to the new container
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtDestroyContainer (NvFlexExtContainercontainer)
+
+

Frees all memory associated with a container

+
Parameters
+ + +
[in]containerThe container to destroy
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexExtAllocParticles (NvFlexExtContainercontainer,
int n,
int * indices 
)
+
+

Allocates particles in the container.

+
Parameters
+ + + + +
[in]containerThe container to allocate out of
[in]nThe number of particles to allocate
[out]indicesAn n-length array of ints that will store the indices to the allocated particles
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtFreeParticles (NvFlexExtContainercontainer,
int n,
const int * indices 
)
+
+

Free allocated particles

+
Parameters
+ + + + +
[in]containerThe container to free from
[in]nThe number of particles to free
[in]indicesThe indices of the particles to free
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexExtGetActiveList (NvFlexExtContainercontainer,
int * indices 
)
+
+

Retrives the indices of all active particles

+
Parameters
+ + + +
[in]containerThe container to free from
[out]indicesReturns the number of active particles
+
+
+
Returns
The number of active particles
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexExtParticleData NvFlexExtMapParticleData (NvFlexExtContainercontainer)
+
+

Returns pointers to the internal data stored by the container. These are host-memory pointers, and will remain valid NvFlexExtUnmapParticleData() is called.

+
Parameters
+ + +
containerThe container whose data should be accessed
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtUnmapParticleData (NvFlexExtContainercontainer)
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexExtTriangleData NvFlexExtMapTriangleData (NvFlexExtContainercontainer)
+
+

Access triangle constraint data, see NvFlexExtGetParticleData() for notes on ownership.

+
Parameters
+ + +
containerThe container to retrive from
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtUnmapTriangleData (NvFlexExtContainercontainer)
+
+

Unmap triangle data, see NvFlexExtMapTriangleData()

+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexExtShapeData NvFlexExtMapShapeData (NvFlexExtContainercontainer)
+
+

Access shape body constraint data, see NvFlexExtGetParticleData() for notes on ownership.

+
Parameters
+ + +
containerThe container to retrive from
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtUnmapShapeData (NvFlexExtContainercontainer)
+
+

Unmap shape transform data, see NvFlexExtMapShapeData()

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexExtInstance* NvFlexExtCreateInstance (NvFlexExtContainercontainer,
NvFlexExtParticleDataparticleData,
const NvFlexExtAssetasset,
const float * transform,
float vx,
float vy,
float vz,
int phase,
float invMassScale 
)
+
+

Creates an instance of an asset, the container will internally store a reference to the asset so it should remain valid for the instance lifetime. This method will allocate particles for the asset, assign their initial positions, velocity and phase.

+
Parameters
+ + + + + + + + + + +
[in]containerThe container to spawn into
[in]particleDataPointer to a mapped particle data struct, returned from NvFlexExtMapParticleData()
[in]assetThe asset to be spawned
[in]transformA pointer to a 4x4 column major, column vector transform that specifies the initial world space configuration of the particles
[in]vxThe velocity of the particles along the x axis
[in]vyThe velocity of the particles along the y axis
[in]vzThe velocity of the particles along the z axis
[in]phaseThe phase used for the particles
[in]invMassScaleA factor applied to the per particle inverse mass
+
+
+
Returns
A pointer to the instance of the asset
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtDestroyInstance (NvFlexExtContainercontainer,
const NvFlexExtInstanceinstance 
)
+
+

Destoy an instance of an asset

+
Parameters
+ + + +
[in]containerThe container the instance belongs to
[in]instanceThe instance to destroy
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtNotifyAssetChanged (NvFlexExtContainercontainer,
const NvFlexExtAssetasset 
)
+
+

Notifies the container that asset data has changed and needs to be sent to the GPU this should be called if the constrains for an existing asset are modified by the user

+
Parameters
+ + + +
[in]containerThe container the instance referencing the asset belongs to
[in]assetThe asset which was modified (can be NULL)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtTickContainer (NvFlexExtContainercontainer,
float dt,
int numSubsteps,
bool enableTimers = false 
)
+
+

Updates the container, applies force fields, steps the solver forward in time, updates the host with the results synchronously. This is a helper function which performs a synchronous update using the following flow.

+
// async update GPU data
+ +
+
// update solver
+
NvFlexUpdateSolver(container, dt, iterations);
+
+
// async read data back to CPU
+ +
+
// read / write particle data on CPU
+ +
+
// CPU particle processing
+
ProcessParticles(data);
+
+
// unmap data
+ +
Parameters
+ + + + + +
[in]containerThe container to update
[in]dtThe time-step in seconds
[in]numSubstepsThe number of substeps to perform
[in]enableTimersWhether to record detailed timers, see NvFlexUpdateSolver()
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtPushToDevice (NvFlexExtContainercontainer)
+
+

Updates the device asynchronously, transfers any particle and constraint changes to the flex solver, expected to be called in the following sequence: NvFlexExtPushToDevice, NvFlexUpdateSolver, NvFlexExtPullFromDevice, flexSynchronize

Parameters
+ + +
[in]containerThe container to update
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtPullFromDevice (NvFlexExtContainercontainer)
+
+

Updates the host asynchronously, transfers particle and constraint data back to he host, expected to be called in the following sequence: NvFlexExtPushToDevice, NvFlexUpdateSolver, NvFlexExtPullFromDevice

Parameters
+ + +
[in]containerThe container to update
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtUpdateInstances (NvFlexExtContainercontainer)
+
+

Synchronizes the per-instance data with the container's data, should be called after the synchronization with the solver read backs are complete

+
Parameters
+ + +
[in]containerThe instances belonging to this container will be updated
+
+
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API NvFlexExtForceFieldCallback* NvFlexExtCreateForceFieldCallback (NvFlexSolversolver)
+
+

Create a NvFlexExtForceFieldCallback structure, each callback is associated with the passed in solver once the NvFlexExtSetForceFields() is called.

+
Parameters
+ + +
[in]solverA valid solver created with NvFlexCreateSolver()
+
+
+
Returns
A pointer to a callback structure
+ +
+
+ +
+
+ + + + + + + + +
NV_FLEX_API void NvFlexExtDestroyForceFieldCallback (NvFlexExtForceFieldCallbackcallback)
+
+

Destroy the force field callback

+
Parameters
+ + +
[in]callbackA valid solver created with NvFlexExtCreateForceFieldCallback()
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtSetForceFields (NvFlexExtForceFieldCallbackcallback,
const NvFlexExtForceFieldforceFields,
int numForceFields 
)
+
+

Set force fields on the container, these will be applied during the Flex update

+
Parameters
+ + + + +
[in]callbackThe callback to update
[in]forceFieldsA pointer to an array of force field data, may be host or GPU memory
[in]numForceFieldsThe number of force fields to send to the device
+
+
+ +
+
+
+ + + + diff --git a/doc/_static/api/_nv_flex_ext_8h_source.html b/doc/_static/api/_nv_flex_ext_8h_source.html new file mode 100644 index 0000000..d704ded --- /dev/null +++ b/doc/_static/api/_nv_flex_ext_8h_source.html @@ -0,0 +1,625 @@ + + + + + + +FLEX: NvFlexExt.h Source File + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + + +
+
+
+
NvFlexExt.h
+
+
+Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
+
2 // under a form of NVIDIA software license agreement provided separately to you.
+
3 //
+
4 // Notice
+
5 // NVIDIA Corporation and its licensors retain all intellectual property and
+
6 // proprietary rights in and to this software and related documentation and
+
7 // any modifications thereto. Any use, reproduction, disclosure, or
+
8 // distribution of this software and related documentation without an express
+
9 // license agreement from NVIDIA Corporation is strictly prohibited.
+
10 //
+
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+
15 //
+
16 // Information and code furnished is believed to be accurate and reliable.
+
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+
18 // information or for any infringement of patents or other rights of third parties that may
+
19 // result from its use. No license is granted by implication or otherwise under any patent
+
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+
21 // This code supersedes and replaces all information previously supplied.
+
22 // NVIDIA Corporation products are not authorized for use as critical
+
23 // components in life support devices or systems without express written approval of
+
24 // NVIDIA Corporation.
+
25 //
+
26 // Copyright (c) 2013-2017 NVIDIA Corporation. All rights reserved.
+
27 
+
28 #ifndef NV_FLEX_EXT_H
+
29 #define NV_FLEX_EXT_H
+
30 
+
36 #include "NvFlex.h"
+
37 
+
38 #include <cassert>
+
39 #include <cstddef>
+
40 
+
41 // A vector type that wraps a NvFlexBuffer, behaves like a standard vector for POD types (no construction)
+
42 // The vector must be mapped using map() before any read/write access to elements or resize operation
+
43 
+
44 template <typename T>
+ +
46 {
+
47  NvFlexVector(NvFlexLibrary* l, int size=0) : lib(l), buffer(NULL), mappedPtr(NULL), count(0), capacity(0)
+
48  {
+
49  if (size)
+
50  {
+
51  resize(size);
+
52 
+
53  // resize implicitly maps, unmap initial allocation
+
54  unmap();
+
55  }
+
56  }
+
57 
+
58  NvFlexVector(NvFlexLibrary* l, const T* ptr, int size) : lib(l), buffer(NULL), mappedPtr(NULL), count(0), capacity(0)
+
59  {
+
60  assign(ptr, size);
+
61  unmap();
+
62  }
+
63 
+
64 
+ +
66  {
+
67  destroy();
+
68  }
+
69 
+ + +
72 
+ +
74  int count;
+
75  int capacity;
+
76 
+
77  // reinitialize the vector leaving it unmapped
+
78  void init(int size)
+
79  {
+
80  destroy();
+
81  resize(size);
+
82  unmap();
+
83  }
+
84 
+
85  void destroy()
+
86  {
+
87  if (mappedPtr)
+
88  NvFlexUnmap(buffer);
+
89 
+
90  if (buffer)
+
91  NvFlexFreeBuffer(buffer);
+
92 
+
93  mappedPtr = NULL;
+
94  buffer = NULL;
+
95  capacity = 0;
+
96  count = 0;
+
97  }
+
98 
+
99  void map(int flags=eNvFlexMapWait)
+
100  {
+
101  if (!buffer)
+
102  return;
+
103 
+
104  assert(!mappedPtr);
+
105  mappedPtr = (T*)NvFlexMap(buffer, flags);
+
106  }
+
107 
+
108  void unmap()
+
109  {
+
110  if (!buffer)
+
111  return;
+
112 
+
113  assert(mappedPtr);
+
114 
+
115  NvFlexUnmap(buffer);
+
116  mappedPtr = 0;
+
117  }
+
118 
+
119  const T& operator[](int index) const
+
120  {
+
121  assert(mappedPtr);
+
122  assert(index < count);
+
123 
+
124  return mappedPtr[index];
+
125  }
+
126 
+
127  T& operator[](int index)
+
128  {
+
129  assert(mappedPtr);
+
130  assert(index < count);
+
131 
+
132  return mappedPtr[index];
+
133  }
+
134 
+
135  void push_back(const T& t)
+
136  {
+
137  assert(mappedPtr || !buffer);
+
138 
+
139  reserve(count+1);
+
140 
+
141  // copy element
+
142  mappedPtr[count++] = t;
+
143  }
+
144 
+
145  void assign(const T* srcPtr, int newCount)
+
146  {
+
147  assert(mappedPtr || !buffer);
+
148 
+
149  resize(newCount);
+
150 
+
151  memcpy(mappedPtr, srcPtr, newCount*sizeof(T));
+
152  }
+
153 
+
154  void copyto(T* dest, int count)
+
155  {
+
156  assert(mappedPtr);
+
157 
+
158  memcpy(dest, mappedPtr, sizeof(T)*count);
+
159  }
+
160 
+
161  int size() const { return count; }
+
162 
+
163  bool empty() const { return size() == 0; }
+
164 
+
165  const T& back() const
+
166  {
+
167  assert(mappedPtr);
+
168  assert(!empty());
+
169 
+
170  return mappedPtr[count-1];
+
171  }
+
172 
+
173  void reserve(int minCapacity)
+
174  {
+
175  if (minCapacity > capacity)
+
176  {
+
177  // growth factor of 1.5
+
178  const int newCapacity = minCapacity*3/2;
+
179 
+
180  NvFlexBuffer* newBuf = NvFlexAllocBuffer(lib, newCapacity, sizeof(T), eNvFlexBufferHost);
+
181 
+
182  // copy contents to new buffer
+
183  void* newPtr = NvFlexMap(newBuf, eNvFlexMapWait);
+
184  memcpy(newPtr, mappedPtr, count*sizeof(T));
+
185 
+
186  // unmap old buffer, but leave new buffer mapped
+
187  unmap();
+
188 
+
189  if (buffer)
+
190  NvFlexFreeBuffer(buffer);
+
191 
+
192  // swap
+
193  buffer = newBuf;
+
194  mappedPtr = (T*)newPtr;
+
195  capacity = newCapacity;
+
196  }
+
197  }
+
198 
+
199  // resizes mapped buffer and leaves new buffer mapped
+
200  void resize(int newCount)
+
201  {
+
202  assert(mappedPtr || !buffer);
+
203 
+
204  reserve(newCount);
+
205 
+
206  // resize but do not initialize new entries
+
207  count = newCount;
+
208  }
+
209 
+
210  void resize(int newCount, const T& val)
+
211  {
+
212  assert(mappedPtr || !buffer);
+
213 
+
214  const int startInit = count;
+
215  const int endInit = newCount;
+
216 
+
217  resize(newCount);
+
218 
+
219  // init any new entries
+
220  for (int i=startInit; i < endInit; ++i)
+
221  mappedPtr[i] = val;
+
222  }
+
223 };
+
224 
+
225 extern "C" {
+
226 
+ +
231 {
+
232  float position[3];
+
233  float rotation[4];
+
234 
+
235  float velocity[3];
+
236  float omega[3];
+
237 
+
238  float acceleration[3];
+
239  float tau[3];
+
240 
+
241  float delta[4][4];
+
242 };
+
243 
+
280 NV_FLEX_API void NvFlexExtMovingFrameInit(NvFlexExtMovingFrame* frame, const float* worldTranslation, const float* worldRotation);
+
281 
+
282 /* Update a frame to a new position, this will automatically update the velocity and acceleration of
+
283  * the frame, which can then be used to calculate inertial forces. This should be called once per-frame
+
284  * with the new position and time-step used when moving the frame.
+
285  *
+
286  * @param[in] frame A pointer to a user-allocated NvFlexExtMovingFrame struct
+
287  * @param[in] worldTranslation A pointer to a vec3 storing the frame's initial translation in world space
+
288  * @param[in] worldRotation A pointer to a quaternion storing the frame's initial rotation in world space
+
289  * @param[in] dt The time that elapsed since the last call to the frame update
+
290  */
+
291 NV_FLEX_API void NvFlexExtMovingFrameUpdate(NvFlexExtMovingFrame* frame, const float* worldTranslation, const float* worldRotation, float dt);
+
292 
+
293 /* Teleport particles to the frame's new position and apply the inertial forces
+
294  *
+
295  * @param[in] frame A pointer to a user-allocated NvFlexExtMovingFrame struct
+
296  * @param[in] positions A pointer to an array of particle positions in (x, y, z, 1/m) format
+
297  * @param[in] velocities A pointer to an array of particle velocities in (vx, vy, vz) format
+
298  * @param[in] numParticles The number of particles to update
+
299  * @param[in] linearScale How strongly the translational inertial forces should be applied, 0.0 corresponds to a purely local space simulation removing all inertial forces, 1.0 corresponds to no inertial damping and has no benefit over regular world space simulation
+
300  * @param[in] angularScale How strongly the angular inertial forces should be applied, 0.0 corresponds to a purely local space simulation, 1.0 corresponds to no inertial damping
+
301  * @param[in] dt The time that elapsed since the last call to the frame update, should match the value passed to NvFlexExtMovingFrameUpdate()
+
302  */
+
303 NV_FLEX_API void NvFlexExtMovingFrameApply(NvFlexExtMovingFrame* frame, float* positions, float* velocities, int numParticles, float linearScale, float angularScale, float dt);
+
304 
+
305 
+ +
311 {
+
312  // particles
+
313  float* particles;
+ + +
316 
+
317  // springs
+ + + + +
322 
+
323  // shapes
+ + + + +
328  float* shapeCenters;
+
329  int numShapes;
+
330 
+
331  // faces for cloth
+ + +
334 
+
335  // inflatable params
+
336  bool inflatable;
+ + + +
340 };
+
341 
+ +
346 {
+ + +
349 
+ + + +
353 
+ +
355  float* shapeRotations;
+
356 
+ +
358 
+
359  void* userData;
+
360 };
+
361 
+ +
366 
+
378 NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices(const float* vertices, int numVertices, int* uniqueVerts, int* originalToUniqueMap, float threshold);
+
379 
+
395 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateClothFromMesh(const float* particles, int numParticles, const int* indices, int numTriangles, float stretchStiffness, float bendStiffness, float tetherStiffness, float tetherGive, float pressure);
+
396 
+
415 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateTearingClothFromMesh(const float* particles, int numParticles, int maxParticles, const int* indices, int numTriangles, float stretchStiffness, float bendStiffness, float pressure);
+
416 
+
421 NV_FLEX_API void NvFlexExtDestroyTearingCloth(NvFlexExtAsset* asset);
+
422 
+ +
429 {
+
430  int srcIndex;
+ +
432 };
+
433 
+ +
442 {
+
443  int triIndex; // index into the triangle indices array to update
+
444  int newParticleIndex; // new value for the index
+
445 };
+
446 
+
461 NV_FLEX_API void NvFlexExtTearClothMesh(NvFlexExtAsset* asset, float maxStrain, int maxSplits, NvFlexExtTearingParticleClone* particleCopies, int* numParticleCopies, int maxCopies, NvFlexExtTearingMeshEdit* triangleEdits, int* numTriangleEdits, int maxEdits);
+
462 
+
474 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float radius, float expand);
+
475 
+
494 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness);
+
495 
+
500 NV_FLEX_API void NvFlexExtDestroyAsset(NvFlexExtAsset* asset);
+
501 
+
514 NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning(const float* vertices, int numVertices, const float* bones, int numBones, float falloff, float maxDistance, float* skinningWeights, int* skinningIndices);
+
515 
+
524 NV_FLEX_API NvFlexExtContainer* NvFlexExtCreateContainer(NvFlexLibrary* lib, NvFlexSolver* solver, int maxParticles);
+
525 
+
531 NV_FLEX_API void NvFlexExtDestroyContainer(NvFlexExtContainer* container);
+
532 
+
540 NV_FLEX_API int NvFlexExtAllocParticles(NvFlexExtContainer* container, int n, int* indices);
+
541 
+
549 NV_FLEX_API void NvFlexExtFreeParticles(NvFlexExtContainer* container, int n, const int* indices);
+
550 
+
551 
+
559 NV_FLEX_API int NvFlexExtGetActiveList(NvFlexExtContainer* container, int* indices);
+
560 
+
561 
+ +
563 {
+
564  float* particles;
+
565  float* restParticles;
+
566  float* velocities;
+
567  int* phases;
+
568  float* normals;
+
569 
+
570  const float* lower;
+
571  const float* upper;
+
572 };
+
573 
+ +
581 NV_FLEX_API void NvFlexExtUnmapParticleData(NvFlexExtContainer* container);
+
582 
+ +
584 {
+
585  int* indices;
+
586  float* normals;
+
587 };
+
588 
+ +
595 
+
599 NV_FLEX_API void NvFlexExtUnmapTriangleData(NvFlexExtContainer* container);
+
600 
+ +
602 {
+
603  float* rotations;
+
604  float* positions;
+
605  int n;
+
606 };
+
607 
+ +
614 
+
618 NV_FLEX_API void NvFlexExtUnmapShapeData(NvFlexExtContainer* container);
+
619 
+
635 NV_FLEX_API NvFlexExtInstance* NvFlexExtCreateInstance(NvFlexExtContainer* container, NvFlexExtParticleData* particleData, const NvFlexExtAsset* asset, const float* transform, float vx, float vy, float vz, int phase, float invMassScale);
+
636 
+
642 NV_FLEX_API void NvFlexExtDestroyInstance(NvFlexExtContainer* container, const NvFlexExtInstance* instance);
+
643 
+
650 NV_FLEX_API void NvFlexExtNotifyAssetChanged(NvFlexExtContainer* container, const NvFlexExtAsset* asset);
+
651 
+
681 NV_FLEX_API void NvFlexExtTickContainer(NvFlexExtContainer* container, float dt, int numSubsteps, bool enableTimers=false);
+
682 
+
688 NV_FLEX_API void NvFlexExtPushToDevice(NvFlexExtContainer* container);
+
689 
+
695 NV_FLEX_API void NvFlexExtPullFromDevice(NvFlexExtContainer* container);
+
696 
+
702 NV_FLEX_API void NvFlexExtUpdateInstances(NvFlexExtContainer* container);
+
703 
+
704 
+ +
709 {
+ +
712 
+ +
715 
+ +
718 };
+
719 
+ +
724 {
+
725  float mPosition[3];
+
726  float mRadius;
+
727  float mStrength;
+ + +
730 };
+
731 
+ +
737 
+ +
746 
+ +
753 
+
761 NV_FLEX_API void NvFlexExtSetForceFields(NvFlexExtForceFieldCallback* callback, const NvFlexExtForceField* forceFields, int numForceFields);
+
762 
+
763 
+
764 
+
765 } // extern "C"
+
766 
+
767 #endif // NV_FLEX_EXT_H
+
768 
+
bool mLinearFalloff
Linear or no falloff.
Definition: NvFlexExt.h:729
+
void destroy()
Definition: NvFlexExt.h:85
+
int numParticles
Number of particles.
Definition: NvFlexExt.h:314
+
float * shapeCenters
The position of the center of mass of each shape, an array of vec3s mNumShapes in length...
Definition: NvFlexExt.h:328
+
NV_FLEX_API void NvFlexExtSetForceFields(NvFlexExtForceFieldCallback *callback, const NvFlexExtForceField *forceFields, int numForceFields)
+
NV_FLEX_API void NvFlexExtMovingFrameApply(NvFlexExtMovingFrame *frame, float *positions, float *velocities, int numParticles, float linearScale, float angularScale, float dt)
+
NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateSoftFromMesh(const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness)
+
float * shapeRotations
Shape matching group rotations (quaternions)
Definition: NvFlexExt.h:355
+
int n
Number of valid tranforms.
Definition: NvFlexExt.h:605
+
NvFlexLibrary * lib
Definition: NvFlexExt.h:70
+
float * particles
Local space particle positions, x,y,z,1/mass.
Definition: NvFlexExt.h:313
+
int * shapeOffsets
Each entry stores the end of the shape's indices in the indices array (exclusive prefix sum of shape ...
Definition: NvFlexExt.h:326
+
int newParticleIndex
Definition: NvFlexExt.h:444
+
NV_FLEX_API void NvFlexUnmap(NvFlexBuffer *buffer)
+
NV_FLEX_API void NvFlexExtDestroyInstance(NvFlexExtContainer *container, const NvFlexExtInstance *instance)
+
NV_FLEX_API void NvFlexExtMovingFrameUpdate(NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation, float dt)
+
void init(int size)
Definition: NvFlexExt.h:78
+
NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateRigidFromMesh(const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float radius, float expand)
+
float * springRestLengths
Spring rest-lengths.
Definition: NvFlexExt.h:320
+
int size() const
Definition: NvFlexExt.h:161
+
NV_FLEX_API void NvFlexExtTickContainer(NvFlexExtContainer *container, float dt, int numSubsteps, bool enableTimers=false)
+
Definition: NvFlexExt.h:562
+
int numParticles
Number of simulation particles.
Definition: NvFlexExt.h:348
+
NV_FLEX_API void NvFlexExtUnmapParticleData(NvFlexExtContainer *container)
+
struct NvFlexExtContainer NvFlexExtContainer
Definition: NvFlexExt.h:365
+
T & operator[](int index)
Definition: NvFlexExt.h:127
+
NvFlexVector(NvFlexLibrary *l, const T *ptr, int size)
Definition: NvFlexExt.h:58
+
void * userData
User data pointer.
Definition: NvFlexExt.h:359
+
NV_FLEX_API void NvFlexExtPullFromDevice(NvFlexExtContainer *container)
+
void resize(int newCount, const T &val)
Definition: NvFlexExt.h:210
+
int * triangleIndices
Indexed triangle mesh indices for clothing.
Definition: NvFlexExt.h:332
+
int capacity
Definition: NvFlexExt.h:75
+
int * particleIndices
Simulation particle indices.
Definition: NvFlexExt.h:347
+
float mRadius
Radius of the force field.
Definition: NvFlexExt.h:726
+
int numTriangles
Number of triangles.
Definition: NvFlexExt.h:333
+
Calling thread will be blocked until buffer is ready for access, default.
Definition: NvFlex.h:69
+
struct NvFlexSolver NvFlexSolver
Definition: NvFlex.h:57
+
NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateClothFromMesh(const float *particles, int numParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float tetherStiffness, float tetherGive, float pressure)
+
Definition: NvFlexExt.h:723
+
int numShapeIndices
Total number of indices for shape constraints.
Definition: NvFlexExt.h:325
+
NV_FLEX_API void NvFlexExtDestroyTearingCloth(NvFlexExtAsset *asset)
+
float * rotations
Receives a pointer to the array quaternion rotation data in [x, y z, w] format.
Definition: NvFlexExt.h:603
+
NV_FLEX_API int NvFlexExtGetActiveList(NvFlexExtContainer *container, int *indices)
+
int shapeIndex
Index in the container's shape body constraints array.
Definition: NvFlexExt.h:351
+
Definition: NvFlexExt.h:45
+
NV_FLEX_API void NvFlexExtDestroyForceFieldCallback(NvFlexExtForceFieldCallback *callback)
+
NV_FLEX_API void * NvFlexMap(NvFlexBuffer *buffer, int flags)
+
int * springIndices
Spring indices.
Definition: NvFlexExt.h:318
+
void reserve(int minCapacity)
Definition: NvFlexExt.h:173
+
~NvFlexVector()
Definition: NvFlexExt.h:65
+
int maxParticles
Maximum number of particles, allows extra space for tearable assets which duplicate particles...
Definition: NvFlexExt.h:315
+
void push_back(const T &t)
Definition: NvFlexExt.h:135
+
NV_FLEX_API void NvFlexExtDestroyContainer(NvFlexExtContainer *container)
+
float tau[3]
Definition: NvFlexExt.h:239
+
float omega[3]
Definition: NvFlexExt.h:236
+
NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning(const float *vertices, int numVertices, const float *bones, int numBones, float falloff, float maxDistance, float *skinningWeights, int *skinningIndices)
+
bool empty() const
Definition: NvFlexExt.h:163
+
Definition: NvFlexExt.h:441
+
NV_FLEX_API NvFlexExtContainer * NvFlexExtCreateContainer(NvFlexLibrary *lib, NvFlexSolver *solver, int maxParticles)
+
NV_FLEX_API NvFlexExtInstance * NvFlexExtCreateInstance(NvFlexExtContainer *container, NvFlexExtParticleData *particleData, const NvFlexExtAsset *asset, const float *transform, float vx, float vy, float vz, int phase, float invMassScale)
+
float rotation[4]
Definition: NvFlexExt.h:233
+
float inflatableVolume
The rest volume for the inflatable constraint.
Definition: NvFlexExt.h:337
+
Host mappable buffer, pinned memory on CUDA, staging buffer on DX.
Definition: NvFlex.h:79
+
NV_FLEX_API void NvFlexExtUnmapShapeData(NvFlexExtContainer *container)
+
struct NvFlexBuffer NvFlexBuffer
Definition: NvFlex.h:62
+
NV_FLEX_API NvFlexExtShapeData NvFlexExtMapShapeData(NvFlexExtContainer *container)
+
Apply field value as an impulse.
Definition: NvFlexExt.h:714
+
float * particles
Receives a pointer to the particle position / mass data.
Definition: NvFlexExt.h:564
+
float * springCoefficients
Spring coefficients.
Definition: NvFlexExt.h:319
+
float * restParticles
Receives a pointer to the particle's rest position (used for self collision culling) ...
Definition: NvFlexExt.h:565
+
float * positions
Receives a pointer to an array of shape body translations in [x, y, z] format.
Definition: NvFlexExt.h:604
+
Definition: NvFlexExt.h:230
+
const T & operator[](int index) const
Definition: NvFlexExt.h:119
+
void unmap()
Definition: NvFlexExt.h:108
+
Definition: NvFlexExt.h:345
+
NV_FLEX_API void NvFlexExtUpdateInstances(NvFlexExtContainer *container)
+
float mPosition[3]
Center of force field.
Definition: NvFlexExt.h:725
+
int * indices
Receives a pointer to the array of triangle index data.
Definition: NvFlexExt.h:585
+
float * normals
Receives a pointer to an array of triangle normal data stored with 16 byte stride, i.e.: [nx, ny, nz].
Definition: NvFlexExt.h:586
+ +
NV_FLEX_API void NvFlexExtTearClothMesh(NvFlexExtAsset *asset, float maxStrain, int maxSplits, NvFlexExtTearingParticleClone *particleCopies, int *numParticleCopies, int maxCopies, NvFlexExtTearingMeshEdit *triangleEdits, int *numTriangleEdits, int maxEdits)
+
float acceleration[3]
Definition: NvFlexExt.h:238
+
Apply field value as a force.
Definition: NvFlexExt.h:711
+
float inflatableStiffness
How stiff the inflatable is.
Definition: NvFlexExt.h:339
+
struct NvFlexLibrary NvFlexLibrary
Definition: NvFlex.h:52
+
int triIndex
Definition: NvFlexExt.h:443
+
float * normals
Receives a pointer to the particle normal data with 16 byte stride in format [nx, ny...
Definition: NvFlexExt.h:568
+
NV_FLEX_API NvFlexExtTriangleData NvFlexExtMapTriangleData(NvFlexExtContainer *container)
+
int destIndex
Definition: NvFlexExt.h:431
+
float mStrength
Strength of the force field.
Definition: NvFlexExt.h:727
+
float position[3]
Definition: NvFlexExt.h:232
+
void resize(int newCount)
Definition: NvFlexExt.h:200
+
Definition: NvFlexExt.h:310
+
NV_FLEX_API void NvFlexExtPushToDevice(NvFlexExtContainer *container)
+
struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback
Definition: NvFlexExt.h:736
+
int count
Definition: NvFlexExt.h:74
+
NvFlexExtForceMode
Definition: NvFlexExt.h:708
+
float * shapeCoefficients
The stiffness coefficient for each shape.
Definition: NvFlexExt.h:327
+
void map(int flags=eNvFlexMapWait)
Definition: NvFlexExt.h:99
+
Apply field value as a velocity change.
Definition: NvFlexExt.h:717
+
NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateTearingClothFromMesh(const float *particles, int numParticles, int maxParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float pressure)
+
Definition: NvFlexExt.h:601
+
NV_FLEX_API void NvFlexExtMovingFrameInit(NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation)
+
float inflatablePressure
How much over the rest volume the inflatable should attempt to maintain.
Definition: NvFlexExt.h:338
+
const float * upper
Receive a pointer to the particle upper bounds [x, y, z].
Definition: NvFlexExt.h:571
+
NV_FLEX_API NvFlexBuffer * NvFlexAllocBuffer(NvFlexLibrary *lib, int elementCount, int elementByteStride, NvFlexBufferType type)
+
int inflatableIndex
Index in the container's inflatables array.
Definition: NvFlexExt.h:352
+
NvFlexVector(NvFlexLibrary *l, int size=0)
Definition: NvFlexExt.h:47
+
NV_FLEX_API void NvFlexExtFreeParticles(NvFlexExtContainer *container, int n, const int *indices)
+
int * shapeIndices
The indices of the shape matching constraints.
Definition: NvFlexExt.h:324
+
NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices(const float *vertices, int numVertices, int *uniqueVerts, int *originalToUniqueMap, float threshold)
+
NV_FLEX_API NvFlexExtParticleData NvFlexExtMapParticleData(NvFlexExtContainer *container)
+
void assign(const T *srcPtr, int newCount)
Definition: NvFlexExt.h:145
+
const NvFlexExtAsset * asset
Source asset used to create this instance.
Definition: NvFlexExt.h:357
+
T * mappedPtr
Definition: NvFlexExt.h:73
+
float delta[4][4]
Definition: NvFlexExt.h:241
+
const float * lower
Receive a pointer to the particle lower bounds [x, y, z].
Definition: NvFlexExt.h:570
+
int triangleIndex
Index in the container's triangle array.
Definition: NvFlexExt.h:350
+
Definition: NvFlexExt.h:583
+
NvFlexExtForceMode mMode
Mode of field application.
Definition: NvFlexExt.h:728
+
NV_FLEX_API int NvFlexExtAllocParticles(NvFlexExtContainer *container, int n, int *indices)
+
int * phases
Receives a pointer to the particle phase data.
Definition: NvFlexExt.h:567
+
NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer *buf)
+
int numShapes
The number of shape matching constraints.
Definition: NvFlexExt.h:329
+
NV_FLEX_API void NvFlexExtUnmapTriangleData(NvFlexExtContainer *container)
+
void copyto(T *dest, int count)
Definition: NvFlexExt.h:154
+
NV_FLEX_API void NvFlexExtDestroyAsset(NvFlexExtAsset *asset)
+
int srcIndex
Definition: NvFlexExt.h:430
+
float * shapeTranslations
Shape matching group translations (vec3s)
Definition: NvFlexExt.h:354
+
float velocity[3]
Definition: NvFlexExt.h:235
+
Definition: NvFlexExt.h:428
+
NvFlexBuffer * buffer
Definition: NvFlexExt.h:71
+
float * velocities
Receives a pointer to the particle velocity data.
Definition: NvFlexExt.h:566
+
const T & back() const
Definition: NvFlexExt.h:165
+
NV_FLEX_API NvFlexExtForceFieldCallback * NvFlexExtCreateForceFieldCallback(NvFlexSolver *solver)
+
bool inflatable
Whether an inflatable constraint should be added.
Definition: NvFlexExt.h:336
+
int numSprings
Number of springs.
Definition: NvFlexExt.h:321
+
NV_FLEX_API void NvFlexExtNotifyAssetChanged(NvFlexExtContainer *container, const NvFlexExtAsset *asset)
+
+ + + + diff --git a/doc/_static/api/arrowdown.png b/doc/_static/api/arrowdown.png new file mode 100644 index 0000000..8257668 Binary files /dev/null and b/doc/_static/api/arrowdown.png differ diff --git a/doc/_static/api/arrowright.png b/doc/_static/api/arrowright.png new file mode 100644 index 0000000..4f2b45f Binary files /dev/null and b/doc/_static/api/arrowright.png differ diff --git a/doc/_static/api/bc_s.png b/doc/_static/api/bc_s.png new file mode 100644 index 0000000..7049183 Binary files /dev/null and b/doc/_static/api/bc_s.png differ diff --git a/doc/_static/api/bdwn.png b/doc/_static/api/bdwn.png new file mode 100644 index 0000000..ab6f2ab Binary files /dev/null and b/doc/_static/api/bdwn.png differ diff --git a/doc/_static/api/closed.png b/doc/_static/api/closed.png new file mode 100644 index 0000000..21f1c91 Binary files /dev/null and b/doc/_static/api/closed.png differ diff --git a/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html b/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html new file mode 100644 index 0000000..e2f9475 --- /dev/null +++ b/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html @@ -0,0 +1,60 @@ + + + + + + +FLEX: include Directory Reference + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + + +
+
+
+
include Directory Reference
+
+
+ + + + + + + + +

+Files

file  NvFlex.h [code]
 
file  NvFlexDevice.h [code]
 
file  NvFlexExt.h [code]
 
+
+ + + + diff --git a/doc/_static/api/doc.png b/doc/_static/api/doc.png new file mode 100644 index 0000000..7a7dcb7 Binary files /dev/null and b/doc/_static/api/doc.png differ diff --git a/doc/_static/api/doxygen.css b/doc/_static/api/doxygen.css new file mode 100644 index 0000000..b8ee746 --- /dev/null +++ b/doc/_static/api/doxygen.css @@ -0,0 +1,1449 @@ +/* The standard CSS for doxygen 1.8.9.1 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #A3BA98; + color: #526947; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #F0F3EE; + border: 1px solid #B9CAB0; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #5E7851; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #6D8B5D; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #B3C6AA; + color: #ffffff; + border: 1px double #A2B997; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #FCFDFC; + border: 1px solid #D2DDCD; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #F0F3EE; + font-weight: bold; + border: 1px solid #D2DDCD; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #F0F3EE; + border: 1px solid #D2DDCD; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #F2F5F0; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F9FAF8; + border-left: 2px solid #B3C6AA; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #B9CAB0; +} + +th.dirtab { + background: #F0F3EE; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #729262; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #FAFBFA; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #6D8B5D; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #6D8B5D; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #F0F3EE; + border: 1px solid #B9CAB0; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #BCCDB4; + border-left: 1px solid #BCCDB4; + border-right: 1px solid #BCCDB4; + padding: 6px 0px 6px 0px; + color: #394931; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E9EEE6; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #BCCDB4; + border-left: 1px solid #BCCDB4; + border-right: 1px solid #BCCDB4; + padding: 6px 10px 2px 10px; + background-color: #FCFDFC; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #93AD86; + border-top:1px solid #7B9C6B; + border-left:1px solid #7B9C6B; + border-right:1px solid #D2DDCD; + border-bottom:1px solid #D2DDCD; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #B3C6AA; + border-bottom: 1px solid #B3C6AA; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F9FAF8; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #5E7851; +} + +.arrow { + color: #B3C6AA; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #93AD86; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #415438; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #45593C; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #556D49; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #BCCDB4; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #BCCDB4; + border-bottom: 1px solid #BCCDB4; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #BCCDB4; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E9EEE6; + font-size: 90%; + color: #394931; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #BCCDB4; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#A5BB9A; + border:solid 1px #D0DCCB; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#536B48; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #3E5035; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#8BA87D; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#536B48; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #FAFBFA; + margin: 0px; + border-bottom: 1px solid #D2DDCD; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #7B9C6B; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #AABFA0; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#4E6443; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F7F9F6; + border: 1px solid #E1E8DE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #6D8B5D; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/doc/_static/api/doxygen.png b/doc/_static/api/doxygen.png new file mode 100644 index 0000000..51a8bd0 Binary files /dev/null and b/doc/_static/api/doxygen.png differ diff --git a/doc/_static/api/dynsections.js b/doc/_static/api/dynsections.js new file mode 100644 index 0000000..85e1836 --- /dev/null +++ b/doc/_static/api/dynsections.js @@ -0,0 +1,97 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + +FLEX: File List + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + +
+
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
+ + + + diff --git a/doc/_static/api/flex.css b/doc/_static/api/flex.css new file mode 100644 index 0000000..7a8c916 --- /dev/null +++ b/doc/_static/api/flex.css @@ -0,0 +1,67 @@ +body { + width: 800px; +} + +body, table, div, p, dl, li{ + font-size: 11pt; + line-height: 1.4; +} + +h1, h2, h3 { + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: rgb(238, 238, 238); + line-height: 1.4; +} + +a { + font-weight: normal; + text-decoration: none; +} + +.caption { +font-weight: bold; +margin-bottom: 2em; +} + +.doxtable { + width: 80%; + table-layout: fixed; +} + + +#projectlogo img { + width: 250px; +} + + +.fieldname { + font-weight: bold; + background-color: rgb(240, 240, 240); +} + +.fieldtype { + background-color: rgb(230, 230, 230); +} + +.fielddoc { + background-color: rgb(250, 250, 250); +} + + +li { + margin-bottom: 9pt; +} + +.level1, .level2, .level3, .level4 { + margin-bottom: 0pt; +} + + +div.line { + font-family: courier, fixed; +} + +div.image img { + width:100%; +} \ No newline at end of file diff --git a/doc/_static/api/folderclosed.png b/doc/_static/api/folderclosed.png new file mode 100644 index 0000000..bf1b273 Binary files /dev/null and b/doc/_static/api/folderclosed.png differ diff --git a/doc/_static/api/folderopen.png b/doc/_static/api/folderopen.png new file mode 100644 index 0000000..fcd679e Binary files /dev/null and b/doc/_static/api/folderopen.png differ diff --git a/doc/_static/api/globals.html b/doc/_static/api/globals.html new file mode 100644 index 0000000..42e1ec0 --- /dev/null +++ b/doc/_static/api/globals.html @@ -0,0 +1,530 @@ + + + + + + +FLEX: Globals + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + +
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- e -

+ + +

- n -

+
+ + + + diff --git a/doc/_static/api/globals_enum.html b/doc/_static/api/globals_enum.html new file mode 100644 index 0000000..c693fe9 --- /dev/null +++ b/doc/_static/api/globals_enum.html @@ -0,0 +1,74 @@ + + + + + + +FLEX: Globals + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + +
+
+
+ + + + diff --git a/doc/_static/api/globals_eval.html b/doc/_static/api/globals_eval.html new file mode 100644 index 0000000..465a0cb --- /dev/null +++ b/doc/_static/api/globals_eval.html @@ -0,0 +1,160 @@ + + + + + + +FLEX: Globals + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + +
+
+  + +

- e -

+
+ + + + diff --git a/doc/_static/api/globals_func.html b/doc/_static/api/globals_func.html new file mode 100644 index 0000000..2766e2e --- /dev/null +++ b/doc/_static/api/globals_func.html @@ -0,0 +1,355 @@ + + + + + + +FLEX: Globals + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + +
+
+  + +

- n -

+
+ + + + diff --git a/doc/_static/api/globals_type.html b/doc/_static/api/globals_type.html new file mode 100644 index 0000000..3ba1e90 --- /dev/null +++ b/doc/_static/api/globals_type.html @@ -0,0 +1,71 @@ + + + + + + +FLEX: Globals + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + +
+
+
+ + + + diff --git a/doc/_static/api/index.html b/doc/_static/api/index.html new file mode 100644 index 0000000..3130b0d --- /dev/null +++ b/doc/_static/api/index.html @@ -0,0 +1,51 @@ + + + + + + +FLEX: Main Page + + + + + + + +
+
+ + + + + + + +
+
FLEX +  1.1.0 +
+
+
+ + +
+
+
+
FLEX Documentation
+
+ + + + + diff --git a/doc/_static/api/jquery.js b/doc/_static/api/jquery.js new file mode 100644 index 0000000..1f4d0b4 --- /dev/null +++ b/doc/_static/api/jquery.js @@ -0,0 +1,68 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('