Panda3D
 All Classes Functions Variables Enumerations
eggAnimPreload.cxx
1 // Filename: eggAnimPreload.cxx
2 // Created by: drose (06Aug08)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "eggAnimPreload.h"
16 
17 #include "string_utils.h"
18 #include "indent.h"
19 
20 TypeHandle EggAnimPreload::_type_handle;
21 
22 ////////////////////////////////////////////////////////////////////
23 // Function: EggAnimPreload::write
24 // Access: Public, Virtual
25 // Description: Writes the table and all of its children to the
26 // indicated output stream in Egg format.
27 ////////////////////////////////////////////////////////////////////
29 write(ostream &out, int indent_level) const {
30  test_under_integrity();
31 
32  write_header(out, indent_level, "<AnimPreload>");
33 
34  if (has_fps()) {
35  indent(out, indent_level + 2)
36  << "<Scalar> fps { " << get_fps() << " }\n";
37  }
38 
39  if (has_num_frames()) {
40  indent(out, indent_level + 2)
41  << "<Scalar> frames { " << get_num_frames() << " }\n";
42  }
43 
44  indent(out, indent_level) << "}\n";
45 }
void write_header(ostream &out, int indent_level, const char *egg_keyword) const
Writes the first line of the egg object, e.g.
virtual void write(ostream &out, int indent_level) const
Writes the table and all of its children to the indicated output stream in Egg format.
int get_num_frames() const
This is only valid if has_num_frames() returns true.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
double get_fps() const
This is only valid if has_fps() returns true.