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

Vtk integrtion #308

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Vtk integrtion #308

wants to merge 16 commits into from

Conversation

mraduldubey
Copy link
Collaborator

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #296

Description

Implemented first version of STLRendererSink Module

Alternative(s) considered

None

Type

Type Choose one: Feature

Checklist

  • I have read the Contribution Guidelines
  • I have written Unit Tests
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach

@mraduldubey
Copy link
Collaborator Author

There is a extra commit, I need to remove it.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Test Results Linux-CudaT

    1 files  ±0      1 suites  ±0   10m 25s ⏱️ -1s
405 tests +1  237 ✔️ ±0  168 💤 +1  0 ±0 
237 runs  ±0    69 ✔️  - 1  168 💤 +1  0 ±0 

Results for commit 92818b8. ± Comparison against base commit 2991073.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Test Results Linux_ARM64

    1 files  ±0      1 suites  ±0   10m 44s ⏱️ -1s
427 tests +1  262 ✔️ ±0  165 💤 +1  0 ±0 
262 runs  ±0    97 ✔️  - 1  165 💤 +1  0 ±0 

Results for commit 92818b8. ± Comparison against base commit 2991073.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Test Results Linux

    1 files  ±0      1 suites  ±0   10m 24s ⏱️ -1s
304 tests +1  230 ✔️ ±0  74 💤 +1  0 ±0 
230 runs  ±0  156 ✔️  - 1  74 💤 +1  0 ±0 

Results for commit 92818b8. ± Comparison against base commit 2991073.

♻️ This comment has been updated with latest results.

base/include/STLRendererSink.h Outdated Show resolved Hide resolved
base/src/STLRendererSink.cpp Outdated Show resolved Hide resolved
base/src/STLRendererSink.cpp Outdated Show resolved Hide resolved
base/src/STLRendererSink.cpp Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Test Results Windows-cuda

    1 files  ±0      1 suites  ±0   12m 45s ⏱️ +2s
401 tests +1  293 ✔️ ±0  108 💤 +1  0 ±0 
293 runs  ±0  185 ✔️  - 1  108 💤 +1  0 ±0 

Results for commit 92818b8. ± Comparison against base commit 2991073.

♻️ This comment has been updated with latest results.

@mraduldubey
Copy link
Collaborator Author

Add the capability to reset camera

Copy link
Collaborator

@joiskash joiskash left a comment

Choose a reason for hiding this comment

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

We copy data twice

  1. From stl / file / points to ApraPoint3Df
  2. ApraPoint3Df to VTK
    Let us find a way to structure ApraPoint3df so that it can go into VTK without copying.

Comment on lines 31 to 54
double meshDiffuseColor[3] = { 176, 196, 222 }; // LightSteelBlue = {0.69, 0.76, 0.87}

/* Specular Lighting
https://ogldev.org/www/tutorial19/tutorial19.html
[[R_spec], [[R_light], [[R_Surface],
[G_spec], = [G_light], * [G_Surface], * M * (R.V)^p
[B_spec]] [B_light]] [B_Surface]]
*/

// Describes the intensity of specular highlight prop of the object(M). Range: [0-1]
double meshSpecularCoefficient = 0.3;
// Describes the shininess factor(p)
double meshSpecularPower = 60.0;

int cameraPosition[3] = { 10, 10, 10 };
int cameraFocalPoint[3] = { 10, 10, 10 };

std::string winName = "STL_Renderer";

int winWidth = 600;
int winHeight = 600;

// Background color. def: DarkOliveGreen
double bkgColor[3] = { 85, 107, 47 };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move to props

meshActor->GetProperty()->SetSpecular(mProps.meshSpecularCoefficient);
meshActor->GetProperty()->SetSpecularPower(mProps.meshSpecularPower);

// rendering
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please reuse window, window interactor and camera. You can use change props to handle changes in window and camera properties.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Move the data to another cpp file or use VTK primitives for a known shape.

…verting the aprapoint3f to vtkDataArray (#350)

* Added the get, set props instead of hardcoded values and directly converting the aprapoint3f to vtkDataArray

* added PipeLine to run the tests. change data and props
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.

Implement a 3D Renderer Module
3 participants