2
0
Эх сурвалжийг харах

*** empty log message ***

David Rose 25 жил өмнө
parent
commit
2ba9291bdf

+ 1 - 1
direct/src/actor/Actor.py

@@ -684,7 +684,7 @@ class Actor(PandaObject, NodePath):
             dt = DirectRenderTransition()
             dt = DirectRenderTransition()
 
 
         # make the back part have the proper transition
         # make the back part have the proper transition
-        backPart.getBottomArc().setTransition(dt)
+        backPart.arc().setTransition(dt)
 
 
         #reparent all the front parts to the back part
         #reparent all the front parts to the back part
         frontParts.reparentTo(backPart)
         frontParts.reparentTo(backPart)

+ 2 - 2
direct/src/directdevices/DirectJoybox.py

@@ -48,7 +48,7 @@ class DirectJoybox(PandaObject):
                         R_TWIST, L_TWIST, NULL_AXIS]
                         R_TWIST, L_TWIST, NULL_AXIS]
         self.modifier = [1,1,1,-1,-1,0]
         self.modifier = [1,1,1,-1,-1,0]
         # Initialize time
         # Initialize time
-        self.lastTime = globalClock.getTime()
+        self.lastTime = globalClock.getFrameTime()
         # Record node path
         # Record node path
         self.nodePath = nodePath
         self.nodePath = nodePath
         # Ref CS for orbit mode
         # Ref CS for orbit mode
@@ -121,7 +121,7 @@ class DirectJoybox(PandaObject):
     
     
     def updateVals(self):
     def updateVals(self):
         # Update delta time
         # Update delta time
-        cTime = globalClock.getTime()
+        cTime = globalClock.getFrameTime()
         self.deltaTime = cTime - self.lastTime
         self.deltaTime = cTime - self.lastTime
         self.lastTime = cTime
         self.lastTime = cTime
         # Update analogs
         # Update analogs

+ 1 - 1
direct/src/directtools/DirectGeometry.py

@@ -176,5 +176,5 @@ def relHpr(nodePath, base, h, p, r):
 # Set direct drawing style for an object
 # Set direct drawing style for an object
 # Never light object or draw in wireframe
 # Never light object or draw in wireframe
 def useDirectRenderStyle(nodePath):
 def useDirectRenderStyle(nodePath):
-    nodePath.getBottomArc().setTransition(LightTransition.allOff())
+    nodePath.arc().setTransition(LightTransition.allOff())
     nodePath.setRenderModeFilled()
     nodePath.setRenderModeFilled()

+ 1 - 1
direct/src/directtools/DirectSelection.py

@@ -345,7 +345,7 @@ class DirectBoundingBox:
         # Get a node path's bounds
         # Get a node path's bounds
         nodeBounds = self.nodePath.node().getBound()
         nodeBounds = self.nodePath.node().getBound()
         for child in self.nodePath.getChildrenAsList():
         for child in self.nodePath.getChildrenAsList():
-            nodeBounds.extendBy(child.getBottomArc().getBound())
+            nodeBounds.extendBy(child.arc().getBound())
             return nodeBounds.makeCopy()
             return nodeBounds.makeCopy()
 
 
     def show(self):
     def show(self):

+ 2 - 2
direct/src/directutil/Mopath.py

@@ -85,13 +85,13 @@ class Mopath(PandaObject):
 	self.stop()
 	self.stop()
 	t = taskMgr.spawnMethodNamed(self.__playTask, self.name + '-play')
 	t = taskMgr.spawnMethodNamed(self.__playTask, self.name + '-play')
 	t.currentTime = time
 	t.currentTime = time
-	t.lastTime = globalClock.getTime()
+	t.lastTime = globalClock.getFrameTime()
 
 
     def stop(self):
     def stop(self):
 	taskMgr.removeTasksNamed(self.name + '-play')
 	taskMgr.removeTasksNamed(self.name + '-play')
 
 
     def __playTask(self, state):
     def __playTask(self, state):
-	time = globalClock.getTime()
+	time = globalClock.getFrameTime()
 	dTime = time - state.lastTime
 	dTime = time - state.lastTime
 	state.lastTime = time
 	state.lastTime = time
 	if (self.loop):
 	if (self.loop):

+ 1 - 1
direct/src/extensions/NodePath-extensions.py

@@ -6,7 +6,7 @@
 
 
     def id(self):
     def id(self):
         """Returns the bottom node's this pointer as a unique id"""
         """Returns the bottom node's this pointer as a unique id"""
-        return self.getBottomArc()
+        return self.arc()
 
 
     def getName(self):
     def getName(self):
         """Returns the name of the bottom node if it exists, or <noname>"""
         """Returns the name of the bottom node if it exists, or <noname>"""

+ 5 - 5
direct/src/leveleditor/LevelEditor.py

@@ -491,10 +491,10 @@ class LevelEditor(NodePath, PandaObject):
         hpr = direct.camera.getHpr()
         hpr = direct.camera.getHpr()
         hpr.set(hpr[0], 0.0, 0.0)
         hpr.set(hpr[0], 0.0, 0.0)
         # Fine tune the drive mode
         # Fine tune the drive mode
-        base.mouseInterface.getBottomNode().setPos(pos)
-        base.mouseInterface.getBottomNode().setHpr(hpr)
-        base.mouseInterface.getBottomNode().setForwardSpeed(20.0)
-        base.mouseInterface.getBottomNode().setReverseSpeed(20.0)
+        base.mouseInterface.node().setPos(pos)
+        base.mouseInterface.node().setHpr(hpr)
+        base.mouseInterface.node().setForwardSpeed(20.0)
+        base.mouseInterface.node().setReverseSpeed(20.0)
 
 
     def enableMouse(self):
     def enableMouse(self):
 	""" Enable Pie Menu interaction (and disable player camera control) """
 	""" Enable Pie Menu interaction (and disable player camera control) """
@@ -1348,7 +1348,7 @@ class LevelEditor(NodePath, PandaObject):
     def createMap(self, neighborhood):
     def createMap(self, neighborhood):
 	map = loader.loadModel('models/level_editor/' + neighborhood +
 	map = loader.loadModel('models/level_editor/' + neighborhood +
                                '_layout')
                                '_layout')
-	map.getBottomArc().setTransition(TransparencyTransition(1))
+	map.arc().setTransition(TransparencyTransition(1))
 	map.setColor(Vec4(1,1,1,.4))
 	map.setColor(Vec4(1,1,1,.4))
         self.mapDictionary[neighborhood] = map
         self.mapDictionary[neighborhood] = map
         # Make sure this item isn't pickable
         # Make sure this item isn't pickable

+ 4 - 4
direct/src/showbase/ShowBase.py

@@ -118,7 +118,7 @@ class ShowBase:
         self.trackball = self.dataUnused.attachNewNode(Trackball('trackball'))
         self.trackball = self.dataUnused.attachNewNode(Trackball('trackball'))
         self.drive = self.dataUnused.attachNewNode(DriveInterface('drive'))
         self.drive = self.dataUnused.attachNewNode(DriveInterface('drive'))
         self.mouse2cam = self.dataUnused.attachNewNode(Transform2SG('mouse2cam'))
         self.mouse2cam = self.dataUnused.attachNewNode(Transform2SG('mouse2cam'))
-        self.mouse2cam.node().setArc(self.camera.getBottomArc())
+        self.mouse2cam.node().setArc(self.camera.arc())
         self.useDrive()
         self.useDrive()
 
 
         self.buttonThrower = self.mouseWatcher.attachNewNode(ButtonThrower())
         self.buttonThrower = self.mouseWatcher.attachNewNode(ButtonThrower())
@@ -283,7 +283,7 @@ class ShowBase:
         self.trackball.reparentTo(self.dataUnused)
         self.trackball.reparentTo(self.dataUnused)
         # Update the mouseInterface to point to the drive
         # Update the mouseInterface to point to the drive
         self.mouseInterface = self.drive
         self.mouseInterface = self.drive
-        self.mouseInterfaceNode = self.mouseInterface.getBottomNode()
+        self.mouseInterfaceNode = self.mouseInterface.node()
         self.drive.node().reset()
         self.drive.node().reset()
         # Hookup the drive to the camera.  Make sure it is first in
         # Hookup the drive to the camera.  Make sure it is first in
         # the list of children of the mouseValve.
         # the list of children of the mouseValve.
@@ -300,7 +300,7 @@ class ShowBase:
         self.drive.reparentTo(self.dataUnused)
         self.drive.reparentTo(self.dataUnused)
         # Update the mouseInterface to point to the trackball
         # Update the mouseInterface to point to the trackball
         self.mouseInterface = self.trackball
         self.mouseInterface = self.trackball
-        self.mouseInterfaceNode = self.mouseInterface.getBottomNode()
+        self.mouseInterfaceNode = self.mouseInterface.node()
         # Hookup the trackball to the camera.  Make sure it is first
         # Hookup the trackball to the camera.  Make sure it is first
         # in the list of children of the mouseValve.
         # in the list of children of the mouseValve.
         self.trackball.reparentTo(self.mouseValve, 0)
         self.trackball.reparentTo(self.mouseValve, 0)
@@ -342,7 +342,7 @@ class ShowBase:
             self.mouseValve.node().setControl(1, self.oobeControl)
             self.mouseValve.node().setControl(1, self.oobeControl)
             self.oobeTrackball = self.mouseValve.attachNewNode(Trackball('oobeTrackball'), 1)
             self.oobeTrackball = self.mouseValve.attachNewNode(Trackball('oobeTrackball'), 1)
             self.oobe2cam = self.oobeTrackball.attachNewNode(Transform2SG('oobe2cam'))
             self.oobe2cam = self.oobeTrackball.attachNewNode(Transform2SG('oobe2cam'))
-            self.oobe2cam.node().setArc(self.oobeCameraTrackball.getBottomArc())
+            self.oobe2cam.node().setArc(self.oobeCameraTrackball.arc())
 
 
             self.oobeButtonEventsType = TypeRegistry.ptr().findType('ButtonEvents_ButtonEventDataTransition')
             self.oobeButtonEventsType = TypeRegistry.ptr().findType('ButtonEvents_ButtonEventDataTransition')
 
 

+ 3 - 3
direct/src/task/Task.py

@@ -20,7 +20,7 @@ def getTimeFrame():
     # you must manually tick the clock
     # you must manually tick the clock
 
 
     # Ask for the time last frame
     # Ask for the time last frame
-    t = globalClock.getTime()
+    t = globalClock.getFrameTime()
 
 
     # Get the new frame count
     # Get the new frame count
     f = globalClock.getFrameCount()
     f = globalClock.getFrameCount()
@@ -381,8 +381,8 @@ class TaskManager:
     def run(self):
     def run(self):
         # Set the clock to have last frame's time in case we were
         # Set the clock to have last frame's time in case we were
         # Paused at the prompt for a long time
         # Paused at the prompt for a long time
-        t = globalClock.getTime()
-        globalClock.setTime(t)
+        t = globalClock.getFrameTime()
+        globalClock.setRealTime(t)
         if self.stepping:
         if self.stepping:
             self.step()
             self.step()
         else:
         else:

+ 4 - 4
direct/src/tkpanels/MopathRecorder.py

@@ -967,7 +967,7 @@ class MopathRecorder(AppShell, PandaObject):
                 # Start new task
                 # Start new task
                 t = taskMgr.spawnMethodNamed(
                 t = taskMgr.spawnMethodNamed(
                     self.recordTask, self.name + '-recordTask')
                     self.recordTask, self.name + '-recordTask')
-                t.startTime = globalClock.getTime()
+                t.startTime = globalClock.getFrameTime()
         else:
         else:
             if self.samplingMode == 'Continuous':
             if self.samplingMode == 'Continuous':
                 # Kill old task
                 # Kill old task
@@ -1002,7 +1002,7 @@ class MopathRecorder(AppShell, PandaObject):
             
             
     def recordTask(self, state):
     def recordTask(self, state):
         # Record raw data point
         # Record raw data point
-        time = self.recordStart + (globalClock.getTime() - state.startTime)
+        time = self.recordStart + (globalClock.getFrameTime() - state.startTime)
         self.recordPoint(time)
         self.recordPoint(time)
         return Task.cont
         return Task.cont
 
 
@@ -1311,7 +1311,7 @@ class MopathRecorder(AppShell, PandaObject):
         t = taskMgr.spawnMethodNamed(
         t = taskMgr.spawnMethodNamed(
             self.playbackTask, self.name + '-playbackTask')
             self.playbackTask, self.name + '-playbackTask')
         t.currentTime = self.playbackTime
         t.currentTime = self.playbackTime
-        t.lastTime = globalClock.getTime()
+        t.lastTime = globalClock.getFrameTime()
 
 
     def setSpeedScale(self, value):
     def setSpeedScale(self, value):
         self.speedScale.set(value)
         self.speedScale.set(value)
@@ -1320,7 +1320,7 @@ class MopathRecorder(AppShell, PandaObject):
         self.playbackSF = pow(10.0, float(value))
         self.playbackSF = pow(10.0, float(value))
         
         
     def playbackTask(self, state):
     def playbackTask(self, state):
-        time = globalClock.getTime()
+        time = globalClock.getFrameTime()
         dTime = self.playbackSF * (time - state.lastTime)
         dTime = self.playbackSF * (time - state.lastTime)
         state.lastTime = time
         state.lastTime = time
         if self.loopPlayback:
         if self.loopPlayback:

+ 1 - 1
panda/src/collide/collisionTraverser.cxx

@@ -240,7 +240,7 @@ traverse(const NodePath &root) {
     (*hi).first->begin_group();
     (*hi).first->begin_group();
   }
   }
 
 
-  df_traverse(root.get_bottom_node(), *this, NullAttributeWrapper(), 
+  df_traverse(root.node(), *this, NullAttributeWrapper(), 
 	      level_state, _graph_type);
 	      level_state, _graph_type);
 
 
   for (hi = _handlers.begin(); hi != _handlers.end(); ++hi) {
   for (hi = _handlers.begin(); hi != _handlers.end(); ++hi) {

+ 0 - 24
panda/src/express/clockObject.I

@@ -210,30 +210,6 @@ get_global_clock() {
   return _global_clock;
   return _global_clock;
 }
 }
 
 
-////////////////////////////////////////////////////////////////////
-//     Function: ClockObject::get_time
-//       Access: Public
-//  Description: Returns get_frame_time().  The use of this function
-//               is deprecated and the function will soon disappear;
-//               use get_frame_time() instead.
-////////////////////////////////////////////////////////////////////
-INLINE double ClockObject::
-get_time() const {
-  return get_frame_time();
-}
-
-////////////////////////////////////////////////////////////////////
-//     Function: ClockObject::set_time
-//       Access: Public
-//  Description: Calls set_real_time().  The use of this function
-//               is deprecated and the function will soon disappear;
-//               use set_real_time() instead.
-////////////////////////////////////////////////////////////////////
-INLINE void ClockObject::
-set_time(double time) {
-  set_real_time(time);
-}
-
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: TimeVal::contructor
 //     Function: TimeVal::contructor
 //       Access: Public
 //       Access: Public

+ 11 - 14
panda/src/express/clockObject.h

@@ -29,14 +29,15 @@ END_PUBLISH
 //       Class : ClockObject
 //       Class : ClockObject
 // Description : A ClockObject keeps track of elapsed real time and
 // Description : A ClockObject keeps track of elapsed real time and
 //               discrete time.  It can run in two modes: In normal
 //               discrete time.  It can run in two modes: In normal
-//               mode, get_time() returns the time as of the last time
-//               tick() was called.  This is the "discrete" time, and
-//               is usually used to get the time as of, for instance,
-//               the beginning of the current frame.  In non-real-time
-//               mode, get_time() returns a constant increment since
-//               the last time tick() was called; this is useful when
-//               it is desirable to fake the clock out, for instance
-//               for non-real-time animation rendering.
+//               mode, get_frame_time() returns the time as of the
+//               last time tick() was called.  This is the "discrete"
+//               time, and is usually used to get the time as of, for
+//               instance, the beginning of the current frame.  In
+//               non-real-time mode, get_frame_time() returns a
+//               constant increment since the last time tick() was
+//               called; this is useful when it is desirable to fake
+//               the clock out, for instance for non-real-time
+//               animation rendering.
 //
 //
 //               In both modes, get_real_time() always returns the
 //               In both modes, get_real_time() always returns the
 //               elapsed real time in seconds since the ClockObject
 //               elapsed real time in seconds since the ClockObject
@@ -46,8 +47,8 @@ END_PUBLISH
 //               to have your own local timer.  There is also a
 //               to have your own local timer.  There is also a
 //               default, global ClockObject intended to represent
 //               default, global ClockObject intended to represent
 //               global time for the application; this is normally set
 //               global time for the application; this is normally set
-//               up to tick every frame so that its get_time() will
-//               return the time for the current frame.
+//               up to tick every frame so that its get_frame_time()
+//               will return the time for the current frame.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAEXPRESS ClockObject {
 class EXPCL_PANDAEXPRESS ClockObject {
 PUBLISHED:
 PUBLISHED:
@@ -81,10 +82,6 @@ PUBLISHED:
 
 
   INLINE static ClockObject *get_global_clock();
   INLINE static ClockObject *get_global_clock();
 
 
-  // Deprecated functions.
-  INLINE double get_time() const;
-  INLINE void set_time(double time);
-
 private:
 private:
   TrueClock *_true_clock;
   TrueClock *_true_clock;
   Mode _mode;
   Mode _mode;

+ 4 - 24
panda/src/sgmanip/nodePath.I

@@ -315,7 +315,7 @@ get_num_children() const {
   nassertr(verify_connectivity(), 0);
   nassertr(verify_connectivity(), 0);
   nassertr(!is_empty(), 0);
   nassertr(!is_empty(), 0);
 
 
-  return get_bottom_node()->get_num_children(_graph_type);
+  return node()->get_num_children(_graph_type);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -332,7 +332,7 @@ get_child(int n) const {
   nassertr(n >= 0 && n < get_num_children(), NodePath());
   nassertr(n >= 0 && n < get_num_children(), NodePath());
 
 
   NodePath result(*this);
   NodePath result(*this);
-  result.extend_by(get_bottom_node()->get_child(_graph_type, n));
+  result.extend_by(node()->get_child(_graph_type, n));
   return result;
   return result;
 }
 }
 
 
@@ -371,9 +371,9 @@ get_parent() const {
 //               if there is no connection to the indicated node.
 //               if there is no connection to the indicated node.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE NodePath NodePath::
 INLINE NodePath NodePath::
-find_path_down_to(Node *node) const {
+find_path_down_to(Node *dnode) const {
   NodePath result(*this);
   NodePath result(*this);
-  if (result.extend_down_to(node)) {
+  if (result.extend_down_to(dnode)) {
     return result;
     return result;
   }
   }
   return NodePath();
   return NodePath();
@@ -1450,23 +1450,3 @@ INLINE void NodePath::
 hide_collision_solids() {
 hide_collision_solids() {
   find_all_matches("**/+CollisionNode").hide();
   find_all_matches("**/+CollisionNode").hide();
 }
 }
-
-////////////////////////////////////////////////////////////////////
-//     Function: NodePath::get_bottom_node
-//       Access: Public
-//  Description: This function is deprecated.  Use node() instead.
-////////////////////////////////////////////////////////////////////
-INLINE Node *NodePath::
-get_bottom_node() const {
-  return node();
-}
-
-////////////////////////////////////////////////////////////////////
-//     Function: NodePath::get_bottom_arc
-//       Access: Public
-//  Description: This function is deprecated.  Use arc() instead.
-////////////////////////////////////////////////////////////////////
-INLINE NodeRelation *NodePath::
-get_bottom_arc() const {
-  return arc();
-}

+ 74 - 74
panda/src/sgmanip/nodePath.cxx

@@ -63,23 +63,23 @@ public:
 //               unambiguous behavior is required.
 //               unambiguous behavior is required.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool NodePath::
 bool NodePath::
-extend_by(Node *node) {
+extend_by(Node *dnode) {
   nassertr(verify_connectivity(), false);
   nassertr(verify_connectivity(), false);
-  nassertr(node != (Node *)NULL, false);
+  nassertr(dnode != (Node *)NULL, false);
   
   
   if (is_empty()) {
   if (is_empty()) {
     nassertr(_head == (ArcComponent *)NULL, false);
     nassertr(_head == (ArcComponent *)NULL, false);
-    _top_node = node;
+    _top_node = dnode;
     return true;
     return true;
   }
   }
 
 
-  Node *bottom_node = get_bottom_node();
-  NodeRelation *arc = find_arc(bottom_node, node, _graph_type);
+  Node *bottom_node = node();
+  NodeRelation *arc = find_arc(bottom_node, dnode, _graph_type);
   if (arc == (NodeRelation *)NULL) {
   if (arc == (NodeRelation *)NULL) {
     if (sgmanip_cat.is_debug()) {
     if (sgmanip_cat.is_debug()) {
       sgmanip_cat.debug()
       sgmanip_cat.debug()
 	<< "Cannot extend " << *this << " by "
 	<< "Cannot extend " << *this << " by "
-	<< *node << "; no connection.\n";
+	<< *dnode << "; no connection.\n";
     }
     }
     return false;
     return false;
   }
   }
@@ -109,7 +109,7 @@ extend_by(NodeRelation *arc) {
     _top_node = arc->get_parent();
     _top_node = arc->get_parent();
   }
   }
 
 
-  if (arc->get_parent() != get_bottom_node()) {
+  if (arc->get_parent() != node()) {
     if (sgmanip_cat.is_debug()) {
     if (sgmanip_cat.is_debug()) {
       sgmanip_cat.debug()
       sgmanip_cat.debug()
 	<< "Cannot extend " << *this << " by arc " << *arc << "\n";
 	<< "Cannot extend " << *this << " by arc " << *arc << "\n";
@@ -182,8 +182,8 @@ extend_by(const string &path) {
 //               if the node was not below this NodePath.
 //               if the node was not below this NodePath.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool NodePath::
 bool NodePath::
-extend_down_to(Node *node) {
-  if (!is_empty() && get_bottom_node() == node) {
+extend_down_to(Node *dnode) {
+  if (!is_empty() && node() == dnode) {
     // We're already there!
     // We're already there!
     return true;
     return true;
   }
   }
@@ -192,14 +192,14 @@ extend_down_to(Node *node) {
   NodePathCollection col;
   NodePathCollection col;
   FindApproxPath approx_path;
   FindApproxPath approx_path;
   approx_path.add_match_many();
   approx_path.add_match_many();
-  approx_path.add_match_pointer(node);
+  approx_path.add_match_pointer(dnode);
   find_matches(col, approx_path, -1);
   find_matches(col, approx_path, -1);
 
 
   if (col.is_empty()) {
   if (col.is_empty()) {
     if (sgmanip_cat.is_debug()) {
     if (sgmanip_cat.is_debug()) {
       sgmanip_cat.debug()
       sgmanip_cat.debug()
 	<< "Could not extend " << *this << " down to "
 	<< "Could not extend " << *this << " down to "
-	<< *node << "; no connection found.\n";
+	<< *dnode << "; no connection found.\n";
     }
     }
     return false;
     return false;
   }
   }
@@ -263,10 +263,10 @@ get_children() const {
   nassertr(verify_connectivity(), result);
   nassertr(verify_connectivity(), result);
   nassertr(!is_empty(), result);
   nassertr(!is_empty(), result);
 
 
-  Node *node = get_bottom_node();
+  Node *bottom_node = node();
   DownRelations::const_iterator dri;
   DownRelations::const_iterator dri;
-  dri = node->_children.find(_graph_type);
-  if (dri != node->_children.end()) {
+  dri = bottom_node->_children.find(_graph_type);
+  if (dri != bottom_node->_children.end()) {
     const DownRelationPointers &drp = (*dri).second;
     const DownRelationPointers &drp = (*dri).second;
     
     
     DownRelationPointers::const_iterator drpi;
     DownRelationPointers::const_iterator drpi;
@@ -298,10 +298,10 @@ get_siblings() const {
   NodePath parent = *this;
   NodePath parent = *this;
   parent.shorten(1);
   parent.shorten(1);
 
 
-  Node *node = parent.get_bottom_node();
+  Node *parent_node = parent.node();
   DownRelations::const_iterator dri;
   DownRelations::const_iterator dri;
-  dri = node->_children.find(_graph_type);
-  if (dri != node->_children.end()) {
+  dri = parent_node->_children.find(_graph_type);
+  if (dri != parent_node->_children.end()) {
     const DownRelationPointers &drp = (*dri).second;
     const DownRelationPointers &drp = (*dri).second;
     
     
     DownRelationPointers::const_iterator drpi;
     DownRelationPointers::const_iterator drpi;
@@ -326,13 +326,13 @@ get_siblings() const {
 //               shortest paths will be listed first.
 //               shortest paths will be listed first.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 NodePathCollection NodePath::
 NodePathCollection NodePath::
-find_all_paths_down_to(Node *node) const {
+find_all_paths_down_to(Node *dnode) const {
   NodePathCollection col;
   NodePathCollection col;
   nassertr(verify_connectivity(), col);
   nassertr(verify_connectivity(), col);
-  nassertr(node != (Node *)NULL, col);
+  nassertr(dnode != (Node *)NULL, col);
   FindApproxPath approx_path;
   FindApproxPath approx_path;
   approx_path.add_match_many();
   approx_path.add_match_many();
-  approx_path.add_match_pointer(node);
+  approx_path.add_match_pointer(dnode);
   find_matches(col, approx_path, -1);
   find_matches(col, approx_path, -1);
   return col;
   return col;
 }
 }
@@ -740,7 +740,7 @@ reparent_to(const NodePath &other, int sort) {
 
 
   NodeRelation *arc = _head->_arc;
   NodeRelation *arc = _head->_arc;
 
 
-  arc->change_parent(other.get_bottom_node(), sort);
+  arc->change_parent(other.node(), sort);
 
 
   // Move our head pointer to the bottom of the new chain.  This will
   // Move our head pointer to the bottom of the new chain.  This will
   // update our own path, as well as all paths that share the same
   // update our own path, as well as all paths that share the same
@@ -796,21 +796,21 @@ instance_to(const NodePath &other, int sort) const {
   nassertr(!is_empty(), NodePath());
   nassertr(!is_empty(), NodePath());
   nassertr(!other.is_empty(), NodePath());
   nassertr(!other.is_empty(), NodePath());
 
 
-  Node *node = get_bottom_node();
-  NodeRelation *arc = 
-    NodeRelation::create_typed_arc(_graph_type, other.get_bottom_node(), 
-				   node, sort);
-  nassertr(arc != (NodeRelation *)NULL, NodePath());
-  nassertr(arc->is_exact_type(_graph_type), NodePath());
+  Node *bottom_node = node();
+  NodeRelation *darc = 
+    NodeRelation::create_typed_arc(_graph_type, other.node(), 
+				   bottom_node, sort);
+  nassertr(darc != (NodeRelation *)NULL, NodePath());
+  nassertr(darc->is_exact_type(_graph_type), NodePath());
 
 
   if (has_arcs()) {
   if (has_arcs()) {
     // Copy the transitions from this one's bottom arc, so the
     // Copy the transitions from this one's bottom arc, so the
     // instance will inherit the same local state by default.
     // instance will inherit the same local state by default.
-    arc->copy_transitions_from(get_bottom_arc());
+    darc->copy_transitions_from(arc());
   }
   }
 
 
   NodePath instance(*this);
   NodePath instance(*this);
-  instance._head = new ArcComponent(arc, other._head);
+  instance._head = new ArcComponent(darc, other._head);
   return instance;
   return instance;
 }
 }
 
 
@@ -835,24 +835,24 @@ copy_to(const NodePath &other, int sort) const {
   nassertr(!is_empty(), NodePath());
   nassertr(!is_empty(), NodePath());
   nassertr(!other.is_empty(), NodePath());
   nassertr(!other.is_empty(), NodePath());
 
 
-  Node *source_node = get_bottom_node();
+  Node *source_node = node();
   PT_Node copy_node = source_node->copy_subgraph(_graph_type);
   PT_Node copy_node = source_node->copy_subgraph(_graph_type);
   nassertr(copy_node != (Node *)NULL, NodePath());
   nassertr(copy_node != (Node *)NULL, NodePath());
 
 
-  NodeRelation *arc = 
-    NodeRelation::create_typed_arc(_graph_type, other.get_bottom_node(), 
+  NodeRelation *darc = 
+    NodeRelation::create_typed_arc(_graph_type, other.node(), 
 				   copy_node, sort);
 				   copy_node, sort);
-  nassertr(arc != (NodeRelation *)NULL, NodePath());
-  nassertr(arc->is_exact_type(_graph_type), NodePath());
+  nassertr(darc != (NodeRelation *)NULL, NodePath());
+  nassertr(darc->is_exact_type(_graph_type), NodePath());
 
 
   if (has_arcs()) {
   if (has_arcs()) {
     // Copy the transitions from this one's bottom arc, so the
     // Copy the transitions from this one's bottom arc, so the
     // duplicate will inherit the same local state by default.
     // duplicate will inherit the same local state by default.
-    arc->copy_transitions_from(get_bottom_arc());
+    darc->copy_transitions_from(arc());
   }
   }
 
 
   NodePath instance(*this);
   NodePath instance(*this);
-  instance._head = new ArcComponent(arc, other._head);
+  instance._head = new ArcComponent(darc, other._head);
   return instance;
   return instance;
 }
 }
 
 
@@ -870,12 +870,12 @@ copy_to(const NodePath &other, int sort) const {
 //               returned.
 //               returned.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 NodePath NodePath::
 NodePath NodePath::
-attach_new_node(Node *node, int sort) const {
+attach_new_node(Node *dnode, int sort) const {
   nassertr(verify_connectivity(), NodePath());
   nassertr(verify_connectivity(), NodePath());
   nassertr(!is_empty(), NodePath(_graph_type));
   nassertr(!is_empty(), NodePath(_graph_type));
-  nassertr(node != (Node *)NULL, NodePath(_graph_type));
+  nassertr(dnode != (Node *)NULL, NodePath(_graph_type));
 
 
-  NodePath path(node, _graph_type);
+  NodePath path(dnode, _graph_type);
   return path.instance_to(*this, sort);
   return path.instance_to(*this, sort);
 }
 }
 
 
@@ -1003,7 +1003,7 @@ void NodePath::
 analyze() const {
 analyze() const {
   nassertv(!is_empty());
   nassertv(!is_empty());
   SceneGraphAnalyzer sga(_graph_type);
   SceneGraphAnalyzer sga(_graph_type);
-  sga.add_node(get_bottom_node());
+  sga.add_node(node());
   sga.write(nout);
   sga.write(nout);
 }
 }
 
 
@@ -1028,7 +1028,7 @@ int NodePath::
 flatten_light() {
 flatten_light() {
   nassertr(!is_empty(), 0);
   nassertr(!is_empty(), 0);
   SceneGraphReducer gr(_graph_type);
   SceneGraphReducer gr(_graph_type);
-  int num_removed = gr.flatten(get_bottom_node(), false);
+  int num_removed = gr.flatten(node(), false);
 
 
   if (sgmanip_cat.is_debug()) {
   if (sgmanip_cat.is_debug()) {
     sgmanip_cat.debug()
     sgmanip_cat.debug()
@@ -1059,8 +1059,8 @@ int NodePath::
 flatten_medium() {
 flatten_medium() {
   nassertr(!is_empty(), 0);
   nassertr(!is_empty(), 0);
   SceneGraphReducer gr(_graph_type);
   SceneGraphReducer gr(_graph_type);
-  gr.apply_transitions(get_bottom_node());
-  int num_removed = gr.flatten(get_bottom_node(), false);
+  gr.apply_transitions(node());
+  int num_removed = gr.flatten(node(), false);
 
 
   if (sgmanip_cat.is_debug()) {
   if (sgmanip_cat.is_debug()) {
     sgmanip_cat.debug()
     sgmanip_cat.debug()
@@ -1091,8 +1091,8 @@ int NodePath::
 flatten_strong() {
 flatten_strong() {
   nassertr(!is_empty(), 0);
   nassertr(!is_empty(), 0);
   SceneGraphReducer gr(_graph_type);
   SceneGraphReducer gr(_graph_type);
-  gr.apply_transitions(get_bottom_node());
-  int num_removed = gr.flatten(get_bottom_node(), true);
+  gr.apply_transitions(node());
+  int num_removed = gr.flatten(node(), true);
 
 
   if (sgmanip_cat.is_debug()) {
   if (sgmanip_cat.is_debug()) {
     sgmanip_cat.debug()
     sgmanip_cat.debug()
@@ -1119,7 +1119,7 @@ write_bam_file(const string &filename) const {
   bool okflag = false;
   bool okflag = false;
 
 
   if (bam_file.open_write(filename)) {
   if (bam_file.open_write(filename)) {
-    if (bam_file.write_object(get_bottom_node())) {
+    if (bam_file.write_object(node())) {
       okflag = true;
       okflag = true;
     }
     }
     bam_file.close();
     bam_file.close();
@@ -1727,7 +1727,7 @@ set_mat(const NodePath &other, const LMatrix4f &mat) {
 	_head->_arc->get_parent(), ForwardIterator(_head->_next), ForwardIterator(),
 	_head->_arc->get_parent(), ForwardIterator(_head->_next), ForwardIterator(),
 	ntw, _graph_type);
 	ntw, _graph_type);
   } else {
   } else {
-    wrt(other.get_bottom_node(), ForwardIterator(other._head), ForwardIterator(),
+    wrt(other.node(), ForwardIterator(other._head), ForwardIterator(),
 	_head->_arc->get_parent(), ForwardIterator(_head->_next), ForwardIterator(),
 	_head->_arc->get_parent(), ForwardIterator(_head->_next), ForwardIterator(),
 	ntw, _graph_type);
 	ntw, _graph_type);
   }
   }
@@ -1755,11 +1755,11 @@ get_mat(const NodePath &other) const {
 
 
   NodeTransitionWrapper ntw(TransformTransition::get_class_type());
   NodeTransitionWrapper ntw(TransformTransition::get_class_type());
   if (other.is_empty()) {
   if (other.is_empty()) {
-    wrt(get_bottom_node(), ForwardIterator(_head), ForwardIterator(),
+    wrt(node(), ForwardIterator(_head), ForwardIterator(),
 	(Node *)NULL, ntw, _graph_type);
 	(Node *)NULL, ntw, _graph_type);
   } else {
   } else {
-    wrt(get_bottom_node(), ForwardIterator(_head), ForwardIterator(),
-	other.get_bottom_node(), ForwardIterator(other._head), ForwardIterator(),
+    wrt(node(), ForwardIterator(_head), ForwardIterator(),
+	other.node(), ForwardIterator(other._head), ForwardIterator(),
 	ntw, _graph_type);
 	ntw, _graph_type);
   }
   }
   const TransformTransition *tt;
   const TransformTransition *tt;
@@ -2564,20 +2564,20 @@ r_get_net_transitions(const ArcComponent *comp,
 //               node, either unnamed as a type, or as a name.
 //               node, either unnamed as a type, or as a name.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string NodePath::
 string NodePath::
-format_node_name(Node *node) const {
-  nassertr(node != (Node *)NULL, string());
+format_node_name(Node *dnode) const {
+  nassertr(dnode != (Node *)NULL, string());
   string name;
   string name;
-  if (node->is_of_type(NamedNode::get_class_type())) {
-    name = DCAST(NamedNode, node)->get_name();
+  if (dnode->is_of_type(NamedNode::get_class_type())) {
+    name = DCAST(NamedNode, dnode)->get_name();
   }
   }
 
 
   if (name.empty()) {
   if (name.empty()) {
     // No name.  If the type isn't one of the trivial types (Node or
     // No name.  If the type isn't one of the trivial types (Node or
     // NamedNode), use the type name instead, since it's likely to be
     // NamedNode), use the type name instead, since it's likely to be
     // more unique.
     // more unique.
-    if (!node->is_of_type(Node::get_class_type()) &&
-	!node->is_of_type(NamedNode::get_class_type())) {
-      return "-" + node->get_type().get_name();
+    if (!dnode->is_of_type(Node::get_class_type()) &&
+	!dnode->is_of_type(NamedNode::get_class_type())) {
+      return "-" + dnode->get_type().get_name();
     }
     }
   }
   }
 
 
@@ -2663,12 +2663,12 @@ r_find_matches(NodePathCollection &result,
       }
       }
 
 
     } else {
     } else {
-      Node *node = entry._node_path.get_bottom_node();
-      nassertv(node != (Node *)NULL);
+      Node *bottom_node = entry._node_path.node();
+      nassertv(bottom_node != (Node *)NULL);
 
 
       DownRelations::const_iterator dri;
       DownRelations::const_iterator dri;
-      dri = node->_children.find(_graph_type);
-      if (dri != node->_children.end()) {
+      dri = bottom_node->_children.find(_graph_type);
+      if (dri != bottom_node->_children.end()) {
 	const DownRelationPointers &drp = (*dri).second;
 	const DownRelationPointers &drp = (*dri).second;
 	
 	
 	DownRelationPointers::const_iterator drpi;
 	DownRelationPointers::const_iterator drpi;
@@ -2694,13 +2694,13 @@ r_find_matches(NodePathCollection &result,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void NodePath::
 void NodePath::
 r_list_descendants(ostream &out, int indent_level) const {
 r_list_descendants(ostream &out, int indent_level) const {
-  Node *node = get_bottom_node();
-  nassertv(node != (Node *)NULL);
-  indent(out, indent_level) << *node << "\n";
+  Node *bottom_node = node();
+  nassertv(bottom_node != (Node *)NULL);
+  indent(out, indent_level) << *bottom_node << "\n";
   
   
   DownRelations::const_iterator dri;
   DownRelations::const_iterator dri;
-  dri = node->_children.find(_graph_type);
-  if (dri != node->_children.end()) {
+  dri = bottom_node->_children.find(_graph_type);
+  if (dri != bottom_node->_children.end()) {
     const DownRelationPointers &drp = (*dri).second;
     const DownRelationPointers &drp = (*dri).second;
     
     
     DownRelationPointers::const_iterator drpi;
     DownRelationPointers::const_iterator drpi;
@@ -2720,15 +2720,15 @@ r_list_descendants(ostream &out, int indent_level) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void NodePath::
 void NodePath::
 r_list_transitions(ostream &out, int indent_level) const {
 r_list_transitions(ostream &out, int indent_level) const {
-  Node *node = get_bottom_node();
-  nassertv(node != (Node *)NULL);
+  Node *bottom_node = node();
+  nassertv(bottom_node != (Node *)NULL);
 
 
   out << "\n+";
   out << "\n+";
-  indent(out, indent_level + 1) << *node << "\n\n";
+  indent(out, indent_level + 1) << *bottom_node << "\n\n";
   
   
   DownRelations::const_iterator dri;
   DownRelations::const_iterator dri;
-  dri = node->_children.find(_graph_type);
-  if (dri != node->_children.end()) {
+  dri = bottom_node->_children.find(_graph_type);
+  if (dri != bottom_node->_children.end()) {
     const DownRelationPointers &drp = (*dri).second;
     const DownRelationPointers &drp = (*dri).second;
     
     
     DownRelationPointers::const_iterator drpi;
     DownRelationPointers::const_iterator drpi;
@@ -2755,10 +2755,10 @@ void NodePath::
 r_adjust_all_priorities(NodeRelation *arc, int adjustment) {
 r_adjust_all_priorities(NodeRelation *arc, int adjustment) {
   arc->adjust_all_priorities(adjustment);
   arc->adjust_all_priorities(adjustment);
 
 
-  Node *node = arc->get_child();
+  Node *dnode = arc->get_child();
   DownRelations::const_iterator dri;
   DownRelations::const_iterator dri;
-  dri = node->_children.find(_graph_type);
-  if (dri != node->_children.end()) {
+  dri = dnode->_children.find(_graph_type);
+  if (dri != dnode->_children.end()) {
     const DownRelationPointers &drp = (*dri).second;
     const DownRelationPointers &drp = (*dri).second;
     
     
     DownRelationPointers::const_iterator drpi;
     DownRelationPointers::const_iterator drpi;

+ 6 - 10
panda/src/sgmanip/nodePath.h

@@ -132,11 +132,11 @@ PUBLISHED:
 
 
   // Methods to extend or shorten a NodePath.
   // Methods to extend or shorten a NodePath.
 
 
-  bool extend_by(Node *node);
+  bool extend_by(Node *dnode);
   bool extend_by(NodeRelation *arc);
   bool extend_by(NodeRelation *arc);
   bool extend_by(const NodePath &other);
   bool extend_by(const NodePath &other);
   bool extend_by(const string &path);
   bool extend_by(const string &path);
-  bool extend_down_to(Node *node);
+  bool extend_down_to(Node *dnode);
 
 
   void shorten(int num_nodes = 1);
   void shorten(int num_nodes = 1);
   void clear();
   void clear();
@@ -179,11 +179,11 @@ PUBLISHED:
   INLINE bool has_parent() const;
   INLINE bool has_parent() const;
   INLINE NodePath get_parent() const;
   INLINE NodePath get_parent() const;
 
 
-  INLINE NodePath find_path_down_to(Node *node) const;
+  INLINE NodePath find_path_down_to(Node *dnode) const;
   INLINE NodePath find(const string &path) const;
   INLINE NodePath find(const string &path) const;
 
 
   NodePathCollection
   NodePathCollection
-  find_all_paths_down_to(Node *node) const;
+  find_all_paths_down_to(Node *dnode) const;
 
 
   NodePathCollection
   NodePathCollection
   find_all_matches(const string &path) const;
   find_all_matches(const string &path) const;
@@ -200,7 +200,7 @@ PUBLISHED:
   void wrt_reparent_to(const NodePath &other, int sort = 0);
   void wrt_reparent_to(const NodePath &other, int sort = 0);
   NodePath instance_to(const NodePath &other, int sort = 0) const;
   NodePath instance_to(const NodePath &other, int sort = 0) const;
   NodePath copy_to(const NodePath &other, int sort = 0) const;
   NodePath copy_to(const NodePath &other, int sort = 0) const;
-  NodePath attach_new_node(Node *node, int sort = 0) const;
+  NodePath attach_new_node(Node *dnode, int sort = 0) const;
   INLINE NodePath attach_new_node(const string &name, int sort = 0) const;
   INLINE NodePath attach_new_node(const string &name, int sort = 0) const;
   void remove_node();
   void remove_node();
 
 
@@ -451,10 +451,6 @@ PUBLISHED:
   PT(BoundingVolume) get_bounds() const;
   PT(BoundingVolume) get_bounds() const;
   void write_bounds(ostream &out) const;
   void write_bounds(ostream &out) const;
 
 
-  // Deprecated functions.  These will go away soon.
-  INLINE Node *get_bottom_node() const;
-  INLINE NodeRelation *get_bottom_arc() const;
-
 
 
 public:
 public:
   // This is a supporting class for passing the list of arcs to wrt().
   // This is a supporting class for passing the list of arcs to wrt().
@@ -477,7 +473,7 @@ private:
 			   ostream &out, int indent_level) const;
 			   ostream &out, int indent_level) const;
   void r_get_net_transitions(const ArcComponent *comp, 
   void r_get_net_transitions(const ArcComponent *comp, 
 			     AllTransitionsWrapper &trans) const;
 			     AllTransitionsWrapper &trans) const;
-  string format_node_name(Node *node) const;
+  string format_node_name(Node *dnode) const;
 
 
   void find_matches(NodePathCollection &result, 
   void find_matches(NodePathCollection &result, 
 		    const string &approx_path_str,
 		    const string &approx_path_str,

+ 3 - 3
panda/src/testbed/demo.cxx

@@ -226,7 +226,7 @@ set_highlight() {
     nout << "Bounding volume of arc is " << *selected_node.get_bounds() << "\n";
     nout << "Bounding volume of arc is " << *selected_node.get_bounds() << "\n";
     
     
     nout << "Transitions on arc:\n";
     nout << "Transitions on arc:\n";
-    selected_node.get_bottom_arc()->write_transitions(nout, 2);
+    selected_node.arc()->write_transitions(nout, 2);
     selected_node.show_bounds();
     selected_node.show_bounds();
   }
   }
 
 
@@ -300,7 +300,7 @@ static void
 event_fkey(CPT_Event event) {
 event_fkey(CPT_Event event) {
   if (selected_node.has_arcs()) {
   if (selected_node.has_arcs()) {
     // Apply a color to the selected node.
     // Apply a color to the selected node.
-    NodeRelation *arc = selected_node.get_bottom_arc();
+    NodeRelation *arc = selected_node.arc();
     nassertv(arc != (NodeRelation *)NULL);
     nassertv(arc != (NodeRelation *)NULL);
 
 
     if (event->get_name() == "f9") {
     if (event->get_name() == "f9") {
@@ -519,7 +519,7 @@ event_L(CPT_Event) {
 
 
     NodePath search(sky);
     NodePath search(sky);
     NodePath sky_search = search.find("**/sun");
     NodePath sky_search = search.find("**/sun");
-    PT_Node light = sky_search.get_bottom_node();
+    PT_Node light = sky_search.node();
 
 
     flare->set_light_source(light);
     flare->set_light_source(light);
     flare_arc = new RenderRelation(light, flare, 10);
     flare_arc = new RenderRelation(light, flare, 10);