Panda3D
 All Classes Functions Variables Enumerations
materialAttrib.I
1 // Filename: materialAttrib.I
2 // Created by: drose (04Mar02)
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: MaterialAttrib::Constructor
18 // Access: Private
19 // Description: Use MaterialAttrib::make() to construct a new
20 // MaterialAttrib object.
21 ////////////////////////////////////////////////////////////////////
22 INLINE MaterialAttrib::
23 MaterialAttrib() {
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: MaterialAttrib::is_off
28 // Access: Published
29 // Description: Returns true if the MaterialAttrib is an 'off'
30 // MaterialAttrib, indicating that it should disable
31 // the use of materials.
32 ////////////////////////////////////////////////////////////////////
33 INLINE bool MaterialAttrib::
34 is_off() const {
35  return _material == (const Material *)NULL;
36 }
37 
38 ////////////////////////////////////////////////////////////////////
39 // Function: MaterialAttrib::get_material
40 // Access: Published
41 // Description: If the MaterialAttrib is not an 'off' MaterialAttrib,
42 // returns the material that is associated. Otherwise,
43 // return NULL.
44 ////////////////////////////////////////////////////////////////////
46 get_material() const {
47  return _material;
48 }
bool is_off() const
Returns true if the MaterialAttrib is an 'off' MaterialAttrib, indicating that it should disable the ...
Material * get_material() const
If the MaterialAttrib is not an 'off' MaterialAttrib, returns the material that is associated...
Defines the way an object appears in the presence of lighting.
Definition: material.h:34