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

feat(cpp): add light manager #749

Merged
merged 2 commits into from
Mar 28, 2019
Merged

Conversation

karjonas
Copy link
Contributor

  • Add a light manager to the scene
  • Add spotlight and quadlight light sources, only supported in OSPRay for now
  • Expose adding/removing of lights as RPCs

@karjonas karjonas requested review from tribal-tec and hernando March 21, 2019 11:11
@karjonas karjonas force-pushed the light_manager branch 2 times, most recently from 179abcd to 160912d Compare March 21, 2019 11:53
Copy link
Contributor

@hernando hernando left a comment

Choose a reason for hiding this comment

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

Here you have my last (partial) code review for you. I hope you enjoy it as usually 😉


/**
* @brief addQuadLight Creates a quad light. The quad light is a planar,
* procedural area light source emitting uniformly on one side into the
Copy link
Contributor

Choose a reason for hiding this comment

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

procedural?


/**
* @brief addQuadLight Creates a quad light. The quad light is a planar,
* procedural area light source emitting uniformly on one side into the
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not entirely clear to me. If each point in the light surface emit uniformly in the half-space, the integral over the area doesn't produce a uniform distribution over a solid angle (as I understand the sphere light does). For that to happen the area needs to be infinite. I would be more careful with the wording.

* Add a light manager to the scene
* Add spotlight and quadlight light sources, only supported in OSPRay for now
* Expose adding/removing of lights as RPCs
@karjonas
Copy link
Contributor Author

I rewrote this PR a bit so that each light is actually a different class without any property map. The light manager now stores the ids for the added lights. The lights serialization is done with a generic RPCLight class which is populated in the rockets plugin.

@karjonas karjonas merged commit 0aa570b into BlueBrain:master Mar 28, 2019
@karjonas karjonas deleted the light_manager branch March 28, 2019 16:46
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

2 participants