Panda3D
 All Classes Functions Variables Enumerations
fltVertex.I
1 // Filename: fltVertex.I
2 // Created by: drose (30Aug00)
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: FltVertex::has_color
18 // Access: Public
19 // Description: Returns true if the vertex has a primary color
20 // indicated, false otherwise.
21 ////////////////////////////////////////////////////////////////////
22 INLINE bool FltVertex::
23 has_color() const {
24  // Even if the no_color bit is not set, if the color_index is -1,
25  // the vertex doesn't have a color (unless we've got packed color).
26  return ((_flags & F_no_color) == 0 &&
27  (_color_index != -1 || ((_flags & F_packed_color) != 0)));
28 }
29 
30 ////////////////////////////////////////////////////////////////////
31 // Function: FltVertex::set_color
32 // Access: Public
33 // Description: Sets the color of the vertex, using the packed
34 // color convention. The alpha component is ignored.
35 ////////////////////////////////////////////////////////////////////
36 INLINE void FltVertex::
38  set_rgb(LRGBColor(color[0], color[1], color[2]));
39 }
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
void set_color(const LColor &color)
Sets the color of the vertex, using the packed color convention.
Definition: fltVertex.I:37
void set_rgb(const LRGBColor &rgb)
Sets the color of the vertex, using the packed color convention.
Definition: fltVertex.cxx:151
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:111
bool has_color() const
Returns true if the vertex has a primary color indicated, false otherwise.
Definition: fltVertex.I:23