Developer documentation | Axl-2.5.1

axlAbstractFieldSpatial.cpp
Go to the documentation of this file.
1 /* axlAbstractFieldSpatial.cpp ---
2  *
3  * Author: Anais Ducoffe
4  * Copyright (C) 2013 - Anais Ducoffe, Inria.
5  */
6 
7 /* Commentary:
8  *
9  */
10 
11 /* Change log:
12  *
13  */
14 #include <sstream>
15 
17 #include "axlAbstractProcess.h"
18 
19 #include <dtkCoreSupport/dtkGlobal.h>
20 
21 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
22 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
23 
24 class axlAbstractFieldSpatialPrivate
25 {
26 public:
27 };
28 
29 // /////////////////////////////////////////////////////////////////
30 // axlAbstractFieldSpatial implementation
31 // /////////////////////////////////////////////////////////////////
32 
34 
37 axlAbstractFieldSpatial::axlAbstractFieldSpatial() : axlAbstractField(), d(new axlAbstractFieldSpatialPrivate)
38 {
39 }
40 
41 
42 
44 
48 {
49  delete d;
50 
51  d = NULL;
52 }
53 
54 
55 
58 // *
59 // */
60 //void axlAbstractFieldSpatial::setType(axlAbstractFieldSpatial::Type type)
61 //{
62 
63 // d->type = type;
64 //}
65 
68 // *
69 // */
70 //void axlAbstractFieldSpatial::setKind(axlAbstractFieldSpatial::Kind kind)
71 //{
72 
73 // d->kind = kind;
74 //}
75 
78 // *
79 // */
80 //void axlAbstractFieldSpatial::setSupport(axlAbstractFieldSpatial::Support support)
81 //{
82 // d->support = support;
83 //}
84 
85 
86 //axlAbstractFieldSpatial::Type axlAbstractFieldSpatial::type(void)
87 //{
88 // return d->type;
89 //}
90 
91 //axlAbstractFieldSpatial::Kind axlAbstractFieldSpatial::kind(void)
92 //{
93 // return d->kind;
94 //}
95 
96 //axlAbstractFieldSpatial::Support axlAbstractFieldSpatial::support(void)
97 //{
98 // return d->support;
99 //}
100 
101 
102 
104 
107 double axlAbstractFieldSpatial::scalar(double x, double y, double z)
108 {
109  if(!(this->kind() == Scalar)) {
110  qDebug() << "Getting scalar value on non scalar field.";
111  return 0;
112  }
113  return 0;
114 }
115 
117 
120 double *axlAbstractFieldSpatial::vector(double x, double y, double z)
121 {
122  if(!(this->kind() == Vector)) {
123  qDebug() << "Getting vector value on non vector field.";
124  return NULL;
125  }
126  return NULL;
127 }
128 
130 
133 double *axlAbstractFieldSpatial::tensor(double x, double y, double z)
134 {
135  if(!(this->kind() == Tensor)) {
136  qDebug() << "Getting tensor value on non tensor field.";
137  return NULL;
138  }
139 
140  return NULL;
141 }
142 
145 // *
146 // */
147 //QString axlAbstractFieldSpatial::name(void)
148 //{
149 // return this->objectName() ;
150 //}
151 
154 // *
155 // */
156 //void axlAbstractFieldSpatial::setName(QString name)
157 //{
158 // this->setObjectName(name);
159 
160 //}
161 
163 
167 {
168  DTK_DEFAULT_IMPLEMENTATION;
169  return "";
170 
171 }
172 
173 
175 
179 {
180  DTK_DEFAULT_IMPLEMENTATION;
181  return "";
182 
183 }
184 
185 
188 
192 {
193  emit updated();
194 }
195 
196 // /////////////////////////////////////////////////////////////////
197 // axlField documentation
198 // /////////////////////////////////////////////////////////////////
199 
206 // /////////////////////////////////////////////////////////////////
207 // Type instanciation
208 // /////////////////////////////////////////////////////////////////
209 
210 dtkAbstractData *createaxlAbstractFieldSpatial(void)
211 {
212  return new axlAbstractFieldSpatial();
213 }
virtual double scalar(double x, double y=0, double z=0)
Returns the value of the spatial field at the coordinates point entered.
virtual double * vector(double x, double y=0, double z=0)
Returns the value of the spatial field at the coordinates point entered.
virtual double * tensor(double x, double y=0, double z=0)
Returns the value of the spatial field at the coordinates point entered.
virtual Kind kind(void)
Class axlAbstractFieldSpatial defines an API for spatial field.
virtual ~axlAbstractFieldSpatial(void)
Destroys a spatial field.
Class axlAbstractField defines an API for arrays of numeric data.
virtual QString identifier(void) const
Returns the description of the field.
dtkAbstractData * createaxlAbstractFieldSpatial(void)
virtual QString description(void) const
Returns the description of the field.