Browse Source

Fixed TestSceneOld to randomize the scene similarly as in Urho3D 1.0.
Comments cleanup.

Lasse Öörni 14 years ago
parent
commit
1fd39c6922

+ 2 - 1
Bin/Data/Scripts/TestSceneOld.as

@@ -142,11 +142,12 @@ void InitScene()
         
         for (uint j = 0; j < NUM_INSTANCES; ++j)
         {
+            Vector3 position = Vector3(Random() * 20 - 10, 0, Random() * 20 - 10);
             float angle = Random() * 360;
             float size = 1 + Random() * 2;
             
             Node@ instance = newNode.CreateChild();
-            instance.position = Vector3(Random() * 20 - 10, 0, Random() * 20 - 10);
+            instance.position = position;
             instance.rotation = Quaternion(angle, Vector3(0, 1, 0));
             instance.SetScale(size);
 

+ 1 - 1
Engine/Graphics/AnimatedModel.h

@@ -139,7 +139,7 @@ protected:
     virtual void OnNodeSet(Node* node);
     /// Handle node transform being dirtied.
     virtual void OnMarkedDirty(Node* node);
-    /// Update world-space bounding box.
+    /// Recalculate the world-space bounding box.
     virtual void OnWorldBoundingBoxUpdate();
     
 private:

+ 1 - 1
Engine/Graphics/BillboardSet.h

@@ -120,7 +120,7 @@ public:
 protected:
     /// Transform has changed. Mark billboards dirty if necessary.
     virtual void OnMarkedDirty(Node* node);
-    /// Update world-space bounding box.
+    /// Recalculate the world-space bounding box.
     virtual void OnWorldBoundingBoxUpdate();
     /// Mark billboard vertex buffer to need an update.
     void MarkPositionsDirty();

+ 1 - 1
Engine/Graphics/Drawable.h

@@ -170,7 +170,7 @@ protected:
     virtual void OnNodeSet(Node* node);
     /// Handle node transform being dirtied.
     virtual void OnMarkedDirty(Node* node);
-    /// Recalculate world bounding box.
+    /// Recalculate the world-space bounding box.
     virtual void OnWorldBoundingBoxUpdate() = 0;
     /// Add to octree.
     void AddToOctree();

+ 1 - 1
Engine/Graphics/Light.h

@@ -268,7 +268,7 @@ public:
     ResourceRef GetShapeTextureAttr() const;
     
 protected:
-    /// Update world-space bounding box.
+    /// Recalculate the world-space bounding box.
     virtual void OnWorldBoundingBoxUpdate();
     
 private:

+ 1 - 1
Engine/Graphics/Skybox.h

@@ -44,7 +44,7 @@ public:
     virtual void GetBatch(const FrameInfo& frame, unsigned batchIndex, Batch& batch);
     
 protected:
-    /// Update world-space bounding box.
+    /// Recalculate the world-space bounding box.
     virtual void OnWorldBoundingBoxUpdate();
     
     /// Custom world transform.

+ 1 - 1
Engine/Graphics/StaticModel.h

@@ -81,7 +81,7 @@ public:
     ResourceRefList GetMaterialsAttr() const;
     
 protected:
-    /// Update the world bounding box.
+    /// Recalculate the world-space bounding box.
     virtual void OnWorldBoundingBoxUpdate();
     /// %Set the bounding box.
     void SetBoundingBox(const BoundingBox& box);

+ 1 - 1
Engine/Graphics/Zone.h

@@ -72,7 +72,7 @@ public:
     virtual bool IsInside(const Vector3& point);
     
 protected:
-    /// Update world-space bounding box.
+    /// Recalculate the world-space bounding box.
     virtual void OnWorldBoundingBoxUpdate();
     
     /// Bounding box.