Developer documentation | Axl-2.5.1

axlSurfaceParametricOffset.cpp
Go to the documentation of this file.
1 /* axlSurfaceParametricOffset.cpp ---
2  *
3  * Author: Meriadeg Perrinel
4  * Copyright (C) 2008 - Meriadeg Perrinel, Inria.
5  * Created: Tue Nov 9 17:03:56 2010 (+0100)
6  * Version: $Id$
7  * Last-Updated: Tue Mar 29 09:43:31 2011 (+0200)
8  * By: Julien Wintz
9  * Update #: 36
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
21 
22 #include <dtkCoreSupport/dtkGlobal.h>
23 
24 
25 class axlSurfaceParametricOffsetPrivate
26 {
27 public:
28  double offset;
30 };
31 
33 
35 axlSurfaceParametricOffset::axlSurfaceParametricOffset(axlAbstractSurfaceParametric *surfaceParam, double offset) : axlAbstractSurfaceParametric(), d(new axlSurfaceParametricOffsetPrivate)
36 {
37  this->setObjectName(this->identifier());
38  if(surfaceParam)
39  this->setParent(surfaceParam->parent());
40  d->offset = offset;
41  d->surface = surfaceParam;
42 }
43 
45 
49 {
50  this->setObjectName(this->identifier());
51  this->setParent(other.parent());
52  d->offset = other.d->offset;
53  d->surface = other.d->surface;
54 
55 }
56 
58 {
59  delete d;
60 
61  d = NULL;
62 }
63 
65 
69 {
70  this->setObjectName(this->identifier());
71  this->setParent(other.parent());
72  d->offset = other.d->offset;
73  d->surface = other.d->surface;
74 
75  return (*this);
76 }
77 
79 
83 {
84  return d->offset;
85 }
86 
88 
92 {
93  d->offset = offset;
94 }
95 
97 
101 {
102  return d->surface;
103 }
104 
105 
106 // /////////////////////////////////////////////////////////////////
107 // Debug operators
108 // /////////////////////////////////////////////////////////////////
109 
110 QDebug operator<<(QDebug dbg, axlSurfaceParametricOffset sphere)
111 {
112  dbg.nospace() << sphere.description();
113 
114  return dbg.space();
115 }
116 
117 QDebug operator<<(QDebug dbg, axlSurfaceParametricOffset& sphere)
118 {
119  dbg.nospace() << sphere.description();
120 
121  return dbg.space();
122 }
123 
124 QDebug operator<<(QDebug dbg, axlSurfaceParametricOffset *sphere)
125 {
126  dbg.nospace() << sphere->description();
127 
128  return dbg.space();
129 }
130 
132 {
133  QString result = "axlSurfaceParametricOffset";
134  result.append("\noffset : "+QString::number(d->offset)+ "n" + d->surface->description());
135  return result;
136 }
137 
139 {
140  return "axlSurfaceParametricOffset";
141 }
142 
143 // /////////////////////////////////////////////////////////////////
144 // axlSphere documentation
145 // /////////////////////////////////////////////////////////////////
146 
void setOffset(double offset)
Set the offset of this axlSurfaceParametricOffset.
virtual QString description(void) const
Class axlSurfaceParametricOffset defines offset of axlAbstractSurfaceParametric.
QDebug operator<<(QDebug dbg, axlSurfaceParametricOffset sphere)
axlSurfaceParametricOffset(axlAbstractSurfaceParametric *surfaceParam, double offset=0.0)
Constructs a axlSurfaceParametricOffset with an axlAbstractSurfaceParametric and a distance offset...
axlSurfaceParametricOffset & operator=(const axlSurfaceParametricOffset &other)
Assigns other to this axlSurfaceParametricOffset and returns a reference to this axlSurfaceParametric...
virtual QString identifier(void) const
double offset(void)
Return offset of this axlSurfaceParametricOffset.
axlAbstractSurfaceParametric * surfaceParam(void)
Return the pointer on the axlAbstractSurfaceParametric of this axlSurfaceParametricOffset.