소스 검색

Clean up scene node related comments in samples.

Lasse Öörni 12 년 전
부모
커밋
e19bed4946

+ 3 - 4
Source/Samples/05_AnimatingScene/Rotator.cpp

@@ -39,14 +39,13 @@ void Rotator::SetRotationSpeed(const Vector3& speed)
 
 
 void Rotator::OnNodeSet(Node* node)
 void Rotator::OnNodeSet(Node* node)
 {
 {
-    // If the node pointer is nonzero, this component has been created into a scene node. Subscribe to the variable timestep
-    // scene update event now. If the node pointer is zero, the component is being removed from a scene node at destruction
+    // If the node pointer is non-null, this component has been created into a scene node. Subscribe to the variable timestep
+    // scene update event now. If the node pointer is null, the component is being removed from a scene node at destruction
     // time. In that case we do nothing
     // time. In that case we do nothing
     if (node)
     if (node)
     {
     {
         Scene* scene = node->GetScene();
         Scene* scene = node->GetScene();
-        // The scene pointer will be nonzero if the scene node belongs to a scene (it is also legal to create free-standing
-        // scene nodes)
+        // The scene pointer can be null if this scene node has been created free-standing and not part of a scene
         if (scene)
         if (scene)
             SubscribeToEvent(scene, E_SCENEUPDATE, HANDLER(Rotator, HandleSceneUpdate));
             SubscribeToEvent(scene, E_SCENEUPDATE, HANDLER(Rotator, HandleSceneUpdate));
     }
     }

+ 2 - 5
Source/Samples/06_SkeletalAnimation/Mover.cpp

@@ -44,14 +44,11 @@ void Mover::SetParameters(float moveSpeed, float rotationSpeed, const BoundingBo
 
 
 void Mover::OnNodeSet(Node* node)
 void Mover::OnNodeSet(Node* node)
 {
 {
-    // If the node pointer is nonzero, this component has been created into a scene node. Subscribe to the variable timestep
-    // scene update event now. If the node pointer is zero, the component is being removed from a scene node at destruction
-    // time. In that case we do nothing
+    // If the node pointer is non-null, this component has been created into a scene node. Subscribe to the variable timestep
+    // scene update event now
     if (node)
     if (node)
     {
     {
         Scene* scene = node->GetScene();
         Scene* scene = node->GetScene();
-        // The scene pointer will be nonzero if the scene node belongs to a scene (it is also legal to create free-standing
-        // scene nodes)
         if (scene)
         if (scene)
             SubscribeToEvent(scene, E_SCENEUPDATE, HANDLER(Mover, HandleSceneUpdate));
             SubscribeToEvent(scene, E_SCENEUPDATE, HANDLER(Mover, HandleSceneUpdate));
     }
     }

+ 2 - 5
Source/Samples/10_RenderToTexture/Rotator.cpp

@@ -39,14 +39,11 @@ void Rotator::SetRotationSpeed(const Vector3& speed)
 
 
 void Rotator::OnNodeSet(Node* node)
 void Rotator::OnNodeSet(Node* node)
 {
 {
-    // If the node pointer is nonzero, this component has been created into a scene node. Subscribe to the variable timestep
-    // scene update event now. If the node pointer is zero, the component is being removed from a scene node at destruction
-    // time. In that case we do nothing
+    // If the node pointer is non-null, this component has been created into a scene node. Subscribe to the variable timestep
+    // scene update event now
     if (node)
     if (node)
     {
     {
         Scene* scene = node->GetScene();
         Scene* scene = node->GetScene();
-        // The scene pointer will be nonzero if the scene node belongs to a scene (it is also legal to create free-standing
-        // scene nodes)
         if (scene)
         if (scene)
             SubscribeToEvent(scene, E_SCENEUPDATE, HANDLER(Rotator, HandleSceneUpdate));
             SubscribeToEvent(scene, E_SCENEUPDATE, HANDLER(Rotator, HandleSceneUpdate));
     }
     }

+ 1 - 1
Source/Samples/13_Ragdolls/CreateRagdoll.cpp

@@ -36,7 +36,7 @@ CreateRagdoll::CreateRagdoll(Context* context) :
 
 
 void CreateRagdoll::OnNodeSet(Node* node)
 void CreateRagdoll::OnNodeSet(Node* node)
 {
 {
-    // If the node pointer is nonzero, this component has been created into a scene node. Subscribe to physics collisions that
+    // If the node pointer is non-null, this component has been created into a scene node. Subscribe to physics collisions that
     // concern this scene node
     // concern this scene node
     if (node)
     if (node)
         SubscribeToEvent(node, E_NODECOLLISION, HANDLER(CreateRagdoll, HandleNodeCollision));
         SubscribeToEvent(node, E_NODECOLLISION, HANDLER(CreateRagdoll, HandleNodeCollision));