It will be good to read this document with example/src/ofApp.cpp.
-
Create mesh same as ofMesh
addVertex
,addColor
,addIndex
, bla,bla,bla,,,
Don't forget to callrefreshMesh
when you finish editing mesh. -
Set skeleton data
Skeleton data is just a vector of ofNode. -
Set relationships between mesh vertices and skeleton nodes by
addWeight
You can callrefreshWeightAutomatic
instead of doing by yourself.
-
Move skeleton nodes
You can get skeleton nodes fromgetSkeleton
or keep them by yourself. -
Update mesh
Just callupdate
.
Just call getDeformedMesh
.
The return value is a normal ofMesh.
MIT Lisence.