Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SClippingPlane.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
24{
25 //======================================================================================================================
26 // INTERNAL FUNCTION
27 //======================================================================================================================
28
29 //======================================================================================================================
30 // DOCUMENTED FUNCTION
31 //======================================================================================================================
32
33public slots: // these functions (slots) will be available in QtScript
34
45 SMatrix Move(Number iDistance)
46 {
47 return SMatrix(
48 new SMatrix(thisDComp()->Move(iDistance)));
49 }
50
54 SPoint iTargetPoint,
56 Boolean iReprojectPoint
59 )
60 {
61 return SMatrix(
62 new SMatrix(thisDComp()->MoveInDirectionOf(iTargetPoint, iReprojectPoint)));
63 }
64
71 SPoint GetPosition() { return new SPoint(thisDComp()->GetPosition()); }
72
79 SetPosition(SPoint iNewCenter
81 )
82 {
83 thisDComp()->SetPosition(iNewCenter->Point);
84 }
85
90 Array GetDirection() ;
91
95 SVector iNormal,
97 SVector iXDir
99 )
100 {
101 return thisDComp()->SetDirection(iNormal, iXDir);
102 }
103
109 inline Number GetDepth() { return thisDComp()->GetDepth(); }
110
113 SetDepth(Number iStep
117 )
118 {
119 thisDComp()->SetDepth(iStep);
120 }
121
127 inline Number GetStep() { return thisDComp()->GetStep(); }
128
131 SetStep(Number iDepth
135 )
136 {
137 thisDComp()->SetStep(iDepth);
138 }
139
142 inline Boolean HasPath() { return thisDComp()->HasPath(); }
143
148 inline Number GetCurvilinearAbscissa() { return thisDComp()->GetCurvilinearAbscissa(); }
149
152 Array GetPath() ;
153
156 String toString() ;
157};
158
159// @brief
160// this class allow to wrap static function to SClippingPlane easily
161// this allow to wrap constructor more easily the constructor will be declared with the function New(...)
162class SClippingPlane
163#ifndef FCT_DOC
164 : public SObjectStatic
165#endif // FCT_DOC
166{
167 //======================================================================================================================
168 // INTERNAL FUNCTION
169 //======================================================================================================================
170
171 //======================================================================================================================
172 // DOCUMENTED FUNCTION
173 //======================================================================================================================
174
175public slots:
176
177#ifdef FCT_DOC
181
187 static SClippingPlane New( SPlane _iPlane);
194 SPoint iCenter,
196 SVector iNormal
198 );
199#else
200 static Array New(
201 QScriptContext ipContext,
203 QScriptEngine ipEngine
205 );
206#endif
207
211 // TESTED
212 static Array FromName( String Name) { return SComp::GetFromName<SClippingPlane>(Name); }
213
223 static Array FromClick() { return SComp::GetFromClick<SClippingPlane>(SV_CLIPPINGPLANE); }
224
228 // TESTED
229 static Array FromSel();
230
234 // TESTED
235 static Array All(
236 Number VisCrit
241 )
242 {
243 return SComp::GetAll<SClippingPlane>(VisCrit);
244 }
245
248 static String toString();
249};
250Q_DECLARE_METATYPE(SClippingPlane::_SClippingPlaneDummy);
251Q_DECLARE_METATYPE(SClippingPlane);
252
253#ifndef FCT_DOC
254} // namespace rsh::ScriptBinding
255#endif // !FCT_DOC
The SClipping class is an abstract class.
Definition: SClipping.h:20
ClippingPlane manipulation class. The SClippingPlane creation can be done by calling the static funct...
Definition: SClippingPlane.h:24
Number GetCurvilinearAbscissa()
Get the current curvilinear abscissa of the plane along its path.
Definition: SClippingPlane.h:148
static SClippingPlane New(SPoint iCenter, SVector iNormal)
Constructs a new SClippingPlane by defining its data.
static SClippingPlane New(SMultiline _iPath)
Constructs a new SClippingPlane by defining its path.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SClippingPlane.h:235
Number GetDepth()
Get the depth of the clipping plane.
Definition: SClippingPlane.h:109
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SClippingPlane.h:223
SMatrix Move(Number iDistance)
Move the clipping plane to a certain distance along its normal or its path if defined.
Definition: SClippingPlane.h:45
Number GetStep()
Get the step of the clipping plane.
Definition: SClippingPlane.h:127
SetDirection(SVector iNormal, SVector iXDir)
Set the normal of the clipping plane.
Definition: SClippingPlane.h:94
SPoint GetPosition()
Set the center of the clipping plane.
Definition: SClippingPlane.h:71
Array GetPath()
Get the path of the clipping plane as a polyline.
static SClippingPlane New()
Default constructor to create an empty new SClippingPlane.
static SClippingPlane New(SClippingPlane _iOther)
Constructs an SPlane by copying the SClippingPlane Other.
SetDepth(Number iStep)
Set the depth for the clipping plane.
Definition: SClippingPlane.h:113
SetStep(Number iDepth)
Set the step for the clipping plane.
Definition: SClippingPlane.h:131
SetPosition(SPoint iNewCenter)
Set the center of the clipping plane.
Definition: SClippingPlane.h:79
SMatrix MoveInDirectionOf(SPoint iTargetPoint, Boolean iReprojectPoint)
Move the clipping plane in direction of a given point along its normal or its path if defined.
Definition: SClippingPlane.h:53
static Array FromSel()
To get all the selected SComp.
Boolean HasPath()
Does the clipping have a path?
Definition: SClippingPlane.h:142
static SClippingPlane New(SPlane _iPlane)
Constructs a new SClippingPlane by defining its plane.
Array GetDirection()
Get the directions of the clipping plane.
static Array FromName(String Name)
Search all the component with the given name.
Definition: SClippingPlane.h:212
String toString()
Get the type of the variable.
static 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
Class to store a multiline, that is: an ordered list of points. The SMultiline creation can be done b...
Definition: SMultiLine.h:24
Plane manipulation class. The SPlane creation can be done by calling the static functions: .
Definition: SPlane.h:24
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