60 #include "SplatCloudObjectSelectionPlugin.hh" 74 if( _vertexList.empty() )
return;
78 emit log(
LOGERR,tr(
"selectVertices: unable to get object"));
85 emit log(
LOGERR,tr(
"selectAllVertices: Unsupported object Type"));
89 QString selection =
"selectVertices(ObjectId, [ " + QString::number(_vertexList[0]);
91 for (uint i = 1 ; i < _vertexList.size(); ++i) {
92 selection +=
", " + QString::number(_vertexList[i]);
98 emit scriptInfo(selection);
107 if( _vertexList.empty() )
return;
111 emit log(
LOGERR,tr(
"unselectVertices: unable to get object"));
118 emit log(
LOGERR,tr(
"unselectVertices: Unsupported object Type"));
122 QString selection =
"unselectVertices(ObjectId, [ " + QString::number(_vertexList[0]);
124 for (uint i = 1 ; i < _vertexList.size(); ++i) {
125 selection +=
", " + QString::number(_vertexList[i]);
131 emit scriptInfo(selection);
142 emit log(
LOGERR,tr(
"selectAllVertices: unable to get object"));
149 emit log(
LOGERR,tr(
"selectAllVertices: Unsupported object Type"));
154 emit scriptInfo(
"selectAllVertices(ObjectId)");
165 emit log(
LOGERR,tr(
"clearVertexSelection: unable to get object"));
172 emit log(
LOGERR,tr(
"clearVertexSelection: Unsupported object Type"));
177 emit scriptInfo(
"clearVertexSelection(ObjectId)");
188 emit log(
LOGERR,tr(
"invertVertexSelection: unable to get object"));
195 emit log(
LOGERR,tr(
"invertVertexSelection: Unsupported object Type"));
200 emit scriptInfo(
"invertVertexSelection(ObjectId)");
211 emit log(
LOGERR,tr(
"getVertexSelection: unable to get object"));
215 emit scriptInfo(
"getVertexSelection(ObjectId)");
220 emit log(
LOGERR,tr(
"getVertexSelection: Unsupported object Type"));
235 emit log(
LOGERR,tr(
"deleteVertexSelection: unable to get object"));
242 emit log(
LOGERR,tr(
"deleteVertexSelection: Unsupported object Type"));
247 emit scriptInfo(
"deleteVertexSelection(ObjectId)");
258 emit log(
LOGERR,
"colorizeVertexSelection: unable to get object");
265 emit log(
LOGERR,
"colorizeVertexSelection: Unsupported object Type");
269 emit scriptInfo(
"colorizeVertexSelection(ObjectId, " 270 + QString::number(r) +
", " + QString::number(g) +
", " + QString::number(b) +
")");
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
SelectionInterface::PrimitiveType vertexType_
Primitive type handle.
void splatCloudColorizeSelection(SplatCloud *_splatCloud, PrimitiveType _primitiveTypes, int _r, int _g, int _b, int _a)
Colorize the selection.
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
void deleteVertexSelection(int _objectId)
Delete vertices that are currently selected.
void colorizeVertexSelection(int _objectId, int _r, int _g, int _b, int _a)
Colorize the vertex selection.
void selectAllVertices(int _objectId)
Select all vertices.
bool dataType(DataType _type) const
std::vector< int > IdList
Standard Type for id Lists used for scripting.
void invertVertexSelection(int _objectId)
Invert the current vertex selection.
IdList getVertexSelection(int _objectId)
Return a list of all selected vertices.
SplatCloud * splatCloud(BaseObjectData *_object)
Get a SplatCloud from an object.
void selectVertices(int _objectId, IdList _vertexList)
Select given vertices.
bool splatCloudDeleteSelection(SplatCloud *_splatCloud, PrimitiveType _primitiveType)
Delete all selected elements of a SplatCloud.
void unselectVertices(int _objectId, IdList _vertexList)
Unselect given vertices.
void clearVertexSelection(int _objectId)
Unselect all vertices.
const UpdateType UPDATE_COLOR(UpdateTypeSet(1024))
Colors have changed.
Functions for selection on a SplatCloud.
const UpdateType UPDATE_SELECTION_VERTICES(UpdateTypeSet(32))
Vertex selection has changed.