示例#1
0
void osg::av_pushMsg(av::Msg& netMsg, const ::osg::Matrixd& buf)
{
    ::osg::Matrixd b;
    XDR xdr;

    xdrmem_create(&xdr, (caddr_t)&b, sizeof(b), XDR_ENCODE);
    xdr_vector(&xdr, (char*)&buf, 16, sizeof(double), (xdrproc_t)xdr_double);
    netMsg.push((void*)&b, sizeof(b));
    xdr_destroy(&xdr);
}
示例#2
0
void osg::av_pushMsg(av::Msg& netMsg, const ::osg::Vec2f& buf)
{
    ::osg::Vec2f b;
    XDR xdr;

    xdrmem_create(&xdr, (caddr_t)&b, sizeof(b), XDR_ENCODE);
    xdr_vector(&xdr, (char*)&buf, 2, sizeof(float), (xdrproc_t)xdr_float);
    netMsg.push((void*)&b, sizeof(b));
    xdr_destroy(&xdr);
}
示例#3
0
void osg::av_pushMsg(av::Msg& netMsg, const ::osg::Matrixf& buf)
{
    ::osg::Matrixf b;
    XDR xdr;

    xdrmem_create(&xdr, reinterpret_cast<caddr_t>(&b), sizeof(b), XDR_ENCODE);
    xdr_vector(&xdr, (char*)&buf, 16, sizeof(float), (xdrproc_t)xdr_float);
    netMsg.push(&b, sizeof(b));
    xdr_destroy(&xdr);
}