Author Topic: how to select the Triangle face which is in the Frustum  (Read 1998 times)

Offline zhongjie.jiang

  • byte
  • *
  • Posts: 2
    • View Profile
how to select the Triangle face which is in the Frustum
« on: August 28, 2013, 08:16:18 am »
Hi All,

I want to use the jpct-ae to render a panorama in android device.

I create a cube and put the camera in the cube center, which is like a skybox.

and I put the texture tiles on the cube, about 4X4 pictures in each cube surface.

the picture tiles is in the network, so I want to load the picture when the trangle face is in the frustum, not load all picture tiles together, but I can't find the method to select the trangle face.

so I want to know how can I select the face in the frustum?

thanks for your suggest :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: how to select the Triangle face which is in the Frustum
« Reply #1 on: August 28, 2013, 09:38:15 am »
You want to SELECT a triangle in the frustum or your want to DETECT if a triangle is in the frustum?

Offline zhongjie.jiang

  • byte
  • *
  • Posts: 2
    • View Profile
Re: how to select the Triangle face which is in the Frustum
« Reply #2 on: August 29, 2013, 04:12:43 am »
I want to DETECT how many triangles are in the frustum, if the triangles are in the frustum, then I put the texture in the triangle

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: how to select the Triangle face which is in the Frustum
« Reply #3 on: August 29, 2013, 08:39:06 am »
You can do this only if you split the sides of your box into distinct Object3Ds and query Object3D.wasVisible();, but even then, you are one frame behind.