00001 // Filename: builderAttrib.I 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 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Function: BuilderAttrib::set_normal_value 00023 // Access: Public 00024 // Description: Reassigns the normal, without knowing whether the 00025 // attribute is indexed or nonindexed. A nonindexed 00026 // attribute will look up the index in the array and 00027 // store the resulting value, while an indexed attribute 00028 // will just store the index number (which assumes the 00029 // array is the same one it's indexing on). 00030 //////////////////////////////////////////////////////////////////// 00031 INLINE void BuilderAttrib:: 00032 set_normal_value(const BuilderN *array, ushort index) { 00033 set_normal(array[index]); 00034 } 00035 00036 00037 //////////////////////////////////////////////////////////////////// 00038 // Function: BuilderAttrib::set_color_value 00039 // Access: Public 00040 // Description: Reassigns the color, without knowing whether the 00041 // attribute is indexed or nonindexed. A nonindexed 00042 // attribute will look up the index in the array and 00043 // store the resulting value, while an indexed attribute 00044 // will just store the index number (which assumes the 00045 // array is the same one it's indexing on). 00046 //////////////////////////////////////////////////////////////////// 00047 INLINE void BuilderAttrib:: 00048 set_color_value(const BuilderC *array, ushort index) { 00049 set_color(array[index]); 00050 } 00051 00052 00053 //////////////////////////////////////////////////////////////////// 00054 // Function: BuilderAttribI::set_normal_value 00055 // Access: Public 00056 // Description: Reassigns the normal, without knowing whether the 00057 // attribute is indexed or nonindexed. A nonindexed 00058 // attribute will look up the index in the array and 00059 // store the resulting value, while an indexed attribute 00060 // will just store the index number (which assumes the 00061 // array is the same one it's indexing on). 00062 //////////////////////////////////////////////////////////////////// 00063 INLINE void BuilderAttribI:: 00064 set_normal_value(const BuilderN *, ushort index) { 00065 set_normal(index); 00066 } 00067 00068 00069 //////////////////////////////////////////////////////////////////// 00070 // Function: BuilderAttribI::set_color_value 00071 // Access: Public 00072 // Description: Reassigns the color, without knowing whether the 00073 // attribute is indexed or nonindexed. A nonindexed 00074 // attribute will look up the index in the array and 00075 // store the resulting value, while an indexed attribute 00076 // will just store the index number (which assumes the 00077 // array is the same one it's indexing on). 00078 //////////////////////////////////////////////////////////////////// 00079 INLINE void BuilderAttribI:: 00080 set_color_value(const BuilderC *, ushort index) { 00081 set_color(index); 00082 }