18 #include "pandabase.h"
20 #include "typedWritableReferenceCount.h"
23 #include "numeric_types.h"
24 #include "config_gobj.h"
36 INLINE
explicit Material(
const string &name =
"");
37 INLINE Material(
const Material ©);
38 void operator = (
const Material ©);
41 INLINE
static Material *get_default();
43 INLINE
bool has_ambient()
const;
44 INLINE
const LColor &get_ambient()
const;
46 INLINE
void clear_ambient();
48 INLINE
bool has_diffuse()
const;
49 INLINE
const LColor &get_diffuse()
const;
50 void set_diffuse(
const LColor &color);
51 INLINE
void clear_diffuse();
53 INLINE
bool has_specular()
const;
54 INLINE
const LColor &get_specular()
const;
55 void set_specular(
const LColor &color);
56 INLINE
void clear_specular();
58 INLINE
bool has_emission()
const;
59 INLINE
const LColor &get_emission()
const;
60 void set_emission(
const LColor &color);
61 INLINE
void clear_emission();
63 INLINE PN_stdfloat get_shininess()
const;
64 INLINE
void set_shininess(PN_stdfloat shininess);
66 INLINE
bool get_local()
const;
67 INLINE
void set_local(
bool local);
68 INLINE
bool get_twoside()
const;
69 INLINE
void set_twoside(
bool twoside);
71 INLINE
bool operator == (
const Material &other)
const;
72 INLINE
bool operator != (
const Material &other)
const;
73 INLINE
bool operator < (
const Material &other)
const;
77 void output(ostream &out)
const;
78 void write(ostream &out,
int indent)
const;
80 INLINE
bool is_attrib_locked()
const;
81 INLINE
void set_attrib_lock();
88 PN_stdfloat _shininess;
90 static PT(Material) _default;
104 static void register_with_read_factory();
115 static void init_type() {
116 TypedWritableReferenceCount::init_type();
117 register_type(_type_handle,
"Material",
118 TypedWritableReferenceCount::get_class_type());
121 return get_class_type();
123 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
130 INLINE ostream &operator << (ostream &out,
const Material &m) {
135 #include "material.I"
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Base class for objects that can be written to and read from Bam files.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
A base class for all things which can have a name.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
Defines the way an object appears in the presence of lighting.
This is the base class for all three-component vectors and points.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
void output(ostream &out) const
Outputs the Namable.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...