﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3ASource%2FModeling%2FAbstractMeshHeader</id>
	<title>Dev:Source/Modeling/AbstractMeshHeader - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3ASource%2FModeling%2FAbstractMeshHeader"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/AbstractMeshHeader&amp;action=history"/>
	<updated>2026-05-14T07:53:17Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/AbstractMeshHeader&amp;diff=58142&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/AbstractMeshHeader&amp;diff=58142&amp;oldid=prev"/>
		<updated>2018-06-28T17:53:41Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 17:53時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/AbstractMeshHeader&amp;diff=58141&amp;oldid=prev</id>
		<title>2010年4月3日 (土) 12:19にwiki&gt;Terrywallworkによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/AbstractMeshHeader&amp;diff=58141&amp;oldid=prev"/>
		<updated>2010-04-03T12:19:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This system is create an abstract API to access different mesh structures. It's &lt;br /&gt;
split into three parts: modeling, querying, and drawing.  Each part is in its own &lt;br /&gt;
struct, and all three structs are included in the final AbstractMesh structure.&lt;br /&gt;
&lt;br /&gt;
The mesh backends themselves are required to store all basic data (e.g. vertex &lt;br /&gt;
coordinates, vertex/face normals, flags, etc) as customdata layers.  The &lt;br /&gt;
customdata API will be refactored a little.  It'll be a little more flexible &lt;br /&gt;
where modifiers and tools are concerned, so that tools can, for example, add new &lt;br /&gt;
flags to verts/edges/faces (thus preventing all the hacked code we have for &lt;br /&gt;
edgesplit and bevel).&lt;br /&gt;
&lt;br /&gt;
Per-face-vertex data will be presented to users of AbstractMesh as a new Loop &lt;br /&gt;
element type.  This will be presented as a geometric element type, however &lt;br /&gt;
back-ends may or may not actually use loops in their own behind-the-scenes &lt;br /&gt;
implementations.&lt;br /&gt;
&lt;br /&gt;
Each vert/edge/face will will be referenced by a backend-specific intptr_t, an &lt;br /&gt;
integer that can store a pointer as well.  These integers can be used to retrieve &lt;br /&gt;
Abstract***Iterator wrappers. These iterator wrappers contain utility pointers to &lt;br /&gt;
various customdata (such as vertex location, vertex normal, etc).  There will also &lt;br /&gt;
be an interface to access the raw customdata layers using these intptr_ts.&lt;br /&gt;
&lt;br /&gt;
Each backend will have a bitmask specifying which of various optional interfaces &lt;br /&gt;
it supports, such as an adjacency querying interface.  YOU SHOULD ALWAYS CHECK&lt;br /&gt;
THIS BITMASK!!&lt;br /&gt;
&lt;br /&gt;
Using this system, it should be possible to write a single function that will &lt;br /&gt;
convert from one back-end to another.  Such conversions should only happen as &lt;br /&gt;
absolutely necassary, such as for tools that require bmesh.&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
struct AbstractVertIterator;&lt;br /&gt;
struct AbstractEdgeIterator;&lt;br /&gt;
struct AbstractLoopIterator;&lt;br /&gt;
struct AbstractFaceIterator;&lt;br /&gt;
&lt;br /&gt;
typedef struct AbstractDrawer {&lt;br /&gt;
	/**/&lt;br /&gt;
	void (*drawFaces)(void *self, int layermask);&lt;br /&gt;
	void (*drawEdges)(void *self);&lt;br /&gt;
&lt;br /&gt;
	/*this is for e.g. halo mode material*/&lt;br /&gt;
	void (*drawPoints)(void *self);&lt;br /&gt;
&lt;br /&gt;
	/*callback for mesh selection drawing in editmode,&lt;br /&gt;
	  should base indices off of ORIGINDEX layer if&lt;br /&gt;
	  it exists (e.g. we're not operating on the original&lt;br /&gt;
	   mesh data, we're in modifier mode).*/&lt;br /&gt;
	void (*drawBackbufferSelect)(void *self);&lt;br /&gt;
	&lt;br /&gt;
	/*these are the actual editmesh drawing functions.*/&lt;br /&gt;
	void (*drawMappedTranspFaces)(void *self);&lt;br /&gt;
	void (*drawMappedFaceDots)(void *self);&lt;br /&gt;
	void (*drawMappedEdges)(void *self, int do_interp);&lt;br /&gt;
	void (*drawMappedVerts)(void *self);&lt;br /&gt;
} AbstractDrawer;&lt;br /&gt;
&lt;br /&gt;
/*AbstractDrawer-&amp;gt;drawFaces layermask argument*/&lt;br /&gt;
#define ADL_SHADED	1&lt;br /&gt;
#define ADL_TEXTURE	2&lt;br /&gt;
#define ADL_GLLIGHT	4&lt;br /&gt;
#define ADL_VCOL	8&lt;br /&gt;
/*for weight paint drawing, I suppose, not sure how this should work*/&lt;br /&gt;
#define ADL_WCOL	16&lt;br /&gt;
&lt;br /&gt;
/*Each of these operations work on&lt;br /&gt;
  &amp;quot;tagged&amp;quot; elements, tagged via&lt;br /&gt;
  the tagging functions, which&lt;br /&gt;
  live here and not in the query&lt;br /&gt;
  interface.*/&lt;br /&gt;
