From f78419ceed31b8b10e539fb4367ca37cb7c53d22 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 30 Jan 2003 01:04:25 +0000 Subject: [PATCH] fix flatten --- panda/src/text/textNode.cxx | 12 ++++++++++++ panda/src/text/textNode.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/panda/src/text/textNode.cxx b/panda/src/text/textNode.cxx index 905f2c7c3f..cd02b90a3d 100644 --- a/panda/src/text/textNode.cxx +++ b/panda/src/text/textNode.cxx @@ -458,6 +458,18 @@ decode_text(const string &text) const { }; } +//////////////////////////////////////////////////////////////////// +// Function: TextNode::xform +// Access: Public, Virtual +// Description: Transforms the contents of this PandaNode by the +// indicated matrix, if it means anything to do so. For +// most kinds of PandaNodes, this does nothing. +//////////////////////////////////////////////////////////////////// +void TextNode:: +xform(const LMatrix4f &mat) { + _transform *= mat; +} + //////////////////////////////////////////////////////////////////// // Function: TextNode::decode_text_impl // Access: Private diff --git a/panda/src/text/textNode.h b/panda/src/text/textNode.h index b0c4f78038..5bd4e71ebf 100644 --- a/panda/src/text/textNode.h +++ b/panda/src/text/textNode.h @@ -216,6 +216,9 @@ public: string encode_wtext(const wstring &wtext) const; wstring decode_text(const string &text) const; + // From parent class PandaNode + virtual void xform(const LMatrix4f &mat); + private: wstring decode_text_impl(StringDecoder &decoder) const; int expand_amp_sequence(StringDecoder &decoder) const;