Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fog Class Reference

#include <fog.h>

Inheritance diagram for Fog:

PandaNode TypedWritable Namable BoundedObject ReferenceCount TypedObject List of all members.

Public Member Functions

virtual ~Fog ()
virtual PandaNodemake_copy () const
virtual void xform (const LMatrix4f &mat)
INLINE Mode get_mode () const
INLINE void set_mode (Mode mode)
INLINE const Colorfget_color () const
INLINE void set_color (float r, float g, float b)
INLINE void set_color (const Colorf &color)
INLINE void set_linear_range (float onset, float opaque)
INLINE const LPoint3f & get_linear_onset_point () const
INLINE void set_linear_onset_point (float x, float y, float z)
INLINE void set_linear_onset_point (const LPoint3f &linear_onset_point)
INLINE const LPoint3f & get_linear_opaque_point () const
INLINE void set_linear_opaque_point (const LPoint3f &linear_opaque_point)
INLINE void set_linear_opaque_point (float x, float y, float z)
INLINE void set_linear_fallback (float angle, float onset, float opaque)
INLINE float get_exp_density () const
INLINE void set_exp_density (float exp_density)
void output (ostream &out) const
void adjust_to_camera (const TransformState *camera_transform)
void get_linear_range (float &onset, float &opaque)
virtual void write_datagram (BamWriter *manager, Datagram &dg)
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

void register_with_read_factory ()
TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad1__: enum Mode { M_linear
PUBLISHED M_exponential
PUBLISHED M_exponential_squared

Protected Member Functions

 Fog (const Fog &copy)
void compute_density ()
void fillin (DatagramIterator &scan, BamReader *manager)

Static Protected Member Functions

TypedWritablemake_from_bam (const FactoryParams &params)

Protected Attributes

Mode _mode
Colorf _color
LPoint3f _linear_onset_point
LPoint3f _linear_opaque_point
float _exp_density
float _linear_fallback_cosa
float _linear_fallback_onset
float _linear_fallback_opaque
float _transformed_onset
float _transformed_opaque

Private Attributes

PUBLISHED __pad0__: Fog(const string &name)

Static Private Attributes

TypeHandle _type_handle

Constructor & Destructor Documentation

Fog::Fog const Fog &  copy  )  [protected]
 

Definition at line 78 of file fog.cxx.

References _color, _exp_density, _linear_fallback_cosa, _linear_fallback_onset, _linear_fallback_opaque, _linear_onset_point, _linear_opaque_point, _mode, _transformed_onset, and _transformed_opaque.

Referenced by make_copy(), and make_from_bam().

Fog::~Fog  )  [virtual]
 

Definition at line 99 of file fog.cxx.


Member Function Documentation

void Fog::adjust_to_camera const TransformState camera_transform  ) 
 

Definition at line 159 of file fog.cxx.

References _linear_fallback_cosa, _linear_fallback_onset, _linear_fallback_opaque, _linear_onset_point, _linear_opaque_point, _transformed_onset, _transformed_opaque, cabs(), PandaNode::CPT(), TransformState::get_mat(), and PandaNode::get_num_parents().

Referenced by CullTraverser::traverse().

void Fog::compute_density  )  [protected]
 

void Fog::fillin DatagramIterator scan,
BamReader manager
[protected]
 

Reimplemented from PandaNode.

Definition at line 265 of file fog.cxx.

References _color, _exp_density, _linear_fallback_cosa, _linear_fallback_onset, _linear_fallback_opaque, _linear_onset_point, _linear_opaque_point, _mode, PandaNode::fillin(), DatagramIterator::get_float32(), and DatagramIterator::get_int8().

Referenced by make_from_bam().

virtual TypeHandle Fog::force_init_type void   )  [inline, virtual]
 

Reimplemented from PandaNode.

Definition at line 133 of file fog.h.

References PandaNode::get_class_type(), and PandaNode::init_type().

TypeHandle Fog::get_class_type void   )  [inline, static]
 

Reimplemented from PandaNode.

Definition at line 122 of file fog.h.

Referenced by register_with_read_factory().

INLINE const Colorf& Fog::get_color  )  const
 

Referenced by GLGraphicsStateGuardian::apply_fog(), DXGraphicsStateGuardian8::apply_fog(), CRGraphicsStateGuardian::apply_fog(), and DXGraphicsStateGuardian7::prepare_texture().

INLINE float Fog::get_exp_density  )  const
 

Referenced by GLGraphicsStateGuardian::apply_fog(), DXGraphicsStateGuardian8::apply_fog(), CRGraphicsStateGuardian::apply_fog(), and DXGraphicsStateGuardian7::prepare_texture().

INLINE const LPoint3f& Fog::get_linear_onset_point  )  const
 

INLINE const LPoint3f& Fog::get_linear_opaque_point  )  const
 

void Fog::get_linear_range float &  onset,
float &  opaque
 

Definition at line 201 of file fog.cxx.

References _transformed_onset, and _transformed_opaque.

Referenced by GLGraphicsStateGuardian::apply_fog(), DXGraphicsStateGuardian8::apply_fog(), CRGraphicsStateGuardian::apply_fog(), and DXGraphicsStateGuardian7::prepare_texture().

INLINE Mode Fog::get_mode  )  const
 

Referenced by GLGraphicsStateGuardian::apply_fog(), DXGraphicsStateGuardian8::apply_fog(), CRGraphicsStateGuardian::apply_fog(), and DXGraphicsStateGuardian7::prepare_texture().

virtual TypeHandle Fog::get_type void   )  const [inline, virtual]
 

Reimplemented from PandaNode.

Definition at line 130 of file fog.h.

