14 #ifndef POLYLIGHTNODE_H 15 #define POLYLIGHTNODE_H 50 enum Attenuation_Type {
57 INLINE
void disable();
58 INLINE
void set_pos(
const LPoint3 &position);
59 INLINE
void set_pos(PN_stdfloat x,PN_stdfloat y, PN_stdfloat z);
60 INLINE LPoint3 get_pos()
const;
61 INLINE
void set_color(
const LColor &color);
62 INLINE
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b);
63 INLINE LColor get_color()
const;
64 INLINE LColor get_color_scenegraph()
const;
65 INLINE
void set_radius(PN_stdfloat r);
66 INLINE PN_stdfloat get_radius()
const;
67 INLINE
bool set_attenuation(Attenuation_Type type);
68 INLINE Attenuation_Type get_attenuation()
const;
69 INLINE
void set_a0(PN_stdfloat a0);
70 INLINE
void set_a1(PN_stdfloat a1);
71 INLINE
void set_a2(PN_stdfloat a2);
72 INLINE PN_stdfloat get_a0()
const;
73 INLINE PN_stdfloat get_a1()
const;
74 INLINE PN_stdfloat get_a2()
const;
75 INLINE
void flicker_on();
76 INLINE
void flicker_off();
77 INLINE
bool is_flickering()
const;
78 INLINE
bool set_flicker_type(Flicker_Type type);
79 INLINE Flicker_Type get_flicker_type()
const;
80 INLINE
void set_offset(PN_stdfloat offset);
81 INLINE PN_stdfloat get_offset()
const;
82 INLINE
void set_scale(PN_stdfloat scale);
83 INLINE PN_stdfloat get_scale()
const;
84 INLINE
void set_step_size(PN_stdfloat step) ;
85 INLINE PN_stdfloat get_step_size()
const;
86 INLINE
void set_freq(PN_stdfloat f);
87 INLINE PN_stdfloat get_freq()
const;
95 INLINE
bool is_enabled()
const;
98 LColor flicker()
const;
100 virtual void xform(
const LMatrix4 &mat);
107 Attenuation_Type _attenuation_type;
112 Flicker_Type _flicker_type;
115 PN_stdfloat _step_size;
116 PN_stdfloat _sin_freq;
123 virtual void output(std::ostream &out)
const;
135 static void init_type() {
136 PandaNode::init_type();
138 PandaNode::get_class_type());
141 return get_class_type();
143 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Base class for objects that can be written to and read from Bam files.
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.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...