Lines references not removing

2 messages Options
Embed this post
Permalink
David Di Biase

Lines references not removing

Reply Threaded More More options
Print post
Permalink
Hi there,

I have a network of lines that I'm constructing (about 50-100) in one Lines3D container. Here's my code:

var lines:Lines3D = new Lines3D(relateMaterial);
for (var relationId in list[id].relations) {
    var nodeId = list[id].relations[relationId][1];
    lines.addNewLine(1, list[id].coords[0],
                                      list[id].coords[1],
                                      list[id].coords[2] - 40,
                                      list[nodeId].coords[0],
                                      list[nodeId].coords[1],
                                      list[nodeId].coords[2] - 40);
}

lvlData.graphs[level].linesReference

When I attempt removing the lines with the following:

for (var i in lvlData.graphs[level].linesReference.lines) {
    lvlData.graphs[level].linesReference.removeLine(lvlData.graphs[level].linesReference.lines[i]);
}
view.scene.removeChild(lvlData.graphs[level].linesReference);

Not sure what I might be doing wrong.

Dave

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
David Di Biase

Re: Lines references not removing

Reply Threaded More More options
Print post
Permalink
Hah, well wasn't I tired when I wrote that email. Clarification: the lines generate beautifully but when I try removing the references then the entire object from scene...the lines REMAIN.

It's very annoying. I'm pretty sure I'm using the library correctly, could this be a bug perhaps?

Dave

On Mon, Oct 19, 2009 at 9:45 AM, David Di Biase <[hidden email]> wrote:
Hi there,

I have a network of lines that I'm constructing (about 50-100) in one Lines3D container. Here's my code:

var lines:Lines3D = new Lines3D(relateMaterial);
for (var relationId in list[id].relations) {
    var nodeId = list[id].relations[relationId][1];
    lines.addNewLine(1, list[id].coords[0],
                                      list[id].coords[1],
                                      list[id].coords[2] - 40,
                                      list[nodeId].coords[0],
                                      list[nodeId].coords[1],
                                      list[nodeId].coords[2] - 40);
}

lvlData.graphs[level].linesReference

When I attempt removing the lines with the following:

for (var i in lvlData.graphs[level].linesReference.lines) {
    lvlData.graphs[level].linesReference.removeLine(lvlData.graphs[level].linesReference.lines[i]);
}
view.scene.removeChild(lvlData.graphs[level].linesReference);

Not sure what I might be doing wrong.

Dave


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org