Hmm. If i understand correctly, you're suggesting a way to accurately mask the line segments in the screen space (2 dimensions). I need a way to mask the line in 3d-space -- the lines penetrating the faces of the cube, with this solution, would still very much be visible. I'm afraid the method of clipping the lines in 2d with a silhouette of the bounding cube would not be enough...is that what you had in mind?
On Jul 3, 5:59 pm, Li <[email protected]> wrote: > Let me throw something at you. > Its just something that comes immediately to my mind, might be completely > stupid... > > If you identify the 3D vertices of your cube, you could use camera.screen() > to generate a set of screen vertices that would represent the screen > coordinates of the cube in the view. Just in case, the view is the 2D layer > into which everything is rendered. With that data you could construct a mask > 2D clip. With this, you could use an ¨infinite¨ line and mask it with your > clip. You would have to use ownCanvas on the objects and > "model.ownSession.getContainer(GameArea.view) as Sprite" to identify the > resulting sprite of the owncanvas of the line in order to mask it... > > It *might work, > Li
