Mark Sibly 7 years ago
parent
commit
61f9062955

+ 21 - 9
modules/mojo3d/scene/bttypeconvs.monkey2

@@ -1,9 +1,11 @@
 
-Namespace mojo3d
+Namespace mojo3d.bullet
 
 Public
 
-Struct Vec3<T> Extension
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
+Struct Vec3f Extension
 
 	Operator To:btVector3()
 
@@ -11,6 +13,8 @@ Struct Vec3<T> Extension
 	End
 End
 
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
 Struct btVector3 Extension
 
 	Operator To:Vec3f()
@@ -19,13 +23,18 @@ Struct btVector3 Extension
 	End
 End
 
-Struct Vec4<T> Extension
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
+Struct Vec4f Extension
+	
 	Operator To:btVector4()
 
 		Return New btVector4( x,y,z,w )
 	End
 End
 
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
 Struct btVector4 Extension
 
 	Operator To:Vec4f()
@@ -34,6 +43,8 @@ Struct btVector4 Extension
 	End
 End
 
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
 Struct Mat3f Extension
 
 	Operator To:btMatrix3x3()
@@ -42,6 +53,8 @@ Struct Mat3f Extension
 	End
 End
 
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
 Struct btMatrix3x3 Extension
 
 	Operator To:Mat3f()
@@ -50,8 +63,9 @@ Struct btMatrix3x3 Extension
 	End
 End
 
-
-Struct AffineMat4f<T> Extension
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
+Struct AffineMat4f Extension
 	
 	Operator To:btTransform()
 	
@@ -60,6 +74,8 @@ Struct AffineMat4f<T> Extension
 
 End
 
+#rem monkeydoc Extension methods for bullet type conversions.
+#end
 Struct btTransform Extension
 	
 	Operator To:AffineMat4f()
@@ -68,7 +84,3 @@ Struct btTransform Extension
 	End
 
 End
-
-
-
-

+ 0 - 9
modules/mojo3d/scene/components/animator.monkey2

@@ -1,15 +1,6 @@
 
 Namespace mojo3d
 
-Class Entity Extension
-	
-	Property Animator:Animator()
-		
-		Return GetComponent<Animator>()
-	End
-	
-End
-
 #rem monkeydoc The Animator class.
 #end
 Class Animator Extends Component

+ 0 - 9
modules/mojo3d/scene/components/collider.monkey2

@@ -14,15 +14,6 @@ Global emptyShape:=New btEmptyShape
 
 Public
 	
-Class Entity Extension
-	
-	Property Collider:Collider()
-		
-		Return GetComponent<Collider>()
-	End
-	
-End
-
 Class Collider Extends Component
 	
 	Const Type:=New ComponentType( "Collider",10,ComponentTypeFlags.Singleton )

+ 0 - 9
modules/mojo3d/scene/components/rigidbody.monkey2

@@ -35,15 +35,6 @@ End
 
 Public
 
-Class Entity Extension
-	
-	Property RigidBody:RigidBody()
-		
-		Return GetComponent<RigidBody>()
-	End
-	
-End
-
 Class RigidBody Extends Component
 	
 	Const Type:=New ComponentType( "RigidBody",-10,ComponentTypeFlags.Singleton )

+ 23 - 1
modules/mojo3d/scene/entityexts.monkey2

@@ -9,9 +9,30 @@ Const RadiansToDegrees:=180.0/Pi
 
 Public
 
-#rem monkeydoc Entity extension methods.
+#rem monkeydoc Utility extension methods for entities.
 #end
 Class Entity Extension
+	
+	#rem monkeydoc The rigid body attached to the entity.
+	#end
+	Property RigidBody:RigidBody()
+		
+		Return GetComponent<RigidBody>()
+	End
+	
+	#rem monkeydoc The collider attached to the entity.
+	#end
+	Property Collider:Collider()
+		
+		Return GetComponent<Collider>()
+	End
+
+	#rem monkeydoc The animator attached to the entity.
+	#end
+	Property Animator:Animator()
+		
+		Return GetComponent<Animator>()
+	End
 
 	#rem monkeydoc World space rotation in degrees.
 	#end
@@ -439,4 +460,5 @@ Class Entity Extension
 		PointAt( target.LocalPosition )
 	End
 	
+	
 End