What about AddLeavesMesh? Is that handling the clip flags correctly?

Greetings,

Greetings,

On 9/14/06, Piotr Obrzut <[EMAIL PROTECTED]> wrote:
> hi,
>
>    I have a problem all meshes are correctly clipped by portal beside
>    instances of my own meshes, here is my GetRenderMeshes code:
>
> csRenderMesh** ttoSpeedTreeMeshObject::GetRenderMeshes (
>   int& n, iRenderView* rview,
>   iMovable* movable, uint32 frustum_mask)
> {
>   n = 0;
>
>   if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return false;
>
>   iCamera* camera = rview->GetCamera ();
>   // speed tree have diferent order for y and z than cs
>   csReversibleTransform o2wt = movable->GetFullTransform ();
>
>   const csVector3& wo = o2wt.GetOrigin ();
>
>   float dist = csVector3::Norm (camera->GetTransform ().GetOrigin () - wo);
>   float lod = ComputeLOD (dist);
>
>   SetupObject (lod);
>
>   int clip_portal, clip_plane, clip_z_plane;
>   rview->CalculateClipSettings (frustum_mask, clip_portal, clip_plane,
>     clip_z_plane);
>
>   // TODO: put this asserts to factory
>   CS_ASSERT (factory->branch_mat != 0);
>   CS_ASSERT (factory->leaves_mat != 0);
>   CS_ASSERT (factory->fronds_mat != 0);
>   CS_ASSERT (factory->billboard_mat != 0);
>   factory->branch_mat->Visit ();
>   factory->leaves_mat->Visit ();
>   factory->fronds_mat->Visit ();
>   factory->billboard_mat->Visit ();
>
>   if (current_frame_nr != rview->GetCurrentFrameNumber ())
>   {
>     current_frame_nr = rview->GetCurrentFrameNumber ();
>     factory->UpdateFrameData ();
>   }
>
>   if (draw_branches)
>     AddBranchMesh (clip_portal, clip_plane, clip_z_plane, rview, o2wt, wo, 
> n++);
>
>   if (draw_fronds)
>     AddFrondsMesh (clip_portal, clip_plane, clip_z_plane, rview, o2wt, wo, 
> n++);
>
>   if (draw_leaves)
>     AddLeavesMesh (clip_portal, clip_plane, clip_z_plane, rview, o2wt, wo, 
> n++);
>
>   if (draw_billboard)
>     AddBillboardMesh (clip_portal, clip_plane, clip_z_plane, rview, o2wt, wo, 
> n++);
>
>   return rmeshes;
> }
>
> I think that when it comes to clipping the settings are rather same...
>
> --
> greetings,
>  Piotr Obrzut                           mailto:[EMAIL PROTECTED]
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Crystal-main mailing list
> Crystal-main@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: mailto:[EMAIL PROTECTED]
>


-- 
Project Manager of Crystal Space (http://www.crystalspace3d.org)
and CEL (http://cel.crystalspace3d.org)
Support Crystal Space. Donate at
https://sourceforge.net/donate/index.php?group_id=649

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Crystal-main mailing list
Crystal-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to