[Bf-committers] Could someone explain the Mesh structure in
Blender
Alexander Ewering
blender at instinctive.de
Wed Mar 8 12:53:29 CET 2006
On Wed, 8 Mar 2006, xiang liang wrote:
> I read codes about Mesh, I donot know what each element in Mesh struct
> means.
> can someone tell me how does blender store mesh, use what structure.
> For example. CGAL use half-edge data structure.
>
> MVert may be the vertext list, MEdge may be the edge list, but what is other
> members in structure Mesh mean.
>
> can someone explain it, or give me a link where I can find detialed
> explanation.
>
> typedef struct Mesh {
> ID id;
id: used for storage of the Mesh struct in the library
> struct BoundBox *bb;
The boundbox of the mesh (surprise!)
> ListBase effect;
A list of effects applied to the mesh (again, surprise!)
> ListBase disp;
A list of display lists, I suppose. Not sure.
> struct Ipo *ipo;
A list of IPOs, for vertex keys, etc.
> struct Key *key;
A list of vertex keys (surprise!)
> struct Material **mat;
A list of materials applied to this mesh (surprise!)
> void *mface, *dface, *tface;
tface stores UV mapping, I think together with mface, in some way. About
dface, I'm not sure. This part is pretty chaotic from what I remember.
> struct MVert *mvert;
The vertices.
> struct MEdge *medge;
The edges.
> struct MDeformVert *dvert; /* __NLA */
This stores vertex groups.
> struct MCol *mcol;
This stores vertes colors.
> struct MSticky *msticky;
Sticky coordinates.
> struct Mesh *texcomesh;
Pointer to the mesh giving texture coordinates ("TexMesh")
> float *orco;
Used for texture mapping, storing the original texture coordinates of the
undeformed mesh - or something. Not sure, check the code for the exact
meaning.
> /* not written in file, caches derived mesh */
> struct DerivedMesh *derived;
> /* hacky place to store temporary decimated mesh */
> struct DispListMesh *decimated;
>
> struct OcInfo *oc; /* not written in file */
> void *sumohandle;
sumohandle is game-engine related and stores a handle for the physics
system.
> int totvert, totedge, totface;
Self-explanatory.
> int texflag;
Should be explained further below in the file.
> float loc[3];
> float size[3];
> float rot[3];
Stores texture space transform.
> float cubemapsize, pad;
Not sure about cubemapsize.
> short smoothresh, flag;
Not sure about smoothresh, flag is explained further below.
> short subdiv, subdivr;
Should be clear, SubSurf levels for OGL/Render.
> short totcol;
Total amount of materials on the mesh.
> short subsurftype;
>
> } Mesh;
>
> --
> Liang Xiang
> Email : xlvector at gmail.com
> National Laboratory of Pattern Recognition
> Institute of Automation, Chineses Academy of Sciences
> Address: No.95 Zhongguancun East Road, Beijing, 100080, P.R.China
>
| alexander ewering instinctive mediaworks
| ae[@]instinctive[.]de http://www[.]instinctive[.]de
More information about the Bf-committers
mailing list