-
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
Vtk integrtion #308
base: main
Are you sure you want to change the base?
Vtk integrtion #308
Conversation
There is a extra commit, I need to remove it. |
…into vtkIntegrtion
Add the capability to reset camera |
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.
We copy data twice
- From stl / file / points to ApraPoint3Df
- ApraPoint3Df to VTK
Let us find a way to structure ApraPoint3df so that it can go into VTK without copying.
base/include/STLRendererSink.h
Outdated
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 }; |
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.
Move to props
meshActor->GetProperty()->SetSpecular(mProps.meshSpecularCoefficient); | ||
meshActor->GetProperty()->SetSpecularPower(mProps.meshSpecularPower); | ||
|
||
// rendering |
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.
Please reuse window, window interactor and camera. You can use change props to handle changes in window and camera properties.
base/test/stlrenderer_tests.cpp
Outdated
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.
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
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