Setting vertex attributes in Point
Posted: Fri 20. Feb 2009, 14:41
When one replaces an attribute in an instance of PointSet one can get unexpected results. Say for example, one has begun with the Attribute.NORMALS set to a DataList initialized from an instance double[20][4], and then one sets the attribute again, this time with a DataList initialized from an instance of double[20][3], then the "new" value of the Attribute.NORMALS will be a DataList corresponding to an instance of double[20][4]. That is, the reduction in vector length of the data from the original setting is not noticed. One can avoid this by setting the value of the attribute to null first, getting rid of the old DataList completely, before resetting it with the new DataList. But this is not a very satisfying solution. My problem is I have no idea how DataList internals work. Is there anyone who can say where this problem should be fixed?