Browse Source

Documentation

Marko Pintera 10 years ago
parent
commit
1fa051f852

+ 34 - 1
BansheeEditor/Include/BsProjectResourceMeta.h

@@ -5,6 +5,9 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	/**
+	 * @brief	Contains meta-data for a resource stored in the ProjectLibrary.
+	 */
 	class ProjectResourceMeta : public IReflectable
 	class ProjectResourceMeta : public IReflectable
 	{
 	{
 	private:
 	private:
@@ -13,12 +16,38 @@ namespace BansheeEngine
 	public:
 	public:
 		explicit ProjectResourceMeta(const ConstructPrivately&);
 		explicit ProjectResourceMeta(const ConstructPrivately&);
 
 
+		/**
+		 * @brief	Creates a new project library resource meta-data entry.
+		 *
+		 * @param	uuid				UUID of the resource.
+		 * @param	typeId				RTTI type id of the resource.
+		 * @param	resourceMetaData	Non-project library specific meta-data.
+		 * @param	importOptions		Import options used for importing the resource.
+		 *
+		 * @return	New project library resource meta data instance.
+		 */
 		static ProjectResourceMetaPtr create(const String& uuid, UINT32 typeId, const ResourceMetaDataPtr& resourceMetaData,
 		static ProjectResourceMetaPtr create(const String& uuid, UINT32 typeId, const ResourceMetaDataPtr& resourceMetaData,
 			const ImportOptionsPtr& importOptions);
 			const ImportOptionsPtr& importOptions);
 
 
+		/**
+		 * @brief	Returns the UUID of the resource this meta data belongs to.
+		 */
 		const String& getUUID() const { return mUUID; }
 		const String& getUUID() const { return mUUID; }
+
+		/**
+		 * @brief	Returns the non-project library specific meta-data,
+		 */
 		ResourceMetaDataPtr getResourceMetaData() const { return mResourceMeta; }
 		ResourceMetaDataPtr getResourceMetaData() const { return mResourceMeta; }
+
+		/**
+		 * @brief	Returns the import options used for importing the resource this
+		 *			object is referencing.
+		 */
 		const ImportOptionsPtr& getImportOptions() const { return mImportOptions; }
 		const ImportOptionsPtr& getImportOptions() const { return mImportOptions; }
+
+		/**
+		 * @brief	Returns the RTTI type ID of the resource this object is referencing.
+		 */
 		UINT32 getTypeID() const { return mTypeId; }
 		UINT32 getTypeID() const { return mTypeId; }
 
 
 	private:
 	private:
@@ -30,11 +59,15 @@ namespace BansheeEngine
 		/************************************************************************/
 		/************************************************************************/
 		/* 								RTTI		                     		*/
 		/* 								RTTI		                     		*/
 		/************************************************************************/
 		/************************************************************************/
+
+		/**
+		 * @brief	Creates a new empty meta-data instance. Used only for serialization purposes.
+		 */
 		static ProjectResourceMetaPtr createEmpty();
 		static ProjectResourceMetaPtr createEmpty();
 
 
 	public:
 	public:
 		friend class ProjectResourceMetaRTTI;
 		friend class ProjectResourceMetaRTTI;
 		static RTTITypeBase* getRTTIStatic();
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;	
 	};
 	};
 }
 }

+ 6 - 5
BansheeEditor/Include/BsResourceImporter.h

@@ -6,8 +6,9 @@
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
 	/**
 	/**
-	 * @brief	Imports Banshee resources. Essentially just does a pass-through
-	 *			as source asset to import and resulting resource are one and the same.
+	 * @brief	Imports built-in Banshee resources (marked with .asset extension). 
+	 *			Essentially just does a pass-through as source asset to import and 
+	 *			resulting resource are one and the same.
 	 *
 	 *
 	 * @note	This is useful in the project library where we sometimes want to save processed
 	 * @note	This is useful in the project library where we sometimes want to save processed
 	 *			resources in the library.
 	 *			resources in the library.
@@ -19,13 +20,13 @@ namespace BansheeEngine
 		virtual ~ResourceImporter();
 		virtual ~ResourceImporter();
 
 
 		/** @copydoc SpecificImporter::isExtensionSupported */
 		/** @copydoc SpecificImporter::isExtensionSupported */
