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

panda/src/builder/builderAttrib.h

Go to the documentation of this file.
00001 // Filename: builderAttrib.h
00002 // Created by:  drose (22Jan99)
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 #ifndef BUILDERATTRIB_H
00020 #define BUILDERATTRIB_H
00021 
00022 ///////////////////////////////////////////////////////////////////
00023 //
00024 // BuilderAttrib, BuilderAttribI
00025 //
00026 // This is the parent class of both BuilderVertex and BuilderPrim, and
00027 // contains the attribute values which may be set on either of them:
00028 // specifically, normal, color, and pixel size. (Pixel size is the
00029 // thickness of the lines, for a polygon or a line, or the size of the
00030 // point, in pixels.)
00031 //
00032 // Like BuilderPrim and BuilderVertex, the two classes BuilderAttrib
00033 // and BuilderAttribI are actually both instantiations of the same
00034 // template class, BuilderAttribTempl.
00035 //
00036 ///////////////////////////////////////////////////////////////////
00037 
00038 #include <pandabase.h>
00039 
00040 #include "builderAttribTempl.h"
00041 
00042 #define BUILDERATTRIBTEMPL_BUILDERV BuilderAttribTempl<BuilderV, BuilderN, BuilderTC, BuilderC>
00043 EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, BUILDERATTRIBTEMPL_BUILDERV);
00044 #define BUILDERATTRIBTEMPL_USHORT BuilderAttribTempl<ushort, ushort, ushort, ushort>
00045 EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, BUILDERATTRIBTEMPL_USHORT);
00046 
00047 class EXPCL_PANDAEGG BuilderAttrib
00048   : public BuilderAttribTempl<BuilderV, BuilderN, BuilderTC, BuilderC> {
00049 public:
00050   BuilderAttrib() {}
00051 
00052   INLINE void set_normal_value(const BuilderN *array, ushort index);
00053   INLINE void set_color_value(const BuilderC *array, ushort index);
00054 };
00055 
00056 class EXPCL_PANDAEGG BuilderAttribI
00057   : public BuilderAttribTempl<ushort, ushort, ushort, ushort> {
00058 public:
00059   BuilderAttribI() {}
00060 
00061   INLINE void set_normal_value(const BuilderN *array, ushort index);
00062   INLINE void set_color_value(const BuilderC *array, ushort index);
00063 };
00064 
00065 #include "builderAttrib.I"
00066 
00067 // Tell GCC that we'll take care of the instantiation explicitly here.
00068 #ifdef __GNUC__
00069 #pragma interface
00070 #endif
00071 
00072 #endif

Generated on Fri May 2 00:34:36 2003 for Panda by doxygen1.3