typedef struct AbstractModeler {&lt;br /&gt;
	/*ensure we have adjacency info.*/&lt;br /&gt;
	void (*ensureAdjacencyInfo)(void *self);.&lt;br /&gt;
&lt;br /&gt;
	/*strips adjacency info.  should always return&lt;br /&gt;
	  success, even on back-ends without adjacency&lt;br /&gt;
	  information.*/&lt;br /&gt;
	void (*stripAdjacencyInfo)(void *self);&lt;br /&gt;
	&lt;br /&gt;
	/* Preparation callback called before performing&lt;br /&gt;
	   any modeling operation.  Don't forget to call&lt;br /&gt;
	   endModeling afterwords.&lt;br /&gt;
	&lt;br /&gt;
	  * ensure_adj: passing a nonzero value to ensure_adj&lt;br /&gt;
	    will have beginModeling call ensureAdjacencyInfo.&lt;br /&gt;
	*/&lt;br /&gt;
	void (*beginModeling)(void *self, int ensure_adj);&lt;br /&gt;
&lt;br /&gt;
	/* Callback called when an operation has finished.*/&lt;br /&gt;
	void (*endModeling)(void *self, int strip_adj);&lt;br /&gt;
&lt;br /&gt;
	/* Tagging functions to tag verts/edges/faces for various&lt;br /&gt;
	   operations.*/&lt;br /&gt;
	void (*resetTagging)(void *self, int doverts, int doedges, int dofaces);&lt;br /&gt;
&lt;br /&gt;
	/*state is the tag value, can be either 0 or 1.  0 clears the&lt;br /&gt;
	  tag state, while 1 sets it.*/&lt;br /&gt;
	void (*tagVert)(void *self, intptr_t vert, int state);&lt;br /&gt;
	void (*tagEdge)(void *self, intptr_t edge, int state);&lt;br /&gt;
	void (*tagFace)(void *self, intptr_t face, int state);&lt;br /&gt;
	&lt;br /&gt;
	/*this duplicates all tagged elements, preserving&lt;br /&gt;
	  the tags on the copied elements but removing them&lt;br /&gt;
	  from the source elements.*/&lt;br /&gt;
	void (*duplicateTaggedElements)(void *self);&lt;br /&gt;
	void (*findDoubles)(void *self, float limit, &lt;br /&gt;
                                intptr_t **source_target_pais, int **totvert);&lt;br /&gt;
	void (*weld)(void *self, intptr_t *source_target_pairs, int totvert);&lt;br /&gt;
	/*simple (non-winged) edge extrude*/&lt;br /&gt;
	void (*extrudeEdges)(void *self);&lt;br /&gt;
	void (*extrudeFaceRegions)(void *self);	&lt;br /&gt;
	void (*extrudeFaces)(void *self)&lt;br /&gt;
	&lt;br /&gt;
	/*each of these returns an intptr_t identifyer to the new element.&lt;br /&gt;
	  NOTE: you cannot directly create or destroy loops.*/&lt;br /&gt;
	intptr_t (*makeVert)(void *self, intptr_t *returnvert, float *co, float *no, short flags,&lt;br /&gt;
                              intptr_t data_to_copy);&lt;br /&gt;
	intptr_t (*makeEdge)(void *self, intptr_t *retedge, intptr_t v1, intptr_t v2, &lt;br /&gt;
                              intptr_t data_to_copy);&lt;br /&gt;
	intptr_t (*makeFace)(void *self, intptr_t *retface, intptr_t *verts, int len, &lt;br /&gt;
                              intptr_t data_to_copy);&lt;br /&gt;
	&lt;br /&gt;
	/*deletes tagged verts/edges/faces*/&lt;br /&gt;
	void (*deleteVert)(void *self, intptr_t vert);&lt;br /&gt;
	void (*deleteEdge)(void *self, intptr_t edge);&lt;br /&gt;
	&lt;br /&gt;
	/*will delete associated per-face data.*/&lt;br /&gt;
	void (*deleteFace)(void *self, intptr_t face);&lt;br /&gt;
	&lt;br /&gt;
	void (*recalcNormals)(void *self);&lt;br /&gt;
} DerivedModeler;&lt;br /&gt;
&lt;br /&gt;
/*all vert/edge/loop/face data is queried via this &amp;quot;iterator&amp;quot; system.&lt;br /&gt;
  Each iterator stores all the needed data for an element type.  These iterators&lt;br /&gt;
  can be used as generic containers for vert/edge/loop/face data.  Allocation&lt;br /&gt;
  of them can be handled by preallocating a limited number of them in a pool,&lt;br /&gt;
  sortof similar to a basic program stack.&lt;br /&gt;
  &lt;br /&gt;
  Note that many of these &amp;quot;iterators&amp;quot; contain convienence pointers to the active&lt;br /&gt;
  layers of custom data, such as UV texture information, vertex locations, etc.&lt;br /&gt;
  Such pointers always point to the data in the *active* custom data layer of&lt;br /&gt;
  its type.  If you want data from other layers, used the customdata query&lt;br /&gt;
  API.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
typedef struct AbstractIterator {&lt;br /&gt;
	/*backend-specific id, can be an index, a pointer,&lt;br /&gt;
	  etc.  It is *not* an Element ID.*/&lt;br /&gt;
	intptr_t id;&lt;br /&gt;
