Hi,

I said "too spezialized", not "too interesting" :-)

Say, I have a kind of geometry drawn with multiple
faces which are partitioned into several materials. I
made an FC, say MyGeo, directly derived from NodeCore,
which has a field with that geometry.
In addition, there is an FC, say MyFacesAndMat, not
derived from NodeCore, which holds a MaterialPtr, a
list of faces and a MyGeoPtr. It has a method
drawPrimitives which knows which faces of MyGeo to
draw.
MyGeo in turn holds an MField of MyFacesAndMatPtr.

MyGeoPtr has a renderhandler, which is visited by
RenderAction:
Action::ResultE MyGeo::renderActionHandler(Action
*action)
{
  RenderAction *a = dynamic_cast<RenderAction
*>(action);
 
  Material::DrawFunctor func;
  Material* m = a->getMaterial();
  bool useMyMaterials= m==NULL;
 
  for(MFMyFacesAndMatPtr::iterator it
=_mfMats.begin(); it!=_mfMats.end(); it++)
  {
    func=osgTypedMethodFunctor1ObjPtr(it->getCPtr(),  
&MyFacesAndMat::drawPrimitives);
      if(useMyMaterials)
      {
        if((*it)->getMaterial()!=NullFC)
          m=(*it)->getMaterial().getCPtr();
        else
          m=getDefaultMaterial().getCPtr();
      }
      a->dropFunctor(func, m);
    }
 
    ...
 
    return Action::Continue;
}

I thought this idea is too specialized because two
FieldContainers are involved.

Björn

 --- Dirk Reiners <[EMAIL PROTECTED]> schrieb: 
> 
>       Hi Bjoern,
> 
> On Mon, 2005-02-21 at 02:25, Björn Harmen Gerth
> wrote:
> > Hi,
> > 
> > I think what I have in mind (and how I implemented
> it)
> > is too specialized to integrate it in
> > MaterialDrawable.
> 
> ok, now I'm curious. ;) What are trying to do?
> 
>       Dirk
> 
> 
> 
> 
>
-------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users.
> Discover which products truly live up to the hype.
> Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> _______________________________________________
> Opensg-users mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/opensg-users
>  


        

        
                
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: 
http://mail.yahoo.de


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to