Open
Conversation
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The objective of this pull request is to implement csg, which allows complex geometric figures to be created from boolean operations of union, difference and intersection. The history of this pull request is very dense with commits because it was opened at a fairly early stage of PhotoNim's development and therefore has commits linked to different versions and code logics. The situation now in master with regard to csg is as follows:
Actually, during the development of PhotoNim (and in particular within this pull request) there was a time when all three types of csg were present: those are images produced using PhotoNim and actually committed.
The change tree traversal modality using getClosestHit made the old implementation incompatible with the state of the art of PhotoNim. As a result, we aim in the future to make the ability to create csgInt and csgDiff usable again for the user. Let's first look at the old implementation:
CSGs where a shape kind, which is not a case in version 1.0.0 PhotoNim. In order to create a csg object, it was necessary to work with recursive calls, as a csg shape actually consisted of two shapes and two transformations (the local shapes) of which the first had all privileges. In order to get hits, we used
getHitPayloadandgetAllHitPayloadsuch as following, where we report only the code regarding CSGs.To bring these functions into the code we imagine that it is necessary to define a function that returns all the hit times, one that allows you to evaluate whether a point is inside a shape or not and work to evaluate all the intersections, in order to be able to choose the correct ones for the desired rendering.