本文整理汇总了C++中MoveSplineFlag::raw方法的典型用法代码示例。如果您正苦于以下问题:C++ MoveSplineFlag::raw方法的具体用法?C++ MoveSplineFlag::raw怎么用?C++ MoveSplineFlag::raw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MoveSplineFlag
的用法示例。
在下文中一共展示了MoveSplineFlag::raw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WriteCreate
void PacketBuilder::WriteCreate(const MoveSpline& move_spline, ByteBuffer& data)
{
// WriteClientStatus(mov,data);
// data.append<float>(&mov.m_float_values[SpeedWalk], SpeedMaxCount);
// if (mov.SplineEnabled())
{
MoveSplineFlag splineFlags = move_spline.splineflags;
data << splineFlags.raw();
if (splineFlags.final_angle)
{
data << move_spline.facing.angle;
}
else if (splineFlags.final_target)
{
data << move_spline.facing.target;
}
else if (splineFlags.final_point)
{
data << move_spline.facing.f.x << move_spline.facing.f.y << move_spline.facing.f.z;
}
data << move_spline.timePassed();
data << move_spline.Duration();
data << move_spline.GetId();
uint32 nodes = move_spline.getPath().size();
data << nodes;
data.append<Vector3>(&move_spline.getPath()[0], nodes);
data << (move_spline.isCyclic() ? Vector3::zero() : move_spline.FinalDestination());
}
}
示例2: WriteCreateBits
void PacketBuilder::WriteCreateBits(MoveSpline const& moveSpline, ByteBuffer& data)
{
ASSERT(!moveSpline.Finalized());
MoveSplineFlag flags = moveSpline.splineflags;
data.WriteBit(true);
data.WriteBit(flags.parabolic || flags.animation);
data.WriteBits(uint8(moveSpline.spline.mode()), 2);
data.WriteBits(moveSpline.getPath().size(), 20);
data.WriteBits(flags.raw(), 25);
data.WriteBit(flags.parabolic);
data.WriteBit(false);
if (false)
{
data.WriteBits(0, 2);
data.WriteBits(0, 21);
}
}