Review Request: Add functions to get the size of a component

Arjen Hiemstra djfreestyler at gmail.com
Thu Aug 30 20:21:36 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106047/#review18290
-----------------------------------------------------------



core/axisalignedbox.h
<http://git.reviewboard.kde.org/r/106047/#comment14459>

    Hmm, it might be a better idea to initialise this with a size of (1,1,1) because I think a box with a size of 0 makes no sense. 
    
    Though I think it might be a better idea to remove this constructor altogether and instead make the position an optional argument of the first constructor. (Thus making size a required property)



core/axisalignedbox.h
<http://git.reviewboard.kde.org/r/106047/#comment14461>

    As above, I don't think a box with a size of 0 makes sense, so you should probably make it clear that newSize should be > (0,0,0).



core/axisalignedbox.h
<http://git.reviewboard.kde.org/r/106047/#comment14460>

    This might work better:
    
    Combine this box with another box. This returns the bounding box of both boxes, with the center of the new box the average of the two centers, and the size of the new box extended to encompass both boxes.
    
    @param box The box to combine with.
    
    @return The bounding box of both boxes.



core/axisalignedbox.cpp
<http://git.reviewboard.kde.org/r/106047/#comment14463>

    Nitpick: In my opinion it is better to use one style, either divide by 2 or multiply by 0.5.


- Arjen Hiemstra


On Aug. 30, 2012, 3:54 p.m., Felix Rohrbach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106047/
> -----------------------------------------------------------
> 
> (Updated Aug. 30, 2012, 3:54 p.m.)
> 
> 
> Review request for Gluon.
> 
> 
> Description
> -------
> 
> I'd like to have these functions to compute the size of GameObjects.
> 
> 
> Diffs
> -----
> 
>   core/CMakeLists.txt 3d94d84 
>   core/axisalignedbox.h PRE-CREATION 
>   core/axisalignedbox.cpp PRE-CREATION 
>   engine/component.h db86220 
>   engine/component.cpp 2999d84 
> 
> Diff: http://git.reviewboard.kde.org/r/106047/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Felix Rohrbach
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gluon/attachments/20120830/adf070e7/attachment.html>


More information about the Gluon mailing list