Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2021.
SCloudIterator Class Reference

This class allow the user to access to cloud coordinate. More...

Inheritance diagram for SCloudIterator:
SObject

Public Slots

Array GetColor ()
 Returns color of the point.
If no color is stored in the cloud, GetColor will return -1, -1, -1. More...
 
Number GetDeviation ()
 
Boolean GetNext ()
 This function will update iterator with the next point of the cloud. More...
 
SPoint GetPt ()
 
Boolean IsValid ()
 
String toString ()
 Get the type of the variable. More...
 
- Public Slots inherited from SObject
 Clear ()
 To deallocate memory of the object. More...
 
String toString ()
 Get the type of the variable. More...
 

Public Member Functions

 SCloudIterator (SCloud _iCloud)
 
 ~SCloudIterator ()
 

Public Attributes

rsh::Data::Cloud::GCTYPE m_CloudType
 
SPoint m_CurrentPt
 
Number m_Deviation
 
SCloud::Iterator m_Iter
 
Number m_MaxVal
 
Number m_MinVal
 

Detailed Description

This class allow the user to access to cloud coordinate.

This class will store an iterator to a cloud for the script To parse a cloud and store the current iterate point in a separate point.

Warning
this can really increase the time of your script if the cloud is important
Note
To get iterator on a cloud, you must call:
var iter = myCloud.GetIterator();
This is how you can parse a cloud and print point coordinate:
var it = myCloud.GetIterator();
if (it.IsValid())
{
var currentPt;
do{
currentPt = it.GetPt();
print(it.GetDeviation());
print("X: " + currentPt.GetX() + ",Y: " + currentPt.GetY() + ",Z: " + currentPt.GetZ());
}
while(it.GetNext())
}

Constructor & Destructor Documentation

◆ SCloudIterator()

SCloudIterator::SCloudIterator ( SCloud  _iCloud)

◆ ~SCloudIterator()

SCloudIterator::~SCloudIterator ( )
inline

Member Function Documentation

◆ GetColor

Array SCloudIterator::GetColor ( )
slot

Returns color of the point.
If no color is stored in the cloud, GetColor will return -1, -1, -1.

Remarks
To convert a colormap of inspection into a color, use SColorGradient::GetColorFromValue()
Return values
Array.ErrorCodeThe error code.
  • 0 OK, no error
  • 1 Index of the cursor is invalid
Array.RedThe undefined red color between [0-1]
Array.GreenThe undefined green color between [0-1]
Array.BlueThe undefined blue color between [0-1]

◆ GetDeviation

Number SCloudIterator::GetDeviation ( )
slot
Return values
Returnsdeviation of the point
If no deviation is stored in the cloud GetDeviation will return an UndefinedValue

◆ GetNext

Boolean SCloudIterator::GetNext ( )
slot

This function will update iterator with the next point of the cloud.

Return values
trueif the next point is found (has not reached the end of the cloud)
falseif there is no more point to parse

◆ GetPt

SPoint SCloudIterator::GetPt ( )
slot
Return values
pointassociated with the iterator
Note
each time you call GetNext() this value will be updated

◆ IsValid

Boolean SCloudIterator::IsValid ( )
slot
Return values
trueif the iterator is valid (has not reached the end of the cloud)
falseif there is no more point to parse

◆ toString

String SCloudIterator::toString ( )
slot

Get the type of the variable.

Member Data Documentation

◆ m_CloudType

rsh::Data::Cloud::GCTYPE SCloudIterator::m_CloudType

◆ m_CurrentPt

SPoint SCloudIterator::m_CurrentPt

◆ m_Deviation

Number SCloudIterator::m_Deviation

◆ m_Iter

SCloud::Iterator SCloudIterator::m_Iter

◆ m_MaxVal

Number SCloudIterator::m_MaxVal

◆ m_MinVal

Number SCloudIterator::m_MinVal