Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SClipping.h
1
2
3
5
6#pragma once
7
8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshPluginScript/SClass/SComp.h"
10#include "RshPluginScriptInterface/Script/ScriptDefine.h"
11
12#ifndef FCT_DOC
13namespace rsh::ScriptBinding
14{
15#endif // !FCT_DOC
16
19class SClipping : public SComp
20{
21 //======================================================================================================================
22 // INTERNAL FUNCTION
23 //======================================================================================================================
24
25 //======================================================================================================================
26 // DOCUMENTED FUNCTION
27 //======================================================================================================================
28
29public slots: // these functions (slots) will be available in QtScript
30
33 inline Clip(SComp Comp)
34 {
35 if(Comp)
36 thisDComp()->Clip(Comp);
37 else
38 rsh::Script::ParamIsInvalid<SComp>();
39 }
40
43 inline ClipTable( Array<SComp> CompTable)
44 {
45 thisDComp()->Clip(CompTable);
46 }
47
50 inline ClipAll() { thisDComp()->ClipAll(); }
51
54 inline Unclip(SComp Comp)
55 {
56 if(Comp)
57 thisDComp()->Unclip(Comp);
58 else
59 rsh::Script::ParamIsInvalid<SComp>();
60 }
61
64 inline UnclipTable( Array<SComp> CompTable)
65 {
66 thisDComp()->Unclip(CompTable);
67 }
68
71 inline UnclipAll() { thisDComp()->UnclipAll(); }
72
75 ActivateInScene(uint iSceneIndex);
76
79 inline ActivateInAllScenes() { thisDComp()->ActivateInAllScenes(); }
80
83 DeactivateInScene(uint iSceneIndex);
84
87 inline DeactivateInAllScenes() { thisDComp()->DeactivateInAllScenes(); }
88
91 String toString() ;
92};
93
94// @brief
95// This class allows to wrap static functions to SClipping easily.
96// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
97class SClipping
98#ifndef FCT_DOC
99 : public SObjectStatic
100#endif // FCT_DOC
101{
102 //======================================================================================================================
103 // INTERNAL FUNCTION
104 //======================================================================================================================
105
106 //======================================================================================================================
107 // DOCUMENTED FUNCTION
108 //======================================================================================================================
109public slots:
110
120 static Array FromClick() { return SComp::GetFromClick<SClippingBase>(SV_CLIPPING); }
121
125 // TESTED
126 static Array FromName( String Name) { return SComp::GetFromName<SClippingBase>(Name); }
127
131 // TESTED
132 static Array FromSel();
133
137 // TESTED
138 static Array All(
139 Number VisCrit
144 )
145 {
146 return SComp::GetAll<SClippingBase>(VisCrit);
147 }
148
152 static Array GetAllActivated(
153 Number VisCrit
158 );
159
162 static String toString();
163};
164RSH_SCOMP_STATIC_Q_DECLARE_METATYPE(SClipping, _SClippingDummy);
165
166#ifndef FCT_DOC
167} // namespace rsh::ScriptBinding
168#endif // !FCT_DOC
The SClipping class is an abstract class.
Definition: SClipping.h:20
static Array FromName(String Name)
Search all the component with the given name.
Definition: SClipping.h:126
Unclip(SComp Comp)
Unclip a SComp.
Definition: SClipping.h:54
static Array FromClick()
Launches a click interaction to select a SClipping in the scene.
Definition: SClipping.h:120
ClipAll()
Clip all SComp in the current document.
Definition: SClipping.h:50
static Array GetAllActivated(Number VisCrit)
To get all activated SClipping in the document in the current scene.
static String toString()
Get the type of the variable.
static Array All(Number VisCrit)
To get all the SClipping in the document.
Definition: SClipping.h:138
ClipTable(Array< SComp > CompTable)
Clip a table of SComp.
Definition: SClipping.h:43
UnclipAll()
Unclip all SComp in the current document.
Definition: SClipping.h:71
Clip(SComp Comp)
Clip a SComp.
Definition: SClipping.h:33
static Array FromSel()
To get all the selected SClipping.
ActivateInScene(uint iSceneIndex)
Activate the clipping object in a given scene.
DeactivateInScene(uint iSceneIndex)
Deactivate the clipping object in a given scene.
ActivateInAllScenes()
Activate the clipping object in all scenes of its document.
Definition: SClipping.h:79
DeactivateInAllScenes()
Deactivate the clipping object in all scenes of its document.
Definition: SClipping.h:87
String toString()
Get the type of the variable.
UnclipTable(Array< SComp > CompTable)
Unclip a table of SComp.
Definition: SClipping.h:64
The SComp class is an abstract class. Use derived classes SCircle, SCylinder, SCloud,...
Definition: SComp.h:32