Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 |
/** * Copyright 1998-2011 Epic Games, Inc. All Rights Reserved. * * Visualizes the movement of players through the map as a series of lines */ class HeatmapVisualizer extends GameStatsVisualizer native(GameStats) config(Editor); /** Atomic position/rotation entry at a given time */ struct native HeatMapPosEntry { /** Time entry was recorded */ var float Time; /** Location of entry */ var vector Position; /** Strength to give position */ var float Strength; }; cpptext { /** Given a chance to initialize */ virtual void Init(); /** Reset the visualizer to initial state */ virtual void Reset(); /** * Returns a dialog box with options related to the visualizer * @return NULL if no options for this visualizer, else pointer to dialog */ virtual class WxVisualizerOptionsDialog* GetOptionsDialog(); /** * Draws all players with unique color within the given time period * taking into account time/space jumps * @param View - the view being drawn in * @param PDI - draw interface for primitives * @param ViewportType - type of viewport being draw (perspective, ortho) */ virtual void Visualize(const FSceneView* View, class FPrimitiveDrawInterface* PDI, ELevelViewportType ViewportType); /** * Draw your stuff as a canvas overlay * @param View - the view being drawn in * @param Canvas - overlay canvas * @param ViewportType - type of viewport being draw (perspective, ortho) */ virtual void VisualizeCanvas(FEditorLevelViewportClient* ViewportClient, const FSceneView* View, FCanvas* Canvas, ELevelViewportType ViewportType); /* * Actual DrawTile call to the canvas, using min/max screen values to properly position the texture * @param Canvas - canvas to draw to * @param MinScreen - WorldMin position of the heatmap, converted to screen space * @param MaxScreen - WorldMax position of the heatmap, converted to screen space */ void VisualizeCanvas(FCanvas* Canvas, const FVector2D& MinScreen, const FVector2D& MaxScreen); /** Called before any database entries are given to the visualizer */ virtual void BeginVisiting(); /** Called at the end of database entry traversal, returns success or failure */ virtual UBOOL EndVisiting(); /** Returns the number of data points the visualizer is actively working with */ virtual INT GetVisualizationSetCount() const; /** * Retrieve some metadata about an event * @param EventIndex - some visualizer relative index about the data to get metadata about * @param MetadataString - return string containing information about the event requested */ virtual void GetMetadata(INT EventIndex, FString& MetadataString); /** Called when a hitproxy belonging to this visualizer is triggered */ virtual void HandleHitProxy(struct HGameStatsHitProxy* HitProxy); /** Game locations during the game are stored as GamePositionEntries */ virtual void Visit(class GamePositionEntry* Entry); /** Player locations during the game are stored as PlayerIntEntries */ virtual void Visit(class PlayerIntEntry* Entry); /** Player kills during the game are stored as PlayerKillDeathEnties */ virtual void Visit(class PlayerKillDeathEntry* Entry); /** Player spawns during the game are stored as PlayerSpawnEntries */ virtual void Visit(class PlayerSpawnEntry* Entry); /** Projectile ints the game are stored as ProjectileIntEntries */ virtual void Visit(class ProjectileIntEntry* Entry); /** the goats are in the base, and they like to use generic param lists to specify heatmap targets as well */ virtual void Visit(class GenericParamListEntry* Entry); /** adds a new point to the heatmap, and adjusts bounds for incoming position */ virtual void AddNewPoint(const FVector& Pt, FLOAT Time, FLOAT Strength); /** * Runs through the data and creates a heatmap texture, normalizing values */ virtual void CreateHeatmapTexture(); /** * Runs through the data and splats an attenuating set of values for each data point */ virtual void CreateHeatmapGrid(); /* * Scan the array of grid points and find the min/max grid values, or specify custom min/max values * @param NewMinDensity - all values at or below this value get the lowest coloring * @param NewMaxDensity - all values at or above this value get the highest coloring */ virtual void UpdateDensityMapping(INT NewMinDensity, INT NewMaxDensity); /** * Called before destroying the object. This is called immediately upon deciding to destroy the object, to allow the object to begin an * asynchronous cleanup process. */ void BeginDestroy(); } /** World bounds */ var vector WorldMinPos; var vector WorldMaxPos; /** The dimensions of the heatmap texture */ var int TextureXSize; var int TextureYSize; /** User defined value used to normalize rendered data */ var int CurrentMinDensity; /** Uset defined value used to normalize rendered data */ var int CurrentMaxDensity; /** Min count (non-zero) of the stat found in all heatmap buckets */ var int MinDensity; /** Max count of the stat found in all heatmap buckets */ var int MaxDensity; /** Radius of "bleed" added at each point on the heatmap */ var int HeatRadius; /** Number of Unreal units per pixel when generating the heatmap */ var float NumUnrealUnitsPerPixel; /** Reference to the material that renders the heatmap */ var MaterialInstanceConstant HeatmapMaterial; /** Reference to the texture generated from the heatmap data */ var Texture2D OverlayTexture; /** All data to be drawn by this visualizer */ var array<HeatMapPosEntry> HeatmapPositions; /** Non-normalized heat data as draw from the heatmap positions */ var array<float> PositionGrid; defaultproperties { FriendlyName="Heatmap Visualizer" OptionsDialogName="ID_HEATMAPOPTIONS" CurrentMinDensity=-1 CurrentMaxDensity=-1 HeatRadius=5 NumUnrealUnitsPerPixel=15 TextureXSize=256 TextureYSize=256 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |