14#ifndef LIGHTLENSNODE_H
15#define LIGHTLENSNODE_H
33class EXPCL_PANDA_PGRAPHNODES LightLensNode :
public Light,
public Camera {
36 virtual ~LightLensNode();
42 void set_shadow_caster(
bool caster,
int buffer_xsize,
int buffer_ysize,
int sort = -10);
59 LightLensNode(
const LightLensNode ©);
60 void clear_shadow_buffers();
61 virtual void setup_shadow_map();
65 bool _has_specular_color;
67 mutable bool _used_by_auto_shader =
false;
73 ShadowBuffers _sbuffers;
77 AtomicAdjust::Integer _attrib_count;
89 virtual void output(std::ostream &out)
const;
90 virtual void write(std::ostream &out,
int indent_level = 0)
const;
102 static void init_type() {
106 Light::get_class_type(),
107 Camera::get_class_type());
109 virtual TypeHandle get_type()
const {
110 return get_class_type();
112 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
115 static TypeHandle _type_handle;
117 friend class GraphicsStateGuardian;
120INLINE std::ostream &operator << (std::ostream &out,
const LightLensNode &light) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
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 class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An abstract base class for GraphicsOutput, for all the usual reasons.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
Encapsulates all the communication with a particular instance of a given rendering backend.
A base class for any number of different kinds of lenses, linear and otherwise.
A derivative of Light and of Camera.
set_shadow_buffer_size
Sets the size of the shadow buffer to be created for this light source.
is_shadow_caster
Returns whether this light is configured to cast shadows or not.
bool has_specular_color() const
Returns true if this light defines a specular color, false if the specular color is derived automatic...
virtual PandaNode * as_node()
Returns the Light object upcast to a PandaNode.
int get_shadow_buffer_sort() const
Returns the sort of the shadow buffer to be created for this light source.
void mark_used_by_auto_shader() const
Marks this light as having been used by the auto shader.
get_shadow_buffer_size
Returns the size of the shadow buffer to be created for this light source.
GraphicsOutputBase * get_shadow_buffer(GraphicsStateGuardianBase *gsg)
Returns the buffer that has been constructed for a given GSG, or NULL if no such buffer has (yet) bee...
void set_shadow_caster(bool caster)
Sets the flag indicating whether this light should cast shadows or not.
virtual void attrib_ref()
This is called when the light is added to a LightAttrib.
virtual void attrib_unref()
This is called when the light is removed from a LightAttrib.
virtual Light * as_light()
Cross-casts the node to a Light pointer, if it is one of the four kinds of Light nodes,...
A perspective-type lens: a normal camera.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...