[Bf-blender-cvs] [a5a6bd1] particles_refactor: Added a comment in DNA about the concept of state/descriptor separation and possible future optimization.

Lukas Tönne noreply at git.blender.org
Tue Apr 22 12:05:47 CEST 2014


Commit: a5a6bd1c0004e5db461964b4809703a8ce3764ef
Author: Lukas Tönne
Date:   Mon Dec 16 10:39:37 2013 +0100
https://developer.blender.org/rBa5a6bd1c0004e5db461964b4809703a8ce3764ef

Added a comment in DNA about the concept of state/descriptor separation
and possible future optimization.

===================================================================

M	source/blender/makesdna/DNA_nparticle_types.h

===================================================================

diff --git a/source/blender/makesdna/DNA_nparticle_types.h b/source/blender/makesdna/DNA_nparticle_types.h
index 8b8a7da..6046eb3 100644
--- a/source/blender/makesdna/DNA_nparticle_types.h
+++ b/source/blender/makesdna/DNA_nparticle_types.h
@@ -63,6 +63,15 @@ typedef struct NParticleAttribute {
 } NParticleAttribute;
 
 typedef struct NParticleSystem {
+	/* XXX attribute access and state separation:
+	 * This needs some more thought. Ideally the state data should be separate
+	 * from the attributes linked list in psys, as a single "state" pointer.
+	 * Then the attribute states should be accessible via hash table, so that
+	 * attribute lookup in the particle state by name becomes O(1).
+	 * Attribute states probably need to store a copy of the descriptor then,
+	 * so that information is directly available for accessors without having
+	 * to resort to the linked (slow) psys list.
+	 */
 	ListBase attributes;				/* definition of available attributes */
 	struct NParticleAttribute *attribute_id;
 } NParticleSystem;




More information about the Bf-blender-cvs mailing list