35   bool legal = !always_quote;
    36   string::const_iterator p;
    37   for (p = str.begin(); p != str.end() && legal; ++p) {
    38     legal = (isalnum(*p) || *p==
'-' || *p==
'_' || *p==
'#' || *p==
'.');
    47     for (p = str.begin(); p != str.end(); ++p) {
    58         indent(out, indent_level) << 
'"';
    77   indent(out, indent_level) << 
"<Transform> {\n";
    79   indent(out, indent_level+2) << 
"<Matrix3> {\n";
    81   for (
int r = 0; r < 3; r++) {
    82     indent(out, indent_level+3);
    83     for (
int c = 0; c < 3; c++) {
    84       out << 
" " << mat(r, c);
    88   indent(out, indent_level+2) << 
"}\n";
    89   indent(out, indent_level) << 
"}\n";
    97   indent(out, indent_level) << 
"<Transform> {\n";
    99   indent(out, indent_level+2) << 
"<Matrix4> {\n";
   101   for (
int r = 0; r < 4; r++) {
   102     indent(out, indent_level+3);
   103     for (
int c = 0; c < 4; c++) {
   104       out << 
" " << mat(r, c);
   108   indent(out, indent_level+2) << 
"}\n";
   109   indent(out, indent_level) << 
"}\n";
 ostream & enquote_string(ostream &out, const string &str, int indent_level, bool always_quote)
Writes the string to the indicated output stream.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void write_transform(ostream &out, const LMatrix3d &mat, int indent_level)
A helper function to write out a 3x3 transform matrix.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.