-		virtual bool isExtensionSupported(const WString& ext) const;
+		virtual bool isExtensionSupported(const WString& ext) const override;
 
 
 		/** @copydoc SpecificImporter::isMagicNumberSupported */
 		/** @copydoc SpecificImporter::isMagicNumberSupported */
-		virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const;
+		virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const override;
 
 
 		/** @copydoc SpecificImporter::import */
 		/** @copydoc SpecificImporter::import */
-		virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions);
+		virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions) override;
 
 
 		static const WString DEFAULT_EXTENSION;
 		static const WString DEFAULT_EXTENSION;
 	};
 	};

+ 42 - 2
BansheeEditor/Include/BsSceneGrid.h

@@ -7,21 +7,61 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	/**
+	 * @brief	Handles rendering of the grid in the scene view.
+	 */
 	class SceneGrid
 	class SceneGrid
 	{
 	{
 	public:
 	public:
 		SceneGrid();
 		SceneGrid();
 
 
+		/**
+		 * @brief	Sets the grid origin in world coordinates.
+		 */
 		void setOrigin(const Vector3& origin);
 		void setOrigin(const Vector3& origin);
+
+		/**
+		 * @brief	Sets the total width/height of the grid in XZ plane.
+		 */
 		void setSize(UINT32 size);
 		void setSize(UINT32 size);
+		
+		/**
+		 * @brief	Sets the spacing between grid lines.
+		 */
 		void setSpacing(float spacing);
 		void setSpacing(float spacing);
+
+		/**
+		 * @brief	Changes the active editor settings. Grid properties
+		 *			will be updated internally when editor settings change.
+		 */
 		void setSettings(const EditorSettingsPtr& settings);
 		void setSettings(const EditorSettingsPtr& settings);
 
 
-		void render(const CameraHandlerPtr& camera, DrawList& drawList);
+		/**
+		 * @brief	Triggered by the renderer when rendering the specified camera.
+		 *
+		 * @param	camera		Camera about to be rendered.
+		 * @param	drawList	Draw list we can use to queue our render commands in.
+		 *
+		 * @note	Internal method.
+		 */
+		void _render(const CameraHandlerPtr& camera, DrawList& drawList);
+
+		/**
+		 * @brief	Called once per frame.
+		 *
+		 * @note	Internal method.
+		 */
 		void update();
 		void update();
 	private:
 	private:
+		/**
+		 * @brief	Rebuilds the scene grid mesh. Call this whenever grid parameters change.
+		 */
 		void updateGridMesh();
 		void updateGridMesh();
-		void updateFromProjectSettings();
+
+		/**
+		 * @brief	Updates internal grid parameters from the attached settings object.
+		 */
+		void updateFromEditorSettings();
 
 
 		HMesh mGridMesh;
 		HMesh mGridMesh;
 		HMaterial mGridMaterial;
 		HMaterial mGridMaterial;

+ 76 - 0
BansheeEditor/Include/BsScenePicking.h

@@ -9,8 +9,14 @@ namespace BansheeEngine
 {
 {
 	class ScenePickingCore;
 	class ScenePickingCore;
 
 
+	/**
+	 * @brief	Handles picking of scene objects with a pointer in scene view.
+	 */
 	class ScenePicking : public Module<ScenePicking>
 	class ScenePicking : public Module<ScenePicking>
 	{
 	{
+		/**
+		 * @brief	Contains information about a single pickable item (mesh).
+		 */
 		struct RenderablePickData
 		struct RenderablePickData
 		{
 		{
 			SPtr<MeshCore> mesh;
 			SPtr<MeshCore> mesh;
@@ -25,7 +31,30 @@ namespace BansheeEngine
 		ScenePicking();
 		ScenePicking();
 		~ScenePicking();
 		~ScenePicking();
 
 
+		/**
+		 * @brief	Attempts to find a single nearest scene object under the provided position and area.
+		 *
+		 * @param	cam			Camera to perform the picking from.
+		 * @param	position	Pointer position relative to the camera viewport, in pixels.
+		 * @param	area		Width/height of the checked area in pixels. Use (1, 1) if you want the
+		 *						exact position under the pointer.
+		 *
+		 * @return	Nearest SceneObject under the provided area, or an empty handle if no object is found.
+		 */
 		HSceneObject pickClosestObject(const CameraHandlerPtr& cam, const Vector2I& position, const Vector2I& area);
 		HSceneObject pickClosestObject(const CameraHandlerPtr& cam, const Vector2I& position, const Vector2I& area);
+
+
+		/**
+		 * @brief	Attempts to find all scene objects under the provided position and area. This does not mean
+		 *			objects occluded by other objects.
+		 *
+		 * @param	cam			Camera to perform the picking from.
+		 * @param	position	Pointer position relative to the camera viewport, in pixels.
+		 * @param	area		Width/height of the checked area in pixels. Use (1, 1) if you want the
+		 *						exact position under the pointer.
+		 *
+		 * @return	A list of SceneObject%s under the provided area.
+		 */
 		Vector<HSceneObject> pickObjects(const CameraHandlerPtr& cam, const Vector2I& position, const Vector2I& area);
 		Vector<HSceneObject> pickObjects(const CameraHandlerPtr& cam, const Vector2I& position, const Vector2I& area);
 
 
 	private:
 	private:
@@ -33,14 +62,30 @@ namespace BansheeEngine
 
 
 		typedef Set<RenderablePickData, std::function<bool(const RenderablePickData&, const RenderablePickData&)>> RenderableSet;
 		typedef Set<RenderablePickData, std::function<bool(const RenderablePickData&, const RenderablePickData&)>> RenderableSet;
 
 
+		/**
+		 * @brief	Encodes a pickable object identifier to a unique color.
+		 */
 		static Color encodeIndex(UINT32 index);
 		static Color encodeIndex(UINT32 index);
+
+		/**
+		 * @brief	Decodes a color into a unique object identifier. Color should
+		 *			have initially been encoded with ::encodeIndex.
+		 */
 		static UINT32 decodeIndex(Color color);
 		static UINT32 decodeIndex(Color color);
 
 
 		ScenePickingCore* mCore;
 		ScenePickingCore* mCore;
 	};
 	};
 
 
+	/**
+	 * @brief	Core thread version of the ScenePicking manager. Handles
+	 *			actual rendering.
+	 */
 	class ScenePickingCore
 	class ScenePickingCore
 	{
 	{
+		/**
+		 * @brief	A list of materials and their parameters to be used for rendering
+		 *			of pickable objects.
+		 */
 		struct MaterialData
 		struct MaterialData
 		{
 		{
 			SPtr<MaterialCore> mMatPickingCore;
 			SPtr<MaterialCore> mMatPickingCore;
@@ -59,11 +104,42 @@ namespace BansheeEngine
 		};
 		};
 
 
 	public:
 	public:
+		/**
+		 * @brief	Initializes the manager. Must be called right after construction.
+		 */
 		void initialize();
 		void initialize();
+
+		/**
+		 * @brief	Destroys the manager. Must be called right before destruction.
+		 */
 		void destroy();
 		void destroy();
 
 
+		/**
+		 * @brief	Sets up the viewport, materials and their parameters as needed for picking. Also renders
+		 *			all the provided renderable objects. Must be followed by ::corePickingEnd. You may call other methods
+		 *			after this one, but you must ensure they render proper unique pickable colors that can be resolved
+		 *			to SceneObject%s later.
+		 *
+		 * @param	target			Render target to render to.
+		 * @param	viewportArea	Normalized area of the render target to render in.
+		 * @param	renderables		A set of pickable Renderable objects to render.
+		 * @param	position		Position of the pointer where to pick objects, in pixels relative to viewport.
+		 * @param	area			Width/height of the area to pick objects, in pixels.
+		 */
 		void corePickingBegin(const SPtr<RenderTargetCore>& target, const Rect2& viewportArea, const ScenePicking::RenderableSet& renderables,
 		void corePickingBegin(const SPtr<RenderTargetCore>& target, const Rect2& viewportArea, const ScenePicking::RenderableSet& renderables,
 			const Vector2I& position, const Vector2I& area);
 			const Vector2I& position, const Vector2I& area);
+		
+		/**
+		 * @brief	Ends picking operation started by ::corePickingBegin. Render target is resolved and objects in the picked area
+		 *			are returned.
+		 *
+		 * @param	target			Render target we're rendering to.
+		 * @param	viewportArea	Normalized area of the render target we're rendering in.
+		 * @param	position		Position of the pointer where to pick objects, in pixels relative to viewport.
+		 * @param	area			Width/height of the area to pick objects, in pixels.
+		 * @param	asyncOp			Async operation handle that when complete will contain the results of the picking
+		 *							operation in the form of Vector<SelectedObject>.
+		 */
 		void corePickingEnd(const SPtr<RenderTargetCore>& target, const Rect2& viewportArea, const Vector2I& position,
 		void corePickingEnd(const SPtr<RenderTargetCore>& target, const Rect2& viewportArea, const Vector2I& position,
 			const Vector2I& area, AsyncOp& asyncOp);
 			const Vector2I& area, AsyncOp& asyncOp);
 
 

+ 51 - 0
BansheeEditor/Include/BsSceneViewHandler.h

@@ -5,22 +5,73 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	/**
+	 * @brief	Handles various operations specific to the scene view, like updating,
+	 *			selecting and rendering handles, selecting objects, rendering scene grid, etc.
+	 *
+	 * @note	Internal class.
+	 */
 	class BS_ED_EXPORT SceneViewHandler
 	class BS_ED_EXPORT SceneViewHandler
 	{
 	{
 	public:
 	public:
 		SceneViewHandler(EditorWidgetBase* parentWidget, const SPtr<CameraHandler>& camera);
 		SceneViewHandler(EditorWidgetBase* parentWidget, const SPtr<CameraHandler>& camera);
 		virtual ~SceneViewHandler();
 		virtual ~SceneViewHandler();
 
 
+		/**
+		 * @brief	Called once per frame. Updates gizmos and the scene grid.
+		 */
 		void update();
 		void update();
+
+		/**
+		 * @brief	Updates currently active handles and updates 
+		 *			handles and selection drawing.
+		 *
+		 * @param	position	Position of the pointer relative to the scene camera viewport.
+		 * @param	delta		Movement of the pointer since last frame.
+		 */
 		void updateHandle(const Vector2I& position, const Vector2I& delta);
 		void updateHandle(const Vector2I& position, const Vector2I& delta);
+
+		/**
+		 * @brief	Selects a handle under the pointer position.
+		 *
+		 * @param	position	Position of the pointer relative to the scene camera viewport.
+		 */
 		void trySelectHandle(const Vector2I& position);
 		void trySelectHandle(const Vector2I& position);
+
+		/**
+		 * @brief	Is any handle currently active.
+		 */
 		bool isHandleActive() const;
 		bool isHandleActive() const;
+
+		/**
+		 * @brief	Deselects any currently active handles.
+		 */
 		void clearHandleSelection();
 		void clearHandleSelection();
+
+		/**
+		 * @brief	Attempts to select a scene object under the pointer position.
+		 *
+		 * @param	position	Position of the pointer relative to the scene camera viewport.
+		 * @param	additive	Should this selection add to the existing selection, or replace it.
+		 */
 		void pickObject(const Vector2I& position, bool additive);
 		void pickObject(const Vector2I& position, bool additive);
 
 
 	protected:
 	protected:
+		/**
+		 * @brief	Triggered by the Renderer when rendering the specified viewport.
+		 *
+		 * @param	viewport	Viewport about to be rendered.
+		 * @param	drawList	Draw list we can use to queue our render commands in.
+		 */
 		void render(const Viewport* viewport, DrawList& drawList);
 		void render(const Viewport* viewport, DrawList& drawList);
 
 
+		/**
+		 * @brief	Checks is the pointer currently within the provided window, and if it is not
+		 *			the cursor is wrapped in such a way so that it is returned to within the window bounds.
+		 *		
+		 * @return	How far was the cursor moved due to wrapping. This will be (0, 0) if the cursor is within
+		 *			window bounds initially.
+		 */
 		Vector2I wrapCursorToWindow();
 		Vector2I wrapCursorToWindow();
 
 
 	private:
 	private:

+ 43 - 1
BansheeEditor/Include/BsSelection.h

@@ -5,27 +5,69 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	/**
+	 * @brief	Handles SceneObject and Resource selection.
+	 */
 	class BS_ED_EXPORT Selection : public Module<Selection>
 	class BS_ED_EXPORT Selection : public Module<Selection>
 	{
 	{
 	public:
 	public:
 		Selection();
 		Selection();
 		~Selection();
 		~Selection();
 
 
+		/**
+		 * @brief	Returns a currently selected set of scene objects.
+		 */
 		const Vector<HSceneObject>& getSceneObjects() const;
 		const Vector<HSceneObject>& getSceneObjects() const;
+
+		/**
+		 * @brief	Sets a new set of scene objects to select, replacing the old ones.
+		 */
 		void setSceneObjects(const Vector<HSceneObject>& sceneObjects);
 		void setSceneObjects(const Vector<HSceneObject>& sceneObjects);
 
 
+		/**
+		 * @brief	Returns a currently selected set of resource paths.
+		 */
 		const Vector<Path>& getResourcePaths() const;
 		const Vector<Path>& getResourcePaths() const;
+
+		/**
+		 * @brief	Sets a new set of resource paths to select, replacing the old ones.
+		 */
 		void setResourcePaths(const Vector<Path>& paths);
 		void setResourcePaths(const Vector<Path>& paths);
 
 
+		/**
+		 * @brief	Returns a currently selected set of resource UUIDs.
+		 */
 		Vector<String> getResourceUUIDs() const;
 		Vector<String> getResourceUUIDs() const;
+
+		/**
+		 * @brief	Sets a new set of resource UUIDs to select, replacing the old ones.
+		 */
 		void setResourceUUIDs(const Vector<String>& UUIDs);
 		void setResourceUUIDs(const Vector<String>& UUIDs);
 
 
+		/**
+		 * @brief	Deselects all currently selected scene objects.
+		 */
 		void clearSceneSelection();
 		void clearSceneSelection();
+
+		/**
+		 * @brief	Deselects all currently selected resources.
+		 */
 		void clearResourceSelection();
 		void clearResourceSelection();
 
 
-		Event<void(const Vector<HSceneObject>&, const Vector<Path>&)> onSelectionChanged;
+		/**
+		 * @brief	Triggered whenever scene object or resource selection changes. The provided
+		 *			parameters will contain the newly selected objects/resource paths.
+		 */
+		Event<void(const Vector<HSceneObject>&, const Vector<Path>&)> onSelectionChanged; 
 	private:
 	private:
+		/**
+		 * @brief	Triggered when the scene object selection in the scene tree view changes.
+		 */
 		void sceneSelectionChanged();
 		void sceneSelectionChanged();
+
+		/**
+		 * @brief	Triggered when the resource selection in the resource tree view changes.
+		 */
 		void resourceSelectionChanged();
 		void resourceSelectionChanged();
 
 
 		Vector<HSceneObject> mSelectedSceneObjects;
 		Vector<HSceneObject> mSelectedSceneObjects;

+ 43 - 0
BansheeEditor/Include/BsSelectionRenderer.h

@@ -9,8 +9,14 @@ namespace BansheeEngine
 {
 {
 	class SelectionRendererCore;
 	class SelectionRendererCore;
 
 
+	/**
+	 * @brief	Handles rendering of the selected SceneObject%s overlay.
+	 */
 	class SelectionRenderer
 	class SelectionRenderer
 	{
 	{
+		/**
+		 * @brief	Contains data about a selected mesh.
+		 */
 		struct ObjectData
 		struct ObjectData
 		{
 		{
 			SPtr<MeshCoreBase> mesh;
 			SPtr<MeshCoreBase> mesh;
@@ -21,17 +27,37 @@ namespace BansheeEngine
 		SelectionRenderer();
 		SelectionRenderer();
 		~SelectionRenderer();
 		~SelectionRenderer();
 
 
+		/**
+		 * @brief	Called once per frame. Updates the overlay depending on current selection.
+		 *
+		 * @note	Internal method.
+		 */
 		void update(const CameraHandlerPtr& camera);
 		void update(const CameraHandlerPtr& camera);
 
 
 	private:
 	private:
 		friend class SelectionRendererCore;
 		friend class SelectionRendererCore;
 
 
+		/**
+		 * @brief	Initializes the core thread counterpart of the selection renderer.
+		 *
+		 * @param	mat	Material used for selection rendering.
+		 */
 		void initializeCore(const SPtr<MaterialCore>& mat);
 		void initializeCore(const SPtr<MaterialCore>& mat);
+
+		/**
+		 * @brief	Destroys the core thread counterpart of the selection renderer.
+		 *
+		 * @param	core	Previously constructed core thread selection renderer instance.
+		 */
 		void destroyCore(SelectionRendererCore* core);
 		void destroyCore(SelectionRendererCore* core);
 
 
 		SelectionRendererCore* mCore;
 		SelectionRendererCore* mCore;
 	};
 	};
 
 
+	/**
+	 * @brief	Core thread version of the selection renderer, that handles
+	 *			actual rendering.
+	 */
 	class SelectionRendererCore
 	class SelectionRendererCore
 	{
 	{
 		friend class SelectionRenderer;
 		friend class SelectionRenderer;
@@ -42,9 +68,26 @@ namespace BansheeEngine
 		SelectionRendererCore(const PrivatelyConstuct& dummy);
 		SelectionRendererCore(const PrivatelyConstuct& dummy);
 
 
 	private:
 	private:
+		/**
+		 * @brief	Initializes the selection renderer. Should be called right
+		 *			after construction.
+		 *
+		 * @param	mat	Material used for selection rendering.
+		 */
 		void initialize(const SPtr<MaterialCore>& mat);
 		void initialize(const SPtr<MaterialCore>& mat);
 
 
+		/**
+		 * @brief	Triggered by the Renderer when the overlay should be rendered.
+		 */
 		void render();
 		void render();
+
+		/**
+		 * @brief	Updates the internal data that determines what will be rendered on the next
+		 *			::render call.
+		 *
+		 * @param	camera	Camera to render the selection overlay in.
+		 * @param	objects	A set of objects to render with the selection overlay.
+		 */
 		void updateData(const SPtr<CameraHandlerCore>& camera, const Vector<SelectionRenderer::ObjectData>& objects);
 		void updateData(const SPtr<CameraHandlerCore>& camera, const Vector<SelectionRenderer::ObjectData>& objects);
 
 
 		Vector<SelectionRenderer::ObjectData> mObjects;
 		Vector<SelectionRenderer::ObjectData> mObjects;

+ 55 - 6
BansheeEditor/Include/BsUndoRedo.h

@@ -5,8 +5,15 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	/**
+	 * @brief	Handles editor-wide undo & redo operations.
+	 */
 	class UndoRedo : public Module<UndoRedo>
 	class UndoRedo : public Module<UndoRedo>
 	{
 	{
+		/**
+		 * @brief	Contains data about a single undo/redo group.
+		 *			Groups allow you to create context sensitive undo/redo operations.
+		 */
 		struct GroupData
 		struct GroupData
 		{
 		{
 			String name;
 			String name;
@@ -17,15 +24,63 @@ namespace BansheeEngine
 		UndoRedo();
 		UndoRedo();
 		~UndoRedo();
 		~UndoRedo();
 
 
+		/**
+		 * @brief	Executes the last command on the undo stack, undoing its operations.
+		 */
 		void undo();
 		void undo();
+
+		/**
+		 * @brief	Executes the last command on the redo stack (last command we called undo on), 
+		 *			re-applying its operation.
+		 */
 		void redo();
 		void redo();
 
 
+		/**
+		 * @brief	Creates a new undo/redo group. All new commands will be registered to this group.
+		 *			You may remove the group and all of its commands by calling ::popGroup.
+		 *
+		 *			For example you might require global editor-wide undo/redo operations, and also
+		 *			more specific ones like input in an input box. When the user is done with the input
+		 *			box you no longer require its undo operations and you may use groups to easily
+		 *			remove them.
+		 *
+		 * @param	name	Unique name for the group.
+		 */
 		void pushGroup(const String& name);
 		void pushGroup(const String& name);
+
+		/**
+		 * @brief	Removes all the command registered to the current undo/redo group.
+		 *
+		 * @param	name	Unique name for the group.
+		 */
 		void popGroup(const String& name);
 		void popGroup(const String& name);
 
 
+		/**
+		 * @brief	Registers a new undo command.
+		 */
 		void registerCommand(EditorCommand* command);
 		void registerCommand(EditorCommand* command);
 
 
 	private:
 	private:
+		/**
+		 * @brief	Removes the last undo command from the undo stack, and returns it.
+		 */
+		EditorCommand* removeLastFromUndoStack();
+
+		/**
+		 * @brief	Adds a new command to the undo stack.
+		 */
+		void addToUndoStack(EditorCommand* command);
+
+		/**
+		 * @brief	Removes all entries from the undo stack.
+		 */
+		void clearUndoStack();
+
+		/**
+		 * @brief	Removes all entries from the redo stack.
+		 */
+		void clearRedoStack();
+
 		static const UINT32 MAX_STACK_ELEMENTS;
 		static const UINT32 MAX_STACK_ELEMENTS;
 
 
 		EditorCommand** mUndoStack;
 		EditorCommand** mUndoStack;
@@ -38,11 +93,5 @@ namespace BansheeEngine
 		UINT32 mRedoNumElements;
 		UINT32 mRedoNumElements;
 
 
 		Stack<GroupData> mGroups;
 		Stack<GroupData> mGroups;
-
-		EditorCommand* removeLastFromUndoStack();
-		void addToUndoStack(EditorCommand* command);
-
-		void clearUndoStack();
-		void clearRedoStack();
 	};
 	};
 }
 }

+ 4 - 4
BansheeEditor/Source/BsSceneGrid.cpp

@@ -72,16 +72,16 @@ namespace BansheeEngine
 	void SceneGrid::setSettings(const EditorSettingsPtr& settings)
 	void SceneGrid::setSettings(const EditorSettingsPtr& settings)
 	{
 	{
 		mSettings = settings;
 		mSettings = settings;
-		updateFromProjectSettings();
+		updateFromEditorSettings();
 	}
 	}
 
 
 	void SceneGrid::update()
 	void SceneGrid::update()
 	{
 	{
 		if (mSettings != nullptr && mSettingsHash != mSettings->getHash())
 		if (mSettings != nullptr && mSettingsHash != mSettings->getHash())
-			updateFromProjectSettings();
+			updateFromEditorSettings();
 	}
 	}
 
 
-	void SceneGrid::render(const CameraHandlerPtr& camera, DrawList& drawList)
+	void SceneGrid::_render(const CameraHandlerPtr& camera, DrawList& drawList)
 	{
 	{
 		MaterialPtr mat = mGridMaterial.getInternalPtr();
 		MaterialPtr mat = mGridMaterial.getInternalPtr();
 		MeshPtr mesh = mGridMesh.getInternalPtr();
 		MeshPtr mesh = mGridMesh.getInternalPtr();
@@ -102,7 +102,7 @@ namespace BansheeEngine
 		drawList.add(mat, mesh, 0, Vector3::ZERO);
 		drawList.add(mat, mesh, 0, Vector3::ZERO);
 	}
 	}
 
 
-	void SceneGrid::updateFromProjectSettings()
+	void SceneGrid::updateFromEditorSettings()
 	{
 	{
 		setSize(mSettings->getGridSize());
 		setSize(mSettings->getGridSize());
 		setSpacing(mSettings->getGridSpacing());
 		setSpacing(mSettings->getGridSpacing());

+ 1 - 1
BansheeEditor/Source/BsSceneViewHandler.cpp

@@ -115,7 +115,7 @@ namespace BansheeEngine
 		if (mCamera->getViewport().get() != viewport)
 		if (mCamera->getViewport().get() != viewport)
 			return;
 			return;
 
 
-		mSceneGrid->render(mCamera, drawList);
+		mSceneGrid->_render(mCamera, drawList);
 	}
 	}
 
 
 	Vector2I SceneViewHandler::wrapCursorToWindow()
 	Vector2I SceneViewHandler::wrapCursorToWindow()