Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SClippingBox.h
1
2
3
5
6#pragma once
7
8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshPluginScript/SClass/SClipping.h"
10
11#ifndef FCT_DOC
12namespace rsh::ScriptBinding
13{
14#endif // !FCT_DOC
15
24class SClippingBox : public SClipping
25{
26 //======================================================================================================================
27 // INTERNAL FUNCTION
28 //======================================================================================================================
29
30 //======================================================================================================================
31 // DOCUMENTED FUNCTION
32 //======================================================================================================================
33
34public slots: // these functions (slots) will be available in QtScript
35
38 Number GetVolume() { return thisDComp()->Volume(); }
39
42 SPoint GetCenter() { return new SPoint(thisDComp()->Center()); }
43
46 SetCenter(SPoint iNewCenter
48 )
49 {
50 thisDComp()->SetCenter(iNewCenter->Point);
51 }
52
55 inline Number GetLength() { return thisDComp()->Length(); }
56
59 SetLength(Number iLength
61 )
62 {
63 thisDComp()->SetLength(iLength);
64 }
65
68 inline Number GetWidth() { return thisDComp()->Width(); }
69
72 SetWidth(Number iWidth
74 )
75 {
76 thisDComp()->SetWidth(iWidth);
77 }
78
81 inline Number GetHeight() { return thisDComp()->Height(); }
82
85 SetHeight(Number iHeight
87 )
88 {
89 thisDComp()->SetHeight(iHeight);
90 }
91
94 SVector GetAxisX() { return thisDComp()->AxisX(); }
95
98 SVector GetAxisY() { return thisDComp()->AxisY(); }
99
102 SVector GetAxisZ() { return thisDComp()->AxisZ(); }
103
117
120 String toString() ;
121};
122
123// @brief
124// this class allow to wrap static function to SClippingBox easily
125// this allow to wrap constructor more easily the constructor will be declared with the function New(...)
126class SClippingBox
127#ifndef FCT_DOC
128 : public SObjectStatic
129#endif // FCT_DOC
130{
131 //======================================================================================================================
132 // INTERNAL FUNCTION
133 //======================================================================================================================
134
135 //======================================================================================================================
136 // DOCUMENTED FUNCTION
137 //======================================================================================================================
138
139public slots:
140
141#ifdef FCT_DOC
145
151 static SClippingBox New( Array<SComp> TblElm);
155 SPoint iFirstPt,
157 SPoint iSecondPt,
159 SPoint iThirdPt,
161 SPoint iFourthPt
163 );
164#else
165 static Array New(
166 QScriptContext ipContext,
168 QScriptEngine ipEngine
170 );
171#endif
172
176 // TESTED
177 static Array FromName( String Name) { return SComp::GetFromName<SClippingBox>(Name); }
178
188 static Array FromClick() { return SComp::GetFromClick<SClippingBox>(SV_CLIPPINGBOX); }
189
193 // TESTED
194 static Array FromSel();
195
199 // TESTED
200 static Array All(
201 Number VisCrit
206 )
207 {
208 return SComp::GetAll<SClippingBox>(VisCrit);
209 }
210
213 static String toString();
214};
215Q_DECLARE_METATYPE(SClippingBox::_SClippingBoxDummy);
216Q_DECLARE_METATYPE(SClippingBox);
217
218#ifndef FCT_DOC
219} // namespace rsh::ScriptBinding
220#endif // !FCT_DOC
ClippingBox manipulation class. The SClippingBox creation can be done by calling the static functions...
Definition: SClippingBox.h:25
SPoint GetLowerPoint()
Returns the lower point of the clipping box.
String toString()
Get the type of the variable.
Number GetHeight()
Definition: SClippingBox.h:81
SetWidth(Number iWidth)
Set the width (extent along the Y axis) for the clipping box.
Definition: SClippingBox.h:72
static String toString()
Get the type of the variable.
Number GetLength()
Definition: SClippingBox.h:55
SetHeight(Number iHeight)
Set the height (extent along the Z axis) for the clipping box.
Definition: SClippingBox.h:85
SPoint GetUpperPoint()
Returns the upper point of the clipping box.
SVector GetAxisY()
Definition: SClippingBox.h:98
static SClippingBox New()
Default constructor to create a default clipping box of size 1.
SVector GetAxisZ()
Definition: SClippingBox.h:102
static SClippingBox New(SPoint iFirstPt, SPoint iSecondPt, SPoint iThirdPt, SPoint iFourthPt)
Constructs a new SClippingBox by 3 points.
SetLength(Number iLength)
Set the length (extent along the X axis) for the clipping box.
Definition: SClippingBox.h:59
SPoint GetCenter()
Set the center of the clipping box.
Definition: SClippingBox.h:42
Number GetVolume()
Definition: SClippingBox.h:38
static SClippingBox New(SClippingBox Other)
Constructs an SBox by copying the SClippingBox Other.
SetCenter(SPoint iNewCenter)
Set the center of the clipping box.
Definition: SClippingBox.h:46
Number GetWidth()
Definition: SClippingBox.h:68
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SClippingBox.h:188
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SClippingBox.h:200
static SClippingBox New(Array< SComp > TblElm)
Constructs a new SClippingBox corresponding to the bounding box of all the table of element.
static Array FromSel()
To get all the selected SComp.
SVector GetAxisX()
Definition: SClippingBox.h:94
static Array FromName(String Name)
Search all the component with the given name.
Definition: SClippingBox.h:177
The SClipping class is an abstract class.
Definition: SClipping.h:20
3D point manipulation class. The SPoint creation can be done by calling the static functions:
Definition: SPoint.h:23
The mathematical object vector.
Definition: SVector3.h:26