Exemplo n.º 1
0
void osg::av_popMsg(av::Msg& netMsg, ::osg::Vec2f& buf)
{
    ::osg::Vec2f b;
    XDR xdr;

    xdrmem_create(&xdr, (caddr_t)&b, sizeof(b), XDR_DECODE);
    netMsg.pop((void*)&b, sizeof(b));
    xdr_vector(&xdr, (char*)&buf, 2, sizeof(float), (xdrproc_t)xdr_float);
    xdr_destroy(&xdr);
}
Exemplo n.º 2
0
void osg::av_popMsg(av::Msg& netMsg, ::osg::Matrixd& buf)
{
    ::osg::Matrixd b;
    XDR xdr;

    xdrmem_create(&xdr, (caddr_t)&b, sizeof(b), XDR_DECODE);
    netMsg.pop((void*)&b, sizeof(b));
    xdr_vector(&xdr, (char*)&buf, 16, sizeof(double), (xdrproc_t)xdr_double);
    xdr_destroy(&xdr);
}