[sldev] [VWR] prim type?
Kelly Linden
kelly at lindenlab.com
Fri Feb 22 10:00:07 PST 2008
Anna Gulaev wrote:
> Though there are PCodes defined for everything I might be interested
> in, all the objects of interest are of type volume. Surely there must
> be more information available than that, and I figure it must be here-ish:
>
> object->getVolume()->getParams().???
>
> But I'll be darned if I can find any way to get the prim type (cube,
> torus, etc). Hints, please?
>
There are at least 2 pieces of info that make up the prim shape:
The profile ( LLVolumeParams::LLProfileParams mProfileParams ) which
describes the 2-D shape. You can check the mCurveType against the
LL_PCODE_PROFILE_* constants.
The path ( LLVolumeParams::LLPathParams mPathParams ) which describes
the path the profile is extruded along. You can check the mCurveType
here against the LL_PCODE_PATH_* constants.
So for example a basic box has
object->getVolume()->getParams().mProfileParams.mCurveType ==
LL_PCODE_PROFILE_SQUARE and
object->getVolume()->getParams().mProfileParams.mCurveType ==
LL_PCODE_PATH_LINE .
A tube is really a cube with a curved path, etc.
I'm a little rusty on this area of the code, so please forgive any
mistakes or omissions, but I believe the above is the general idea.
- Kelly
More information about the SLDev
mailing list