mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
add clear_transform
This commit is contained in:
parent
de8c2d0de3
commit
28aba7f1a6
@ -458,6 +458,16 @@ get_transform() const {
|
|||||||
return node()->get_transform();
|
return node()->get_transform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: NodePath::clear_transform
|
||||||
|
// Access: Published
|
||||||
|
// Description: Sets the transform object on this node to identity.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE void NodePath::
|
||||||
|
clear_transform() {
|
||||||
|
set_transform(TransformState::make_identity());
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: NodePath::set_transform
|
// Function: NodePath::set_transform
|
||||||
// Access: Published
|
// Access: Published
|
||||||
@ -469,6 +479,18 @@ set_transform(const TransformState *transform) {
|
|||||||
node()->set_transform(transform);
|
node()->set_transform(transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: NodePath::clear_transform
|
||||||
|
// Access: Published
|
||||||
|
// Description: Sets the transform object on this node to identity,
|
||||||
|
// relative to the other node. This effectively places
|
||||||
|
// this node at the same position as the other node.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE void NodePath::
|
||||||
|
clear_transform(const NodePath &other) {
|
||||||
|
set_transform(other, TransformState::make_identity());
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: NodePath::get_net_transform
|
// Function: NodePath::get_net_transform
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -238,8 +238,10 @@ PUBLISHED:
|
|||||||
INLINE CPT(RenderState) get_net_state() const;
|
INLINE CPT(RenderState) get_net_state() const;
|
||||||
|
|
||||||
INLINE const TransformState *get_transform() const;
|
INLINE const TransformState *get_transform() const;
|
||||||
|
INLINE void clear_transform();
|
||||||
INLINE void set_transform(const TransformState *transform);
|
INLINE void set_transform(const TransformState *transform);
|
||||||
CPT(TransformState) get_transform(const NodePath &other) const;
|
CPT(TransformState) get_transform(const NodePath &other) const;
|
||||||
|
INLINE void clear_transform(const NodePath &other);
|
||||||
void set_transform(const NodePath &other, const TransformState *transform);
|
void set_transform(const NodePath &other, const TransformState *transform);
|
||||||
INLINE CPT(TransformState) get_net_transform() const;
|
INLINE CPT(TransformState) get_net_transform() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user