Panda3D
 All Classes Functions Variables Enumerations
antialiasAttrib.I
1 // Filename: antialiasAttrib.I
2 // Created by: drose (26Jan05)
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: AntialiasAttrib::Constructor
18 // Access: Private
19 // Description: Use AntialiasAttrib::make() to construct a new
20 // AntialiasAttrib object.
21 ////////////////////////////////////////////////////////////////////
22 INLINE AntialiasAttrib::
23 AntialiasAttrib(unsigned short mode) :
24  _mode(mode)
25 {
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: AntialiasAttrib::get_mode
30 // Access: Published
31 // Description: Returns the specified antialias mode.
32 ////////////////////////////////////////////////////////////////////
33 INLINE unsigned short AntialiasAttrib::
34 get_mode() const {
35  return _mode;
36 }
37 
38 ////////////////////////////////////////////////////////////////////
39 // Function: AntialiasAttrib::get_mode_type
40 // Access: Published
41 // Description: Returns the specified antialias mode, with the
42 // quality bits masked out. This therefore indicates
43 // only the requested type of antialiasing: M_none,
44 // M_auto, or some specific combination.
45 ////////////////////////////////////////////////////////////////////
46 INLINE unsigned short AntialiasAttrib::
47 get_mode_type() const {
48  return _mode & M_type_mask;
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: AntialiasAttrib::get_mode_quality
53 // Access: Published
54 // Description: Returns the specified antialias mode, with the type
55 // bits masked out. This therefore indicates only the
56 // requested quality settings: one of M_faster,
57 // M_better, M_dont_care, or zero (unspecified).
58 ////////////////////////////////////////////////////////////////////
59 INLINE unsigned short AntialiasAttrib::
61  return _mode & ~M_type_mask;
62 }
unsigned short get_mode() const
Returns the specified antialias mode.
unsigned short get_mode_type() const
Returns the specified antialias mode, with the quality bits masked out.
unsigned short get_mode_quality() const
Returns the specified antialias mode, with the type bits masked out.