mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
added get_relative_vector
This commit is contained in:
parent
362c716a82
commit
0575f75afd
@ -1316,6 +1316,19 @@ get_relative_point(const NodePath &other, const LVecBase3f &point) {
|
|||||||
return rel_point;
|
return rel_point;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: NodePath::get_relative_vector
|
||||||
|
// Access: Published
|
||||||
|
// Description: Given that the indicated vector is in the coordinate
|
||||||
|
// system of the other node, returns the same vector in
|
||||||
|
// this node's coordinate system.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
LVector3f NodePath::
|
||||||
|
get_relative_vector(const NodePath &other, const LVecBase3f &vec) {
|
||||||
|
LVector3f rel_vector = LVector3f(vec) * other.get_mat(*this);
|
||||||
|
return rel_vector;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: NodePath::look_at
|
// Function: NodePath::look_at
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -378,6 +378,7 @@ PUBLISHED:
|
|||||||
void set_mat(const NodePath &other, const LMatrix4f &mat);
|
void set_mat(const NodePath &other, const LMatrix4f &mat);
|
||||||
|
|
||||||
LPoint3f get_relative_point(const NodePath &other, const LVecBase3f &point);
|
LPoint3f get_relative_point(const NodePath &other, const LVecBase3f &point);
|
||||||
|
LVector3f get_relative_vector(const NodePath &other, const LVecBase3f &vec);
|
||||||
|
|
||||||
INLINE void look_at(const NodePath &other,
|
INLINE void look_at(const NodePath &other,
|
||||||
float x, float y, float z);
|
float x, float y, float z);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user