Marko Pintera 11 лет назад
Родитель
Сommit
0bec47140b

+ 12 - 4
CamelotCore/Include/CmComponent.h

@@ -5,6 +5,10 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Components represent primarily logic elements in the scene. 
+	 *			They are attached to scene objects.
+	 */
 	class CM_EXPORT Component : public GameObject
 	{
 	public:
@@ -14,7 +18,7 @@ namespace BansheeEngine
 		HSceneObject sceneObject() const { return mParent; }
 
 		/**
-		 * @brief	Same as sceneObject(), just a shorter name.
+		 * @copydoc	sceneObject
 		 */
 		HSceneObject SO() const { return sceneObject(); }
 
@@ -23,7 +27,7 @@ namespace BansheeEngine
 		 * 			
 		 * @note	Internal method.
 		 */
-		virtual void update() = 0;
+		virtual void update() { }
 
 		/**
 		 * @brief	Removes the component from parent SceneObject and deletes it. All
@@ -38,12 +42,16 @@ namespace BansheeEngine
 		Component(const HSceneObject& parent);
 		virtual ~Component();
 
+		/**
+		 * @brief	Called just before the component is destroyed.
+		 */
 		virtual void onDestroyed() {}
-
-		HSceneObject mParent;
 	private:
 		Component(const Component& other) { }
 
+	protected:
+		HSceneObject mParent;
+
 		/************************************************************************/
 		/* 								RTTI		                     		*/
 		/************************************************************************/

+ 24 - 3
CamelotCore/Include/CmGameObject.h

@@ -5,6 +5,9 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Contains instance data that is held by all GameObject handles.
+	 */
 	struct GameObjectInstanceData
 	{
 		GameObjectInstanceData()
@@ -15,27 +18,45 @@ namespace BansheeEngine
 		UINT64 mInstanceId;
 	};
 
+	/**
+	 * @brief	Type of object that can be referenced by a GameObject handle.
+	 *			Each object has an unique ID and is registered with the GameObjectManager.
+	 */
 	class CM_EXPORT GameObject : public IReflectable
 	{
 	public:
 		GameObject();
 		virtual ~GameObject();
 
+		/**
+		 * @brief	Returns the unique instance ID of the GameObject.
+		 */
 		UINT64 getInstanceId() const { return mInstanceData->mInstanceId; }
 
+		/**
+		 * @brief	Gets the name of the object.
+		 */
 		const String& getName() const { return mName; }
+
+		/**
+		 * @brief	Sets the name of the object.
+		 */
 		void setName(const String& name) { mName = name; }
 
-	private:
+	protected:
 		friend class GameObjectHandleBase;
 		friend class GameObjectManager;
 
-		std::shared_ptr<GameObjectInstanceData> mInstanceData;
+		/**
+		 * @brief	Initializes the GameObject after construction.
+		 */
+		void initialize(const std::shared_ptr<GameObject>& object, UINT64 instanceId);
 
 	protected:
 		String mName;
 
-		void initialize(const std::shared_ptr<GameObject>& object, UINT64 instanceId);
+	private:
+		std::shared_ptr<GameObjectInstanceData> mInstanceData;
 
 		/************************************************************************/
 		/* 								RTTI		                     		*/

+ 112 - 16
CamelotCore/Include/CmGameObjectHandle.h

@@ -4,6 +4,9 @@ namespace BansheeEngine
 {
 	class GameObjectManager;
 
+	/**
+	 * @brief	Internal data shared between GameObject handles.
+	 */
 	struct CM_EXPORT GameObjectHandleData
 	{
 		GameObjectHandleData()
@@ -28,7 +31,7 @@ namespace BansheeEngine
 	 * 			It primarily keeps track if the object is still alive, so anything
 	 * 			still referencing it doesn't accidentally use it.
 	 * 			
-	 * @note	This class exists because I want the references between game objects be quite loose.
+	 * @note	This class exists because references between game objects should be quite loose.
 	 * 			For example one game object should be able to reference another one without the other
 	 * 			one knowing. But if that is the case I also need to handle the case when the other
 	 * 			object we're referencing has been deleted, and that is the main purpose of this class.
@@ -40,19 +43,20 @@ namespace BansheeEngine
 		GameObjectHandleBase();
 
 		/**
-		 * @brief	Checks if the object has been destroyed
+		 * @brief	Returns true if the object the handle is pointing to has been destroyed.
 		 */
 		bool isDestroyed() const { return mData->mPtr == nullptr || mData->mPtr->object == nullptr; }
 
 		/**
-		 * @brief	Internal method only. Not meant to be called directly.
+		 * @brief	Returns the instance ID of the object the handle is referencing.
 		 */
-		std::shared_ptr<GameObjectHandleData> getHandleData() const { return mData; }
-
 		UINT64 getInstanceId() const { return mData->mInstanceId; }
 
-		void resolve(const GameObjectHandleBase& object);
-
+		/**
+		 * @brief	Returns pointer to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		GameObject* get() const 
 		{ 
 			throwIfDestroyed();
@@ -60,6 +64,11 @@ namespace BansheeEngine
 			return mData->mPtr->object.get(); 
 		}
 
+		/**
+		 * @brief	Returns a smart pointer to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		std::shared_ptr<GameObject> getInternalPtr() const
 		{
 			throwIfDestroyed();
@@ -67,9 +76,34 @@ namespace BansheeEngine
 			return mData->mPtr->object;
 		}
 
+		/**
+		 * @brief	Returns pointer to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		GameObject* operator->() const { return get(); }
+
+		/**
+		 * @brief	Returns reference to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		GameObject& operator*() const { return *get(); }
 
+		/**
+		 * @brief	Returns internal handle data.
+		 *
+		 * @note	Internal method.
+		 */
+		std::shared_ptr<GameObjectHandleData> _getHandleData() const { return mData; }
+
+		/**
+		 * @brief	Resolves a handle to a proper GameObject in case it was created uninitialized.
+		 *
+		 * @note	Internal method.
+		 */
+		void _resolve(const GameObjectHandleBase& object);
+
 	protected:
 		friend class SceneObject;
 		friend class SceneObjectRTTI;
@@ -79,8 +113,14 @@ namespace BansheeEngine
 		GameObjectHandleBase(const std::shared_ptr<GameObjectHandleData>& data);
 		GameObjectHandleBase(std::nullptr_t ptr);
 
+		/**
+		 * @brief	Throws an exception if the referenced GameObject has been destroyed.
+		 */
 		inline void throwIfDestroyed() const;
 		
+		/**
+		 * @brief	Invalidates the handle signifiying the referenced object was destroyed.
+		 */
 		void destroy()
 		{
 			// We need to clear mData->mPtr before we clear mData->mPtr->object,
@@ -104,31 +144,47 @@ namespace BansheeEngine
 		virtual RTTITypeBase* getRTTI() const;
 	};
 
-	// NOTE: It is important this class contains no data since we often value 
-	// cast it to its base 
+	/**
+	 * @copydoc	GameObjectHandleBase
+	 *
+	 * @note	It is important this class contains no data since we often 
+	 *			value cast it to its base.
+	 */
 	template <typename T>
 	class GameObjectHandle : public GameObjectHandleBase
 	{
 	public:
+		/**
+		 * @brief	Constructs a new empty handle.
+		 */
 		GameObjectHandle()
 			:GameObjectHandleBase()
 		{	
 			mData = cm_shared_ptr<GameObjectHandleData, PoolAlloc>();
 		}
 
+		/**
+		 * @brief	Copy constructor from another handle of the same type.
+		 */
 		template <typename T1>
 		GameObjectHandle(const GameObjectHandle<T1>& ptr)
 			:GameObjectHandleBase()
 		{ 	
-			mData = ptr.getHandleData();
+			mData = ptr._getHandleData();
 		}
 
+		/**
+		 * @brief	Copy constructor from another handle of the base type.
+		 */
 		GameObjectHandle(const GameObjectHandleBase& ptr)
 			:GameObjectHandleBase()
 		{ 	
-			mData = ptr.getHandleData();
+			mData = ptr._getHandleData();
 		}
 
+		/**
+		 * @brief	Invalidates the handle.
+		 */
 		inline GameObjectHandle<T>& operator=(std::nullptr_t ptr)
 		{ 	
 			mData = cm_shared_ptr<GameObjectHandleData, PoolAlloc>();
@@ -136,6 +192,9 @@ namespace BansheeEngine
 			return *this;
 		}
 
+		/**
+		 * @brief	Casts a specific handle to the base handle.
+		 */
 		inline operator GameObjectHandleBase()
 		{
 			GameObjectHandleBase base(mData);
@@ -143,6 +202,11 @@ namespace BansheeEngine
 			return base;
 		}
 
+		/**
+		 * @brief	Returns a pointer to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		T* get() const 
 		{ 
 			throwIfDestroyed();
@@ -150,6 +214,11 @@ namespace BansheeEngine
 			return reinterpret_cast<T*>(mData->mPtr->object.get()); 
 		}
 
+		/**
+		 * @brief	Returns a smart pointer to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		std::shared_ptr<T> getInternalPtr() const
 		{
 			throwIfDestroyed();
@@ -157,20 +226,35 @@ namespace BansheeEngine
 			return std::static_pointer_cast<T>(mData->mPtr->object);
 		}
 
+		/**
+		 * @brief	Returns pointer to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		T* operator->() const { return get(); }
+
+		/**
+		 * @brief	Returns reference to the referenced GameObject.
+		 *
+		 * @note	Throws exception if the GameObject was destroyed.
+		 */
 		T& operator*() const { return *get(); }
 
 		template<class _Ty>
-		struct CM_Bool_struct
+		struct Bool_struct
 		{
 			int _Member;
 		};
 
-		// Conversion to bool
-		// (Why not just directly convert to bool? Because then we can assign pointer to bool and that's weird)
-		operator int CM_Bool_struct<T>::*() const
+		/**
+		 * @brief	Allows direct conversion of handle to bool.
+		 *
+		 * @note	This is needed because we can't directly convert to bool
+		 *			since then we can assign pointer to bool and that's weird.
+		 */
+		operator int Bool_struct<T>::*() const
 		{
-			return (((mData->mPtr != nullptr) && (mData->mPtr->object != nullptr)) ? &CM_Bool_struct<T>::_Member : 0);
+			return (((mData->mPtr != nullptr) && (mData->mPtr->object != nullptr)) ? &Bool_struct<T>::_Member : 0);
 		}
 
 	private:
@@ -178,23 +262,35 @@ namespace BansheeEngine
 		friend class SceneObjectRTTI;
 		friend class GameObjectManager;
 
+		/**
+		 * @brief	Creates a handle from a smart pointer.
+		 */
 		explicit GameObjectHandle(const std::shared_ptr<T> ptr)
 			:GameObjectHandleBase(ptr)
 		{ }
 	};
 
+	/**
+	 * @brief	Casts one handle type to another.
+	 */
 	template<class _Ty1, class _Ty2>
 		GameObjectHandle<_Ty1> static_object_cast(const GameObjectHandle<_Ty2>& other)
 	{	
 		return GameObjectHandle<_Ty1>(other);
 	}
 
+	/**
+	 * @brief	Compares if two handles point to the same GameObject.
+	 */
 	template<class _Ty1, class _Ty2>
 	bool operator==(const GameObjectHandle<_Ty1>& _Left, const GameObjectHandle<_Ty2>& _Right)
 	{	
 		return (_Left == nullptr && _Right == nullptr) || (_Left != nullptr && _Right != nullptr && _Left.get() == _Right.get());
 	}
 
+	/**
+	 * @brief	Compares if two handles point to different GameObjects.
+	 */
 	template<class _Ty1, class _Ty2>
 	bool operator!=(const GameObjectHandle<_Ty1>& _Left, const GameObjectHandle<_Ty2>& _Right)
 	{	

+ 26 - 0
CamelotCore/Include/CmGameObjectManager.h

@@ -6,17 +6,43 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Tracks GameObject creation and destructions. Also resolves
+	 *			GameObject references from GameObject handles.
+	 *
+	 * @note	Sim thread only.
+	 */
 	class CM_EXPORT GameObjectManager : public Module<GameObjectManager>
 	{
 	public:
 		GameObjectManager();
 		~GameObjectManager();
 
+		/**
+		 * @brief	Registers a new GameObject and returns the handle to the object.
+		 */
 		GameObjectHandleBase registerObject(const std::shared_ptr<GameObject>& object);
+
+		/**
+		 * @brief	Unregisters a GameObject.
+		 */
 		void unregisterObject(const GameObjectHandleBase& object);
 
+		/**
+		 * @brief	Attempts to find a GameObject handle based on the GameObject instance ID.
+		 *			Returns empty handle if ID cannot be found.
+		 */
 		GameObjectHandleBase getObject(UINT64 id) const;
+
+		/**
+		 * @brief	Attempts to find a GameObject handle based on the GameObject instance ID.
+		 *			Returns true if object with the specified ID is found, false otherwise.
+		 */
 		bool tryGetObject(UINT64 id, GameObjectHandleBase& object) const;
+
+		/**
+		 * @brief	Checks if the GameObject with the specified instance ID exists.
+		 */
 		bool objectExists(UINT64 id) const;
 
 		/************************************************************************/

+ 25 - 5
CamelotCore/Include/CmSceneManager.h

@@ -8,8 +8,8 @@ namespace BansheeEngine
 {
 	/**
 	 * @brief	Manages all objects in the scene and provides various query methods
-	 * 			for finding objects you need. This is just the base class with basic
-	 * 			query functionality. You should override it with your own version that
+	 * 			for finding objects. This is just the base class with basic query 
+	 *			functionality. You should override it with your own version that
 	 * 			implements a spatial data structure of your choice for faster queries.
 	 */
 	class CM_EXPORT SceneManagerBase : public Module<SceneManagerBase>
@@ -18,12 +18,19 @@ namespace BansheeEngine
 		SceneManagerBase();
 		virtual ~SceneManagerBase();
 
+		/**
+		 * @brief	Returns the root scene object.
+		 */
 		HSceneObject getRootNode() const { return mRootNode; }
 
-		virtual void update();
+		/**
+		 * @brief	Called every frame.
+		 *
+		 * @note	Internal method.
+		 */
+		virtual void _update();
 	protected:
 		friend class SceneObject;
-		HSceneObject mRootNode;
 
 		/**
 		 * @brief	Register a new node in the scene manager, on the top-most level of the hierarchy.
@@ -33,11 +40,24 @@ namespace BansheeEngine
 		 *
 		 * @param [in]	node	Node you wish to add. It's your responsibility not to add duplicate or null nodes. This method won't check.
 		 */
-		void registerNewGO(const HSceneObject& node);
+		void registerNewSO(const HSceneObject& node);
 
+		/**
+		 * @brief	SceneObjects call this when they have a component added to them.
+		 */
 		virtual void notifyComponentAdded(const HComponent& component);
+
+		/**
+		 * @brief	SceneObjects call this when they have a component removed from them.
+		 */
 		virtual void notifyComponentRemoved(const HComponent& component);
+
+	protected:
+		HSceneObject mRootNode;
 	};
 
+	/**
+	 * @brief	Provides easy access to the scene manager.
+	 */
 	CM_EXPORT SceneManagerBase& gSceneManager();
 }

+ 110 - 19
CamelotCore/Include/CmSceneObject.h

@@ -11,50 +11,118 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	SceneObject represents an object in the scene graph. It has a world position,
+	 *			place in the hierarchy and optionally a number of attached components.
+	 */
 	class CM_EXPORT SceneObject : public GameObject
 	{
 		friend class SceneManagerBase;
 	public:
 		~SceneObject();
 
+		/**
+		 * @brief	Creates a new SceneObject with the specified name. Object will be placed in the top
+		 *			of the scene hierarchy.
+		 */
 		static HSceneObject create(const String& name);
+
+		/**
+		 * @brief	Destroys this object and any of its held components.
+		 */
 		void destroy();
 
 	private:
-		HSceneObject mThisHandle;
-
 		SceneObject(const String& name);
 
 		static HSceneObject createInternal(const String& name);
 		void destroyInternal();
 
+	private:
+		HSceneObject mThisHandle;
+
 		/************************************************************************/
 		/* 								Transform	                     		*/
 		/************************************************************************/
 	public:
+		/**
+		 * @brief	Sets local position of the object.
+		 */
 		void setPosition(const Vector3& position);
+
+		/**
+		 * @brief	Gets local position of the object.
+		 */
 		const Vector3& getPosition() const { return mPosition; }
+
+		/**
+		 * @brief	Gets world position of the object.
+		 *
+		 * @note	Performance warning: This might involve updating the transforms if the transform is dirty.
+		 */
 		const Vector3& getWorldPosition() const;
 
+		/**
+		 * @brief	Sets the local rotation of the object.
+		 */
 		void setRotation(const Quaternion& rotation);
+
+		/**
+		 * @brief	Gets the local rotation of the object.
+		 */
 		const Quaternion& getRotation() const { return mRotation; }
+
+		/**
+		 * @brief	Gets world rotation of the object.
+		 *
+		 * @note	Performance warning: This might involve updating the transforms if the transform is dirty.
+		 */
 		const Quaternion& getWorldRotation() const;
 
+		/**
+		 * @brief	Sets the local scale of the object.
+		 */
 		void setScale(const Vector3& scale);
+
+		/**
+		 * @brief	Gets the local scale of the object.
+		 */
 		const Vector3& getScale() const { return mScale; }
+
+		/**
+		 * @brief	Gets world scale of the object.
+		 *
+		 * @note	Performance warning: This might involve updating the transforms if the transform is dirty.
+		 */
 		const Vector3& getWorldScale() const;
 
+		/**
+		 * @brief	Orients the object so it is looking at the provided "location" (local space)
+		 *			where "up" is used for determining the location of the objects Y axis.
+		 *
+		 */
 		void lookAt(const Vector3& location, const Vector3& up = Vector3::UNIT_Y);
 
+		/**
+		 * @brief	Gets the objects world transform matrix.
+		 *
+		 * @note	Performance warning: This might involve updating the transforms if the transform is dirty.
+		 */
 		const Matrix4& getWorldTfrm() const;
+
+		/**
+		 * @brief	Gets the objects local transform matrix.
+		 */
 		const Matrix4& getLocalTfrm() const;
 
-		/** Moves the object's position by the vector offset provided along world axes.
-        */
+		/**
+		 * @brief	Moves the object's position by the vector offset provided along world axes.
+		 */
         void move(const Vector3& vec);
 
-        /** Moves the object's position by the vector offset provided along it's own axes (relative to orientation).
-        */
+		/**
+		 * @brief	Moves the object's position by the vector offset provided along it's own axes (relative to orientation).
+		 */
         void moveRelative(const Vector3& vec);
 
 		/**
@@ -88,12 +156,14 @@ namespace BansheeEngine
 		 */
 		void setForward(const Vector3& forwardDir);
 
-		/** Rotate the object around an arbitrary axis.
-        */
+		/**
+		 * @brief	Rotate the object around an arbitrary axis.
+		 */
         void rotate(const Vector3& axis, const Radian& angle);
 
-        /** Rotate the object around an arbitrary axis using a Quaternion.
-        */
+		/**
+		 * @brief	Rotate the object around an arbitrary axis using a Quaternion.
+		 */
         void rotate(const Quaternion& q);
 
 		/**
@@ -132,11 +202,24 @@ namespace BansheeEngine
 		mutable Matrix4 mCachedWorldTfrm;
 		mutable bool mIsCachedWorldTfrmUpToDate;
 
-		Matrix4 mCustomWorldTfrm; // TODO
-		bool mIsCustomTfrmModeActive; // TODO
-
+		/**
+		 * @brief	Marks the transform as dirty so that we know to update
+		 *			it when the transform is requested.
+		 */
 		void markTfrmDirty() const;
+
+		/**
+		 * @brief	Updates the local transform. Normally just reconstructs the 
+		 *			transform matrix from the position/rotation/scale.
+		 */
 		void updateLocalTfrm() const;
+
+		/**
+		 * @brief	Updates the world transform. Reconstructs the local transform
+		 *			matrix and multiplies it with any parent transforms.
+		 *
+		 * @note	If parent transforms are dirty they will be updated.
+		 */
 		void updateWorldTfrm() const;
 
 		/************************************************************************/
@@ -164,10 +247,8 @@ namespace BansheeEngine
 		 * @param	idx	The zero based index of the child.
 		 *
 		 * @return	SceneObject of the child.
-		 * 			
-		 * @throws ERR_INVALIDPARAMS If the index is out of range.
 		 */
-		HSceneObject getChild(unsigned int idx) const;
+		HSceneObject getChild(UINT32 idx) const;
 
 		/**
 		 * @brief	Find the index of the specified child. Don't persist this value as
@@ -213,6 +294,10 @@ namespace BansheeEngine
 		/* 								Component	                     		*/
 		/************************************************************************/
 	public:
+		/**
+		 * @brief	Constructs a new component of the specified type and adds it to 
+		 *			the internal component list.
+		 */
 		template<class T, class... Args>
 		GameObjectHandle<T> addComponent(Args &&... args)
 		{
@@ -285,25 +370,28 @@ namespace BansheeEngine
 		HComponent getComponent(UINT32 typeId) const;
 
 		/**
-		 * @brief	Removes the component from this SceneObject, and deallocates it.
+		 * @brief	Removes the component from this object, and deallocates it.
 		 *
 		 * @param [in]	component	The component to destroy.
 		 */
 		void destroyComponent(const HComponent& component);
 
 		/**
-		 * @brief	Removes the component from this SceneObject, and deallocates it.
+		 * @brief	Removes the component from this object, and deallocates it.
 		 *
 		 * @param [in]	component	The component to destroy.
 		 */
 		void destroyComponent(Component* component);
 
 		/**
-		 * @brief	Returns all components on this SceneObject.
+		 * @brief	Returns all components on this object.
 		 */
 		const Vector<HComponent>& getComponents() const { return mComponents; }
 
 	private:
+		/**
+		 * @brief	Creates an empty component with the default constructor.
+		 */
 		template <typename T>
 		static std::shared_ptr<T> createEmptyComponent()
 		{
@@ -315,6 +403,9 @@ namespace BansheeEngine
 			return gameObject;
 		}
 
+		/**
+		 * @brief	Adds the component to the internal component array.
+		 */
 		void addComponentInternal(const std::shared_ptr<Component> component);
 
 		Vector<HComponent> mComponents;

+ 1 - 1
CamelotCore/Source/CmApplication.cpp

@@ -111,7 +111,7 @@ namespace BansheeEngine
 			RenderWindowManager::instance()._update();
 			gInput()._update();
 
-			PROFILE_CALL(gSceneManager().update(), "SceneManager");
+			PROFILE_CALL(gSceneManager()._update(), "SceneManager");
 
 			gCoreThread().queueCommand(std::bind(&Application::beginCoreProfiling, this));
 			gCoreThread().queueCommand(std::bind(&QueryManager::_update, QueryManager::instancePtr()));

+ 2 - 2
CamelotCore/Source/CmGameObjectManager.cpp

@@ -80,9 +80,9 @@ namespace BansheeEngine
 			auto findIterObj = mObjects.find(instanceId);
 
 			if(findIterObj != mObjects.end())
-				unresolvedHandle.resolve(findIterObj->second);	
+				unresolvedHandle._resolve(findIterObj->second);	
 			else
-				unresolvedHandle.resolve(nullptr);
+				unresolvedHandle._resolve(nullptr);
 		}
 
 		for(auto iter = mEndCallbacks.rbegin(); iter != mEndCallbacks.rend(); ++iter)

+ 2 - 2
CamelotCore/Source/CmSceneManager.cpp

@@ -15,7 +15,7 @@ namespace BansheeEngine
 			mRootNode->destroy();
 	}
 
-	void SceneManagerBase::update()
+	void SceneManagerBase::_update()
 	{
 		Stack<HSceneObject> todo;
 		todo.push(mRootNode);
@@ -37,7 +37,7 @@ namespace BansheeEngine
 		}
 	}
 
-	void SceneManagerBase::registerNewGO(const HSceneObject& node) 
+	void SceneManagerBase::registerNewSO(const HSceneObject& node) 
 	{ 
 		if(mRootNode) // If root node is null, then this new node is the root node
 			node->setParent(mRootNode);

+ 5 - 8
CamelotCore/Source/CmSceneObject.cpp

@@ -13,8 +13,7 @@ namespace BansheeEngine
 		:GameObject(), mPosition(Vector3::ZERO), mRotation(Quaternion::IDENTITY), mScale(Vector3::ONE),
 		mWorldPosition(Vector3::ZERO), mWorldRotation(Quaternion::IDENTITY), mWorldScale(Vector3::ONE),
 		mCachedLocalTfrm(Matrix4::IDENTITY), mIsCachedLocalTfrmUpToDate(false),
-		mCachedWorldTfrm(Matrix4::IDENTITY), mIsCachedWorldTfrmUpToDate(false),
-		mCustomWorldTfrm(Matrix4::IDENTITY), mIsCustomTfrmModeActive(false)
+		mCachedWorldTfrm(Matrix4::IDENTITY), mIsCachedWorldTfrmUpToDate(false)
 	{
 		setName(name);
 	}
@@ -32,7 +31,7 @@ namespace BansheeEngine
 	{
 		HSceneObject newObject = createInternal(name);
 
-		gSceneManager().registerNewGO(newObject);
+		gSceneManager().registerNewSO(newObject);
 
 		return newObject;
 	}
@@ -132,7 +131,6 @@ namespace BansheeEngine
 		Vector3 forward = location - mPosition;
 		forward.normalize();
 
-		// TODO - I'm ignoring "up" direction
 		setForward(forward);
 
 		Quaternion upRot = Quaternion::getRotationFromTo(getUp(), up);
@@ -308,12 +306,11 @@ namespace BansheeEngine
 		}
 	}
 
-	HSceneObject SceneObject::getChild(unsigned int idx) const
+	HSceneObject SceneObject::getChild(UINT32 idx) const
 	{
 		if(idx < 0 || idx >= mChildren.size())
 		{
-			CM_EXCEPT(InternalErrorException, 
-				"Child index out of range.");
+			CM_EXCEPT(InternalErrorException, "Child index out of range.");
 		}
 
 		return mChildren[idx];
@@ -405,7 +402,7 @@ namespace BansheeEngine
 			if(x.isDestroyed())
 				return false;
 
-			return x.getHandleData()->mPtr->object.get() == component; }
+			return x._getHandleData()->mPtr->object.get() == component; }
 		);
 
 		if(iterFind != mComponents.end())