00001 // Filename: cLwoSurface.I 00002 // Created by: drose (25Apr01) 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: CLwoSurface::get_name 00022 // Access: Public 00023 // Description: Returns the name of the surface. Each surface in a 00024 // given Lightwave file should have a unique name. 00025 //////////////////////////////////////////////////////////////////// 00026 INLINE const string &CLwoSurface:: 00027 get_name() const { 00028 return _surface->_name; 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: CLwoSurface::has_named_uvs 00033 // Access: Public 00034 // Description: Returns true if the surface is set up to reference 00035 // UV's stored on the vertices, by name (as opposed to 00036 // generated UV's, which is the more common Lightwave 00037 // case). In this case, get_uv_name() can be called to 00038 // return the name of the UV's. 00039 //////////////////////////////////////////////////////////////////// 00040 INLINE bool CLwoSurface:: 00041 has_named_uvs() const { 00042 return (_block != (CLwoSurfaceBlock *)NULL && 00043 _block->_projection_mode == LwoSurfaceBlockProjection::M_uv); 00044 } 00045 00046 //////////////////////////////////////////////////////////////////// 00047 // Function: CLwoSurface::get_uv_name 00048 // Access: Public 00049 // Description: Returns the name of the set of UV's that are 00050 // associated with this surface, if has_named_uvs() is 00051 // true. 00052 //////////////////////////////////////////////////////////////////// 00053 INLINE const string &CLwoSurface:: 00054 get_uv_name() const { 00055 return _block->_uv_name; 00056 }