Blender Git Loki
Git Commits -> Revision dcacbc2
Revision dcacbc2 by Nicholas Bishop (master) May 10, 2012, 20:32 (GMT) |
Modify CCGSubsurf to subdivide an arbitrary number of (float) layers. The layout of vert data in CCGSubSurf is almost the same; previously it was three floats (for xyz coordinate) optionally followed by three floats for the normal. The only change is that the first three floats can now be any number of floats. * _getSubSurf takes a numLayers parameter to set the number of layers, stored in CCGMeshIFC.numLayers. * All calls to _getSubSurf currently have numLayers set to 3, except for UV subsurf, where it is reduced to 2 (with a corresponding change when reading the results out to use float (*)[2] rather than float (*)[3].) * The various VertData* macros in CCGSubSurf.c are now functions that take a CCGSubSurf pointer, which provides access to CCGMeshIFC, which has numLayers. * Add ccgSubSurf_setNumLayers() to the API. Only changes the number of layers that get subdivided, doesn't change the amount of memory allocated. So if space for N layers is allocated, it's safe to set the number of layers to less than N, but not more. * The rest of the changes are just adding the 'ss' parameter. |
Commit Details:
Full Hash: dcacbc25bc0fb850b56673f7f167aa623d1e2fb5
SVN Revision: 46513
Parent Commit: 147b4b1
Lines Changed: +299, -240