Actually, since I don't need to know how many faces are visible in the
view, I just need to know if ANY faces are visible I hacked the
AbstractSession.as class and added below the method getTotalFaces()
the following method so I save myself a loop and get a little more
performance optimization
public function getVisibleFaces(view:View3D):int
{
return getRenderer(view).list().length;
}
Now to check if the Object3D is visible i do
if(theModel.session.getVisibleFaces(view) > 0)
{
return true;
}
Just for future reference in case anyone needs it
On Dec 12, 9:35 pm, Miguel Kennedy <[email protected]> wrote:
> John, thank you so much!
>
> That's a very elegant solution that works great!
>
> I'm sure it will help many others ;)
>
> Thanks once again! And thanks to Michael as well for all the input...
>
> On Dec 12, 2:45 pm, John Brookes <[email protected]> wrote:
>
>
>
>
>
>
>
> > You could give it its own session or owncanvas then check the total faces
>
> > //eg
> > cube.ownCanvas = true;
>
> > if(cube.session.getTotalFaces(view) < 1)
> > {
> > //not in view
>
> > }