NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxMesh.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #include "cxMesh.h"
14 #include <vtkCellArray.h>
15 #include <vtkColorSeries.h>
16 #include <vtkPolyData.h>
17 #include <vtkPointData.h>
18 #include <QDomDocument>
19 #include <QColor>
20 #include <QDir>
21 #include <vtkTransformTextureCoords.h>
22 #include <vtkTexture.h>
23 #include <vtkTextureMapToCylinder.h>
24 #include <vtkTextureMapToPlane.h>
25 #include <vtkTextureMapToSphere.h>
26 #include "cxTypeConversions.h"
28 #include "cxBoundingBox3D.h"
29 #include "vtkProperty.h"
30 #include "vtkImageData.h"
31 #include "cxImage.h"
32 #include "cxFileManagerService.h"
33 #include "cxLogger.h"
34 #include "cxNullDeleter.h"
35 
36 namespace cx
37 {
38 
39 
40 //---------------------------------------------------------
41 //---------------------------------------------------------
42 //---------------------------------------------------------
43 
44 MeshPtr Mesh::create(const QString& uid, const QString& name, PatientModelServicePtr patientModelService, SpaceProviderPtr spaceProvider)
45 {
46  return MeshPtr(new Mesh(uid, name, vtkPolyDataPtr(), patientModelService, spaceProvider));
47 }
48 
49 Mesh::Mesh(const QString& uid, const QString& name, vtkPolyDataPtr polyData, PatientModelServicePtr patientModelService, SpaceProviderPtr spaceProvider) :
50  Data(uid, name), mVtkPolyData(polyData), mHasGlyph(false), mOrientationArray(""), mColorArray(""), mPatientModelService(patientModelService),
51  mSpaceProvider(spaceProvider), mTextureData(patientModelService)
52 {
53  if (!mVtkPolyData)
54  mVtkPolyData = vtkPolyDataPtr::New();
55  connect(&mProperties, &MeshPropertyData::changed, this, &Mesh::meshChanged);
56  connect(&mTextureData, &MeshTextureData::changed, this, &Mesh::meshChanged);
57  mShowGlyph = shouldGlyphBeEnableByDefault();
58  mGlyphLUT ="Citrus";
59  this->setAcquisitionTime(QDateTime::currentDateTime());
60 }
61 
63 {
64 }
65 
66 void Mesh::setIsWireframe(bool on)
67 {
68  if (on)
69  mProperties.mRepresentation->setValue(QString::number(VTK_WIREFRAME));
70  else
71  mProperties.mRepresentation->setValue(QString::number(VTK_SURFACE));
72 }
73 
75 {
76  return mProperties.mRepresentation->getValue().toInt() == VTK_WIREFRAME;
77 }
78 
79 bool Mesh::load(QString path, FileManagerServicePtr filemanager)
80 {
81  vtkPolyDataPtr raw;
82  raw = filemanager->loadVtkPolyData(path);
83  if(raw)
84  {
85  this->setVtkPolyData(raw);
86  this->setName(QFileInfo(path).baseName());
87  this->setFilename(path); // need path even when not set explicitly: nice for testing
88  }
89  return raw!=0;
90 }
91 
92 void Mesh::setVtkPolyData(const vtkPolyDataPtr& polyData)
93 {
94  mVtkPolyData = polyData;
95  mVtkPolyDataOriginal = mVtkPolyData;
96  mOrientationArrayList.clear();
97  mColorArrayList.clear();
98 
99  if (mVtkPolyData)
100  {
101  int num;
102  for(int k=0; k < mVtkPolyData->GetPointData()->GetNumberOfArrays(); k++)
103  {
104  num=mVtkPolyData->GetPointData()->GetArray(k)->GetNumberOfComponents();
105  if(num==3)
106  {
107  if(strlen(mOrientationArray.c_str())==0)
108  {
109  mOrientationArray=mVtkPolyData->GetPointData()->GetArrayName(k);
110  mHasGlyph=true;
111  }
112  mOrientationArrayList << mVtkPolyData->GetPointData()->GetArrayName(k);
113  }
114  }
115  mColorArrayList << "";
116  mColorArray="";
117  for(int k=0; k < mVtkPolyData->GetPointData()->GetNumberOfArrays(); k++)
118  {
119  num=mVtkPolyData->GetPointData()->GetArray(k)->GetNumberOfComponents();
120  if(num==1)
121  {
122  mColorArrayList << mVtkPolyData->GetPointData()->GetArrayName(k);
123  }
124  }
125  }
126  mShowGlyph = shouldGlyphBeEnableByDefault();
127 
128  emit meshChanged();
129 }
131 {
132  return mVtkPolyData;
133 }
134 
136 {
137  return mVtkTexture;
138 }
139 
140 void Mesh::addXml(QDomNode& dataNode)
141 {
142  Data::addXml(dataNode);
143  QDomDocument doc = dataNode.ownerDocument();
144 
145  QDomNode meshNode = dataNode;
146 
147  mProperties.addXml(dataNode);
148  mTextureData.addXml(dataNode);
149 
150  QDomElement glyphNode = doc.createElement("glyph");
151  QDomElement elemGlyph = glyphNode.toElement();
152  elemGlyph.setAttribute("showGlyph", mShowGlyph);
153  elemGlyph.setAttribute("orientationArray", mOrientationArray.c_str());
154  elemGlyph.setAttribute("colorArray", mColorArray.c_str());
155  elemGlyph.setAttribute("glyphLUT", mGlyphLUT.c_str());
156  meshNode.appendChild(elemGlyph);
157 
158 }
159 
160 void Mesh::parseXml(QDomNode& dataNode)
161 {
162  Data::parseXml(dataNode);
163 
164  // image node must be parsed in the data manager to create this Image object
165  // Only subnodes are parsed here
166 
167  if (dataNode.isNull())
168  return;
169 
170  mProperties.parseXml(dataNode);
171  mTextureData.parseXml(dataNode);
172 
173  QDomNode glyphNode = dataNode.namedItem("glyph");
174  if (!glyphNode.isNull())
175  {
176  mShowGlyph = glyphNode.toElement().attribute("showGlyph").toInt();
177  mOrientationArray = glyphNode.toElement().attribute("orientationArray").toStdString();
178  mColorArray = glyphNode.toElement().attribute("colorArray").toStdString();
179  mGlyphLUT = glyphNode.toElement().attribute("glyphLUT").toStdString();
180  }
181 
182  emit meshChanged();
183 }
184 
185 void Mesh::setColor(const QColor& color)
186 {
187  mProperties.mColor->setValue(color);
188 }
189 
191 {
192  return mProperties.mColor->getValue();
193 }
194 
196 {
197  mProperties.mUseColorFromPolydataScalars->setValue(on);
198 }
199 
201 {
202  return mProperties.mUseColorFromPolydataScalars->getValue();
203 }
204 
205 void Mesh::setBackfaceCullingSlot(bool backfaceCulling)
206 {
207  mProperties.mBackfaceCulling->setValue(backfaceCulling);
208 }
209 
211 {
212  return mProperties.mBackfaceCulling->getValue();
213 }
214 
215 void Mesh::setFrontfaceCullingSlot(bool frontfaceCulling)
216 {
217  mProperties.mFrontfaceCulling->setValue(frontfaceCulling);
218  emit meshChanged();
219 }
220 
222 {
223  return mProperties.mFrontfaceCulling->getValue();
224 }
225 
226 void Mesh::setShowGlyph(bool val)
227 {
228  mShowGlyph = val;
229  emit meshChanged();
230 }
231 
233 {
234  return mHasGlyph;
235 }
236 
238 {
239  return mShowGlyph;
240 }
241 
242 bool Mesh::shouldGlyphBeEnableByDefault()
243 {
244  if(! mHasGlyph) return false;
245  if(!mVtkPolyData) return false;
246  if(mVtkPolyData->GetNumberOfVerts() > 0) return false;
247  if(mVtkPolyData->GetNumberOfLines() > 0) return false;
248  if(mVtkPolyData->GetNumberOfPolys() > 0) return false;
249  if(mVtkPolyData->GetNumberOfStrips() > 0) return false;
250 
251  return true;
252 }
253 
254 
256 {
257  return mOrientationArray.c_str();
258 }
259 
260 void Mesh::setOrientationArray(const char * orientationArray)
261 {
262  mOrientationArray = orientationArray;
263  emit meshChanged();
264 }
265 
267 {
268  return mProperties.mVisSize->getValue();
269 }
270 
271 void Mesh::setVisSize(double size)
272 {
273  mProperties.mVisSize->setValue(size);
274 }
275 
276 const char * Mesh::getColorArray()
277 {
278  return mColorArray.c_str();
279 }
280 
281 void Mesh::setColorArray(const char * colorArray)
282 {
283  mColorArray = colorArray;
284  emit meshChanged();
285 }
286 
287 const char * Mesh::getGlyphLUT()
288 {
289  return mGlyphLUT.c_str();
290 }
291 
293 {
294  return mTextureData.getTextureShape()->getValue();
295 }
296 
297 void Mesh::setGlyphLUT(const char * glyphLUT)
298 {
299  mGlyphLUT = glyphLUT;
300  emit meshChanged();
301 }
302 
303 bool Mesh::hasTexture() const
304 {
305  if(mTextureData.getTextureImage()->getValue().isEmpty() || mTextureData.getTextureImage()->getImage() == NULL)
306  return false;
307  else
308  return true;
309 }
310 
312 {
313  if (!this->hasTexture())
314  {
315  mVtkTexture = NULL;
316  if(mVtkPolyDataOriginal)
317  mVtkPolyData = mVtkPolyDataOriginal;
318  return;
319  }
320 
321  //create the texture mapper
322  vtkDataSetAlgorithmPtr tMapper;
323  if(!this->createTextureMapper(tMapper))
324  return;
325 
326  //Get the image data
327  ImagePtr textureImage = mTextureData.getTextureImage()->getImage();
328  vtkImageDataPtr vtkImageData = textureImage->getBaseVtkImageData();
329 
330  //Create the texture
331  mVtkTexture = vtkTexturePtr::New();
332  mVtkTexture->SetRepeat(mTextureData.getRepeat()->getValue());
333  mVtkTexture->SetInputData(vtkImageData);
334 
335  //transform texture coordinates
336  //VTK uses r, s and t coordinates. t is only used for 3D texturing which is not supported by VTK yet.
337  //We map r and s to match the CustusX X and Y directions.
338  vtkTransformTextureCoordsPtr transformTexture = vtkTransformTextureCoordsPtr::New();
339  transformTexture->SetInputConnection(tMapper->GetOutputPort());
340  double posR = this->getTextureData().getPositionX()->getValue();
341  double posS = this->getTextureData().getPositionY()->getValue();
342  transformTexture->SetPosition(-posR, -posS, 0);
343  double scaleR = this->getTextureData().getScaleX()->getValue();
344  double scaleS = this->getTextureData().getScaleY()->getValue();
345  transformTexture->SetScale(scaleR, scaleS, 1);
346  transformTexture->Update();
347 
348  //Update the poly data
349  mVtkPolyData = transformTexture->GetPolyDataOutput();
350 }
351 
352 bool Mesh::createTextureMapper(vtkDataSetAlgorithmPtr &tMapper)
353 {
354  QString textureShape = this->getTextureShape();
355 
356  if (textureShape == mTextureData.getCylinderText())
357  {
358  tMapper = vtkTextureMapToCylinderPtr::New();
359  dynamic_cast<vtkTextureMapToCylinder*>(tMapper.Get())->PreventSeamOn();
360  }
361  else if (textureShape == mTextureData.getPlaneText())
362  {
363  vtkTextureMapToPlanePtr mapper = vtkTextureMapToPlanePtr::New();
364  DoubleBoundingBox3D bb = this->boundingBox();
365  // Explicitly state the plane as the upper xy-plane of the bounding box
366  // The automatic plane generation is not deterministic for square cases.
367  mapper->SetOrigin(bb.corner(0,0,1).data());
368  mapper->SetPoint1(bb.corner(1,0,1).data());
369  mapper->SetPoint2(bb.corner(0,1,1).data());
370 
371  tMapper = mapper;
372  }
373  else if (textureShape == mTextureData.getSphereText())
374  {
375  tMapper = vtkTextureMapToSpherePtr::New();
376  }
377  else
378  {
379  return false;
380  }
381 
382  tMapper->SetInputData(mVtkPolyData);
383  return true;
384 }
385 
387 {
388  return mOrientationArrayList;
389 }
390 
392 {
393  return mColorArrayList;
394 }
395 
397 {
398  return mProperties;
399 }
400 
402 {
403  return mTextureData;
404 }
405 
407 {
408  // getVtkPolyData()->Update();
409  DoubleBoundingBox3D bounds(getVtkPolyData()->GetBounds());
410  return bounds;
411 }
412 
414 {
415  // if transform elements exists, create a copy with entire position inside the polydata:
416  if (similar(transform, Transform3D::Identity()))
417  {
418  vtkPolyDataPtr poly = vtkPolyDataPtr::New();
419  poly->DeepCopy(getVtkPolyData());
420  return poly;
421  }
422 
423  vtkPolyDataPtr poly = vtkPolyDataPtr::New();
424  poly->DeepCopy(getVtkPolyData());
425  vtkPointsPtr points = poly->GetPoints();
426 
427  vtkPointsPtr floatPoints = vtkPointsPtr::New();
428  floatPoints->DeepCopy(points);
429  floatPoints->SetDataTypeToFloat();
430  for (int i = 0; i < poly->GetNumberOfPoints(); ++i)
431  {
432  Vector3D p(points->GetPoint(i));
433  p = transform.coord(p);
434  floatPoints->SetPoint(i, p.begin());
435  }
436  poly->SetPoints(floatPoints.GetPointer());
437  poly->Modified();
438 
439  return poly;
440 }
441 
443 {
445  return poly->GetLines()->GetNumberOfCells() > 0 && poly->GetPolys()->GetNumberOfCells() == 0 && poly->GetStrips()->GetNumberOfCells() == 0;
446 }
447 
448 void Mesh::save(const QString& basePath, FileManagerServicePtr fileManager)
449 {
450  QString filename = basePath + "/Images/" + this->getUid() + ".vtk";
451  this->setFilename(QDir(basePath).relativeFilePath(filename));
452  MeshPtr self = MeshPtr(this, null_deleter());
453  fileManager->save(self, filename);
454 
455 }
456 
457 } // namespace cx
cx::MeshTextureData::getPositionX
DoublePropertyPtr getPositionX() const
Definition: cxMeshTextureData.cpp:106
cx::null_deleter
Definition: cxNullDeleter.h:8
cx::MeshTextureData
Definition: cxMeshTextureData.h:28
cx::Mesh::setIsWireframe
void setIsWireframe(bool on)
Set rep to wireframe, false means surface.
Definition: cxMesh.cpp:66
cx::Mesh::getFrontfaceCulling
bool getFrontfaceCulling()
Get frontface culling.
Definition: cxMesh.cpp:221
cx::Mesh::setBackfaceCullingSlot
void setBackfaceCullingSlot(bool backfaceCulling)
Set backface culling on/off in mesh visualization.
Definition: cxMesh.cpp:205
cx::MeshTextureData::getTextureImage
StringPropertySelectImagePtr getTextureImage() const
Definition: cxMeshTextureData.cpp:131
cxLogger.h
cxFileManagerService.h
cx::MeshPropertyData
Definition: cxMeshPropertyData.h:29
cx::DoubleBoundingBox3D
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,...
Definition: cxBoundingBox3D.h:63
cx::Mesh::setVtkPolyData
void setVtkPolyData(const vtkPolyDataPtr &polyData)
Definition: cxMesh.cpp:92
cx::MeshPropertyData::addXml
void addXml(QDomNode &dataNode)
Definition: cxMeshPropertyData.cpp:121
cx::Data::addXml
virtual void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
Definition: cxData.cpp:123
cx::Mesh::setGlyphLUT
void setGlyphLUT(const char *glyphLUT)
Definition: cxMesh.cpp:297
cx::Mesh::load
virtual bool load(QString path, FileManagerServicePtr filemanager)
Definition: cxMesh.cpp:79
cx::MeshTextureData::getCylinderText
QString getCylinderText() const
Definition: cxMeshTextureData.cpp:96
cx::Mesh::parseXml
virtual void parseXml(QDomNode &dataNode)
Use a XML node to load data.
Definition: cxMesh.cpp:160
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::Mesh::setUseColorFromPolydataScalars
void setUseColorFromPolydataScalars(bool on)
Definition: cxMesh.cpp:195
cx::Mesh::showGlyph
bool showGlyph()
Definition: cxMesh.cpp:237
cxImage.h
cx::Mesh::getBackfaceCulling
bool getBackfaceCulling()
Get backface culling.
Definition: cxMesh.cpp:210
cx::MeshTextureData::parseXml
void parseXml(QDomNode &dataNode)
Definition: cxMeshTextureData.cpp:37
cx::MeshPropertyData::parseXml
void parseXml(QDomNode dataNode)
Definition: cxMeshPropertyData.cpp:130
cx::Mesh::getGlyphLUT
const char * getGlyphLUT()
Definition: cxMesh.cpp:287
cx::MeshTextureData::getPlaneText
QString getPlaneText() const
Definition: cxMeshTextureData.cpp:91
cx::Mesh::setColorArray
void setColorArray(const char *colorArray)
Definition: cxMesh.cpp:281
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoConnectionWidget.h:30
cx::Mesh::setOrientationArray
void setOrientationArray(const char *orientationArray)
Definition: cxMesh.cpp:260
cx::MeshPropertyData::changed
void changed()
cxBoundingBox3D.h
cx::MeshPropertyData::mRepresentation
StringPropertyPtr mRepresentation
Definition: cxMeshPropertyData.h:45
cx::FileManagerServicePtr
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
Definition: cxLogicManager.h:31
cx::Mesh::setFrontfaceCullingSlot
void setFrontfaceCullingSlot(bool backfaceCulling)
Set frontface culling on/off in mesh visualization.
Definition: cxMesh.cpp:215
cx::MeshPropertyData::mVisSize
DoublePropertyPtr mVisSize
Definition: cxMeshPropertyData.h:42
cx::Mesh::create
static MeshPtr create(const QString &uid, const QString &name="", PatientModelServicePtr patientModelService=PatientModelService::getNullObject(), SpaceProviderPtr spaceProvider=SpaceProvider::getNullObject())
Definition: cxMesh.cpp:44
cx::Mesh::setColor
void setColor(const QColor &color)
Set the color of the mesh.
Definition: cxMesh.cpp:185
cx::Mesh::getUseColorFromPolydataScalars
bool getUseColorFromPolydataScalars() const
Definition: cxMesh.cpp:200
cx::Mesh::getTransformedPolyDataCopy
vtkPolyDataPtr getTransformedPolyDataCopy(Transform3D tranform)
Create a new transformed polydata.
Definition: cxMesh.cpp:413
cx::MeshPropertyData::mColor
ColorPropertyPtr mColor
Definition: cxMeshPropertyData.h:39
cx::MeshPropertyData::mFrontfaceCulling
BoolPropertyPtr mFrontfaceCulling
Definition: cxMeshPropertyData.h:44
cx::MeshPtr
boost::shared_ptr< class Mesh > MeshPtr
Definition: cxForwardDeclarations.h:48
cx::Mesh::isFiberBundle
bool isFiberBundle() const
Definition: cxMesh.cpp:442
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cxNullDeleter.h
cx::Mesh::getTextureShape
QString getTextureShape()
Definition: cxMesh.cpp:292
cx::Mesh::hasTexture
bool hasTexture() const
Definition: cxMesh.cpp:303
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::vtkPointsPtr
vtkSmartPointer< vtkPoints > vtkPointsPtr
Definition: cxCenterlineRegistration.h:41
cxTypeConversions.h
cx::Mesh::meshChanged
void meshChanged()
cx::MeshTextureData::getSphereText
QString getSphereText() const
Definition: cxMeshTextureData.cpp:86
cx::Data::setAcquisitionTime
void setAcquisitionTime(QDateTime time)
Definition: cxData.cpp:194
cx::ImagePtr
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
cx::Mesh::getVtkTexture
virtual vtkTexturePtr getVtkTexture() const
Definition: cxMesh.cpp:135
cx::Mesh::getOrientationArray
const char * getOrientationArray()
Definition: cxMesh.cpp:255
cx::MeshTextureData::getTextureShape
StringPropertyPtr getTextureShape() const
Definition: cxMeshTextureData.cpp:136
cxRegistrationTransform.h
cx::vtkPolyDataPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition: cxCenterlineRegistration.h:42
cx::MeshTextureData::getScaleY
DoublePropertyPtr getScaleY() const
Definition: cxMeshTextureData.cpp:121
cx::MeshTextureData::getScaleX
DoublePropertyPtr getScaleX() const
Definition: cxMeshTextureData.cpp:126
cx::Data::getUid
virtual QString getUid() const
Definition: cxData.cpp:64
cx::Mesh::save
virtual void save(const QString &basePath, FileManagerServicePtr fileManager)
Definition: cxMesh.cpp:448
cx::MeshTextureData::addXml
void addXml(QDomNode &dataNode)
Definition: cxMeshTextureData.cpp:28
vtkDataSetAlgorithmPtr
vtkSmartPointer< class vtkDataSetAlgorithm > vtkDataSetAlgorithmPtr
Definition: vtkForwardDeclarations.h:53
vtkTextureMapToPlanePtr
vtkSmartPointer< class vtkTextureMapToPlane > vtkTextureMapToPlanePtr
Definition: vtkForwardDeclarations.h:137
cx::Mesh::getTextureData
const MeshTextureData & getTextureData() const
Definition: cxMesh.cpp:401
cx::Mesh::getOrientationArrayList
QStringList getOrientationArrayList()
Definition: cxMesh.cpp:386
vtkTexturePtr
vtkSmartPointer< class vtkTexture > vtkTexturePtr
Definition: vtkForwardDeclarations.h:140
cx::Mesh::getVisSize
double getVisSize()
Definition: cxMesh.cpp:266
cx::Mesh::updateVtkPolyDataWithTexture
void updateVtkPolyDataWithTexture()
Definition: cxMesh.cpp:311
cx::MeshPropertyData::mUseColorFromPolydataScalars
BoolPropertyBasePtr mUseColorFromPolydataScalars
Definition: cxMeshPropertyData.h:40
cx::Mesh::boundingBox
virtual DoubleBoundingBox3D boundingBox() const
Definition: cxMesh.cpp:406
cx::Mesh::addXml
void addXml(QDomNode &dataNode)
adds xml information about the image and its variabels
Definition: cxMesh.cpp:140
cx::Data::parseXml
virtual void parseXml(QDomNode &dataNode)
Use a XML node to load data.
Definition: cxData.cpp:149
cx::Mesh::getProperties
const MeshPropertyData & getProperties() const
Definition: cxMesh.cpp:396
cx::MeshTextureData::getPositionY
DoublePropertyPtr getPositionY() const
Definition: cxMeshTextureData.cpp:101
cx::Mesh::Mesh
Mesh(const QString &uid, const QString &name="", vtkPolyDataPtr polyData=vtkPolyDataPtr(), PatientModelServicePtr patientModelService=PatientModelService::getNullObject(), SpaceProviderPtr spaceProvider=SpaceProvider::getNullObject())
Definition: cxMesh.cpp:49
cx::Mesh::setShowGlyph
void setShowGlyph(bool val)
Definition: cxMesh.cpp:226
cx::MeshPropertyData::mBackfaceCulling
BoolPropertyPtr mBackfaceCulling
Definition: cxMeshPropertyData.h:43
cx::transform
DoubleBoundingBox3D transform(const Transform3D &m, const DoubleBoundingBox3D &bb)
Definition: cxTransform3D.cpp:150
cx::Data
Superclass for all data objects.
Definition: cxData.h:89
cx::Mesh::hasGlyph
bool hasGlyph()
Definition: cxMesh.cpp:232
cx::Mesh::getVtkPolyData
virtual vtkPolyDataPtr getVtkPolyData() const
Definition: cxMesh.cpp:130
cx::MeshTextureData::changed
void changed()
cx::similar
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
Definition: cxCameraStyleForView.cpp:506
cxMesh.h
cx::Mesh::~Mesh
virtual ~Mesh()
Definition: cxMesh.cpp:62
cx::Mesh::getIsWireframe
bool getIsWireframe() const
true=wireframe, false=surface
Definition: cxMesh.cpp:74
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::Mesh::getColorArrayList
QStringList getColorArrayList()
Definition: cxMesh.cpp:391
cx::Data::setName
void setName(const QString &name)
Definition: cxData.cpp:58
cx::MeshTextureData::getRepeat
BoolPropertyPtr getRepeat() const
Definition: cxMeshTextureData.cpp:111
cx::SpaceProviderPtr
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Definition: cxLogicManager.h:23
cx::Mesh::setVisSize
void setVisSize(double size)
Definition: cxMesh.cpp:271
vtkTransformTextureCoordsPtr
vtkSmartPointer< class vtkTransformTextureCoords > vtkTransformTextureCoordsPtr
Definition: vtkForwardDeclarations.h:144
cx::Mesh::getColor
QColor getColor()
Get the color of the mesh (Values are range 0 - 255)
Definition: cxMesh.cpp:190
cx::Mesh::getColorArray
const char * getColorArray()
Definition: cxMesh.cpp:276
cx::Data::setFilename
virtual void setFilename(QString val)
Definition: cxData.cpp:78