1 /* === S Y N F I G ========================================================= */
3 ** \brief Template Header
5 ** $Id: plant.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_PLANT_H
25 #define __SYNFIG_PLANT_H
27 /* === H E A D E R S ======================================================= */
31 #include <synfig/layer_composite.h>
32 #include <synfig/segment.h>
33 #include <synfig/blinepoint.h>
34 #include <synfig/value.h>
35 #include <synfig/gradient.h>
36 #include <synfig/angle.h>
38 #include <synfig/rect.h>
40 /* === M A C R O S ========================================================= */
42 /* === T Y P E D E F S ===================================================== */
44 /* === C L A S S E S & S T R U C T S ======================================= */
46 using namespace synfig;
50 class Plant : public synfig::Layer_Composite
52 SYNFIG_LAYER_MODULE_EXT
55 std::vector<synfig::BLinePoint> bline;
58 synfig::Gradient gradient;
65 Particle(const synfig::Point &point,const synfig::Color& color):
66 point(point),color(color) { }
69 mutable std::vector<Particle> particle_list;
70 mutable synfig::Rect bounding_rect;
71 synfig::Angle split_angle;
72 synfig::Vector gravity;
73 synfig::Real velocity;
80 synfig::Real random_factor;
84 mutable bool needs_sync_;
87 void branch(int n, int depth,float t, float stunt_growth, synfig::Point position,synfig::Vector velocity)const;
95 void calc_bounding_rect()const;
97 virtual bool set_param(const String & param, const synfig::ValueBase &value);
99 virtual ValueBase get_param(const String & param)const;
101 virtual Vocab get_param_vocab()const;
103 virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;\
105 virtual synfig::Rect get_bounding_rect(synfig::Context context)const;
108 /* === E N D =============================================================== */