determining model space object from vectorizer module
determining model space object from vectorizer module
hi,
is there any way to determine which model space object that is currently being vectorized from the gs-module (e.g from the function odgsopenglvectorizeview:

ntraitsmodified())?
(i have been using layers to render specific objects different from others, but this is a bit restrictive. the best thing would be access to the xdata for the object being rendered.)
hi,
yes there is such a way:
code:
const odgidrawable* odgiconveyorcontext::currentdrawable() const;
const odgidrawabledesc* odgiconveyorcontext::currentdrawabledesc() const;
these methods are implemented in odgibasevectorizer.
note that they may return null.
hi,
thanks for the quick answer! i had a quick look at gidrawable.h and it seems to cover my needs. i'm guessing something like this will do the trick:
code:
const odgidrawable* gid = currentdrawable();
if( gid )
{
if( (gid->drawabletype() == odgidrawable::kgeometry) && gid->ispersistent() )
{
oddbentityptr pent = ((oddbobjectid)gid->id()).safeopenobject(oddb::kforread);
}
}
last edited by tag; 24th august 2007 at 05:11 amfff">. reason: code fixed