• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ idBitMsgDelta类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中idBitMsgDelta的典型用法代码示例。如果您正苦于以下问题:C++ idBitMsgDelta类的具体用法?C++ idBitMsgDelta怎么用?C++ idBitMsgDelta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了idBitMsgDelta类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: WriteToSnapshot

/*
================
idPhysics_Parametric::WriteToSnapshot
================
*/
void idPhysics_Parametric::WriteToSnapshot( idBitMsgDelta &msg ) const {
	msg.WriteInt( current.time );
	msg.WriteInt( current.atRest );
	msg.WriteFloat( current.origin[0] );
	msg.WriteFloat( current.origin[1] );
	msg.WriteFloat( current.origin[2] );
	msg.WriteFloat( current.angles[0] );
	msg.WriteFloat( current.angles[1] );
	msg.WriteFloat( current.angles[2] );
	msg.WriteDeltaFloat( current.origin[0], current.localOrigin[0] );
	msg.WriteDeltaFloat( current.origin[1], current.localOrigin[1] );
	msg.WriteDeltaFloat( current.origin[2], current.localOrigin[2] );
	msg.WriteDeltaFloat( current.angles[0], current.localAngles[0] );
	msg.WriteDeltaFloat( current.angles[1], current.localAngles[1] );
	msg.WriteDeltaFloat( current.angles[2], current.localAngles[2] );

	msg.WriteBits( current.linearExtrapolation.GetExtrapolationType(), 8 );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetStartTime() );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetDuration() );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetStartValue()[0] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetStartValue()[1] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetStartValue()[2] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetSpeed()[0] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetSpeed()[1] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetSpeed()[2] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetBaseSpeed()[0] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetBaseSpeed()[1] );
	msg.WriteDeltaFloat( 0.0f, current.linearExtrapolation.GetBaseSpeed()[2] );

	msg.WriteBits( current.angularExtrapolation.GetExtrapolationType(), 8 );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetStartTime() );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetDuration() );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetStartValue()[0] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetStartValue()[1] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetStartValue()[2] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetSpeed()[0] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetSpeed()[1] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetSpeed()[2] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetBaseSpeed()[0] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetBaseSpeed()[1] );
	msg.WriteDeltaFloat( 0.0f, current.angularExtrapolation.GetBaseSpeed()[2] );

	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetStartTime() );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetAcceleration() );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetDeceleration() );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetDuration() );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetStartValue()[0] );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetStartValue()[1] );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetStartValue()[2] );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetEndValue()[0] );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetEndValue()[1] );
	msg.WriteDeltaFloat( 0.0f, current.linearInterpolation.GetEndValue()[2] );

	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetStartTime() );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetAcceleration() );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetDeceleration() );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetDuration() );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetStartValue()[0] );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetStartValue()[1] );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetStartValue()[2] );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetEndValue()[0] );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetEndValue()[1] );
	msg.WriteDeltaFloat( 0.0f, current.angularInterpolation.GetEndValue()[2] );
}
开发者ID:revelator,项目名称:Revelator-Doom3,代码行数:69,代码来源:Physics_Parametric.cpp


示例2: WriteToSnapshot

