Commit 88ac6fc3 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add some conversion functions.

parent c2c7da18
......@@ -17,26 +17,46 @@ namespace hpp {
v.set((type)t[0], (type)t[1], (type)t[2]);
}
inline void fromHPP(const hpp::Transform__var& in, osgVector3& v)
inline void fromHPP(const hpp::Transform__slice* t, osgVector3& v)
{
typedef graphics::WindowsManager::value_type type;
const hpp::Transform__slice* t (in.in());
v.set((type)t[0], (type)t[1], (type)t[2]);
}
inline void fromHPP(const hpp::Transform__var& in, osgQuat& q)
inline void fromHPP(const hpp::Transform__var& in, osgVector3& v)
{
fromHPP (in.in(), v);
}
inline void fromHPP(const hpp::Transform__slice* t, osgQuat& q)
{
typedef graphics::WindowsManager::value_type type;
const hpp::Transform__slice* t (in.in());
q.set((type)t[3], (type)t[4], (type)t[5], (type)t[6]);
}
inline void fromHPP(const hpp::Transform__var& in, graphics::Configuration& c)
inline void fromHPP(const hpp::Transform__var& in, osgQuat& q)
{
fromHPP (in.in(), q);
}
inline void fromHPP(const hpp::Transform__slice* in, graphics::Configuration& c)
{
fromHPP(in, c.position);
fromHPP(in, c.quat);
}
inline void fromHPP(const hpp::Transform__var& in, graphics::Configuration& c)
{
fromHPP(in.in(), c);
}
inline void fromHPP(const hpp::TransformSeq& in, std::vector<graphics::Configuration>& c)
{
c.resize (in.length());
for (std::size_t i = 0; i < in.length(); ++i)
fromHPP (in[(CORBA::ULong)i], c[i]);
}
} // namespace gui
} // namespace hpp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment