Browse Source

add relative uniform set_scale

David Rose 22 years ago
parent
commit
47e4a10fc8

+ 4 - 3
panda/src/pgraph/loaderFileTypeRegistry.cxx

@@ -107,11 +107,12 @@ get_type_from_extension(const string &extension) {
       _deferred_types.erase(di);
       _deferred_types.erase(di);
 
 
       loader_cat->info()
       loader_cat->info()
-        << "loading file type module: " << dlname.to_os_specific() << endl;
+        << "loading file type module: " << (*di).second << endl;
       void *tmp = load_dso(dlname);
       void *tmp = load_dso(dlname);
       if (tmp == (void *)NULL) {
       if (tmp == (void *)NULL) {
-        loader_cat->info()
-          << "Unable to load: " << load_dso_error() << endl;
+        loader_cat->warning()
+          << "Unable to load " << dlname.to_os_specific() << ": " 
+          << load_dso_error() << endl;
         return NULL;
         return NULL;
       }
       }
 
 

+ 11 - 0
panda/src/pgraph/nodePath.I

@@ -794,6 +794,17 @@ get_r(const NodePath &other) const {
   return get_hpr(other)[2];
   return get_hpr(other)[2];
 }
 }
 
 
+////////////////////////////////////////////////////////////////////
+//     Function: NodePath::set_scale
+//       Access: Published
+//  Description: Sets the scale component of the transform,
+//               relative to the other node.
+////////////////////////////////////////////////////////////////////
+INLINE void NodePath::
+set_scale(const NodePath &other, float scale) {
+  set_scale(other, LPoint3f(scale, scale, scale));
+}
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NodePath::set_scale
 //     Function: NodePath::set_scale
 //       Access: Published
 //       Access: Published

+ 1 - 0
panda/src/pgraph/nodePath.h

@@ -369,6 +369,7 @@ PUBLISHED:
   void set_quat(const NodePath &other, const LQuaternionf &quat);
   void set_quat(const NodePath &other, const LQuaternionf &quat);
   LQuaternionf get_quat(const NodePath &other) const;
   LQuaternionf get_quat(const NodePath &other) const;
 
 
+  INLINE void set_scale(const NodePath &other, float scale);
   INLINE void set_scale(const NodePath &other, float sx, float sy, float sz);
   INLINE void set_scale(const NodePath &other, float sx, float sy, float sz);
   void set_scale(const NodePath &other, const LVecBase3f &scale);
   void set_scale(const NodePath &other, const LVecBase3f &scale);
   void set_sx(const NodePath &other, float sx);
   void set_sx(const NodePath &other, float sx);