diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-05 01:00:24 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-05 01:00:24 +0300 |
commit | 1b9d661ecaed5c51bc702e209b0a1dae7365754f (patch) | |
tree | 3108583d45ddf9b6bb293e37966344e2881cd3b4 /intern/opennl/extern | |
parent | 044ae7f82fcb8a5af774cd2a4bea392f54abf8c2 (diff) |
Mesh Deform Modifier
====================
The MeshDeform modifier can deform a mesh with another 'cage' mesh.
It is similar to a lattice modifier, but instead of being restricted
to the regular grid layout of a lattice, the cage mesh can be modeled
to fit the mesh better.
http://www.blender.org/development/current-projects/changes-since-244/modifiers/
Implementation Notes:
- OpenNL has been refactored a bit to allow least squares matrices to
be built without passing the matrix row by row, but instead with
random access. MDef doesn't need this actually, but it's using this
version of OpenNL so I'm just committing it now.
- Mean value weights for polygons have been added to arithb.c, a type
of barycentric coordinates for polygons with >= 3 vertices. This
might be useful for other parts of blender too.
Diffstat (limited to 'intern/opennl/extern')
-rw-r--r-- | intern/opennl/extern/ONL_opennl.h | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/intern/opennl/extern/ONL_opennl.h b/intern/opennl/extern/ONL_opennl.h index 7f501629290..be76aa95eac 100644 --- a/intern/opennl/extern/ONL_opennl.h +++ b/intern/opennl/extern/ONL_opennl.h @@ -79,20 +79,16 @@ typedef void* NLContext; #define NL_SYSTEM 0x0 #define NL_MATRIX 0x1 -#define NL_ROW 0x2 /* Solver Parameters */ -#define NL_SOLVER 0x100 -#define NL_NB_VARIABLES 0x101 -#define NL_LEAST_SQUARES 0x102 -#define NL_SYMMETRIC 0x106 -#define NL_ERROR 0x108 - -/* Row parameters */ - -#define NL_RIGHT_HAND_SIDE 0x500 -#define NL_ROW_SCALING 0x501 +#define NL_SOLVER 0x100 +#define NL_NB_VARIABLES 0x101 +#define NL_LEAST_SQUARES 0x102 +#define NL_SYMMETRIC 0x106 +#define NL_ERROR 0x108 +#define NL_NB_ROWS 0x110 +#define NL_NB_RIGHT_HAND_SIDES 0x112 /* 4 max */ /* Contexts */ @@ -106,9 +102,6 @@ NLContext nlGetCurrent(void); void nlSolverParameterf(NLenum pname, NLfloat param); void nlSolverParameteri(NLenum pname, NLint param); -void nlRowParameterf(NLenum pname, NLfloat param); -void nlRowParameteri(NLenum pname, NLint param); - void nlGetBooleanv(NLenum pname, NLboolean* params); void nlGetFloatv(NLenum pname, NLfloat* params); void nlGetIntergerv(NLenum pname, NLint* params); @@ -119,8 +112,8 @@ NLboolean nlIsEnabled(NLenum pname); /* Variables */ -void nlSetVariable(NLuint index, NLfloat value); -NLfloat nlGetVariable(NLuint index); +void nlSetVariable(NLuint rhsindex, NLuint index, NLfloat value); +NLfloat nlGetVariable(NLuint rhsindex, NLuint index); void nlLockVariable(NLuint index); void nlUnlockVariable(NLuint index); NLboolean nlVariableIsLocked(NLuint index); @@ -129,14 +122,16 @@ NLboolean nlVariableIsLocked(NLuint index); void nlBegin(NLenum primitive); void nlEnd(NLenum primitive); -void nlCoefficient(NLuint index, NLfloat value); -/* Setting random elements matrix/vector - not supported for - least squares! */ +/* Setting elements in matrix/vector */ void nlMatrixAdd(NLuint row, NLuint col, NLfloat value); -void nlRightHandSideAdd(NLuint index, NLfloat value); -void nlRightHandSideSet(NLuint index, NLfloat value); +void nlRightHandSideAdd(NLuint rhsindex, NLuint index, NLfloat value); +void nlRightHandSideSet(NLuint rhsindex, NLuint index, NLfloat value); + +/* Multiply */ + +void nlMatrixMultiply(NLfloat *x, NLfloat *y); /* Solve */ |