15 #ifndef POLYLIGHTNODE_H 16 #define POLYLIGHTNODE_H 18 #include "pandabase.h" 24 #include "pandaNode.h" 25 #include "colorAttrib.h" 53 enum Attenuation_Type {
60 INLINE
void disable();
61 INLINE
void set_pos(
const LPoint3 &position);
62 INLINE
void set_pos(PN_stdfloat x,PN_stdfloat y, PN_stdfloat z);
65 INLINE
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b);
66 INLINE
LColor get_color()
const;
67 INLINE
LColor get_color_scenegraph()
const;
68 INLINE
void set_radius(PN_stdfloat r);
69 INLINE PN_stdfloat get_radius()
const;
70 INLINE
bool set_attenuation(Attenuation_Type type);
71 INLINE Attenuation_Type get_attenuation()
const;
72 INLINE
void set_a0(PN_stdfloat a0);
73 INLINE
void set_a1(PN_stdfloat a1);
74 INLINE
void set_a2(PN_stdfloat a2);
75 INLINE PN_stdfloat get_a0()
const;
76 INLINE PN_stdfloat get_a1()
const;
77 INLINE PN_stdfloat get_a2()
const;
78 INLINE
void flicker_on();
79 INLINE
void flicker_off();
80 INLINE
bool is_flickering()
const;
81 INLINE
bool set_flicker_type(Flicker_Type type);
82 INLINE Flicker_Type get_flicker_type()
const;
83 INLINE
void set_offset(PN_stdfloat offset);
84 INLINE PN_stdfloat get_offset()
const;
85 INLINE
void set_scale(PN_stdfloat scale);
86 INLINE PN_stdfloat get_scale()
const;
87 INLINE
void set_step_size(PN_stdfloat step) ;
88 INLINE PN_stdfloat get_step_size()
const;
89 INLINE
void set_freq(PN_stdfloat f);
90 INLINE PN_stdfloat get_freq()
const;
98 INLINE
bool is_enabled()
const;
110 Attenuation_Type _attenuation_type;
115 Flicker_Type _flicker_type;
118 PN_stdfloat _step_size;
119 PN_stdfloat _sin_freq;
127 virtual void output(ostream &out)
const;
139 static void init_type() {
140 PandaNode::init_type();
141 register_type(_type_handle,
"PolylightNode",
142 PandaNode::get_class_type());
145 return get_class_type();
147 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
153 #include "polylightNode.I" A basic node of the scene graph or data graph.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
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 a three-component point in space (as opposed to a three-component vector, which represents a ...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so...
This is a 4-by-4 transform matrix.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
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 ...
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 ...