Panda3D
 All Classes Functions Variables Enumerations
eggLine.cxx
00001 // Filename: eggLine.cxx
00002 // Created by:  drose (14Oct03)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "eggLine.h"
00016 
00017 #include "indent.h"
00018 
00019 TypeHandle EggLine::_type_handle;
00020 
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //     Function: EggLine::Destructor
00024 //       Access: Published, Virtual
00025 //  Description: 
00026 ////////////////////////////////////////////////////////////////////
00027 EggLine::
00028 ~EggLine() {
00029   clear();
00030 }
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //     Function: EggLine::write
00034 //       Access: Public, Virtual
00035 //  Description: Writes the point to the indicated output stream in
00036 //               Egg format.
00037 ////////////////////////////////////////////////////////////////////
00038 void EggLine::
00039 write(ostream &out, int indent_level) const {
00040   write_header(out, indent_level, "<Line>");
00041 
00042   if (has_thick()) {
00043     indent(out, indent_level + 2) 
00044       << "<Scalar> thick { " << get_thick() << " }\n";
00045   }
00046 
00047   write_body(out, indent_level + 2);
00048   indent(out, indent_level) << "}\n";
00049 }
00050 
00051 ////////////////////////////////////////////////////////////////////
00052 //     Function: EggLine::get_num_lead_vertices
00053 //       Access: Protected, Virtual
00054 //  Description: Returns the number of initial vertices that are not
00055 //               used in defining any component; the first component
00056 //               is defined by the (n + 1)th vertex, and then a new
00057 //               component at each vertex thereafter.
00058 ////////////////////////////////////////////////////////////////////
00059 int EggLine::
00060 get_num_lead_vertices() const {
00061   return 1;
00062 }
 All Classes Functions Variables Enumerations