&lt;br /&gt;
	/*flag set when iteration ends*/&lt;br /&gt;
	int at_end;&lt;br /&gt;
	&lt;br /&gt;
	/*set when an element is tagged, note that this&lt;br /&gt;
	  is essentially read-only, to set the tag state&lt;br /&gt;
	  use the tagging functions.*/&lt;br /&gt;
	int is_tagged;&lt;br /&gt;
	Itervoid error;&lt;br /&gt;
&lt;br /&gt;
	/*release this iterator*/&lt;br /&gt;
	void (*release)(void *mesh, void *self);&lt;br /&gt;
&lt;br /&gt;
	/*replaces the data in this iterator with the next element in the&lt;br /&gt;
	  stream.*/&lt;br /&gt;
	void (*next)(void *mesh, void *self);&lt;br /&gt;
} AbstractIterator ;&lt;br /&gt;
&lt;br /&gt;
/*accesses vert information.  Note that next may simply modify self&lt;br /&gt;
  and return it.*/&lt;br /&gt;
typedef struct AbstractVertIterator {&lt;br /&gt;
	AbstractWrapper main;&lt;br /&gt;
		&lt;br /&gt;
	/*note that these are convienence pointers, all this data is&lt;br /&gt;
	  stored as customdata.*/&lt;br /&gt;
	float *co, *no;&lt;br /&gt;
	MDeformVert *dvert;&lt;br /&gt;
	&lt;br /&gt;
	/*returns an iterator capable of iterating over the edges&lt;br /&gt;
	  around a vert.*/&lt;br /&gt;
	AbstractEdgeIterator *(*getEdge)(void *mesh, void *self);&lt;br /&gt;
} AbstractVertIterator;&lt;br /&gt;
&lt;br /&gt;
typedef struct AbstractEdgeIterator {&lt;br /&gt;
	AbstractWrapper main;&lt;br /&gt;
		&lt;br /&gt;
	/*remember, crease is a customdata layer just like&lt;br /&gt;
	  everything else.*/&lt;br /&gt;
	float *crease;&lt;br /&gt;
	&lt;br /&gt;
	/*flags is also a customdata layer.*/&lt;br /&gt;
	AbstractFlags *flags;&lt;br /&gt;
	&lt;br /&gt;
	/*these could be replaced by indices/element IDs (whichever ones&lt;br /&gt;
	  we decide to use).*/&lt;br /&gt;
	AbstractVertIterator *(*getV1)(void *mesh, void *self);&lt;br /&gt;
	AbstractVertIterator *(*getV2)(void *mesh, void *self);&lt;br /&gt;
	&lt;br /&gt;
	/*adjacency stuff, you should always check to make sure the&lt;br /&gt;
	  abstractmesh supports this.*/&lt;br /&gt;
	AbstractVertIterator *(*nextRadialAroundV1)(void *mesh, void *self);&lt;br /&gt;
	AbstractVertIterator *(*nextRadialAroundV2)(void *mesh, void *self);&lt;br /&gt;
	AbstractVertIterator *(*firstFaceAroundEdge)(void *mesh, void *self);&lt;br /&gt;
} AbstractEdgeIterator;&lt;br /&gt;
&lt;br /&gt;
/*accesses loops.  Note that next may modify self and return it.*/&lt;br /&gt;
typedef struct AbstractLoopIterator {&lt;br /&gt;
	AbstractWrapper main;&lt;br /&gt;
	&lt;br /&gt;
	/*active UV col*/&lt;br /&gt;
	float (*uv)[2], (*col)[2];&lt;br /&gt;
&lt;br /&gt;
	/*adjacency stuff, you should always check to make sure the&lt;br /&gt;
	  abstractmesh supports this.*/&lt;br /&gt;
	AbstractFaceIterator *(*getFace)(void *mesh, void *self);&lt;br /&gt;
	AbstractVertIterator *(*getVert)(void *mesh, void *self);&lt;br /&gt;
	AbstractEdgeIterator *(*getEdge)(void *mesh, void *self);&lt;br /&gt;
} AbstractLoopIterator;&lt;br /&gt;
&lt;br /&gt;
typedef struct AbstractFaceIterator {&lt;br /&gt;
	void *data, *next, *customdata;&lt;br /&gt;
	/*backend-specific id, can be an index, a pointer,&lt;br /&gt;
	  etc.  it is *not* an Element ID.*/&lt;br /&gt;
	intptr_t id;&lt;br /&gt;
	&lt;br /&gt;
	AbstractVertIterator verts;&lt;br /&gt;
	AbstractEdgeIterator edges;&lt;br /&gt;
	AbstractLoopIterator loops;&lt;br /&gt;
	&lt;br /&gt;
	float *normal;&lt;br /&gt;
	int *mat;&lt;br /&gt;
} AbstractVertIterator;&lt;br /&gt;
&lt;br /&gt;
typedef struct AbstractQuery {&lt;br /&gt;
	int (*hasAdjacencyInfo)(void *self);&lt;br /&gt;
&lt;br /&gt;
	AbstractFaceIterator *(*iterFaces)(void *self);&lt;br /&gt;
	AbstractEdgeIterator *(*iterEdges)(void *self);&lt;br /&gt;
	AbstractVertIterator *(*iterVerts)(void *self);&lt;br /&gt;
	&lt;br /&gt;
	/*backbuffer select will need these.  They shouldn't be used&lt;br /&gt;
	  by anything else.  The begin/endSelectPicking functions are so&lt;br /&gt;
      the back-end can prepare various optimizations, if needed,&lt;br /&gt;
      before having to process a lot of picking index lookups.&lt;br /&gt;
      They are optional, and shouldn't be use if simply picking&lt;br /&gt;
      a few elements (like during normal rightmouse select). */&lt;br /&gt;
	void (*beginSelectPicking)(void *self, int doverts, int doedges, int dofaces);&lt;br /&gt;
	AbstractVertIterator *(*getVertAtIndex)(void *self, int index);&lt;br /&gt;
	AbstractEdgeIterator *(*getEdgeAtIndex)(void *self, int index);&lt;br /&gt;
	AbstractFaceIterator *(*getFaceAtIndex)(void *self, int index);&lt;br /&gt;
	void (*endSelectPicking)(void *self);&lt;br /&gt;
	&lt;br /&gt;
	/*get vert/edge/loop/face descriptive iterator from a backend-specfic&lt;br /&gt;
	  intptr_t value.*/&lt;br /&gt;
	AbstractVertIterator *(*getVert)(void *self, intptr_t ref);&lt;br /&gt;
	AbstractEdgeIterator *(*getEdge)(void *self, intptr_t ref);&lt;br /&gt;
	AbstractLoopIterator *(*getLoop)(void *self, intptr_t ref);&lt;br /&gt;
	AbstractFaceIterator *(*getFace)(void *self, intptr_t ref);&lt;br /&gt;
} AbstractQuery;&lt;br /&gt;
&lt;br /&gt;
typedef struct AbstractMeshType {&lt;br /&gt;
	AbstractDrawer *drawer;&lt;br /&gt;
	AbstractModeler *model;&lt;br /&gt;
	AbstractQuery *query;&lt;br /&gt;
	&lt;br /&gt;
	/*should free all related data.*/&lt;br /&gt;
	void (*release)(void *self);&lt;br /&gt;
	void *(*newMesh);&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	/*-------internal customdata stuff-------*/&lt;br /&gt;
&lt;br /&gt;
	/*adds a new layer of type type.  If name is passed as NULL, then the default name is used.&lt;br /&gt;
	  automatically allocates layer to the proper size, by testing which data (vertData, faceData,&lt;br /&gt;
	  etc) was passed in.*/&lt;br /&gt;
	void (*customdata_add_layer(void *self, CustomData *data, int type, char *name);&lt;br /&gt;
	void (*customdata_rem_layer)(CustomData *data, int type, int sublayer, int can_free, int free_all);&lt;br /&gt;
	void (*customdata_set_active_layer_index)(CustomData *data, int type, int sublayer, int set_render);&lt;br /&gt;
	void (*customdata_set_active_layer)(CustomData *data, int type, CustomDataLayer *sublayer, int set_render);&lt;br /&gt;
&lt;br /&gt;
	void (*customdata_copy_data)(CustomData *source, &lt;br /&gt;
               CustomData *dest, intptr_t src_index, intptr_t dst_index);&lt;br /&gt;
               &lt;br /&gt;
	void (*customdata_merge_data)(CustomData *source, &lt;br /&gt;
               CustomData *dest, intptr_t src_index, intptr_t dst_index);&lt;br /&gt;
	&lt;br /&gt;
    /*These next two get specific customdata from elements.  The first one will return&lt;br /&gt;
      data from the currently active layer, while the second allows choosing which sublayer&lt;br /&gt;
      to use.*/&lt;br /&gt;
	void *(*customdata_get_active_data)(intptr_t data, int type);	&lt;br /&gt;
	void *(*customdata_get_data_at_index)(intptr_t data, int type, int sublayer);&lt;br /&gt;
	&lt;br /&gt;
	void (*customdata_interp)(CustomData *data, intptr_t *src_refs, float *weights,&lt;br /&gt;
							  int count, intptr_t dest_block);&lt;br /&gt;
&lt;br /&gt;
} AbstractMeshType;&lt;br /&gt;
&lt;br /&gt;
typedef struct AbstractMesh {&lt;br /&gt;
	AbstractMeshType *type;&lt;br /&gt;
	&lt;br /&gt;
	/*masks of all the custom data layers&lt;br /&gt;
	  currently stored in this mesh.*/&lt;br /&gt;
	int CD_VertDataMask;&lt;br /&gt;
	int CD_EdgeDataMask;&lt;br /&gt;
	int CD_LoopDataMask;&lt;br /&gt;
	int CD_FaceDataMask;&lt;br /&gt;
&lt;br /&gt;
	int IM_InterfaceMask;&lt;br /&gt;
} AbstractMesh;&lt;br /&gt;
&lt;br /&gt;
/*modeling ops flags*/&lt;br /&gt;
#define IM_WELD		                    (1&amp;lt;&amp;lt;0)&lt;br /&gt;
#define IM_EXTRUDEFACES                 (1&amp;lt;&amp;lt;1)&lt;br /&gt;
#define IM_EXTRUDEFACEREGION            (1&amp;lt;&amp;lt;2)&lt;br /&gt;
#define IM_EXTRUDEEDGES	          		(1&amp;lt;&amp;lt;3)&lt;br /&gt;
#define IM_EXTRUDEVERTS	          		(1&amp;lt;&amp;lt;4)&lt;br /&gt;
#define IM_RECALCNORMALS                (1&amp;lt;&amp;lt;5)&lt;br /&gt;
&lt;br /&gt;
/*adjacency info query flags*/&lt;br /&gt;
#define IM_EDGES_AROUND_VERT            (1&amp;lt;&amp;lt;6)&lt;br /&gt;
#define IM_FACES_AROUND_EDGE            (1&amp;lt;&amp;lt;7)&lt;br /&gt;
&lt;br /&gt;
/*the value denoting a null element*/&lt;br /&gt;
#define NULLELEMENT	-1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Terrywallwork</name></author>
		
	</entry>
</feed>