Skip to content
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

Merged

Conversation

K-aniket23
Copy link

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.

@mraduldubey mraduldubey requested a review from abhi9sh May 6, 2024 13:29
base/src/STLRendererSink.cpp Show resolved Hide resolved
{0.0013935305, -0.011261113, 0.1330998} };
public:
SourceModule(SourceModuleProps props = SourceModuleProps()) : Module(SOURCE, "SourceModule", props)
{
Copy link
Collaborator

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Collaborator

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 ()

Comment on lines +24 to +33
{
meshDiffuseColor = _meshDiffuseColor;
meshSpecularCoefficient = _meshSpecularCoefficient;
meshSpecularPower = _meshSpecularPower;
cameraPosition = _cameraPosition;
cameraFocalPoint = _cameraFocalPoint;
winName = _winName;
winWidth = _winWidth;
winHeight = _winHeight;
bkgColor = _bkgColor;
Copy link
Collaborator

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.

Copy link
Author

@K-aniket23 K-aniket23 May 8, 2024

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

base/include/STLRendererSink.h Show resolved Hide resolved
@abhi9sh abhi9sh requested a review from mraduldubey May 8, 2024 11:49
{0.0013935305, -0.011261113, 0.1330998} };
public:
SourceModule(SourceModuleProps props = SourceModuleProps()) : Module(SOURCE, "SourceModule", props)
{
Copy link
Collaborator

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)
{
Copy link
Collaborator

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 ()

@mraduldubey mraduldubey merged commit ffa83c4 into Apra-Labs:vtkIntegrtion Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants