Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] using cgal AABB tree as class member

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] using cgal AABB tree as class member


Chronological Thread 
  • From: Mael <>
  • To:
  • Subject: Re: [cgal-discuss] using cgal AABB tree as class member
  • Date: Tue, 4 Feb 2020 09:11:59 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:h/gNDBR2tetjxp9vgQVpMRCWfdpsv+yvbD5Q0YIujvd0So/mwa67ZRWDt8tkgFKBZ4jH8fUM07OQ7/m8HzBQqs/Y7jhCKMUKC0Zez51O3kQJO42sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7MhdpdKyuQtaBx8u42Pqv9JLNfg5GmCSyYa9oLBWxsA7dqtQajZFtJ6osxRbFuHRFdudZyW91OF6engv36sOs8JJ+6ShdtO8t+sBaXanmY6g0SKFTASg7PWwy+MDlrwTIQxGV5nsbXGUWkx5IDBbA4RrnQJr/sTb0u/Rk1iWCMsL4Ub47WTK576d2UxDokzsINyQ48G7MlMN9ir9QrQ+7qBx+x47UZ5yVNOZ7c6jAc94WWXZNU8BMXCFHH4iybZYAD/AZMOhFsYf9qVsAoxiwCwaiC+zgyCNHiHDt0K0m0eksCx3K0BAuEt8MtnnfsdX7NL0VUeCw1KTGyi/MYO1S2Tzg74XIdwouru+IXb5qa8rRzlQvFgzbgVWUs4DlOyma2f8WvGeF9OdgWvygi2kiqw5vvjiv3MctiofTiY0J1lDE8j95wYYvKdKkT057ZMepHZ1NvC+UMIt2R9ktQ2BuuCsizL0Jo4W0czMOyJs53RLQd/uHc42Q7hLsVeaRPTd4hG9+d76lmxmy9k2gx+vhXce3yFZHtiVIn9jWunwQyxDe6tKLR/lj8ku71juC2Bjf5+VYLUwuiKbXNp0szqQtmpcctUnPBCH7lUvugKOKbEko5vKk5/j9brn6oJKXKpF5igXjMqQ1hsywH/44PBUPX2ma5+uxzKHv8EvkS7tQlPI2iLPWsJXCKMQbuKG5BwhV354n5hqlCjem18kUkHsJIV5ffRKIlYnpO1XXLPD/EPe/n06gkDB1x/DGJLHhBIvCLmTbnLfge7Zy9VJcxRI8wN1e/Z5YF60NLfLpVkLzqtDUFBA0PgOsz+biEtp914ceWWyVAq+eNaPfqVqI6fgxLOmIfoMVojH9K+Uq5vHwiX81g1sdcrOy0pQMdn+1BftmLFueYXrpnNgBDX0KvwowTOPwlFKCTTlTZ2yyXq4m+j47D4emAZ/ZRo+xmLyBwDu7HppOa29aBVCDC3Poe5yZVPcNcyKdPtJhkicfVbW6UI8g1RSutBfgxLZ9L+rU/DcYtZP529Rv6e3Tjwk+9TlzD8uAzW6AV3p0nmYURz8uxax/plF9ykub3ah4nfNYEdtT6utRUgc+L5Hdz/J1C8rzVw/CfNqFUlamTc+8DTE2UNIxw8UCY0BjFNW+lhzD3iyqDKEJl7GTGJA46L7Q02LtK8pn13rKzLMhgEU+QstTKW2mgbZy+BTcB4HTl0WVjruldaUH3CHR6WeD1nGOsVpZUA52S6XFXGoQalHYrdTjtQv+SOqlBr0jdwdA0sWfMbBia9vzjFwASu2wFs7ZZjeUkmq0TUKNz76IKpDtZnUQ2GPZAUIOnigc8HGDOBQkFymoqH7ZFi0oHlXqNRC/udJioW+2GxdnhzqBaFdsguLsp0wlwMeEQvZW5Yoq/ScsrzIuQgTsmdfRUoXb4Q9ofaEZZs4hplBZ1STfuhAvZsXxfZAnvUYXdkFMh22r0hx2Dotals1w9SElwQ13JL6CwV1IfC+fx4G2MbrSeDGroEKfLpXO01Sb6+64v78V4a5h+VruuwSkClAz/Xxsz95Pwj2X4ZCYVAc=

Hello,

Please post the code, it will make things much easier. Code can be hosted on gist.github (and you can also open an issue on github directly, at https://github.com/CGAL/cgal/issues).

Best,
Mael

On 04/02/2020 02:56, myociss wrote:
Hi everyone,

I am having trouble with something that may be a CGAL issue or might just be
my beginner understanding of c++. What I want to do is make a class that has
an AABB tree as a class member. Having just the tree does not work because
it is a private class, which I attempted to solve by making the class member
a shared_ptr<Tree> instead. I have it so that the tree is built from point
and triangle primitives in the constructor, and then another class method I
wrote is called later to find ray intersections with the tree. However,
within this method the tree is returning triangles where the first point is
incorrect, having 0 values in the x and y dimensions. I tried moving the
code from this method into the constructor just to test, and it works
correctly there. The weirdest thing is that calling a method on the tree
(tree->do_intersect(segment_query)) in the constructor causes the exact same
code in the other method to return the correct points for triangles. Please
let me know if I can clarify anything, I can post the code if needed. Sorry
if this is a simple c++ mistake, and I hope you will let me know if you have
any recommendations for what I should do to make an AABB tree a class member
rather than what I currently have.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page