add relative uniform set_scale

This commit is contained in:
David Rose 2003-11-04 05:13:40 +00:00
parent 29d25e0e69
commit 47e4a10fc8
3 changed files with 16 additions and 3 deletions

View File

@ -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() loader_cat->warning()
<< "Unable to load: " << load_dso_error() << endl; << "Unable to load " << dlname.to_os_specific() << ": "
<< load_dso_error() << endl;
return NULL; return NULL;
} }

View File

@ -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

View File

@ -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);