소스 검색

Vector2_ScriptBinding.h:
Have to avoid the word "Vector" because doxygen sees the capital letter and links it to a class named Vector if it exists. Must use lower-case "vector" or "%vector" to avoid that with doxygen.

Trigger_ScriptBinding.h & console.h & TorqueScriptReference.cfg
Added a "superclass" to the ConsoleMethodGroup* functions so Trigger can lead you to SceneObject where more functions reside and so on.

Charlie Patterson 12 년 전
부모
커밋
5601cfc2d8

+ 32 - 31
engine/source/2d/core/Vector2_ScriptBinding.h

@@ -34,11 +34,11 @@ ConsoleFunctionGroupBeginWithDocs(Vector2Math)
 
 //-----------------------------------------------------------------------------
 
-/*! Add two 2-Vectors.
+/*! Add two 2-vectors.
 	@return v1+v2
 
-	\par From Engine
-	@see Vector2::operator+
+	@boundto
+	Vector2::operator+
 */
 ConsoleFunctionWithDocs( Vector2Add, ConsoleString, 3, 3, (Vector2 v1, Vector2 v2) )
 {
@@ -57,11 +57,11 @@ ConsoleFunctionWithDocs( Vector2Add, ConsoleString, 3, 3, (Vector2 v1, Vector2 v
 
 //-----------------------------------------------------------------------------
 
-/*! Subtract two 2D Vectors.
+/*! Subtract two 2D vectors.
     @return v1-v2
 
-	\par From Engine
-	@see Vector2::operator-(Vector2)
+	@boundto
+	Vector2::operator-(Vector2)
 */
 ConsoleFunctionWithDocs( Vector2Sub, ConsoleString, 3, 3,(Vector2 v1, Vector2 v2))
 {
@@ -80,11 +80,11 @@ ConsoleFunctionWithDocs( Vector2Sub, ConsoleString, 3, 3,(Vector2 v1, Vector2 v2
 
 //-----------------------------------------------------------------------------
 
-/*! Absolute difference of two 2-Vectors
+/*! Absolute difference of two 2-vectors
 	@return abs(v1-v2)
 
-	\par From Engine
-	@see Vector2::absolute
+	@boundto
+	Vector2::absolute
 */
 ConsoleFunctionWithDocs( Vector2Abs, ConsoleString, 3, 3, (Vector2 v1, Vector2 v2) )
 {
@@ -102,7 +102,7 @@ ConsoleFunctionWithDocs( Vector2Abs, ConsoleString, 3, 3, (Vector2 v1, Vector2 v
 }
 
 //-----------------------------------------------------------------------------
-/*! Multiply two 2D Vectors (Not Dot-Product!)
+/*! Multiply two 2D vectors (Not Dot-Product!)
 	@return v1 mult v2.
 */
 ConsoleFunctionWithDocs( Vector2Mult, ConsoleString, 3, 3, (Vector2 v1, Vector2 v2))
@@ -121,12 +121,13 @@ ConsoleFunctionWithDocs( Vector2Mult, ConsoleString, 3, 3, (Vector2 v1, Vector2
 }
 
 //-----------------------------------------------------------------------------
-/*! Scale a 2D Vector.
+/*! Scale a 2D vector.
 	@return v1 scaled by scale.
 
-	\par From Engine
-	@see Vector2::operator*
+	@boundto
+	Vector2::operator*
 */
+
 ConsoleFunctionWithDocs( Vector2Scale, ConsoleString, 3, 3, (Vector2 v1, scale))
 {
     // Check Parameters.
@@ -144,11 +145,11 @@ ConsoleFunctionWithDocs( Vector2Scale, ConsoleString, 3, 3, (Vector2 v1, scale))
 }
 
 //-----------------------------------------------------------------------------
-/*! Normalize a 2D Vector.
+/*! Normalize a 2D vector.
 	@return Normalized v1.
 
-	\par From Engine
-	@see Vector2::Normalize
+	@boundto
+	Vector2::Normalize
 */
 ConsoleFunctionWithDocs( Vector2Normalize, ConsoleString, 2, 2, (Vector2 v1))
 {
@@ -165,11 +166,11 @@ ConsoleFunctionWithDocs( Vector2Normalize, ConsoleString, 2, 2, (Vector2 v1))
 }
 
 //-----------------------------------------------------------------------------
-/*! Dot-Product of two 2D Vectors.
+/*! Dot-Product of two 2D vectors.
 	@return dot-product of v1 and v2.
 
-	\par From Engine
-	@see Vector2::dot
+	@boundto
+	Vector2::dot
 */
 ConsoleFunctionWithDocs(Vector2Dot, ConsoleFloat, 3, 3, (Vector2 v1, Vector2 v2))
 {
@@ -191,7 +192,7 @@ ConsoleFunctionWithDocs(Vector2Dot, ConsoleFloat, 3, 3, (Vector2 v1, Vector2 v2)
 	Compares points p1 and p2 with optional difference (epsilon).
 	@return true if equal
 */
-ConsoleFunctionWithDocs( Vector2Compare, ConsoleBool, 3, 4, (Vector2 p1, Vector2 p2, [epsilon]))
+ConsoleFunctionWithDocs( Vector2Compare, ConsoleBool, 3, 4, (Vector2 p1, Vector2 p2, [Vector2 epsilon=0.0001]?))
 {
     // Check Parameters.
     if (Utility::mGetStringElementCount(argv[1]) < 2 ||Utility::mGetStringElementCount(argv[2]) < 2 )
@@ -233,7 +234,7 @@ ConsoleFunctionWithDocs( Vector2Distance, ConsoleFloat, 3, 3, (Vector2 p1, Vecto
 }
 
 //-----------------------------------------------------------------------------
-/*! Angle between two 2D Vectors.
+/*! Angle between two 2D vectors.
 	@return the angle between v1 and v2.
 */
 ConsoleFunctionWithDocs( Vector2AngleBetween, ConsoleFloat, 3, 3, (Vector2 v1, Vector2 v2))
@@ -275,7 +276,7 @@ ConsoleFunctionWithDocs( Vector2AngleToPoint, ConsoleFloat, 3, 3, (Vector2 p1, V
 }
 
 //-----------------------------------------------------------------------------
-/*! Vector from angle and magnitude.
+/*! vector from angle and magnitude.
 	Calculates a direction from an angle and magnitude.
     @param angle The angle of the direction.
     @param magnitude The magnitude of the direction.
@@ -297,11 +298,11 @@ ConsoleFunctionWithDocs( Vector2Direction, ConsoleString, 3, 3, (F32 angle, F32
 }
 
 //-----------------------------------------------------------------------------
-/*! Length of a 2D Vector.
+/*! Length of a 2D vector.
 	@return the length of v1.
 
-	\par From Engine
-	@see Vector2::Length
+	@boundto
+	Vector2::Length
 */
 ConsoleFunctionWithDocs( Vector2Length, ConsoleFloat, 2, 2, (Vector2 v1))
 {
@@ -318,11 +319,11 @@ ConsoleFunctionWithDocs( Vector2Length, ConsoleFloat, 2, 2, (Vector2 v1))
 }
 
 //-----------------------------------------------------------------------------
-/*! Inverse of a 2D Vector.
+/*! Inverse of a 2D vector.
 	@return the inverse of v1.
 
-	\par From Engine
-	@see Vector2::operator-()
+	@boundto
+	Vector2::operator-()
 */
 //-----------------------------------------------------------------------------
 ConsoleFunctionWithDocs( Vector2Inverse, ConsoleString, 2, 2, (Vector2 v1))
@@ -340,7 +341,7 @@ ConsoleFunctionWithDocs( Vector2Inverse, ConsoleString, 2, 2, (Vector2 v1))
 }
 
 //-----------------------------------------------------------------------------
-/*! Inverse X component of a 2D Vector.
+/*! Inverse X component of a 2D vector.
 	@return the inverse of the v1 X component.
 */
 ConsoleFunctionWithDocs( Vector2InverseX, ConsoleString, 2, 2, (Vector2 v1))
@@ -359,7 +360,7 @@ ConsoleFunctionWithDocs( Vector2InverseX, ConsoleString, 2, 2, (Vector2 v1))
 }
 
 //-----------------------------------------------------------------------------
-/*! Inverse Y component of a 2D Vector.
+/*! Inverse Y component of a 2D vector.
 	@return the inverse of the v1 Y component.
 */
 ConsoleFunctionWithDocs( Vector2InverseY, ConsoleString, 2, 2, (Vector2 v1))
@@ -378,7 +379,7 @@ ConsoleFunctionWithDocs( Vector2InverseY, ConsoleString, 2, 2, (Vector2 v1))
 }
 
 //-----------------------------------------------------------------------------
-/*! Normalize Rectangle (two 2D Vectors) with relation to each other.
+/*! Normalize Rectangle (two 2D vectors) with relation to each other.
 	@return Normalize rectangle of v1 and v2.
 */
 ConsoleFunctionWithDocs( Vector2AreaNormalize, ConsoleString, 3, 3, (Vector2 v1, Vector2 v2))

+ 4 - 4
engine/source/2d/sceneobject/Trigger_ScriptBinding.h

@@ -22,13 +22,13 @@
 
 class Trigger;
 
-ConsoleMethodGroupBeginWithDocs(Trigger)
+ConsoleMethodGroupBeginWithDocs(Trigger, SceneObject)
 
 /*! Set whether trigger checks onEnter events
 	@param setting Default is true.
 	@return No return value.
 */
-ConsoleMethodWithDocs(Trigger, setEnterCallback, void, 2, 3, ([setting]))
+ConsoleMethodWithDocs(Trigger, setEnterCallback, ConsoleVoid, 2, 3, ([setting]?))
 {
    // If the value isn't specified, the default is true.
    bool callback = true;
@@ -44,7 +44,7 @@ ConsoleMethodWithDocs(Trigger, setEnterCallback, void, 2, 3, ([setting]))
 	@param setting Default is true.
 	@return No return value.
 */
-ConsoleMethodWithDocs(Trigger, setStayCallback, ConsoleVoid, 2, 3, ([setting]))
+ConsoleMethodWithDocs(Trigger, setStayCallback, ConsoleVoid, 2, 3, ([setting]?))
 {
    // If the value isn't specified, the default is true.
    bool callback = true;
@@ -60,7 +60,7 @@ ConsoleMethodWithDocs(Trigger, setStayCallback, ConsoleVoid, 2, 3, ([setting]))
     @param setting Default is true.
     @return No return value.
 */
-ConsoleMethodWithDocs(Trigger, setLeaveCallback, ConsoleVoid, 2, 3, ([setting]))
+ConsoleMethodWithDocs(Trigger, setLeaveCallback, ConsoleVoid, 2, 3, ([setting]?))
 {
    // If the value isn't specified, the default is true.
    bool callback = true;

+ 1 - 1
engine/source/console/console.h

@@ -825,7 +825,7 @@ public:
 #  define ConsoleNamespace(className, usage) \
       static ConsoleConstructor className##__Namespace(#className, usage);
 
-#  define ConsoleMethodGroupBeginWithDocs(className)
+#  define ConsoleMethodGroupBeginWithDocs(className, superclassName)
 #  define ConsoleMethodGroupEndWithDocs(className)
 
 #  define ConsoleMethodGroupBegin(className, groupName, usage) \

+ 5 - 1
tools/documentation/config/torque2DReference.cfg

@@ -366,7 +366,11 @@ LOOKUP_CACHE_SIZE      = 0
 # Private class members and static file members will be hidden unless
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
 
-#YEP vector2?  namespace Sim?
+#T2D
+# Too many semi-core classes aren't documented yet.
+# For instance class vector2 and namespace Sim!
+# So we'll show all classes, atleast for now.
+
 EXTRACT_ALL            = YES
 
 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class

+ 2 - 2
tools/documentation/config/torqueScriptReference.cfg

@@ -1643,7 +1643,7 @@ PREDEFINED            += ConsoleFunctionGroupEndWithDocs(groupName)="}; };"
 
 # PREDEFINED            += ConsoleMethodGroupBegin(className,groupName,usage)=" "
 PREDEFINED            += ConsoleMethodGroupBegin(className,groupName,usage)="namespace Class { class className { public:"
-PREDEFINED            += ConsoleMethodGroupBeginWithDocs(className)="namespace Class { class className { public:"
+PREDEFINED            += ConsoleMethodGroupBeginWithDocs(className,superclassName)="namespace Class { class className : public superclassName { public:"
 # PREDEFINED            += ConsoleMethod(className,name,returnType,minArgs,maxArgs,argString)="returnType className::name (...)"
 PREDEFINED            += ConsoleMethod(className,name,returnType,minArgs,maxArgs,argString)="namespace Class { class className { public: returnType className::name (...); }; };"
 PREDEFINED            += ConsoleMethodWithDocs(className,name,returnType,minArgs,maxArgs,argString)="returnType className::name argString"
@@ -1684,7 +1684,7 @@ SKIP_FUNCTION_MACROS   = YES
 # NOT include the path). If a tag file is not located in the directory in which
 # doxygen is run, you must also specify the path to the tagfile here.
 
-TAGFILES               = Torque2D.tag=../../torque2DDocs/html
+TAGFILES               = Torque2D.tag=../../Torque2DDocs/html
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.