14#ifndef POLYLIGHTEFFECT_H
15#define POLYLIGHTEFFECT_H
35class EXPCL_PANDA_PGRAPH PolylightEffect :
public RenderEffect {
45 INLINE PolylightEffect();
46 INLINE PolylightEffect(
const PolylightEffect ©);
49 static CPT(RenderEffect)
make();
50 static CPT(RenderEffect)
make(PN_stdfloat weight, ContribType contrib,
const LPoint3 &effect_center);
51 static CPT(RenderEffect)
make(PN_stdfloat weight, ContribType contrib,
const LPoint3 &effect_center,
const LightGroup &lights);
54 CPT(RenderEffect)
set_weight(PN_stdfloat w)
const;
73 virtual void output(std::ostream &out)
const;
76 ContribType _contribution_type;
78 LightGroup _lightgroup;
79 LPoint3 _effect_center;
82 virtual int compare_to_impl(
const RenderEffect *other)
const;
88 static void init_type() {
89 RenderEffect::init_type();
91 RenderEffect::get_class_type());
94 return get_class_type();
96 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
104std::ostream &operator << (std::ostream &out, PolylightEffect::ContribType ct);
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
bool has_light(const NodePath &light) const
Returns true if the indicated light is listed in the PolylightEffect, false otherwise.
ContribType get_contrib() const
Returns CT_all or CT_proximal.
ConstPointerTo< RenderEffect > set_contrib(ContribType c) const
Set Contrib Type and return a new effect... the reason this couldnt be done through make was because ...
ConstPointerTo< RenderEffect > add_light(const NodePath &newlight) const
Add a PolylightNode object to this effect and return a new effect.
PN_stdfloat get_weight() const
Get the weight value.
LPoint3 get_effect_center() const
Return the value of the _effect_center.
ConstPointerTo< RenderEffect > set_weight(PN_stdfloat w) const
Set weight and return a new effect... the reason this couldnt be done through make was because that w...
ConstPointerTo< RenderEffect > remove_light(const NodePath &newlight) const
Remove a light from this effect.
static ConstPointerTo< RenderEffect > make()
Constructs a new PolylightEffect object.
ConstPointerTo< RenderEffect > set_effect_center(const LPoint3 &ec) const
Set weight and return a new effect... the reason this couldnt be done through make was because that w...
ConstPointerTo< RenderAttrib > do_poly_light(const SceneSetup *scene, const CullTraverserData *data, const TransformState *node_transform) const
Gets the node's position and based on distance from lights in the lightgroup calculates the color to ...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
virtual bool has_cull_callback() const
Should be overridden by derived classes to return true if cull_callback() has been defined.
virtual void cull_callback(CullTraverser *trav, CullTraverserData &data, ConstPointerTo< TransformState > &node_transform, ConstPointerTo< RenderState > &node_state) const
If has_cull_callback() returns true, this function will be called during the cull traversal to perfor...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
This object holds the camera position, etc., and other general setup information for rendering a part...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.