Browse Source

Applied AssetImporter & MathAPI patch from primitivewaste.

Lasse Öörni 12 years ago
parent
commit
b45fac020f
4 changed files with 85 additions and 0 deletions
  1. 1 0
      Docs/Reference.dox
  2. 76 0
      Docs/ScriptAPI.dox
  3. 3 0
      Engine/Engine/MathAPI.cpp
  4. 5 0
      Tools/AssetImporter/AssetImporter.cpp

+ 1 - 0
Docs/Reference.dox

@@ -1460,6 +1460,7 @@ Options:
 -nm   Do not output materials
 -ns   Do not create subdirectories for resources
 -nz   Do not create a zone and a directional light (scene mode only)
+-nf   Do not fix infacing normals
 -pX   Set path X for scene resources. Default is output file path
 -rX   Use scene node X as root node
 -t    Generate tangents to model(s)

+ 76 - 0
Docs/ScriptAPI.dox

@@ -531,6 +531,9 @@ Methods:<br>
 - bool Equals(const Rect&) const
 
 Properties:<br>
+- Vector2 center (readonly)
+- Vector2 size (readonly)
+- Vector2 halfSize (readonly)
 - Vector2 min
 - Vector2 max
 - float left
@@ -5329,6 +5332,79 @@ Properties:<br>
 - bool interpolation
 
 
+Navigable
+
+Methods:<br>
+- void SendEvent(const String&, VariantMap& arg1 = VariantMap ( ))
+- bool Load(File@)
+- bool Save(File@)
+- bool LoadXML(const XMLElement&)
+- bool SaveXML(XMLElement&)
+- void ApplyAttributes()
+- bool SetAttribute(const String&, const Variant&)
+- Variant GetAttribute(const String&)
+- void Remove()
+- void MarkNetworkUpdate() const
+- void DrawDebugGeometry(DebugRenderer@, bool)
+
+Properties:<br>
+- ShortStringHash type (readonly)
+- String typeName (readonly)
+- int refs (readonly)
+- int weakRefs (readonly)
+- uint numAttributes (readonly)
+- Variant[] attributes
+- AttributeInfo[] attributeInfos (readonly)
+- bool enabled
+- bool enabledEffective (readonly)
+- uint id (readonly)
+- Node@ node (readonly)
+- uint flags
+
+
+NavigationMesh
+
+Methods:<br>
+- void SendEvent(const String&, VariantMap& arg1 = VariantMap ( ))
+- bool Load(File@)
+- bool Save(File@)
+- bool LoadXML(const XMLElement&)
+- bool SaveXML(XMLElement&)
+- void ApplyAttributes()
+- bool SetAttribute(const String&, const Variant&)
+- Variant GetAttribute(const String&)
+- void Remove()
+- void MarkNetworkUpdate() const
+- void DrawDebugGeometry(DebugRenderer@, bool)
+- void Build()
+
+Properties:<br>
+- ShortStringHash type (readonly)
+- String typeName (readonly)
+- int refs (readonly)
+- int weakRefs (readonly)
+- uint numAttributes (readonly)
+- Variant[] attributes
+- AttributeInfo[] attributeInfos (readonly)
+- bool enabled
+- bool enabledEffective (readonly)
+- uint id (readonly)
+- Node@ node (readonly)
+- float cellSize
+- float cellHeight
+- float agentHeight
+- float agentRadius
+- float agentMaxClimb
+- float agentMaxSlope
+- float regionMinSize
+- float regionMergeSize
+- float edgeMaxLength
+- float edgeMaxError
+- float detailSampleDistance
+- float detailSampleMaxError
+- BoundingBox worldBoundingBox (readonly)
+
+
 ScriptFile
 
 Methods:<br>

+ 3 - 0
Engine/Engine/MathAPI.cpp

@@ -779,6 +779,9 @@ static void RegisterRect(asIScriptEngine* engine)
     engine->RegisterObjectMethod("Rect", "void Clip(const Rect&in)", asMETHODPR(Rect, Clip, (const Rect&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod("Rect", "void Clear()", asMETHOD(Rect, Clear), asCALL_THISCALL);
     engine->RegisterObjectMethod("Rect", "bool Equals(const Rect&in) const", asMETHOD(Rect, Equals), asCALL_THISCALL);
+    engine->RegisterObjectMethod("Rect", "Vector2 get_center() const", asMETHOD(Rect, Center), asCALL_THISCALL);
+    engine->RegisterObjectMethod("Rect", "Vector2 get_size() const", asMETHOD(Rect, Size), asCALL_THISCALL);
+    engine->RegisterObjectMethod("Rect", "Vector2 get_halfSize() const", asMETHOD(Rect, HalfSize), asCALL_THISCALL);
     engine->RegisterObjectProperty("Rect", "Vector2 min", offsetof(Rect, min_));
     engine->RegisterObjectProperty("Rect", "Vector2 max", offsetof(Rect, max_));
     engine->RegisterObjectProperty("Rect", "float left", offsetof(Rect, min_.x_));

+ 5 - 0
Tools/AssetImporter/AssetImporter.cpp

@@ -194,6 +194,7 @@ void Run(const Vector<String>& arguments)
             "-nm   Do not output materials\n"
             "-ns   Do not create subdirectories for resources\n"
             "-nz   Do not create a zone and a directional light (scene mode only)\n"
+            "-nf   Do not fix infacing normals\n"
             "-pX   Set path X for scene resources. Default is output file path\n"
             "-rX   Use scene node X as root node\n"
             "-fX   Animation tick frequency to use if unspecified. Default 4800\n"
@@ -284,6 +285,10 @@ void Run(const Vector<String>& arguments)
                     case 'z':
                         createZone_ = false;
                         break;
+                        
+                    case 'f':
+                        flags &= ~aiProcess_FixInfacingNormals;
+                        break;
                     }
                 }
                 break;