Преглед на файлове

WIP: Scripting bindings

BearishSun преди 8 години
родител
ревизия
3023ebd94a

+ 3 - 3
Source/BansheeCore/Components/BsCBoxCollider.h

@@ -17,9 +17,9 @@ namespace bs
 	 *
 	 *
 	 * Wraps BoxCollider as a Component.
 	 * Wraps BoxCollider as a Component.
 	 */
 	 */
-    class BS_CORE_EXPORT CBoxCollider : public CCollider
-    {
-    public:
+	class BS_CORE_EXPORT CBoxCollider : public CCollider
+	{
+	public:
 		CBoxCollider(const HSceneObject& parent, const Vector3& extents = Vector3::ONE);
 		CBoxCollider(const HSceneObject& parent, const Vector3& extents = Vector3::ONE);
 
 
 		/** @copydoc BoxCollider::setExtents */
 		/** @copydoc BoxCollider::setExtents */

+ 3 - 3
Source/BansheeCore/Components/BsCCollider.h

@@ -17,9 +17,9 @@ namespace bs
 	 *
 	 *
 	 * Wraps Collider as a Component.
 	 * Wraps Collider as a Component.
 	 */
 	 */
-    class BS_CORE_EXPORT CCollider : public Component
-    {
-    public:
+	class BS_CORE_EXPORT CCollider : public Component
+	{
+	public:
 		CCollider(const HSceneObject& parent);
 		CCollider(const HSceneObject& parent);
 		virtual ~CCollider() {}
 		virtual ~CCollider() {}
 
 

+ 2 - 2
Source/BansheeCore/Physics/BsBoxCollider.h

@@ -19,10 +19,10 @@ namespace bs
 	public:
 	public:
 		BoxCollider();
 		BoxCollider();
 
 
-		/** Sets the extents (half size) of the geometry of the box. */
+		/** Determines the extents (half size) of the geometry of the box. */
 		virtual void setExtents(const Vector3& extents) = 0;
 		virtual void setExtents(const Vector3& extents) = 0;
 
 
-		/** Gets the extents (half size) of the geometry of the box. */
+		/** @copdoc setExtents() */
 		virtual Vector3 getExtents() const = 0;
 		virtual Vector3 getExtents() const = 0;
 
 
 		/** 
 		/** 

+ 4 - 7
Source/BansheeCore/Physics/BsCapsuleCollider.h

@@ -20,21 +20,18 @@ namespace bs
 		CapsuleCollider();
 		CapsuleCollider();
 
 
 		/** 
 		/** 
-		 * Sets the half height of the capsule, from the origin to one of the hemispherical centers, along the normal 
+		 * Determines the half height of the capsule, from the origin to one of the hemispherical centers, along the normal 
 		 * vector. 
 		 * vector. 
 		 */
 		 */
 		virtual void setHalfHeight(float halfHeight) = 0;
 		virtual void setHalfHeight(float halfHeight) = 0;
 
 
-		/** 
-		 * Gets the half height of the capsule, from the origin to one of the hemispherical centers, along the normal
-		 * vector. 
-		 */
+		/** @copdyoc setHalfHeight() */
 		virtual float getHalfHeight() const = 0;
 		virtual float getHalfHeight() const = 0;
 
 
-		/** Sets the radius of the capsule. */
+		/** Determines the radius of the capsule. */
 		virtual void setRadius(float radius) = 0;
 		virtual void setRadius(float radius) = 0;
 
 
-		/** Gets the radius of the capsule. */
+		/** @copydoc setRadius() .*/
 		virtual float getRadius() const = 0;
 		virtual float getRadius() const = 0;
 
 
 		/** 
 		/** 

+ 4 - 4
Source/BansheeCore/Physics/BsCollider.h

@@ -49,10 +49,10 @@ namespace bs
 		/** @copydoc FCollider::getIsTrigger */
 		/** @copydoc FCollider::getIsTrigger */
 		inline bool getIsTrigger() const;
 		inline bool getIsTrigger() const;
 
 
-		/** Sets the Rigidbody that controls this collider (if any). */
+		/** Determines the Rigidbody that controls this collider (if any). */
 		inline void setRigidbody(Rigidbody* value);
 		inline void setRigidbody(Rigidbody* value);
 
 
-		/** Retrieves the Rigidbody that controls this collider (if any). */
+		/** @copydoc setRigidbody() */
 		Rigidbody* getRigidbody() const { return mRigidbody; }
 		Rigidbody* getRigidbody() const { return mRigidbody; }
 
 
 		/** @copydoc FCollider::setMass */
 		/** @copydoc FCollider::setMass */
@@ -85,10 +85,10 @@ namespace bs
 		/** @copydoc FCollider::getLayer */
 		/** @copydoc FCollider::getLayer */
 		inline UINT64 getLayer() const;
 		inline UINT64 getLayer() const;
 
 
-		/** Sets a value that determines which (if any) collision events are reported. */
+		/** @copydoc FCollider::setCollisionReportMode */
 		inline void setCollisionReportMode(CollisionReportMode mode);
 		inline void setCollisionReportMode(CollisionReportMode mode);
 
 
-		/** Gets a value that determines which (if any) collision events are reported. */
+		/** @copydoc FCollider::getCollisionReportMode */
 		inline CollisionReportMode getCollisionReportMode() const;
 		inline CollisionReportMode getCollisionReportMode() const;
 
 
 		/** 
 		/** 

+ 20 - 17
Source/BansheeCore/Physics/BsFCollider.h

@@ -35,32 +35,35 @@ namespace bs
 		 */
 		 */
 		virtual void setIsTrigger(bool value) = 0;
 		virtual void setIsTrigger(bool value) = 0;
 
 
-		/** Checks is the collider a trigger. */
+		/** @copydoc setIsTrigger() */
 		virtual bool getIsTrigger() const = 0;
 		virtual bool getIsTrigger() const = 0;
 
 
 		/** 
 		/** 
-		 * Changes whether the collider is a part of a rigidbody (non-static), or is on its own (static). You should change
-		 * this whenever you are attaching or detaching a collider from a rigidbody.
+		 * Determines whether the collider is a part of a rigidbody (non-static), or is on its own (static). You should 
+		 * change this whenever you are attaching or detaching a collider from a rigidbody.
 		 */
 		 */
 		virtual void setIsStatic(bool value) = 0;
 		virtual void setIsStatic(bool value) = 0;
 
 
-		/** Checks whether the collider is a part of a rigidbody (non-static), or is on its own (static). */
+		/** @copydoc setIsStatic() */
 		virtual bool getIsStatic() const = 0;
 		virtual bool getIsStatic() const = 0;
 
 
 		/** 
 		/** 
-		 * Sets the mass of the collider. Only relevant if the collider is part of a rigidbody. Ultimately this will
+		 * Determines the mass of the collider. Only relevant if the collider is part of a rigidbody. Ultimately this will
 		 * determine the total mass, center of mass and inertia tensors of the parent rigidbody (if they're being calculated
 		 * determine the total mass, center of mass and inertia tensors of the parent rigidbody (if they're being calculated
 		 * automatically).
 		 * automatically).
 		 */
 		 */
 		virtual void setMass(float mass) { mMass = mass; }
 		virtual void setMass(float mass) { mMass = mass; }
 
 
-		/** Returns the mass of the collider. */
+		/** @copydoc setMass() */
 		virtual float getMass() const { return mMass; }
 		virtual float getMass() const { return mMass; }
 
 
-		/** Sets the material of the collider. The material determines how objects hitting the collider behave. */
+		/** 
+		 * Determines the physical material of the collider. The material determines how objects hitting the collider 
+		 * behave. 
+		 */
 		virtual void setMaterial(const HPhysicsMaterial& material);
 		virtual void setMaterial(const HPhysicsMaterial& material);
 
 
-		/** Gets the material of the collider. The material determines how objects hitting the collider behave. */
+		/** @copydoc setMaterial() */
 		virtual HPhysicsMaterial getMaterial() const { return mMaterial; }
 		virtual HPhysicsMaterial getMaterial() const { return mMaterial; }
 
 
 		/**
 		/**
@@ -74,31 +77,31 @@ namespace bs
 		 */
 		 */
 		virtual void setContactOffset(float value) = 0;
 		virtual void setContactOffset(float value) = 0;
 
 
-		/** Returns shape's contact offset in meters. See setContactOffset() to learn contact offset is. */
+		/** @copydoc setContactOffset() */
 		virtual float getContactOffset() const = 0;
 		virtual float getContactOffset() const = 0;
 
 
 		/**
 		/**
-		 * Sets at what distance should two objects resting on one another come to an equilibrium. The value used in the
-		 * runtime will be the sum of rest offsets for both interacting objects. This value is in meters. Cannot be larger
-		 * than contact offset.
+		 * Determines at what distance should two objects resting on one another come to an equilibrium. The value used in
+		 * the runtime will be the sum of rest offsets for both interacting objects. This value is in meters. Cannot be 
+		 * larger than contact offset.
 		 *
 		 *
 		 * Also see setContactOffset().
 		 * Also see setContactOffset().
 		 */
 		 */
 		virtual void setRestOffset(float value) = 0;
 		virtual void setRestOffset(float value) = 0;
 
 
-		/** Returns shepe's rest offset in meters. See setRestOffset() to learn what contact offset is. */
+		/** @copydoc setRestOffset() */
 		virtual float getRestOffset() const = 0;
 		virtual float getRestOffset() const = 0;
 
 
-		/** Sets the layer of the collider. Layer controls with which objects will the collider collide. */
+		/** Determines the layer of the collider. Layer controls with which objects will the collider collide. */
 		virtual void setLayer(UINT64 layer) = 0;
 		virtual void setLayer(UINT64 layer) = 0;
 
 
-		/** Gets the layer of the collider. Layer controls with which objects will the collider collide. */
+		/** @copydoc setLayer() */
 		virtual UINT64 getLayer() const = 0;
 		virtual UINT64 getLayer() const = 0;
 
 
-		/** Sets a value that determines which (if any) collision events are reported. */
+		/** Determines which (if any) collision events are reported. */
 		virtual void setCollisionReportMode(CollisionReportMode mode) = 0;
 		virtual void setCollisionReportMode(CollisionReportMode mode) = 0;
 
 
-		/** Gets a value that determines which (if any) collision events are reported. */
+		/** @copydoc setCollisionReportMode() */
 		virtual CollisionReportMode getCollisionReportMode() const = 0;
 		virtual CollisionReportMode getCollisionReportMode() const = 0;
 
 
 		/** Enables continous collision detect for this collider. Only valid if the collider is a part of a rigidbody. */
 		/** Enables continous collision detect for this collider. Only valid if the collider is a part of a rigidbody. */

+ 4 - 5
Source/BansheeCore/Physics/BsMeshCollider.h

@@ -19,14 +19,13 @@ namespace bs
 		MeshCollider();
 		MeshCollider();
 
 
 		/** 
 		/** 
-		 * Sets a mesh that represents the collider geometry. 
-		 *
-		 * @param[in]	mesh	Generic triangle mesh, or and convex mesh. Triangle meshes are not supported as triggers, 
-		 *						nor are they supported for colliders that are parts of a non-kinematic rigidbody.
+		 * Sets a mesh that represents the collider geometry. This can be a generic triangle mesh, or and convex mesh. 
+		 * Triangle meshes are not supported as triggers, nor are they supported for colliders that are parts of a 
+		 * non-kinematic rigidbody.
 		 */
 		 */
 		void setMesh(const HPhysicsMesh& mesh) { mMesh = mesh; onMeshChanged(); markListenerResourcesDirty(); }
 		void setMesh(const HPhysicsMesh& mesh) { mMesh = mesh; onMeshChanged(); markListenerResourcesDirty(); }
 
 
-		/** Returns a mesh that represents the collider geometry. */
+		/** @copydoc setMesh() */
 		HPhysicsMesh getMesh() const { return mMesh; }
 		HPhysicsMesh getMesh() const { return mMesh; }
 
 
 		/** 
 		/** 

+ 2 - 2
Source/BansheeCore/Physics/BsSphereCollider.h

@@ -19,10 +19,10 @@ namespace bs
 	public:
 	public:
 		SphereCollider();
 		SphereCollider();
 
 
-		/** Sets the radius of the sphere geometry. */
+		/** Determines the radius of the sphere geometry. */
 		virtual void setRadius(float radius) = 0;
 		virtual void setRadius(float radius) = 0;
 
 
-		/** Gets the radius of the sphere geometry. */
+		/** @copdyc setRadius(). */
 		virtual float getRadius() const = 0;
 		virtual float getRadius() const = 0;
 
 
 		/**
 		/**

+ 0 - 4
Source/SBansheeEngine/Wrappers/BsScriptComponent.h

@@ -23,10 +23,6 @@ namespace bs
 		/** Returns the component wrapped by this object. */
 		/** Returns the component wrapped by this object. */
 		HComponent getComponent() const { return static_object_cast<Component>(getNativeHandle()); }
 		HComponent getComponent() const { return static_object_cast<Component>(getNativeHandle()); }
 
 
-		/** Returns the component wrapped by this object. */
-		template<class T>
-		GameObjectHandle<T> getComponent() const { return static_object_cast<T>(getNativeHandle()); }
-
 	protected:
 	protected:
 		friend class ScriptGameObjectManager;
 		friend class ScriptGameObjectManager;