18 #include "pandabase.h" 20 #include "pandaNode.h" 23 #include "deg_2_rad.h" 48 Fog(
const string &name);
66 INLINE Mode get_mode()
const;
67 INLINE
void set_mode(Mode mode);
69 INLINE
const LColor &get_color()
const;
70 INLINE
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b);
73 INLINE
void set_linear_range(PN_stdfloat onset, PN_stdfloat opaque);
75 INLINE
const LPoint3 &get_linear_onset_point()
const;
76 INLINE
void set_linear_onset_point(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
77 INLINE
void set_linear_onset_point(
const LPoint3 &linear_onset_point);
79 INLINE
const LPoint3 &get_linear_opaque_point()
const;
80 INLINE
void set_linear_opaque_point(
const LPoint3 &linear_opaque_point);
81 INLINE
void set_linear_opaque_point(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
83 INLINE
void set_linear_fallback(PN_stdfloat angle, PN_stdfloat onset, PN_stdfloat opaque);
85 INLINE PN_stdfloat get_exp_density()
const;
86 INLINE
void set_exp_density(PN_stdfloat exp_density);
88 void output(ostream &out)
const;
91 void adjust_to_camera(
const TransformState *camera_transform);
92 void get_linear_range(PN_stdfloat &onset, PN_stdfloat &opaque);
95 void compute_density();
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();
123 register_type(_type_handle,
"Fog",
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 ostream &operator << (ostream &out, Fog::Mode mode);
137 INLINE ostream &operator << (ostream &out,
const Fog &fog) {
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.
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.
This is the base class for all three-component vectors and points.
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 ...