COPASI API  4.16.103
CLTransformation.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/layout/CLTransformation.h,v $
3 // $Revision: 1.3 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/09/30 16:35:21 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 #ifndef CLTransformation_H__
15 #define CLTransformation_H__
16 
17 #include <string>
18 
19 #include "copasi/layout/CLBase.h"
20 
21 class Transformation;
22 
23 class CLTransformation : public CLBase
24 {
25 protected:
26  double mMatrix[12];
27 
28 public:
29  static const double IDENTITY3D[12];
30 
31  static const double* getIdentityMatrix();
32 
33  /**
34  * Default constructor.
35  * All matrix elements are set to NaN
36  */
38 
39  /**
40  * Constructor with values for the matrix.
41  */
42  CLTransformation(const double matrix[12]);
43 
44  /**
45  * Sets the matrix.
46  */
47  void setMatrix(const double m[12]);
48 
49  /**
50  * Returns the matrix.
51  */
52  virtual const double* getMatrix() const;
53 
54  /**
55  * Returns true if the matrix has been set or false otherwise.
56  */
57  bool isSetMatrix() const;
58 
59  /**
60  * Returns true if the matrix is the identity matrix.
61  */
62  bool isIdentityMatrix() const;
63 
64  /**
65  * Checks if the transformation is a 2D transformation, i.e.
66  * we have to check some of the values.
67  */
68  bool is2DTransformation() const;
69 
70  /**
71  * Returns a string to represent the 3D transformation.
72  */
73  std::string get3DTransformationString() const;
74 
75  /**
76  * Sets the transformation matrix from the given string.
77  * The string has to contain 12 numerical values seperated by ",".
78  * Otherwise the matrix is set to the identity matrix.
79  */
80  virtual void parseTransformation(const std::string& transformationString);
81 };
82 
83 #endif /* CLTransformation_H__ */
std::string get3DTransformationString() const
void setMatrix(const double m[12])
bool is2DTransformation() const
static const double IDENTITY3D[12]
virtual void parseTransformation(const std::string &transformationString)
static const double * getIdentityMatrix()
Definition: CLBase.h:33
virtual const double * getMatrix() const
bool isSetMatrix() const
bool isIdentityMatrix() const