38 class EXPCL_PANDA_PGRAPH
Light {
45 virtual bool is_ambient_light()
const;
47 INLINE
const LColor &get_color()
const;
48 INLINE
void set_color(
const LColor &color);
49 MAKE_PROPERTY(color, get_color, set_color);
51 INLINE
bool has_color_temperature()
const;
52 INLINE PN_stdfloat get_color_temperature()
const;
53 void set_color_temperature(PN_stdfloat temperature);
54 MAKE_PROPERTY(color_temperature, get_color_temperature,
55 set_color_temperature);
57 virtual PN_stdfloat get_exponent()
const;
58 virtual const LColor &get_specular_color()
const;
59 virtual const LVecBase3 &get_attenuation()
const;
61 INLINE
void set_priority(
int priority);
62 INLINE
int get_priority()
const;
63 virtual int get_class_priority()
const=0;
64 MAKE_PROPERTY(priority, get_priority, set_priority);
67 virtual void attrib_ref();
68 virtual void attrib_unref();
70 virtual void output(std::ostream &out)
const=0;
71 virtual void write(std::ostream &out,
int indent_level)
const=0;
75 virtual bool get_vector_to_light(LVector3 &result,
76 const LPoint3 &from_object_point,
77 const LMatrix4 &to_object_space);
84 virtual void fill_viz_geom(
GeomNode *viz_geom);
85 INLINE
void mark_viz_stale();
94 CP_directional_priority,
107 bool _has_color_temperature;
108 PN_stdfloat _color_temperature;
111 class EXPCL_PANDA_PGRAPH CData :
public CycleData {
114 INLINE CData(
const CData ©);
119 return Light::get_class_type();
125 bool _viz_geom_stale;
141 static void init_type() {
142 ReferenceCount::init_type();
144 ReferenceCount::get_class_type());
147 return get_class_type();
154 INLINE std::ostream &operator << (std::ostream &out,
const Light &light) {
A basic node of the scene graph or data graph.
The abstract interface to all kinds of lights.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A single page of data maintained by a PipelineCycler.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual TypeHandle get_parent_type() const
Returns the type of the container that owns the CycleData.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
virtual void write_datagram(BamWriter *, Datagram &) const
Writes the contents of this object to the datagram for shipping out to a Bam file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class calls PipelineCycler::read() in the constructor and PipelineCycler::release_read(...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
This is a sequence number that increments monotonically.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A node that holds Geom objects, renderable pieces of geometry.