6#ifndef VIEWER_MODELPART_H
7#define VIEWER_MODELPART_H
13#include <vtkSmartPointer.h>
16#include <vtkSTLReader.h>
18#include <vtkShrinkFilter.h>
19#include <vtkClipDataSet.h>
21#include <vtkDataSetMapper.h>
22#include <vtkDataSet.h>
104 void setColour(
const unsigned char R,
const unsigned char G,
const unsigned char B);
235 unsigned char colourR;
236 unsigned char colourG;
237 unsigned char colourB;
249 bool applyShrinkFilter;
250 double shrinkFilterFactor;
254 bool applyClipFilter;
256 double clipFilterValue;
257 bool invertClipFilter;
Represents one CAD model part in the application.
Definition ModelPart.h:30
int row() const
Gets this item's row number relative to its parent.
Definition ModelPart.cpp:112
int clipAxis() const
Gets the axis used by the clip filter.
Definition ModelPart.cpp:290
~ModelPart()
Deletes the model part and its child items.
Definition ModelPart.cpp:48
vtkSmartPointer< vtkActor > getNewActor()
Creates a separate actor for VR rendering.
Definition ModelPart.cpp:463
QVariant data(int column) const
Gets the data stored in a given column.
Definition ModelPart.cpp:83
void updatePipeline()
Updates the main VTK rendering pipeline after filter/property changes.
Definition ModelPart.cpp:174
double clipValue() const
Gets the clip filter value.
Definition ModelPart.cpp:295
unsigned char getColourB()
Gets the green colour value.
Definition ModelPart.cpp:141
void set(int column, const QVariant &value)
Sets the data stored in a given column.
Definition ModelPart.cpp:95
bool shrinkFilterEnabled() const
Checks whether the shrink filter is enabled.
Definition ModelPart.cpp:263
vtkSmartPointer< vtkActor > getActor()
Gets the actor used for normal GUI rendering.
Definition ModelPart.cpp:340
unsigned char getColourG()
Gets the green colour value.
Definition ModelPart.cpp:137
double shrinkFactor() const
Gets the shrink filter factor.
Definition ModelPart.cpp:268
void appendChild(ModelPart *item)
Adds a child item to this model part.
Definition ModelPart.cpp:53
void setClipFilter(bool enabled, int axis, double value, bool invert)
Sets the clip filter used for rendering.
Definition ModelPart.cpp:274
void setShrinkFilter(bool enabled, double factor)
Sets the shrink filter used for rendering.
Definition ModelPart.cpp:253
bool clipFilterEnabled() const
Checks whether the clip filter is enabled.
Definition ModelPart.cpp:285
bool visible()
Gets whether the model part is visible.
Definition ModelPart.cpp:167
void loadSTL(QString fileName)
Loads an STL file for this model part.
Definition ModelPart.cpp:305
int columnCount() const
Gets the number of data columns.
Definition ModelPart.cpp:77
void updateVRPipeline()
Updates the VR rendering pipeline after filter/property changes.
Definition ModelPart.cpp:351
void setVisible(bool isVisible)
Sets whether the model part is visible.
Definition ModelPart.cpp:147
ModelPart * parentItem()
Gets the parent item.
Definition ModelPart.cpp:105
bool clipInvert() const
Checks whether the clip filter is inverted.
Definition ModelPart.cpp:300
void setColour(const unsigned char R, const unsigned char G, const unsigned char B)
Sets the RGB colour of the model part.
Definition ModelPart.cpp:122
int childCount() const
Gets the number of child items.
Definition ModelPart.cpp:70
bool removeChild(int row)
Removes a child item at a given row.
Definition ModelPart.cpp:331
unsigned char getColourR()
Gets the red colour value.
Definition ModelPart.cpp:133
ModelPart * child(int row)
Gets the child item at a given row.
Definition ModelPart.cpp:62