43 explicit Fog(
const std::string &name);
52 virtual void xform(
const LMatrix4 &mat);
61 INLINE Mode get_mode()
const;
62 INLINE
void set_mode(Mode mode);
63 MAKE_PROPERTY(mode, get_mode, set_mode);
65 INLINE
const LColor &get_color()
const;
66 INLINE
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b);
67 INLINE
void set_color(
const LColor &color);
68 MAKE_PROPERTY(color, get_color, set_color);
70 INLINE
void set_linear_range(PN_stdfloat onset, PN_stdfloat opaque);
72 INLINE
const LPoint3 &get_linear_onset_point()
const;
73 INLINE
void set_linear_onset_point(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
74 INLINE
void set_linear_onset_point(
const LPoint3 &linear_onset_point);
75 MAKE_PROPERTY(linear_onset_point, get_linear_onset_point, set_linear_onset_point);
77 INLINE
const LPoint3 &get_linear_opaque_point()
const;
78 INLINE
void set_linear_opaque_point(
const LPoint3 &linear_opaque_point);
79 INLINE
void set_linear_opaque_point(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
80 MAKE_PROPERTY(linear_opaque_point, get_linear_opaque_point, set_linear_opaque_point);
82 INLINE
void set_linear_fallback(PN_stdfloat angle, PN_stdfloat onset, PN_stdfloat opaque);
84 INLINE PN_stdfloat get_exp_density()
const;
85 INLINE
void set_exp_density(PN_stdfloat exp_density);
86 MAKE_PROPERTY(exp_density, get_exp_density, set_exp_density);
88 void output(std::ostream &out)
const;
92 void get_linear_range(PN_stdfloat &onset, PN_stdfloat &opaque);
95 void compute_density();
108 LPoint3 _linear_onset_point;
109 LPoint3 _linear_opaque_point;
110 PN_stdfloat _exp_density;
112 PN_stdfloat _linear_fallback_cosa;
113 PN_stdfloat _linear_fallback_onset, _linear_fallback_opaque;
115 PN_stdfloat _transformed_onset, _transformed_opaque;
121 static void init_type() {
122 PandaNode::init_type();
124 PandaNode::get_class_type());
127 return get_class_type();
129 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
135 EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, Fog::Mode mode);
137 INLINE std::ostream &operator << (std::ostream &out,
const Fog &fog) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
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 ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
Specifies how atmospheric fog effects are applied to geometry.
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.
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 ...