14#ifndef BILLBOARDEFFECT_H
15#define BILLBOARDEFFECT_H
27class EXPCL_PANDA_PGRAPH BillboardEffect :
public RenderEffect {
29 INLINE BillboardEffect();
32 static CPT(RenderEffect)
make(
const LVector3 &up_vector,
37 const LPoint3 &look_at_point,
38 bool fixed_depth =
false);
39 INLINE
static CPT(RenderEffect) make_axis();
40 INLINE
static CPT(RenderEffect) make_point_eye();
41 INLINE
static CPT(RenderEffect) make_point_world();
43 INLINE
bool is_off()
const;
55 virtual void output(std::ostream &out)
const;
68 virtual int compare_to_impl(
const RenderEffect *other)
const;
83 LPoint3 _look_at_point;
92 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
99 static void init_type() {
100 RenderEffect::init_type();
102 RenderEffect::get_class_type());
105 return get_class_type();
107 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
static ConstPointerTo< RenderEffect > make(const LVector3 &up_vector, bool eye_relative, bool axial_rotate, PN_stdfloat offset, const NodePath &look_at, const LPoint3 &look_at_point, bool fixed_depth=false)
Constructs a new BillboardEffect object with the indicated properties.
const NodePath & get_look_at() const
Returns the node this billboard will rotate to look towards.
bool get_eye_relative() const
Returns true if this billboard interprets the up vector relative to the camera, or false if it is rel...
const LPoint3 & get_look_at_point() const
Returns the point, relative to the look_at node, towards which the billboard will rotate.
static void register_with_read_factory()
Tells the BamReader how to create objects of type BillboardEffect.
bool is_off() const
Returns true if the BillboardEffect is an 'off' BillboardEffect, indicating that it does not enable b...
bool get_axial_rotate() const
Returns true if this billboard rotates only around the axis of the up vector, or false if it rotates ...
PN_stdfloat get_offset() const
Returns the distance toward the camera (or the look_at_point) the billboard is moved towards,...
const LVector3 & get_up_vector() const
Returns the up vector in effect for this billboard.
bool get_fixed_depth() const
Returns true if this billboard always appears at a fixed distance from the camera.
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,...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A basic node of the scene graph or data graph.
virtual bool has_adjust_transform() const
Should be overridden by derived classes to return true if adjust_transform() has been defined,...
virtual bool safe_to_transform() const
Returns true if it is generally safe to transform this particular kind of RenderEffect by calling the...
virtual void adjust_transform(ConstPointerTo< TransformState > &net_transform, ConstPointerTo< TransformState > &node_transform, const PandaNode *node) const
Performs some operation on the node's apparent net and/or local transforms.
virtual ConstPointerTo< TransformState > prepare_flatten_transform(const TransformState *net_transform) const
Preprocesses the accumulated transform that is about to be applied to (or through) this node due to a...
virtual bool has_cull_callback() const
Should be overridden by derived classes to return true if cull_callback() has been defined.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
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...
TypeHandle is the identifier used to differentiate C++ class types.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is our own Panda specialization on the default STL list.
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.