Skip to content

Commit 5969078

Browse files
authored
Merge pull request #901 from uni-bremen-agst/fix/documentation-style
Refactor XML documentation – part 1
2 parents 3a56f41 + 0049d29 commit 5969078

File tree

590 files changed

+5287
-5251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

590 files changed

+5287
-5251
lines changed

Assets/SEE/Audio/AudioGameObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public bool Mute
6565
/// Default Constructor
6666
/// </summary>
6767
/// <param name="attachedObject">The game object this audio management object is attached to.</param>
68-
/// <param name="volume">The audio volume</param>
68+
/// <param name="volume">The audio volume.</param>
6969
/// <param name="muted">Whether or not the audio should be muted.</param>
7070
public AudioGameObject(GameObject attachedObject, float volume = 1.0f, bool muted = false)
7171
{

Assets/SEE/CameraPaths/CameraPath.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ private CameraPath(string path)
7373
///
7474
/// Precondition: 0 <= key < Count.
7575
/// </summary>
76-
/// <param name="key">the index of the path entry to be returned</param>
77-
/// <returns>key'th entry in the path</returns>
76+
/// <param name="key">The index of the path entry to be returned.</param>
77+
/// <returns>Key'th entry in the path.</returns>
7878
public PathData this[int key]
7979
{
8080
get => data[key];
@@ -85,9 +85,9 @@ public PathData this[int key]
8585
/// Adds the data captured about a particular camera position and rotation in a path
8686
/// at a given point in time.
8787
/// </summary>
88-
/// <param name="position">position of the camera</param>
89-
/// <param name="rotation">rotation of the camera</param>
90-
/// <param name="time">point in time in seconds since game start</param>
88+
/// <param name="position">Position of the camera.</param>
89+
/// <param name="rotation">Rotation of the camera.</param>
90+
/// <param name="time">Point in time in seconds since game start.</param>
9191
public void Add(Vector3 position, Quaternion rotation, float time)
9292
{
9393
data.Add(new PathData(position, rotation, time));
@@ -102,7 +102,7 @@ public void Add(Vector3 position, Quaternion rotation, float time)
102102
/// vector, the second three entries the rotation in Euler angles, and the
103103
/// the last entry contains the time. Each value is a float.
104104
/// </summary>
105-
/// <param name="filename">name of the output file</param>
105+
/// <param name="filename">Name of the output file.</param>
106106
public void Save(string filename)
107107
{
108108
List<string> outputs = new();
@@ -129,8 +129,8 @@ public void Save(string filename)
129129
/// Converts a float value to a string with two digits and a period as a
130130
/// decimal separator.
131131
/// </summary>
132-
/// <param name="value">the value to be converted</param>
133-
/// <returns>the float as a string in the requested format</returns>
132+
/// <param name="value">The value to be converted.</param>
133+
/// <returns>The float as a string in the requested format.</returns>
134134
private static string FloatToString(float value)
135135
{
136136
return value.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture);
@@ -164,7 +164,7 @@ private static string FloatToString(float value)
164164
///
165165
/// May throw any exception that can be thrown by System.IO.File.ReadAllLines.
166166
/// </summary>
167-
/// <param name="filename">name of the file containing the path data</param>
167+
/// <param name="filename">Name of the file containing the path data.</param>
168168
public static CameraPath ReadPath(string filename)
169169
{
170170
string[] data = System.IO.File.ReadAllLines(filename);
@@ -212,7 +212,7 @@ public static CameraPath ReadPath(string filename)
212212
///
213213
/// Implements interface IEnumerable.
214214
/// </summary>
215-
/// <returns>an enumerator over all path data entries in the path</returns>
215+
/// <returns>An enumerator over all path data entries in the path.</returns>
216216
public IEnumerator GetEnumerator()
217217
{
218218
return data.GetEnumerator();
@@ -225,7 +225,7 @@ public IEnumerator GetEnumerator()
225225
/// this direction. The whole path data is created as a single static root game object tagged
226226
/// by Tags.Path whose children represent the movements and the lookouts.
227227
/// </summary>
228-
/// <returns>game object representing the path</returns>
228+
/// <returns>Game object representing the path.</returns>
229229
public GameObject Draw()
230230
{
231231
GameObject result = new(string.IsNullOrEmpty(path) ? "anonymous path" : path)
@@ -247,8 +247,8 @@ public GameObject Draw()
247247
/// the direction the camera has looked in this path group. The length of this line
248248
/// is proportional to the sum over all times of the elements of a path group.
249249
/// </summary>
250-
/// <param name="pathGameObject">the parent the game objects created here are to become
251-
/// children of</param>
250+
/// <param name="pathGameObject">The parent the game objects created here are to become
251+
/// children of.</param>
252252
private void DrawLookOuts(GameObject pathGameObject)
253253
{
254254
int i = 0;
@@ -295,10 +295,10 @@ private void DrawLookOuts(GameObject pathGameObject)
295295
/// of their co-ordinates are not greater than the given allowed difference.
296296
/// Returns 1 or -1, respectively, if the vectors are not similar enough.
297297
/// </summary>
298-
/// <param name="me">one vector to be compared</param>
299-
/// <param name="other">other vector to be compared against the first one</param>
300-
/// <param name="allowedDifference">allowable difference between co-ordinates</param>
301-
/// <returns>0 if similar, -1 or 1 if dissimilar</returns>
298+
/// <param name="me">One vector to be compared.</param>
299+
/// <param name="other">Other vector to be compared against the first one.</param>
300+
/// <param name="allowedDifference">Allowable difference between co-ordinates.</param>
301+
/// <returns>0 if similar, -1 or 1 if dissimilar.</returns>
302302
private static int CompareTo(Vector3 me, Vector3 other, float allowedDifference)
303303
{
304304
{
@@ -334,8 +334,8 @@ private static int CompareTo(Vector3 me, Vector3 other, float allowedDifference)
334334
/// The order of the resulting aggregated path is arbitrary. It will not be consistent
335335
/// with the order of the given path.
336336
/// </summary>
337-
/// <param name="path"></param>
338-
/// <returns>path aggregation</returns>
337+
/// <param name="path">.</param>
338+
/// <returns>Path aggregation.</returns>
339339
private static List<PathData> Aggregate(List<PathData> path)
340340
{
341341
if (path.Count <= 1)
@@ -385,10 +385,10 @@ private static List<PathData> Aggregate(List<PathData> path)
385385
/// Compares the first argument against the second one based on the similarity
386386
/// of their position and rotation (ignoring time).
387387
/// </summary>
388-
/// <param name="x">first argument</param>
389-
/// <param name="y">second argument to be compared to the first argument</param>
388+
/// <param name="x">First argument.</param>
389+
/// <param name="y">Second argument to be compared to the first argument.</param>
390390
/// <returns>0 if x and y are similar, 1 if x is before y, otherwise -1 (the 'before'
391-
/// relation is arbitrary)</returns>
391+
/// relation is arbitrary).</returns>
392392
private static int CompareTo(PathData x, PathData y)
393393
{
394394
// The following value defines the difference below we still consider two
@@ -410,7 +410,7 @@ private static int CompareTo(PathData x, PathData y)
410410
/// is created as a line rendering becoming a component of the given object
411411
/// representing the path.
412412
/// </summary>
413-
/// <param name="pathGameObject"></param>
413+
/// <param name="pathGameObject">.</param>
414414
private void DrawPath(GameObject pathGameObject)
415415
{
416416
LineRenderer line = pathGameObject.AddComponent<LineRenderer>();
@@ -444,8 +444,8 @@ private void DrawPath(GameObject pathGameObject)
444444
/// <summary>
445445
/// Returns <paramref name="v"/> as a string for debugging.
446446
/// </summary>
447-
/// <param name="v">vector to be turned into a string</param>
448-
/// <returns><paramref name="v"/> as a string</returns>
447+
/// <param name="v">Vector to be turned into a string.</param>
448+
/// <returns><paramref name="v"/> as a string.</returns>
449449
private static string Dump(Vector3 v)
450450
{
451451
return ("(" + v.x.ToString("0.00000")

Assets/SEE/CameraPaths/CameraRecorder.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public class CameraRecorder : MonoBehaviour
6969
/// Returns the filename that does not currently exist taking into
7070
/// account the path, basename, take, and extension.
7171
/// </summary>
72-
/// <param name="objectName">the name of the tracked object to be added to the filename</param>
73-
/// <returns>filename for the recording</returns>
72+
/// <param name="objectName">The name of the tracked object to be added to the filename.</param>
73+
/// <returns>Filename for the recording.</returns>
7474
private string Filename(string objectName)
7575
{
7676
string result = NewName(Directory, Basename, objectName, Take, CameraPath.DotPathFileExtension);
@@ -87,12 +87,12 @@ private string Filename(string objectName)
8787
/// account the path, basename, take, and extension. This filename may or
8888
/// may not already exist.
8989
/// </summary>
90-
/// <param name="path">leading path</param>
91-
/// <param name="basename">base name of the file</param>
92-
/// <param name="objectName">the name of the tracked object to be added to the filename</param>
93-
/// <param name="take">the number of the take</param>
94-
/// <param name="extension">file extension</param>
95-
/// <returns>filename for the recording as a concatenation of all given input parameters</returns>
90+
/// <param name="path">Leading path.</param>
91+
/// <param name="basename">Base name of the file.</param>
92+
/// <param name="objectName">The name of the tracked object to be added to the filename.</param>
93+
/// <param name="take">The number of the take.</param>
94+
/// <param name="extension">File extension.</param>
95+
/// <returns>Filename for the recording as a concatenation of all given input parameters.</returns>
9696
private static string NewName(string path, string basename, string objectName, int take, string extension)
9797
{
9898
if (!path.EndsWith(Path.DirectorySeparatorChar.ToString()))
@@ -127,8 +127,8 @@ private void Start()
127127
/// <summary>
128128
/// Retrieves all objects to be tracked from the scene including the main camera.
129129
/// </summary>
130-
/// <param name="trackedObjects">the name of the objects to be tracked</param>
131-
/// <returns>all objects to be tracked</returns>
130+
/// <param name="trackedObjects">The name of the objects to be tracked.</param>
131+
/// <returns>All objects to be tracked.</returns>
132132
private static GameObject[] GetTrackedObjects(string[] trackedObjects)
133133
{
134134
if (trackedObjects == null || trackedObjects.Length == 0)

Assets/SEE/CameraPaths/PathData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public struct PathData
1515
/// <summary>
1616
/// Sets the data captured about a particular position in a path at a given point in time.
1717
/// </summary>
18-
/// <param name="position">position of the camera</param>
19-
/// <param name="rotation">rotation of the camera</param>
20-
/// <param name="time">point in time in seconds since game start</param>
18+
/// <param name="position">Position of the camera.</param>
19+
/// <param name="rotation">Rotation of the camera.</param>
20+
/// <param name="time">Point in time in seconds since game start.</param>
2121
public PathData(Vector3 position, Quaternion rotation, float time)
2222
{
2323
this.Position = position;

Assets/SEE/CameraPaths/PathReplay.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public class PathReplay : MonoBehaviour
7171
/// as a serialized list of doubles (position.x, position.y,
7272
/// position.z, time for each entry in the path).
7373
/// </summary>
74-
/// <param name="path">path to be serialized</param>
75-
/// <returns>serialized position and timing data of path</returns>
74+
/// <param name="path">Path to be serialized.</param>
75+
/// <returns>Serialized position and timing data of path.</returns>
7676
private static IList<double> VectorsToList(CameraPath path)
7777
{
7878
List<double> list = new List<double>();
@@ -89,9 +89,9 @@ private static IList<double> VectorsToList(CameraPath path)
8989
/// <summary>
9090
/// Deserializes the list of doubles as list of Vector4s.
9191
/// </summary>
92-
/// <param name="list">list to be deserialized</param>
93-
/// <returns>list of Vectors4 (x,y,z,w) where x,y,z are
94-
/// 3D co-ordinates and w is the time deserialized from given list</returns>
92+
/// <param name="list">List to be deserialized.</param>
93+
/// <returns>List of Vectors4 (x,y,z,w) where x,y,z are
94+
/// 3D co-ordinates and w is the time deserialized from given list.</returns>
9595
private static Vector4[] ListToVectors(IList<double> list)
9696
{
9797
int num = list.Count / 4;
@@ -181,8 +181,8 @@ private void Start()
181181
/// <summary>
182182
/// Activate (true)/deactivates (false) <paramref name="parent"/> and all its descendants.
183183
/// </summary>
184-
/// <param name="parent">root of the game-object tree</param>
185-
/// <param name="activate">whether the game objects should be activated or deactivated</param>
184+
/// <param name="parent">Root of the game-object tree.</param>
185+
/// <param name="activate">Whether the game objects should be activated or deactivated.</param>
186186
private static void Activate(GameObject parent, bool activate)
187187
{
188188
parent.SetActive(activate);
@@ -222,10 +222,10 @@ private void Update()
222222
///
223223
/// Increases the current index to the next point reached (but not farther than path.Count-1).
224224
/// </summary>
225-
/// <param name="current">the current index into the path; will be increased to the
226-
/// next index we need to reach at the given point in time</param>
227-
/// <param name="time">current point in time since game start</param>
228-
/// <returns>the interpolated rotation on the way between two subsequent path points</returns>
225+
/// <param name="current">The current index into the path; will be increased to the
226+
/// next index we need to reach at the given point in time.</param>
227+
/// <param name="time">Current point in time since game start.</param>
228+
/// <returns>The interpolated rotation on the way between two subsequent path points.</returns>
229229
private Quaternion Forward(ref int current, float time)
230230
{
231231
while (current < path.Count && path[current].Time < time)

Assets/SEE/Controls/Actions/AbstractPlayerAction.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public virtual void Redo()
5959
/// <summary>
6060
/// Returns the <see cref="ActionStateType"/> of the specific action.
6161
/// </summary>
62-
/// <returns>the <see cref="ActionStateType"/> of the specific action</returns>
62+
/// <returns>The <see cref="ActionStateType"/> of the specific action.</returns>
6363
public abstract ActionStateType GetActionStateType();
6464

6565
/// <summary>
@@ -86,13 +86,13 @@ public virtual void Start()
8686
/// Will be called upon every frame when this action is being executed.
8787
/// See <see cref="IReversibleAction.Update"/>.
8888
/// </summary>
89-
/// <returns>true if action is completed</returns>
89+
/// <returns>True if action is completed.</returns>
9090
public abstract bool Update();
9191

9292
/// <summary>
9393
/// Returns a new instance of the same type as this particular type of ReversibleAction.
9494
/// </summary>
95-
/// <returns>new instance</returns>
95+
/// <returns>New instance.</returns>
9696
public abstract IReversibleAction NewInstance();
9797

9898
/// <summary>
@@ -109,7 +109,7 @@ public virtual void Stop()
109109
/// Sets <see cref="HoveredObject"/> to given <paramref name="interactableObject"/>.
110110
/// Will be called while any <see cref="InteractableObject"/> is being hovered over.
111111
/// </summary>
112-
/// <param name="interactableObject">new value for <see cref="HoveredObject"/></param>
112+
/// <param name="interactableObject">New value for <see cref="HoveredObject"/>.</param>
113113
protected void LocalAnyHoverIn(InteractableObject interactableObject)
114114
{
115115
HoveredObject = interactableObject.gameObject;
@@ -119,7 +119,7 @@ protected void LocalAnyHoverIn(InteractableObject interactableObject)
119119
/// Sets <see cref="HoveredObject"/> to <code>null</code>.
120120
/// Will be called whenever any <see cref="InteractableObject"/> is no longer being hovered over.
121121
/// </summary>
122-
/// <param name="interactableObject">object no longer be hovered over (ignored here)</param>
122+
/// <param name="interactableObject">Object no longer be hovered over (ignored here).</param>
123123
protected void LocalAnyHoverOut(InteractableObject interactableObject)
124124
{
125125
HoveredObject = null;
@@ -130,19 +130,19 @@ protected void LocalAnyHoverOut(InteractableObject interactableObject)
130130
/// that may need to be undone and whether it is still ongoing.
131131
/// Implements <see cref="IReversibleAction.CurrentProgress"/>.
132132
/// </summary>
133-
/// <returns>the current state of the action</returns>
133+
/// <returns>The current state of the action.</returns>
134134
public IReversibleAction.Progress CurrentProgress() => CurrentState;
135135

136136
/// <summary>
137137
/// Returns the IDs of all gameObjects manipulated by the specific action.
138138
/// </summary>
139-
/// <returns>All IDs of manipulated gameObjects</returns>
139+
/// <returns>All IDs of manipulated gameObjects.</returns>
140140
public abstract HashSet<string> GetChangedObjects();
141141

142142
/// <summary>
143143
/// A getter for the ID of this action.
144144
/// </summary>
145-
/// <returns>The ID of this action as a string</returns>
145+
/// <returns>The ID of this action as a string.</returns>
146146
public string GetId() => id.ToString();
147147
}
148148
}

0 commit comments

Comments
 (0)