Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.ForceFeedbackManager


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
/**
* This class handles various waveform activities. It manages the waveform data
* that is being played on any given gamepad at any given time. It is called by
* the player controller to start/stop/pause a waveform for a given gamepad. It
* is queried by the Viewport to get the current rumble state information
* to apply that to the gamepad. It does this by evaluating the function
* defined in the waveform sample data.
*
* Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
*/

class ForceFeedbackManager extends Object within PlayerController
	native
	abstract
	transient;


/** Whether the player has disabled gamepad rumble or not (TCR C5-3) */
var bool bAllowsForceFeedback;

/** The currently playing waveform */
var ForceFeedbackWaveform FFWaveform;

/** Whether it was paused by the player controller or not */
var bool bIsPaused;

/** The current waveform sample being played */
var int CurrentSample;

/** The amount of time elapsed since the start of this waveform */
var float ElapsedTime;

/** The amount to scale all waveforms by (user settable) (TCR C5-3) */
var float ScaleAllWaveformsBy;

/**
 * Sets the waveform to play for the gamepad
 *
 * @param ForceFeedbackWaveform The waveform data to play
 */
simulated function PlayForceFeedbackWaveform(ForceFeedbackWaveform Waveform)
{
	// If there is already a waveform playing, only switch if the new one has a longer duration
	if ((Waveform != None) && (FFWaveform != None) && (Waveform.Samples.Length > 0) && (Waveform.Samples[0].Duration < FFWaveform.Samples[0].Duration))
	{
		return;
	}

	// Zero out the current sample and duration and unpause if paused
	CurrentSample = 0;
	ElapsedTime = 0.0;
	bIsPaused = false;
	// Make sure the waveform is valid
	if (Waveform != None && Waveform.Samples.Length > 0 &&
		bAllowsForceFeedback == true)
	{
		// Set the wave form to play
		FFWaveform = Waveform;
	}
	else
	{
		FFWaveform = None;
	}
}

/**
 * Stops the waveform by nulling out the waveform
 */
simulated function StopForceFeedbackWaveform(optional ForceFeedbackWaveform Waveform)
{
	if (Waveform == None || Waveform == FFWaveform)
	{
		// Remove the current waveform
		FFWaveform = None;
	}
}

/**
 * Pauses/unpauses the playback of the waveform for the gamepad
 *
 * @param bPause True to pause, False to resume
 */
simulated function PauseWaveform(optional bool bPause)
{
	// Set the paused state for the gamepad
	bIsPaused = bPause;
}

// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)

defaultproperties
{
   bAllowsForceFeedback=True
   ScaleAllWaveformsBy=1.000000
   Name="Default__ForceFeedbackManager"
   ObjectArchetype=Object'Core.Default__Object'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:17:54.000 - Creation time: sk 18-3-2018 10:01:07.642 - Created with UnCodeX