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

Change getVolume to use visual clipping type #1130

Merged
merged 1 commit into from
May 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/common/fnc_getVolume.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Function: CBA_fnc_getVolume
Description:
Return the volume of the bounding box of an object's model.
The bounding box is retrieved using boundingBoxReal instead of boundingBox for more precise measurements.
The bounding box is retrieved using boundingBoxReal instead of boundingBox
with visual clipping type for more precise measurements.
Parameters:
_object - Object to calculate the volume of <OBJECT>
Expand All @@ -24,6 +25,6 @@ SCRIPT(getVolume);

params [["_object", objNull, [objNull]]];

(boundingBoxReal _object) params ["_leftBackBottom", "_rightFrontTop"];
(0 boundingBoxReal _object) params ["_leftBackBottom", "_rightFrontTop"];
(_rightFrontTop vectorDiff _leftBackBottom) params ["_width", "_length", "_height"];
_width * _length * _height