OpenCMISS-Zinc C++ API Documentation
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Pages
fieldtrigonometry.hpp
Go to the documentation of this file.
1 
4 /* OpenCMISS-Zinc Library
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #ifndef CMZN_FIELDTRIGONOMETRY_HPP__
10 #define CMZN_FIELDTRIGONOMETRY_HPP__
11 
12 #include "zinc/fieldtrigonometry.h"
13 #include "zinc/field.hpp"
14 #include "zinc/fieldmodule.hpp"
15 
16 namespace OpenCMISS
17 {
18 namespace Zinc
19 {
20 class FieldSin : public Field
29 {
30 private:
31  // takes ownership of C handle, responsibility for destroying it
32  explicit FieldSin(cmzn_field_id field_id) : Field(field_id)
33  { }
34 
35  friend FieldSin Fieldmodule::createFieldSin(const Field& sourceField);
36 
37 public:
38 
39  FieldSin() : Field(0)
40  { }
41 
42 };
43 class FieldCos : public Field
52 {
53 private:
54  // takes ownership of C handle, responsibility for destroying it
55  explicit FieldCos(cmzn_field_id field_id) : Field(field_id)
56  { }
57 
58  friend FieldCos Fieldmodule::createFieldCos(const Field& sourceField);
59 
60 public:
61 
62  FieldCos() : Field(0)
63  { }
64 
65 };
66 class FieldTan : public Field
75 {
76 private:
77  // takes ownership of C handle, responsibility for destroying it
78  explicit FieldTan(cmzn_field_id field_id) : Field(field_id)
79  { }
80 
81  friend FieldTan Fieldmodule::createFieldTan(const Field& sourceField);
82 
83 public:
84 
85  FieldTan() : Field(0)
86  { }
87 
88 };
89 class FieldAsin : public Field
98 {
99 private:
100  // takes ownership of C handle, responsibility for destroying it
101  explicit FieldAsin(cmzn_field_id field_id) : Field(field_id)
102  { }
103 
104  friend FieldAsin Fieldmodule::createFieldAsin(const Field& sourceField);
105 
106 public:
107 
108  FieldAsin() : Field(0)
109  { }
110 
111 };
112 class FieldAcos : public Field
121 {
122 private:
123  // takes ownership of C handle, responsibility for destroying it
124  explicit FieldAcos(cmzn_field_id field_id) : Field(field_id)
125  { }
126 
127  friend FieldAcos Fieldmodule::createFieldAcos(const Field& sourceField);
128 
129 public:
130 
131  FieldAcos() : Field(0)
132  { }
133 
134 };
135 class FieldAtan : public Field
144 {
145 private:
146  // takes ownership of C handle, responsibility for destroying it
147  explicit FieldAtan(cmzn_field_id field_id) : Field(field_id)
148  { }
149 
150  friend FieldAtan Fieldmodule::createFieldAtan(const Field& sourceField);
151 
152 public:
153 
154  FieldAtan() : Field(0)
155  { }
156 
157 };
158 class FieldAtan2 : public Field
171 {
172 private:
173  // takes ownership of C handle, responsibility for destroying it
174  explicit FieldAtan2(cmzn_field_id field_id) : Field(field_id)
175  { }
176 
177 public:
178 
179  FieldAtan2() : Field(0)
180  { }
181 
182  friend FieldAtan2 Fieldmodule::createFieldAtan2(const Field& sourceField1,
183  const Field& sourceField2);
184 
185 };
186 
187 inline FieldSin Fieldmodule::createFieldSin(const Field& sourceField)
188 {
189  return FieldSin(cmzn_fieldmodule_create_field_sin(id, sourceField.getId()));
190 }
191 
192 inline FieldCos Fieldmodule::createFieldCos(const Field& sourceField)
193 {
194  return FieldCos(cmzn_fieldmodule_create_field_cos(id, sourceField.getId()));
195 }
196 
197 inline FieldTan Fieldmodule::createFieldTan(const Field& sourceField)
198 {
199  return FieldTan(cmzn_fieldmodule_create_field_tan(id, sourceField.getId()));
200 }
201 
202 inline FieldAsin Fieldmodule::createFieldAsin(const Field& sourceField)
203 {
204  return FieldAsin(cmzn_fieldmodule_create_field_asin(id, sourceField.getId()));
205 }
206 
207 inline FieldAcos Fieldmodule::createFieldAcos(const Field& sourceField)
208 {
209  return FieldAcos(cmzn_fieldmodule_create_field_acos(id, sourceField.getId()));
210 }
211 
212 inline FieldAtan Fieldmodule::createFieldAtan(const Field& sourceField)
213 {
214  return FieldAtan(cmzn_fieldmodule_create_field_atan(id, sourceField.getId()));
215 }
216 
217 inline FieldAtan2 Fieldmodule::createFieldAtan2(const Field& sourceField1, const Field& sourceField2)
218 {
219  return FieldAtan2(cmzn_fieldmodule_create_field_atan2(id, sourceField1.getId(),
220  sourceField2.getId()));
221 }
222 
223 } // namespace Zinc
224 }
225 
226 #endif
FieldSin createFieldSin(const Field &sourceField)
Definition: fieldtrigonometry.hpp:187
FieldCos createFieldCos(const Field &sourceField)
Definition: fieldtrigonometry.hpp:192
A field where the components are the arccosine value (using radians) of the components of the source_...
Definition: fieldtrigonometry.hpp:120
A field where the components are the sine value (using radians) of the components of the source_field...
Definition: fieldtrigonometry.hpp:28
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:46
A field where the components are the arctangent value (using radians) of the components of the source...
Definition: fieldtrigonometry.hpp:143
FieldAsin createFieldAsin(const Field &sourceField)
Definition: fieldtrigonometry.hpp:202
A field where the components are the cosine value (using radians) of the components of the source_fie...
Definition: fieldtrigonometry.hpp:51
cmzn_field_id getId() const
Definition: field.hpp:98
A field where the components are the trigonometric tangent value (using radians) of the components of...
Definition: fieldtrigonometry.hpp:74
A field where the components are calculated using the atan2 c function, so that the angle returned (i...
Definition: fieldtrigonometry.hpp:170
FieldTan createFieldTan(const Field &sourceField)
Definition: fieldtrigonometry.hpp:197
FieldAtan2 createFieldAtan2(const Field &sourceField1, const Field &sourceField2)
Definition: fieldtrigonometry.hpp:217
FieldAtan createFieldAtan(const Field &sourceField)
Definition: fieldtrigonometry.hpp:212
A field where the components are the arcsine value (using radians) of the components of the source_fi...
Definition: fieldtrigonometry.hpp:97
FieldAcos createFieldAcos(const Field &sourceField)
Definition: fieldtrigonometry.hpp:207