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

panda/src/gobj/geomSphere.cxx

Go to the documentation of this file.
00001 // Filename: geomSphere.cxx
00002 // Created by:  drose (01Oct99)
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 "geomSphere.h"
00020 #include <graphicsStateGuardianBase.h>
00021 #include <datagram.h>
00022 #include <datagramIterator.h>
00023 #include <bamReader.h>
00024 #include <bamWriter.h>
00025 
00026 TypeHandle GeomSphere::_type_handle;
00027 
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //     Function: GeomSphere::make_copy
00031 //       Access: Public, Virtual
00032 //  Description: Returns a newly-allocated Geom that is a shallow copy
00033 //               of this one.  It will be a different Geom pointer,
00034 //               but its internal data may or may not be shared with
00035 //               that of the original Geom.
00036 ////////////////////////////////////////////////////////////////////
00037 Geom *GeomSphere::
00038 make_copy() const {
00039   return new GeomSphere(*this);
00040 }
00041 
00042 void GeomSphere::
00043 draw_immediate(GraphicsStateGuardianBase *gsg, GeomContext *gc) {
00044   gsg->draw_sphere(this, gc);
00045 }
00046 
00047 ////////////////////////////////////////////////////////////////////
00048 //     Function: GeomSphere::make_GeomSphere
00049 //       Access: Protected
00050 //  Description: Factory method to generate a GeomSphere object
00051 ////////////////////////////////////////////////////////////////////
00052 TypedWritable* GeomSphere::
00053 make_GeomSphere(const FactoryParams &params)
00054 {
00055   GeomSphere *me = new GeomSphere;
00056   DatagramIterator scan;
00057   BamReader *manager;
00058 
00059   parse_params(params, scan, manager);
00060   me->fillin(scan, manager);
00061   me->make_dirty();
00062   me->config();
00063   return me;
00064 }
00065 
00066 ////////////////////////////////////////////////////////////////////
00067 //     Function: GeomSphere::register_with_factory
00068 //       Access: Public, Static
00069 //  Description: Factory method to generate a GeomSphere object
00070 ////////////////////////////////////////////////////////////////////
00071 void GeomSphere::
00072 register_with_read_factory(void)
00073 {
00074   BamReader::get_factory()->register_factory(get_class_type(), make_GeomSphere);
00075 }
00076 
00077 
00078 
00079 

Generated on Fri May 2 00:39:26 2003 for Panda by doxygen1.3