/*
================
idPhysics_RigidBody::WriteToSnapshot
================
*/
void idPhysics_RigidBody::WriteToSnapshot( idBitMsgDelta &msg ) const {
	idCQuat quat, localQuat;
	quat = current.i.orientation.ToCQuat();
	localQuat = current.localAxis.ToCQuat();
	msg.WriteLong( current.atRest );
	msg.WriteFloat( current.i.position[0] );
	msg.WriteFloat( current.i.position[1] );
	msg.WriteFloat( current.i.position[2] );
	msg.WriteFloat( quat.x );
	msg.WriteFloat( quat.y );
	msg.WriteFloat( quat.z );
	msg.WriteFloat( current.i.linearMomentum[0], RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	msg.WriteFloat( current.i.linearMomentum[1], RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	msg.WriteFloat( current.i.linearMomentum[2], RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	msg.WriteFloat( current.i.angularMomentum[0], RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	msg.WriteFloat( current.i.angularMomentum[1], RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	msg.WriteFloat( current.i.angularMomentum[2], RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	msg.WriteDeltaFloat( current.i.position[0], current.localOrigin[0] );
	msg.WriteDeltaFloat( current.i.position[1], current.localOrigin[1] );
	msg.WriteDeltaFloat( current.i.position[2], current.localOrigin[2] );
	msg.WriteDeltaFloat( quat.x, localQuat.x );
	msg.WriteDeltaFloat( quat.y, localQuat.y );
	msg.WriteDeltaFloat( quat.z, localQuat.z );
	msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], RB_VELOCITY_EXPONENT_BITS, RB_VELOCITY_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.pushVelocity[1], RB_VELOCITY_EXPONENT_BITS, RB_VELOCITY_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.pushVelocity[2], RB_VELOCITY_EXPONENT_BITS, RB_VELOCITY_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.externalForce[0], RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.externalForce[1], RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.externalForce[2], RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.externalTorque[0], RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.externalTorque[1], RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	msg.WriteDeltaFloat( 0.0f, current.externalTorque[2], RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
}
开发者ID:nbohr1more,项目名称:Revelation,代码行数:38,代码来源:Physics_RigidBody.cpp


示例3: ReadFromSnapshot

/*
================
idPhysics_RigidBody::ReadFromSnapshot
================
*/
void idPhysics_RigidBody::ReadFromSnapshot( const idBitMsgDelta &msg ) {
	idCQuat quat, localQuat;
	current.atRest = msg.ReadLong();
	current.i.position[0] = msg.ReadFloat();
	current.i.position[1] = msg.ReadFloat();
	current.i.position[2] = msg.ReadFloat();
	quat.x = msg.ReadFloat();
	quat.y = msg.ReadFloat();
	quat.z = msg.ReadFloat();
	current.i.linearMomentum[0] = msg.ReadFloat( RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	current.i.linearMomentum[1] = msg.ReadFloat( RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	current.i.linearMomentum[2] = msg.ReadFloat( RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	current.i.angularMomentum[0] = msg.ReadFloat( RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	current.i.angularMomentum[1] = msg.ReadFloat( RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	current.i.angularMomentum[2] = msg.ReadFloat( RB_MOMENTUM_EXPONENT_BITS, RB_MOMENTUM_MANTISSA_BITS );
	current.localOrigin[0] = msg.ReadDeltaFloat( current.i.position[0] );
	current.localOrigin[1] = msg.ReadDeltaFloat( current.i.position[1] );
	current.localOrigin[2] = msg.ReadDeltaFloat( current.i.position[2] );
	localQuat.x = msg.ReadDeltaFloat( quat.x );
	localQuat.y = msg.ReadDeltaFloat( quat.y );
	localQuat.z = msg.ReadDeltaFloat( quat.z );
	current.pushVelocity[0] = msg.ReadDeltaFloat( 0.0f, RB_VELOCITY_EXPONENT_BITS, RB_VELOCITY_MANTISSA_BITS );
	current.pushVelocity[1] = msg.ReadDeltaFloat( 0.0f, RB_VELOCITY_EXPONENT_BITS, RB_VELOCITY_MANTISSA_BITS );
	current.pushVelocity[2] = msg.ReadDeltaFloat( 0.0f, RB_VELOCITY_EXPONENT_BITS, RB_VELOCITY_MANTISSA_BITS );
	current.externalForce[0] = msg.ReadDeltaFloat( 0.0f, RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	current.externalForce[1] = msg.ReadDeltaFloat( 0.0f, RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	current.externalForce[2] = msg.ReadDeltaFloat( 0.0f, RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	current.externalTorque[0] = msg.ReadDeltaFloat( 0.0f, RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	current.externalTorque[1] = msg.ReadDeltaFloat( 0.0f, RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	current.externalTorque[2] = msg.ReadDeltaFloat( 0.0f, RB_FORCE_EXPONENT_BITS, RB_FORCE_MANTISSA_BITS );
	current.i.orientation = quat.ToMat3();
	current.localAxis = localQuat.ToMat3();
	if( clipModel ) {
		clipModel->Link( gameLocal.clip, self, clipModel->GetId(), current.i.position, current.i.orientation );
	}
}
开发者ID:nbohr1more,项目名称:Revelation,代码行数:41,代码来源:Physics_RigidBody.cpp


示例4: ReadFromSnapshot

/*
======================
idMoveableItem::ReadFromSnapshot
======================
*/
void idMoveableItem::ReadFromSnapshot( const idBitMsgDelta &msg ) {
	physicsObj.ReadFromSnapshot( msg );
	if ( msg.HasChanged() ) {
		UpdateVisuals();
	}
}
开发者ID:angjminer,项目名称:deamos,代码行数:11,代码来源:Item.cpp


示例5: WriteToSnapshot

/*
================
idItem::WriteFromSnapshot
================
*/
void idItem::WriteToSnapshot( idBitMsgDelta &msg ) const {
	msg.WriteBits( IsHidden(), 1 );
}
开发者ID:angjminer,项目名称:deamos,代码行数:8,代码来源:Item.cpp


示例6: WriteToSnapshot

void hhWeaponAutoCannon::WriteToSnapshot( idBitMsgDelta &msg ) const {
    hhWeapon::WriteToSnapshot( msg );

    msg.WriteFloat( GetHeatLevel() );
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:5,代码来源:prey_weaponautocannon.cpp


示例7: WriteToSnapshot

void hhWallWalkable::WriteToSnapshot( idBitMsgDelta &msg ) const {
	msg.WriteBits(wallwalkOn, 1);
	msg.WriteBits(IsActive(TH_THINK), 1);
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:4,代码来源:game_misc.cpp


示例8: ReadFromSnapshot

void hhControlHand::ReadFromSnapshot( const idBitMsgDelta &msg ) {
	bProcessControls = !!msg.ReadBits(1);
	oldStatus = msg.ReadBits(32);

	hhHand::ReadFromSnapshot(msg);
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:6,代码来源:game_handcontrol.cpp


示例9: WriteToSnapshot

/*
================
idMoveable::WriteToSnapshot
================
*/
void idExplodingBarrel::WriteToSnapshot( idBitMsgDelta &msg ) const {
	idMoveable::WriteToSnapshot( msg );
	msg.WriteBits( IsHidden(), 1 );
}
开发者ID:CecilHarvey,项目名称:DOOM-3,代码行数:9,代码来源:Moveable.cpp


示例10: ReadFromSnapshot

/*
================
idLight::ReadFromSnapshot
================
*/
void idLight::ReadFromSnapshot( const idBitMsgDelta &msg )
{
    idVec4	shaderColor;
    int		oldCurrentLevel = currentLevel;
    idVec3	oldBaseColor = baseColor;

    GetPhysics()->ReadFromSnapshot( msg );
    ReadBindFromSnapshot( msg );

    currentLevel = msg.ReadByte();
    if ( currentLevel != oldCurrentLevel )
    {
        // need to call On/Off for flickering lights to start/stop the sound
        // while doing it this way rather than through events, the flickering is out of sync between clients
        // but at least there is no question about saving the event and having them happening globally in the world
        if ( currentLevel )
        {
            On();
        }
        else
        {
            Off();
        }
    }
    UnpackColor( msg.ReadInt(), baseColor );
    // lightParentEntityNum = msg.ReadBits( GENTITYNUM_BITS );

    /*	// only helps prediction
    	UnpackColor( msg.ReadInt(), fadeFrom );
    	UnpackColor( msg.ReadInt(), fadeTo );
    	fadeStart = msg.ReadInt();
    	fadeEnd = msg.ReadInt();
    */

    // FIXME: read renderLight.shader
    renderLight.lightRadius[0] = msg.ReadFloat( 5, 10 );
    renderLight.lightRadius[1] = msg.ReadFloat( 5, 10 );
    renderLight.lightRadius[2] = msg.ReadFloat( 5, 10 );

    UnpackColor( msg.ReadInt(), shaderColor );
    renderLight.shaderParms[SHADERPARM_RED] = shaderColor[0];
    renderLight.shaderParms[SHADERPARM_GREEN] = shaderColor[1];
    renderLight.shaderParms[SHADERPARM_BLUE] = shaderColor[2];
    renderLight.shaderParms[SHADERPARM_ALPHA] = shaderColor[3];

    renderLight.shaderParms[SHADERPARM_TIMESCALE] = msg.ReadFloat( 5, 10 );
    renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = msg.ReadInt();
    //renderLight.shaderParms[SHADERPARM_DIVERSITY] = msg.ReadFloat();
    renderLight.shaderParms[SHADERPARM_MODE] = msg.ReadShort();

    ReadColorFromSnapshot( msg );

    if ( msg.HasChanged() )
    {
        if ( ( currentLevel != oldCurrentLevel ) || ( baseColor != oldBaseColor ) )
        {
            SetLightLevel();
        }
        else
        {
            PresentLightDefChange();
            PresentModelDefChange();
        }
    }
}
开发者ID:revelator,项目名称:Revelator-Doom3,代码行数:70,代码来源:Light.cpp


示例11: WriteToSnapshot

void hhControlHand::WriteToSnapshot( idBitMsgDelta &msg ) const {
	msg.WriteBits(bProcessControls, 1);
	msg.WriteBits(oldStatus, 32);

	hhHand::WriteToSnapshot(msg);
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:6,代码来源:game_handcontrol.cpp


示例12: ReadFromSnapshot

//================
//hhCameraInterpolator::ReadFromSnapshot
//================
void hhCameraInterpolator::ReadFromSnapshot( const idBitMsgDelta &msg, hhPlayer *pl )
{
	idCQuat sq, q;

	idVec3 plPos = pl->GetPlayerPhysics()->GetOrigin();

#if 1
	sq.x = msg.ReadFloat();
	sq.y = msg.ReadFloat();
	sq.z = msg.ReadFloat();
	rotationInfo.start = sq.ToQuat();
	q.x = msg.ReadDeltaFloat(sq.x);
	q.y = msg.ReadDeltaFloat(sq.y);
	q.z = msg.ReadDeltaFloat(sq.z);
	rotationInfo.current = q.ToQuat();
	q.x = msg.ReadDeltaFloat(sq.x);
	q.y = msg.ReadDeltaFloat(sq.y);
	q.z = msg.ReadDeltaFloat(sq.z);
	rotationInfo.end = q.ToQuat();
	rotationInfo.interpVal = msg.ReadFloat(4, 4);

	positionInfo.start[0] = msg.ReadDeltaFloat(plPos[0]);
	positionInfo.start[1] = msg.ReadDeltaFloat(plPos[1]);
	positionInfo.start[2] = msg.ReadDeltaFloat(plPos[2]);
	positionInfo.current[0] = msg.ReadDeltaFloat(positionInfo.start[0]);
	positionInfo.current[1] = msg.ReadDeltaFloat(positionInfo.start[1]);
	positionInfo.current[2] = msg.ReadDeltaFloat(positionInfo.start[2]);
	positionInfo.end[0] = msg.ReadDeltaFloat(positionInfo.start[0]);
	positionInfo.end[1] = msg.ReadDeltaFloat(positionInfo.start[1]);
	positionInfo.end[2] = msg.ReadDeltaFloat(positionInfo.start[2]);
	positionInfo.interpVal = msg.ReadFloat(4, 4);

	eyeOffsetInfo.start = msg.ReadFloat();
	eyeOffsetInfo.current = msg.ReadDeltaFloat(eyeOffsetInfo.start);
	eyeOffsetInfo.end = msg.ReadDeltaFloat(eyeOffsetInfo.start);
	eyeOffsetInfo.interpVal = msg.ReadFloat(4, 4);
#else
	q.x = msg.ReadFloat();
	q.y = msg.ReadFloat();
	q.z = msg.ReadFloat();
	rotationInfo.current = q.ToQuat();

	positionInfo.current[0] = msg.ReadDeltaFloat(plPos[0]);
	positionInfo.current[1] = msg.ReadDeltaFloat(plPos[1]);
	positionInfo.current[2] = msg.ReadDeltaFloat(plPos[2]);

	eyeOffsetInfo.current = msg.ReadFloat();

	rotationInfo.start = rotationInfo.current;
	rotationInfo.end = rotationInfo.current;
	positionInfo.start = positionInfo.current;
	positionInfo.end = positionInfo.current;
	eyeOffsetInfo.start = eyeOffsetInfo.current;
	eyeOffsetInfo.end = eyeOffsetInfo.current;
#endif
	//lerpScale = msg.ReadFloat();
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:60,代码来源:prey_camerainterpolator.cpp


示例13: WriteToSnapshot

//================
//hhCameraInterpolator::WriteToSnapshot
//================
void hhCameraInterpolator::WriteToSnapshot( idBitMsgDelta &msg, const hhPlayer *pl ) const
{
	idCQuat sq, q;

	idVec3 plPos = ((idPlayer *)pl)->GetPlayerPhysics()->GetOrigin();
#if 1
	sq = rotationInfo.start.ToCQuat();
	msg.WriteFloat(sq.x);
	msg.WriteFloat(sq.y);
	msg.WriteFloat(sq.z);
	q = rotationInfo.current.ToCQuat();
	msg.WriteDeltaFloat(sq.x, q.x);
	msg.WriteDeltaFloat(sq.y, q.y);
	msg.WriteDeltaFloat(sq.z, q.z);
	q = rotationInfo.end.ToCQuat();
	msg.WriteDeltaFloat(sq.x, q.x);
	msg.WriteDeltaFloat(sq.y, q.y);
	msg.WriteDeltaFloat(sq.z, q.z);
	msg.WriteFloat(rotationInfo.interpVal, 4, 4);

	msg.WriteDeltaFloat(plPos[0], positionInfo.start[0]);
	msg.WriteDeltaFloat(plPos[1], positionInfo.start[1]);
	msg.WriteDeltaFloat(plPos[2], positionInfo.start[2]);
	msg.WriteDeltaFloat(positionInfo.start[0], positionInfo.current[0]);
	msg.WriteDeltaFloat(positionInfo.start[1], positionInfo.current[1]);
	msg.WriteDeltaFloat(positionInfo.start[2], positionInfo.current[2]);
	msg.WriteDeltaFloat(positionInfo.start[0], positionInfo.end[0]);
	msg.WriteDeltaFloat(positionInfo.start[1], positionInfo.end[1]);
	msg.WriteDeltaFloat(positionInfo.start[2], positionInfo.end[2]);
	msg.WriteFloat(positionInfo.interpVal, 4, 4);

	msg.WriteFloat(eyeOffsetInfo.start);
	msg.WriteDeltaFloat(eyeOffsetInfo.start, eyeOffsetInfo.current);
	msg.WriteDeltaFloat(eyeOffsetInfo.start, eyeOffsetInfo.end);
	msg.WriteFloat(eyeOffsetInfo.interpVal, 4, 4);
#else
	q = rotationInfo.current.ToCQuat();
	msg.WriteFloat(q.x);
	msg.WriteFloat(q.y);
	msg.WriteFloat(q.z);

	msg.WriteDeltaFloat(plPos[0], positionInfo.current[0]);
	msg.WriteDeltaFloat(plPos[1], positionInfo.current[1]);
	msg.WriteDeltaFloat(plPos[2], positionInfo.current[2]);

	msg.WriteFloat(eyeOffsetInfo.current);
#endif

	//msg.WriteFloat(lerpScale);
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:53,代码来源:prey_camerainterpolator.cpp


示例14: ReadFromSnapshot

void hhWeaponAutoCannon::ReadFromSnapshot( const idBitMsgDelta &msg ) {
    hhWeapon::ReadFromSnapshot( msg );

    SetHeatLevel( msg.ReadFloat() );
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:5,代码来源:prey_weaponautocannon.cpp


示例15: ReadFromSnapshot

/*
================
idPhysics_Parametric::ReadFromSnapshot
================
*/
void idPhysics_Parametric::ReadFromSnapshot( const idBitMsgDelta &msg ) {
	extrapolation_t linearType, angularType;
	float startTime, duration, accelTime, decelTime;
	idVec3 linearStartValue, linearSpeed, linearBaseSpeed, startPos, endPos;
	idAngles angularStartValue, angularSpeed, angularBaseSpeed, startAng, endAng;

	current.time = msg.ReadInt();
	current.atRest = msg.ReadInt();
	current.origin[0] = msg.ReadFloat();
	current.origin[1] = msg.ReadFloat();
	current.origin[2] = msg.ReadFloat();
	current.angles[0] = msg.ReadFloat();
	current.angles[1] = msg.ReadFloat();
	current.angles[2] = msg.ReadFloat();
	current.localOrigin[0] = msg.ReadDeltaFloat( current.origin[0] );
	current.localOrigin[1] = msg.ReadDeltaFloat( current.origin[1] );
	current.localOrigin[2] = msg.ReadDeltaFloat( current.origin[2] );
	current.localAngles[0] = msg.ReadDeltaFloat( current.angles[0] );
	current.localAngles[1] = msg.ReadDeltaFloat( current.angles[1] );
	current.localAngles[2] = msg.ReadDeltaFloat( current.angles[2] );

	linearType = (extrapolation_t) msg.ReadBits( 8 );
	startTime = msg.ReadDeltaFloat( 0.0f );
	duration = msg.ReadDeltaFloat( 0.0f );
	linearStartValue[0] = msg.ReadDeltaFloat( 0.0f );
	linearStartValue[1] = msg.ReadDeltaFloat( 0.0f );
	linearStartValue[2] = msg.ReadDeltaFloat( 0.0f );
	linearSpeed[0] = msg.ReadDeltaFloat( 0.0f );
	linearSpeed[1] = msg.ReadDeltaFloat( 0.0f );
	linearSpeed[2] = msg.ReadDeltaFloat( 0.0f );
	linearBaseSpeed[0] = msg.ReadDeltaFloat( 0.0f );
	linearBaseSpeed[1] = msg.ReadDeltaFloat( 0.0f );
	linearBaseSpeed[2] = msg.ReadDeltaFloat( 0.0f );
	current.linearExtrapolation.Init( startTime, duration, linearStartValue, linearBaseSpeed, linearSpeed, linearType );

	angularType = (extrapolation_t) msg.ReadBits( 8 );
	startTime = msg.ReadDeltaFloat( 0.0f );
	duration = msg.ReadDeltaFloat( 0.0f );
	angularStartValue[0] = msg.ReadDeltaFloat( 0.0f );
	angularStartValue[1] = msg.ReadDeltaFloat( 0.0f );
	angularStartValue[2] = msg.ReadDeltaFloat( 0.0f );
	angularSpeed[0] = msg.ReadDeltaFloat( 0.0f );
	angularSpeed[1] = msg.ReadDeltaFloat( 0.0f );
	angularSpeed[2] = msg.ReadDeltaFloat( 0.0f );
	angularBaseSpeed[0] = msg.ReadDeltaFloat( 0.0f );
	angularBaseSpeed[1] = msg.ReadDeltaFloat( 0.0f );
	angularBaseSpeed[2] = msg.ReadDeltaFloat( 0.0f );
	current.angularExtrapolation.Init( startTime, duration, angularStartValue, angularBaseSpeed, angularSpeed, angularType );

	startTime = msg.ReadDeltaFloat( 0.0f );
	accelTime = msg.ReadDeltaFloat( 0.0f );
	decelTime = msg.ReadDeltaFloat( 0.0f );
	duration = msg.ReadDeltaFloat( 0.0f );
	startPos[0] = msg.ReadDeltaFloat( 0.0f );
	startPos[1] = msg.ReadDeltaFloat( 0.0f );
	startPos[2] = msg.ReadDeltaFloat( 0.0f );
	endPos[0] = msg.ReadDeltaFloat( 0.0f );
	endPos[1] = msg.ReadDeltaFloat( 0.0f );
	endPos[2] = msg.ReadDeltaFloat( 0.0f );
	current.linearInterpolation.Init( startTime, accelTime, decelTime, duration, startPos, endPos );

	startTime = msg.ReadDeltaFloat( 0.0f );
	accelTime = msg.ReadDeltaFloat( 0.0f );
	decelTime = msg.ReadDeltaFloat( 0.0f );
	duration = msg.ReadDeltaFloat( 0.0f );
	startAng[0] = msg.ReadDeltaFloat( 0.0f );
	startAng[1] = msg.ReadDeltaFloat( 0.0f );
	startAng[2] = msg.ReadDeltaFloat( 0.0f );
	endAng[0] = msg.ReadDeltaFloat( 0.0f );
	endAng[1] = msg.ReadDeltaFloat( 0.0f );
	endAng[2] = msg.ReadDeltaFloat( 0.0f );
	current.angularInterpolation.Init( startTime, accelTime, decelTime, duration, startAng, endAng );

	current.axis = current.angles.ToMat3();

	if ( clipModel ) {
		clipModel->Link( gameLocal.clip, self, 0, current.origin, current.axis );
	}
}
开发者ID:revelator,项目名称:Revelator-Doom3,代码行数:84,代码来源:Physics_Parametric.cpp


示例16: WriteToSnapshot

/*
=================
idEntityFx::WriteToSnapshot
=================
*/
void idEntityFx::WriteToSnapshot( idBitMsgDelta &msg ) const {
	GetPhysics()->WriteToSnapshot( msg );
	WriteBindToSnapshot( msg );
	msg.WriteLong( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
	msg.WriteLong( started );
}
开发者ID:4DA,项目名称:doom3.gpl,代码行数:11,代码来源:Fx.cpp


示例17: WriteToSnapshot

/*
=================
rvEffect::WriteToSnapshot
=================
*/
void rvEffect::WriteToSnapshot( idBitMsgDelta &msg ) const {
    GetPhysics()->WriteToSnapshot( msg );
    WriteBindToSnapshot( msg );
    idGameLocal::WriteDecl( msg, effect );
    msg.WriteBits( loop, 1 );
}
开发者ID:Big-Zam,项目名称:IT266-gameMod,代码行数:11,代码来源:Effect.cpp



注:本文中的idBitMsgDelta类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ idBlockAlloc类代码示例发布时间:2022-05-31
下一篇:
C++ idBitMsg类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap