Marcus Lindblom wrote:
> Allen Bierbaum wrote:
> 
>> In other words, can I initialize a ChunkMaterialMTRecPtr from a
>> ChunkMaterial* safely like this or is there a special function call to
>> get the RecPtr and variants from a raw pointer?
>>
>> OSG::ChuckMaterialMTRecPtr material =
>> dynamic_cast<OSG::ChunkMaterial*>(OSG::getDefaultMaterial());
> 
> Yup. dynamic|static_pointer_cast<> names was borrowed from boost and 
> extended for OpenSG ptrs. I.e:
> 
> OSG::ChuckMaterialMTRecPtr material = 
> dynamic_pointer_cast<OSG::ChunkMaterial>(OSG::getDefaultMaterial());

Doh. I answered the wrong question. The cast above is when you want to 
convert from a smart_ptr<X> to smart_ptr<Y>.

Sorry for the noise

/Marcus

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to