-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add Projector #845
Add Projector #845
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-rendering7 #845 +/- ##
=================================================
+ Coverage 77.09% 77.14% +0.04%
=================================================
Files 164 169 +5
Lines 14521 14712 +191
=================================================
+ Hits 11195 11349 +154
- Misses 3326 3363 +37
|
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
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.
Some minor comments, otherwise LGTM
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.
Just minor comments
include/gz/rendering/Projector.hh
Outdated
/// \brief Destructor | ||
public: virtual ~Projector(); | ||
|
||
/// \brief Get the camera's far clipping plane distance |
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.
/// \brief Get the camera's far clipping plane distance | |
/// \brief Get the projector's far clipping plane distance |
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.
fixed. b4a27fa
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.
Just minor comments
Signed-off-by: Ian Chen <[email protected]>
are all these windows failures expected ? https://build.osrfoundation.org/job/ign_rendering-pr-win/3223/ |
yes unfortunately tests started failing recently on the new ec2 windows machines. I think @j-rivero is looking into it. |
🎉 New feature
Summary
Add support for Projectors - an object that projects a texture onto a surface.
In order to get this new feature in gz-rendering7 in an ABI compatible way, I introduced a new
SceneExt
class that provides a genericCreateExt
function for creating aProjector
object.CreateProjector
virtual function in base class and override them in ogre 1.x and 2.x implementation which changes vtable and so breaks ABI. I have added all these functions but they are commented out with a todo not to uncomment them when forward porting togz-rendering8
Key implementation details:
The screenshot below illustrates the difference between ogre 1.x and ogre 2.x:
ogre 1.x: Projection based on a frustum (blue box is the projector)
ogre 2.x: Projection based on a rectangular volume
Test it
Run the
UNIT_Projector_TEST
andINTEGRATION_projector
testse.g. testing with ogre 2.x
Build and run the
projector
demoChecklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.