コード例 #1
0
/*
================
sdPhysics_GeneralMover::SetInitialPosition
================
*/
void sdPhysics_GeneralMover::SetInitialPosition( const idVec3& org, const idMat3& axes ) {
	move.startPos		= org;
	move.endPos			= org;

	move.startAngles	= axes.ToAngles();
	move.endAngles		= axes.ToAngles();

	SetCurrentPos( 1.f, true );
	rate				= 0.f;

	UpdateClipModel();
}
コード例 #2
0
/*
================
idPhysics_Parametric::SetAxis
================
*/
void idPhysics_Parametric::SetAxis( const idMat3 &newAxis, int id ) {
	idVec3 masterOrigin;
	idMat3 masterAxis;

	current.localAngles = newAxis.ToAngles();

	current.angularExtrapolation.SetStartValue( current.localAngles );
	current.angularInterpolation.SetStartValue( current.localAngles );

	current.localAngles = current.angularExtrapolation.GetCurrentValue( current.time );
	if ( hasMaster && isOrientated ) {
		self->GetMasterPosition( masterOrigin, masterAxis );
		current.axis = current.localAngles.ToMat3() * masterAxis;
		current.angles = current.axis.ToAngles();
	}
	else {
		current.axis = current.localAngles.ToMat3();
		current.angles = current.localAngles;
	}
	if ( clipModel ) {
// RAVEN BEGIN
// ddynerman: multiple clip worlds
		clipModel->Link( self, 0, current.origin, current.axis );
// RAVEN END
	}
	Activate();
}
コード例 #3
0
/*
=====================
sdWalker::SetAxis
=====================
*/
void sdWalker::SetAxis( const idMat3& axis ) {
	viewAxis = axis;

	if ( vehicleControl ) {
		idAngles angles = axis.ToAngles();
		vehicleControl->OnYawChanged( angles.yaw );
	}

	UpdateVisuals();
}
コード例 #4
0
/*
=====================
sdClientProjectile::Launch
=====================
*/
void sdClientProjectile::Launch( idEntity* owner, const idVec3& tracerMuzzleOrigin, const idMat3& tracerMuzzleAxis ) {
	idAngles tracerMuzzleAngles = tracerMuzzleAxis.ToAngles();
	idVec3 anglesVec( tracerMuzzleAngles.pitch, tracerMuzzleAngles.yaw, tracerMuzzleAngles.roll );

	AddOwner( owner );

	sdScriptHelper helper;
	helper.Push( tracerMuzzleOrigin );
	helper.Push( anglesVec );
	CallNonBlockingScriptEvent( scriptObject->GetFunction( "OnLaunch" ), helper );
}
コード例 #5
0
void hhShuttleTransport::UpdateAxis( const idMat3 &newAxis ) {
	// Yaw transport to match yaw of shuttle
	idAngles ang = newAxis.ToAngles();
	ang.pitch = ang.roll = 0.0f;
	SetAxis(ang.ToMat3());
}