Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/egg/eggPoint.cxx

Go to the documentation of this file.
00001 // Filename: eggPoint.cxx
00002 // Created by:  drose (15Dec99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include "eggPoint.h"
00020 
00021 #include <indent.h>
00022 
00023 #include <algorithm>
00024 
00025 TypeHandle EggPoint::_type_handle;
00026 
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //     Function: EggPoint::cleanup
00030 //       Access: Public, Virtual
00031 //  Description: Cleans up modeling errors in whatever context this
00032 //               makes sense.  For instance, for a polygon, this calls
00033 //               remove_doubled_verts(true).  For a point, it calls
00034 //               remove_nonunique_verts().  Returns true if the
00035 //               primitive is valid, or false if it is degenerate.
00036 ////////////////////////////////////////////////////////////////////
00037 bool EggPoint::
00038 cleanup() {
00039   remove_nonunique_verts();
00040   return !empty();
00041 }
00042 
00043 ////////////////////////////////////////////////////////////////////
00044 //     Function: EggPoint::write
00045 //       Access: Public, Virtual
00046 //  Description: Writes the point to the indicated output stream in
00047 //               Egg format.
00048 ////////////////////////////////////////////////////////////////////
00049 void EggPoint::
00050 write(ostream &out, int indent_level) const {
00051   write_header(out, indent_level, "<PointLight>");
00052   write_body(out, indent_level+2);
00053   indent(out, indent_level) << "}\n";
00054 }

Generated on Fri May 2 00:37:49 2003 for Panda by doxygen1.3