Panda3D
 All Classes Functions Variables Enumerations
cLwoSurface.I
1 // Filename: cLwoSurface.I
2 // Created by: drose (25Apr01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: CLwoSurface::get_name
18 // Access: Public
19 // Description: Returns the name of the surface. Each surface in a
20 // given Lightwave file should have a unique name.
21 ////////////////////////////////////////////////////////////////////
22 INLINE const string &CLwoSurface::
23 get_name() const {
24  return _surface->_name;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: CLwoSurface::has_named_uvs
29 // Access: Public
30 // Description: Returns true if the surface is set up to reference
31 // UV's stored on the vertices, by name (as opposed to
32 // generated UV's, which is the more common Lightwave
33 // case). In this case, get_uv_name() can be called to
34 // return the name of the UV's.
35 ////////////////////////////////////////////////////////////////////
36 INLINE bool CLwoSurface::
37 has_named_uvs() const {
38  return (_block != (CLwoSurfaceBlock *)NULL &&
39  _block->_projection_mode == LwoSurfaceBlockProjection::M_uv);
40 }
41 
42 ////////////////////////////////////////////////////////////////////
43 // Function: CLwoSurface::get_uv_name
44 // Access: Public
45 // Description: Returns the name of the set of UV's that are
46 // associated with this surface, if has_named_uvs() is
47 // true.
48 ////////////////////////////////////////////////////////////////////
49 INLINE const string &CLwoSurface::
50 get_uv_name() const {
51  return _block->_uv_name;
52 }
bool has_named_uvs() const
Returns true if the surface is set up to reference UV's stored on the vertices, by name (as opposed t...
Definition: cLwoSurface.I:37
This class is a wrapper around LwoSurfaceBlock and stores additional information useful during the co...
const string & get_name() const
Returns the name of the surface.
Definition: cLwoSurface.I:23
const string & get_uv_name() const
Returns the name of the set of UV's that are associated with this surface, if has_named_uvs() is true...
Definition: cLwoSurface.I:50