Hi Aron,
On Tue, 2005-06-21 at 11:02 -0500, Aron Bierbaum wrote:
> Are there plans to add support to calcVertexTangents to place binormals
> in Geometry::SecondaryColorsFieldId? It seems that this should not be
> too difficult since colors are texture coordinates are using the same
> basic data types. I have tried to downcast the binormalP:
>
> tangentP = GeoTexCoords4f::create();
> GeoColors4fPtr hack = GeoColors4fPtr::dcast(tangentP);
> geo->setSecondaryColors(hack);
>
> But this does not seem to work. Is there some way to get access to a
> common base type of both GeoTexCoords4fPtr and GeoColors4fPtr so that I
> can add support for this in a clean way? Currently all data is created
> in a vector and then copied over using
> binormalP->getField().push_back(vect). But since binormalP is of type
> GeoTexCoords4fPtr I can not call geo->setSecondaryColors(binormalP).
right now there is no common base class for those two, so I think you're
out of luck here.
If you don't have to do it often you can copy the data over, but right
now I don't see a better way, sorry.
Dirk
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users