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

panda/src/egg/eggSurface.I

Go to the documentation of this file.
00001 // Filename: eggSurface.I
00002 // Created by:  drose (15Feb00)
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 
00020 ////////////////////////////////////////////////////////////////////
00021 //     Function: EggSurface::Constructor
00022 //       Access: Public
00023 //  Description:
00024 ////////////////////////////////////////////////////////////////////
00025 INLINE EggSurface::
00026 EggSurface(const string &name) : EggPrimitive(name) {
00027   _u_subdiv = 0;
00028   _v_subdiv = 0;
00029 }
00030 
00031 ////////////////////////////////////////////////////////////////////
00032 //     Function: EggSurface::Copy constructor
00033 //       Access: Public
00034 //  Description:
00035 ////////////////////////////////////////////////////////////////////
00036 INLINE EggSurface::
00037 EggSurface(const EggSurface &copy) :
00038   EggPrimitive(copy),
00039   _u_subdiv(copy._u_subdiv),
00040   _v_subdiv(copy._v_subdiv)
00041 {
00042 }
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 //     Function: EggSurface::Copy assignment operator
00046 //       Access: Public
00047 //  Description:
00048 ////////////////////////////////////////////////////////////////////
00049 INLINE EggSurface &EggSurface::
00050 operator = (const EggSurface &copy) {
00051   EggPrimitive::operator = (copy);
00052   _u_subdiv = copy._u_subdiv;
00053   _v_subdiv = copy._v_subdiv;
00054   return *this;
00055 }
00056 
00057 
00058 ////////////////////////////////////////////////////////////////////
00059 //     Function: EggSurface::set_u_subdiv
00060 //       Access: Public
00061 //  Description: Sets the number of subdivisions in the U direction
00062 //               that will be requested across the surface.  (This
00063 //               doesn't necessary guarantee that this number of
00064 //               subdivisions will be made; it's just a hint to any
00065 //               surface renderer or quick tesselator.)  Set the
00066 //               number to 0 to disable the hint.
00067 ////////////////////////////////////////////////////////////////////
00068 INLINE void EggSurface::
00069 set_u_subdiv(int subdiv) {
00070   _u_subdiv = subdiv;
00071 }
00072 
00073 ////////////////////////////////////////////////////////////////////
00074 //     Function: EggSurface::get_u_subdiv
00075 //       Access: Public
00076 //  Description: Returns the requested number of subdivisions in the U
00077 //               direction, or 0 if no particular subdivisions have
00078 //               been requested.
00079 ////////////////////////////////////////////////////////////////////
00080 INLINE int EggSurface::
00081 get_u_subdiv() const {
00082   return _u_subdiv;
00083 }
00084 
00085 ////////////////////////////////////////////////////////////////////
00086 //     Function: EggSurface::set_v_subdiv
00087 //       Access: Public
00088 //  Description: Sets the number of subdivisions in the U direction
00089 //               that will be requested across the surface.  (This
00090 //               doesn't necessary guarantee that this number of
00091 //               subdivisions will be made; it's just a hint to any
00092 //               surface renderer or quick tesselator.)  Set the
00093 //               number to 0 to disable the hint.
00094 ////////////////////////////////////////////////////////////////////
00095 INLINE void EggSurface::
00096 set_v_subdiv(int subdiv) {
00097   _v_subdiv = subdiv;
00098 }
00099 
00100 ////////////////////////////////////////////////////////////////////
00101 //     Function: EggSurface::get_v_subdiv
00102 //       Access: Public
00103 //  Description: Returns the requested number of subdivisions in the U
00104 //               direction, or 0 if no particular subdivisions have
00105 //               been requested.
00106 ////////////////////////////////////////////////////////////////////
00107 INLINE int EggSurface::
00108 get_v_subdiv() const {
00109   return _v_subdiv;
00110 }

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