-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the get, set props instead of hardcoded values and directly converting the aprapoint3f to vtkDataArray #350
Added the get, set props instead of hardcoded values and directly converting the aprapoint3f to vtkDataArray #350
Conversation
…verting the aprapoint3f to vtkDataArray
{0.0013935305, -0.011261113, 0.1330998} }; | ||
public: | ||
SourceModule(SourceModuleProps props = SourceModuleProps()) : Module(SOURCE, "SourceModule", props) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider putting this data into some file and read it. @mraduldubey need you comments on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, should be read from file. Best way is to use vtk itself to read and iterate over the vtkarray to give the points when source module does step ()
{ | ||
meshDiffuseColor = _meshDiffuseColor; | ||
meshSpecularCoefficient = _meshSpecularCoefficient; | ||
meshSpecularPower = _meshSpecularPower; | ||
cameraPosition = _cameraPosition; | ||
cameraFocalPoint = _cameraFocalPoint; | ||
winName = _winName; | ||
winWidth = _winWidth; | ||
winHeight = _winHeight; | ||
bkgColor = _bkgColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider initializing member variables in the constructor's initialization list rather than assigning them in the constructor body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i do this as it would not be more clean and clear code @mraduldubey
{0.0013935305, -0.011261113, 0.1330998} }; | ||
public: | ||
SourceModule(SourceModuleProps props = SourceModuleProps()) : Module(SOURCE, "SourceModule", props) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
{0.0013935305, -0.011261113, 0.1330998} }; | ||
public: | ||
SourceModule(SourceModuleProps props = SourceModuleProps()) : Module(SOURCE, "SourceModule", props) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, should be read from file. Best way is to use vtk itself to read and iterate over the vtkarray to give the points when source module does step ()
Title: Enhance vtkIntegartion Module: Data Handling and Property Management
Description:
This pull request enhances the VTK module by improving data handling efficiency and flexibility:
1: Employed VTK functions to copy data from aprapoints3f to a vtkArray, eliminating the need to copy data from aprapoints3f to vtkPoints using a for loop.
2: Added getProps and setProps functions to replace hardcoded values for properties, enhancing flexibility.
3: Implemented unit tests to evaluate the functionality of the newly added get and setProps functions.