References PandaNode::get_class_type().

void Fog::init_type void   )  [inline, static]
 

Reimplemented from PandaNode.

Definition at line 125 of file fog.h.

References PandaNode::get_class_type(), PandaNode::init_type(), and register_type().

Referenced by init_libpgraph().

PandaNode * Fog::make_copy  )  const [virtual]
 

Reimplemented from PandaNode.

Definition at line 111 of file fog.cxx.

References Fog().

TypedWritable * Fog::make_from_bam const FactoryParams params  )  [static, protected]
 

Reimplemented from PandaNode.

Definition at line 246 of file fog.cxx.

References fillin(), Fog(), params, and parse_params().

Referenced by register_with_read_factory().

void Fog::output ostream &  out  )  const [virtual]
 

Reimplemented from PandaNode.

Definition at line 134 of file fog.cxx.

References _exp_density, _linear_onset_point, _linear_opaque_point, _mode, M_exponential, and M_exponential_squared.

Referenced by operator<<().

void Fog::register_with_read_factory  )  [static]
 

Reimplemented from PandaNode.

Definition at line 213 of file fog.cxx.

References get_class_type(), BamReader::get_factory(), make_from_bam(), and Factory< TypedWritable >::register_factory().

Referenced by init_libpgraph().

INLINE void Fog::set_color const Colorf color  ) 
 

INLINE void Fog::set_color float  r,
float  g,
float  b
 

INLINE void Fog::set_exp_density float  exp_density  ) 
 

INLINE void Fog::set_linear_fallback float  angle,
float  onset,
float  opaque
 

INLINE void Fog::set_linear_onset_point const LPoint3f &  linear_onset_point  ) 
 

INLINE void Fog::set_linear_onset_point float  x,
float  y,
float  z
 

INLINE void Fog::set_linear_opaque_point float  x,
float  y,
float  z
 

INLINE void Fog::set_linear_opaque_point const LPoint3f &  linear_opaque_point  ) 
 

INLINE void Fog::set_linear_range float  onset,
float  opaque
 

INLINE void Fog::set_mode Mode  mode  ) 
 

void Fog::write_datagram BamWriter manager,
Datagram dg
[virtual]
 

Reimplemented from PandaNode.

Definition at line 224 of file fog.cxx.

References _color, _exp_density, _linear_fallback_cosa, _linear_fallback_onset, _linear_fallback_opaque, _linear_onset_point, _linear_opaque_point, _mode, Datagram::add_float32(), Datagram::add_int8(), and PandaNode::write_datagram().

void Fog::xform const LMatrix4f &  mat  )  [virtual]
 

Reimplemented from PandaNode.

Definition at line 123 of file fog.cxx.

References _linear_onset_point, and _linear_opaque_point.


Member Data Documentation

PUBLISHED Fog::__pad0__ [private]
 

Reimplemented from PandaNode.

Definition at line 52 of file fog.h.

PUBLISHED Fog::__pad1__
 

Reimplemented from PandaNode.

Definition at line 65 of file fog.h.

Colorf Fog::_color [protected]
 

Definition at line 111 of file fog.h.

Referenced by fillin(), Fog(), and write_datagram().

float Fog::_exp_density [protected]
 

Definition at line 114 of file fog.h.

Referenced by fillin(), Fog(), output(), and write_datagram().

float Fog::_linear_fallback_cosa [protected]
 

Definition at line 116 of file fog.h.

Referenced by adjust_to_camera(), fillin(), Fog(), and write_datagram().

float Fog::_linear_fallback_onset [protected]
 

Definition at line 117 of file fog.h.

Referenced by adjust_to_camera(), fillin(), Fog(), and write_datagram().

float Fog::_linear_fallback_opaque [protected]
 

Definition at line 117 of file fog.h.

Referenced by adjust_to_camera(), fillin(), Fog(), and write_datagram().

LPoint3f Fog::_linear_onset_point [protected]
 

Definition at line 112 of file fog.h.

Referenced by adjust_to_camera(), fillin(), Fog(), output(), write_datagram(), and xform().

LPoint3f Fog::_linear_opaque_point [protected]
 

Definition at line 113 of file fog.h.

Referenced by adjust_to_camera(), fillin(), Fog(), output(), write_datagram(), and xform().

Mode Fog::_mode [protected]
 

Definition at line 110 of file fog.h.

Referenced by fillin(), Fog(), output(), and write_datagram().

float Fog::_transformed_onset [protected]
 

Definition at line 119 of file fog.h.

Referenced by adjust_to_camera(), Fog(), and get_linear_range().

float Fog::_transformed_opaque [protected]
 

Definition at line 119 of file fog.h.

Referenced by adjust_to_camera(), Fog(), and get_linear_range().

TypeHandle Fog::_type_handle [static, private]
 

Reimplemented from PandaNode.

Definition at line 33 of file fog.cxx.

PUBLISHED Fog::M_exponential
 

Definition at line 65 of file fog.h.

Referenced by DXGraphicsStateGuardian8::apply_fog(), GLGraphicsStateGuardian::get_fog_mode_type(), DXGraphicsStateGuardian8::get_fog_mode_type(), operator<<(), output(), and DXGraphicsStateGuardian7::prepare_texture().

PUBLISHED Fog::M_exponential_squared
 

Definition at line 65 of file fog.h.

Referenced by DXGraphicsStateGuardian8::apply_fog(), GLGraphicsStateGuardian::get_fog_mode_type(), DXGraphicsStateGuardian8::get_fog_mode_type(), operator<<(), output(), and DXGraphicsStateGuardian7::prepare_texture().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:12:17 2003 for Panda by doxygen1.3