8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshDisplay/SComp/DGroup.h"
10#include "RshDisplay/Display/DCompSelectionModel.h"
11#include "RshPluginScript/SClass/SObject.h"
12#include "RshPluginScript/SClass/SVector3.h"
13#include "RshPluginScript/Script/SEngineManager.h"
14#include "RshPluginScriptInterface/Script/ScriptConvert.h"
17namespace rsh::ScriptBinding
31class RshPluginScriptAPI SComp : public SObject
114 Boolean MoveInsideTopParent
228 static Number SelectDComp(
229 std::type_index iDCompType,
SComp opSelectedComp, rsh::Display::DCompTree ipCompTree);
235class RshPluginScriptAPI
SComp
237 :
public SObjectStatic
258 static Array
FromClick() {
return SComp::GetFromClick<SComp>(SV_COMP); }
264 static Array
FromName( String Name) {
return SComp::GetFromName<SComp>(Name); }
284 return SComp::GetAll<SComp>(VisCrit);
291RSH_SCOMP_STATIC_Q_DECLARE_METATYPE(
SComp, _SCompDummy);
300namespace rsh::Script::ScriptConvert
305template<
typename DCompClass>
306 DCompFromScriptValue( Array _iScriptValue, DCompClass _oDComp)
308 using namespace rsh::Display;
309 using namespace rsh::ScriptBinding;
312 QObject myObj = _iScriptValue.prototype().toQObject();
313 SComp currentScomp =
dynamic_cast<SComp>(myObj);
316 SComp myDcomp = currentScomp->thisDComp(_iScriptValue);
317 _oDComp =
dynamic_cast<DCompClass
>(myDcomp);
324RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SCircle);
325RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SPlane);
326RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SCylinder);
327RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SMultiline);
328RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SPoint);
329RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SPoly);
330RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SCloud);
331RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SLabel);
332RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SSetMultiline);
333RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SLine);
334RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SCone);
335RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SSphere);
336RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SRoundSlot);
337RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SSquareSlot);
338RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SViewSet);
339RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SCADSurface);
340RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SFeature);
341RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SClipping);
342RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SClippingPlane);
343RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SClippingBox);
344RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SReportData);
345RSH_Q_DECLARE_METATYPE_FORWARD(rsh::ScriptBinding::SReport);
The SComp class is an abstract class. Use derived classes SCircle, SCylinder, SCloud,...
Definition: SComp.h:32
SetTransparency(Number Alpha)
Sets the transparency of the component.
Clear()
To deallocate object memory.
Definition: SComp.h:176
SetColors(Number Red, Number Green, Number Blue)
Sets the colors of the component.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SComp.h:276
String GetName()
The component's name.
Array GetBoundingBox()
Calculates the bounding box of the component.
static Array FromName(String Name)
Search all the component with the given name.
Definition: SComp.h:264
Invert()
Normal of the component is inverted.
String GetPath()
To get the full path of a comp in the tree.
Boolean IsInDoc()
Return if the component is in the document or not.
SetName(String ComponentName)
To set the component's name.
Array GetColors()
To get the colors of the component.
RepresentationTypeEnum
The different representation types for inherited classes. Use (inherited class).SMOOTH....
Definition: SComp.h:48
@ INSPECTION
Definition: SComp.h:57
@ FLAT_ROTWIRE
Definition: SComp.h:55
@ SMOOTH
Definition: SComp.h:49
@ TEXTURE
Definition: SComp.h:56
@ FLAT_WIRE
Definition: SComp.h:53
@ FLAT
Definition: SComp.h:50
@ SMOOTH_ROTWIRE
Definition: SComp.h:54
@ WIRE
Definition: SComp.h:51
@ SMOOTH_WIRE
Definition: SComp.h:52
Translate(SVector Vector)
To make a translation of the current object with an SVector.
SetClippable(Boolean clipping)
Set clippable or not.
SetVisibility(Boolean Visible)
Sets the component to be visible, or not visible.
AddToDoc()
To add the object to the document.
SetRepresentationType(RepresentationTypeEnum Representation)
The shading type of the component is modified.
static Array FromSel()
To get all the selected SComp.
String GetFolderName()
The component containing folder's name.
RemoveFromDoc()
To remove the object from the document.
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SComp.h:258
ApplyTransformation(SMatrix iMatrix)
To apply a geometric transformation to the current object by making a product with the given matrix.
MoveToGroup(String GroupPath, Boolean MoveInsideTopParent)
Move the object to the document group represent by the given path. If some groups,...
String toString()
Get the type of the variable.
Matrix with 3 lines and 4 columns to make any transformation. This class should be used in order to a...
Definition: SMatrix.h:21
The mathematical object vector.
Definition: SVector3.h:26