OpendTect  6.3
beachballdata.h
Go to the documentation of this file.
1 #pragma once
2 /*+
3  * (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
4  * AUTHOR : Karthika
5  * DATE : Sep 2009
6 -*/
7 
8 #include "generalmod.h"
9 #include "color.h"
10 #include "namedobj.h"
11 #include "position.h"
12 
13 namespace visBeachBall
14 {
15 
17 
19 {
20 public:
21 
22  BallProperties( const char* nm=0,
23  float r=500,
24  Color c1=Color(255,0,0),
25  Color c2=Color::White(),
26  Coord3 p=Coord3(0, 0, 0),
27  float el=0.5)
28  : ::NamedObject(nm)
29  , radius_(r)
30  , color1_(c1), color2_(c2)
31  , pos_(p), elasticity_(el) {}
32 
33  BallProperties get() const;
34  void set(const BallProperties&);
35 
36  float radius() const;
37  void setRadius(float);
38 
39  Color color1() const;
40  void setColor1(Color);
41 
42  Color color2() const;
43  void setColor2(Color);
44 
45  Coord3 pos() const;
46  void setPos(const Coord3&);
47 
48  float elasticity() const;
49  void setElasticity(float);
50 
51  BallProperties& operator = (const BallProperties& bp);
52  bool operator == (const BallProperties& bp) const;
53  bool operator != (const BallProperties& bp) const;
54 
55 protected:
56 
57  float radius_;
61  float elasticity_; // range is 0.0 to 1.0
62 
63 };
64 
65 
67 
68 mExpClass(General) BallDynamics: public ::NamedObject
69 {
70 public:
71 
72  BallDynamics(const char* nm=0,
73  float sp=1.0,
74  Coord3 dirvec=Coord3(1, 1, 1))
75  : ::NamedObject(nm)
76  , speed_(sp)
77  , directionvec_(dirvec) {}
78 
79  BallDynamics get() const;
80  void set(const BallDynamics&);
81 
82  float speed() const;
83  void setSpeed(const float&);
84 
85  Coord3 directionvector() const;
86  void setDirectionVector(const Coord3&);
87 
88  void velocity(float*, Coord3*) const;
89  void setVelocity(float, const Coord3&);
90 
91  BallDynamics& operator = (const BallDynamics& bd);
92  bool operator == (const BallDynamics& bd) const;
93  bool operator != (const BallDynamics& bd) const;
94 
95 protected:
96 
97  float speed_;
99 
100 };
101 
102 };
#define mExpClass(module)
Definition: commondefs.h:157
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
basic properties of the ball
Definition: beachballdata.h:18
float speed_
Definition: beachballdata.h:97
BallDynamics(const char *nm=0, float sp=1.0, Coord3 dirvec=Coord3(1, 1, 1))
Definition: beachballdata.h:72
BallProperties(const char *nm=0, float r=500, Color c1=Color(255, 0, 0), Color c2=Color::White(), Coord3 p=Coord3(0, 0, 0), float el=0.5)
Definition: beachballdata.h:22
float elasticity_
Definition: beachballdata.h:61
dynamic properties of the ball
Definition: beachballdata.h:68
3D point or vector
Definition: commontypes.h:57
FixedString Color()
Definition: keystrs.h:44
Color color2_
Definition: beachballdata.h:59
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
float radius_
Definition: beachballdata.h:57
Color color1_
Definition: beachballdata.h:58
Coord3d Coord3
Definition: commontypes.h:84
Coord3 pos_
Definition: beachballdata.h:60
static Color White()
Definition: color.h:85
object with a name.
Definition: namedobj.h:20
Definition: beachballdata.h:13
Coord3 directionvec_
movement dir
Definition: beachballdata.h:98
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017