summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix resource leaks in ArrayAllocatingPolicy.Volker Krause2016-01-191-0/+6
| | | | | | | | | | | | | | Previously we ended up with default constructed elements in the bucket, and were constructing new ones for every allocation. As some of the types used in here allocate resources in their ctors themselves we were leaking those resources. Now we only construct each element at most once, and we don't construct any element that is never used. The resulting re-use of elements exposed the missing cleanup method in tst_ArrayResource. Change-Id: Ie875fea3ebc9b6f96d0239a6064474fbea798814 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make axisIdentifier & buttonIdentifier constBogDan Vatra2016-01-141-2/+2
| | | | | Change-Id: Idedf3cab5d8a30d1a417ceb10555170b53b00d26 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove unused ListAllocationPolicy.Volker Krause2016-01-123-442/+0
| | | | | Change-Id: I59a6461fd3e81d578af3cc33248fb21d8b503135 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make parentEntityId privateKevin Ottens2015-12-182-6/+13
| | | | | | | | It is used only once in the whole of Qt3D and looks rather foreign to the rest of the nodes API. Change-Id: I6d8d40590a1f8a5c2019a8d16a7abff4f19ae9bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QSceneObserverInterface privateKevin Ottens2015-12-173-5/+1
| | | | | Change-Id: I98454ea6ed5bd5bbfed550317fedbf8ee47a1f8f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QBackendNodeFactory privateKevin Ottens2015-12-172-2/+2
| | | | | Change-Id: I0edb9fb0444d8a4a9b77550d5dd32d36d501683c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move services() and jobManager() to the pimplKevin Ottens2015-12-171-12/+12
| | | | | | | This way we avoid leaking private types through public API. Change-Id: Ifb30d7e57d8b995bba8cf9a95ae77f8d7818d79a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move QAbstractAspect::registerAspect() to the pimplKevin Ottens2015-12-171-6/+6
| | | | | Change-Id: Iabc9afe59052e69725a82fb6bdb42f0dfae7fc91 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove QAbstractAspect::setRootEntityKevin Ottens2015-12-173-11/+9
| | | | | | | We switch to a more resilient private virtual instead. Change-Id: I90710c7873571ca0a40f7cc939282344b20a59f0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Change the idiom to clear null job dependenciesKevin Ottens2015-12-161-1/+1
| | | | | | | | | | The "clearNull" method is kind of surprising so make QAspectJob API more usual. Also the "clearNull" method was only used twice so change the idiom to go through removeDependency if that one receives a null pointer. Change-Id: Ib74e1054ba52754b1a19d6c3e9268fa9ff14edaf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QAspectJob::removeDependency()Kevin Ottens2015-12-161-0/+18
| | | | | Change-Id: Id67338fa5cae61161674d9efb345a475a7ae93ac Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add tests to QAspectJobKevin Ottens2015-12-163-0/+106
| | | | | Change-Id: I373f57fc40f9f2d92de6b48126d6c84363ed6d28 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove initialize/shutdown from APIv5.6.0-beta1Kevin Ottens2015-12-141-1/+0
| | | | | | | | Hiding them in QAspectEnginePrivate and calling them when needed from setRootEntity. Change-Id: I4c3dfb19d84ae90cc15bbff29a4abd0705bb61dc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Turn all services private for nowKevin Ottens2015-12-122-4/+4
| | | | | Change-Id: I9da605c77c5489b9bef4f07079e05f8babb9559f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTransform: Add convenience properties for Euler angle rotationsAndy Nichols2015-12-111-1/+20
| | | | | | | | | | | | | | | | Since refactoring the QTransform API to enable matrix decomposition, it has become more inconvenient to apply rotation transforms through the QML API. This is due to the need to set QQuaternion values for the rotation property, which makes using the Qt Quick animation framework difficult. To remedy this, there are now some additional properties added to Qt3DCore::QTransform which enable direct usage of Euler angles instead of just QQuaternion. Internally the rotation property is still used by translating the Euler angle transforms to a QQuaternion. Change-Id: Iad48542a7b125f7615f7a69516fb10a973d8395b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move all raycasting code as private in Qt3DRenderKevin Ottens2015-12-104-8/+7
| | | | | Change-Id: I871cbc57166493f30ea307305d8664e2f8a8873f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QFrameAllocator privateKevin Ottens2015-12-084-3/+4
| | | | | Change-Id: Id69a161da691322184d8ec5ed7a1b375cf2038ed Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Indicate light typeLaszlo Agocs2015-12-071-0/+6
| | | | | | | | | | | | Having a dedicated type field is required not just to make the shaders cleaner but also to avoid incorrect results when lights get moved around in the scene. Currently the shaders rely on the direction uniform to distinguish directional lights from the others, but this cannot work when the elements in the lights uniform array change, potentially leaving type-specific members like direction set when a point light takes the same index. Change-Id: I170e4b471c8cd9b4a23eca49690239c01944b3e6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAxisInput/QActionInput: use list of int rather than int maskPaul Lemire2015-12-043-15/+29
| | | | | | | Needed to allow devices like keyboards which have more than 64 keys Change-Id: Ia837285ba9c5b7c26d3d89046d7d9f7a4cddb2ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractPhysicalDevice: Remove axis/buttons methodsPaul Lemire2015-12-041-2/+0
| | | | | | | They do not need to be on the frontend node Change-Id: I16cd5ad9a2d556916a3d8f4e6856eddf00fb7d3e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QNodeVisitor privateKevin Ottens2015-12-032-2/+2
| | | | | Change-Id: Ie36f6f170b5b627d0ed371bcd1a8dc292e7226b3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move core/io content to render/geometry and ioKevin Ottens2015-12-022-11/+11
| | | | | Change-Id: I79e0b0d62e07a269ebfce99edff56d30da28494c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add autotest for lightsLaszlo Agocs2015-12-023-0/+266
| | | | | Change-Id: Id8639d437bd55de15dc924af49930c12a3489cea Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add command support on aspects and QAspectEngineKevin Ottens2015-12-021-20/+103
| | | | | | Change-Id: I5c3847a2779b691a2748083fb768b37d1f629274 Task-Id: QTBUG-49683 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add missing test for QAspectEngine::registerAspectKevin Ottens2015-12-021-0/+42
| | | | | | Change-Id: Id41bd1acd5e9b1d272b13ec6e53cc34080df51fe Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move definition of tests in the classKevin Ottens2015-12-021-49/+45
| | | | | | | | It will make this test suite just easier to update. Change-Id: I1d6df0f4bb7b0e36f1471c9ca29a2246d0795ffa Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Unit tests for AxisInputPaul Lemire2015-12-019-65/+272
| | | | | Change-Id: Ib639eec6cfaa3839f43e09e9dd3ad31f0524e700 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit tests for ActionPaul Lemire2015-12-013-1/+167
| | | | | Change-Id: I463d0b469aa78e42c2671b6d3798546328898786 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit tests for AxisPaul Lemire2015-12-013-1/+167
| | | | | Change-Id: I58b95eea52d8e4cfe2d072eb51abfd29c07e11b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit tests for QLogicalDevicePaul Lemire2015-12-013-1/+196
| | | | | Change-Id: I49b22190422f32ead46f794fb785f7fbbb7531f8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit tests for QActionInputPaul Lemire2015-12-013-1/+190
| | | | | Change-Id: I6c7388352fd615d1a596b406dff63d783dbb14c3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit tests for QAxisInputPaul Lemire2015-12-013-1/+206
| | | | | Change-Id: I9f56464d9e4cb6bc6f96528f7838c0cc1743f79b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit tests for QActionPaul Lemire2015-12-013-1/+176
| | | | | Change-Id: Ib72f56c57ef6e7ff1c9996c141a813c6e10b7ba6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit tests for QAxisPaul Lemire2015-12-014-1/+182
| | | | | Change-Id: I7090ff89feaf0cf93f901a38827f00a331ccee9b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectFactory can now also give registered name of an aspectKevin Ottens2015-12-011-0/+14
| | | | | Change-Id: I8f89eefb06e20943f7abb82d461b5e90fd9799f9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove unused code from QAspectFactoryKevin Ottens2015-12-011-21/+0
| | | | | Change-Id: I1639a3ee2e4aac177f1c7cf4252a1c65db7cf721 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make QAspectFactory privateKevin Ottens2015-12-012-2/+2
| | | | | Change-Id: I1301887b4572310eebc3086699447ff574e1345b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Unit tests for QTransformPaul Lemire2015-11-253-1/+205
| | | | | Change-Id: Iefe3f3afb8281a2eb994bfc8b63ca81500f66934 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QRenderAspect/Renderer: refactored to use the AbstractRenderer interfacePaul Lemire2015-11-241-6/+7
| | | | | Change-Id: I662577e6dd337b1f056f73b4a11262e902d4dde2 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Restore mouse picking testsPaul Lemire2015-11-241-1/+0
| | | | | Change-Id: Iccc02982a165f8aa54cd68e4293f1b244802b5ae Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Add unit tests for triangleboundingvolumePaul Lemire2015-11-243-1/+236
| | | | | Change-Id: I05f3450bbb037c2d8b9bf45a3d6eb66d1db846bd Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* QRayCastingService improvementsPaul Lemire2015-11-241-14/+26
| | | | | Change-Id: Id8072015f153bebf3e44b9d0a6ad9e2e9254aa83 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Unit tests for TriangleExtractorPaul Lemire2015-11-243-1/+414
| | | | | Change-Id: Iab3c5690a18edc652f314b6bf758eea7f73a1c50 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* jobs benchmarksPaul Lemire2015-11-244-1/+400
| | | | | Change-Id: I0585281d2ba3e109b8ab8e45762e5101f7ea2163 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove aspect enumsMike Krus2015-11-212-2/+2
| | | | | | Change-Id: I5cd1c2ddb54d32a7d650e2a44f48d9f67f9821a2 Task-Id: QTBUG-49001 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove transforms property of QTransformSean Harmer2015-11-172-10/+6
| | | | | | | | Compound transformations are now built up using QMatrix4x4 in both QML and C++. Updating examples accordingly. Change-Id: I03c9abf1f6cdd1b56226dc0e16a7ad5ce84516dd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Setting matrix property to decompose to S, R, TSean Harmer2015-11-171-0/+1
| | | | | | | | | | | | | | | | | | | Updating the matrix property now decomposes the matrix to calculate the scale, rotation and translation properties that get sent to the backend. The test example will be updated to show how to build a matrix from a series of "sub transformations" in an imperative way. This will reinforce in the API the fact that we can't decompose an affine transform into an arbitrary set of sub transforms. That is the API will emphasise the one way nature. The decomposition functions were provided by Konstantin Ritt. Note: mouse picking unit tests skipped for now Change-Id: Ibc259dacac7a3dc32f4b03b375607291d998601c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Updated Entity unit testsPaul Lemire2015-11-161-0/+3
| | | | | Change-Id: I27866c85f3ad221e750dab4810dd4f5b8a7d0155 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Unit tests for default meshesPaul Lemire2015-11-163-1/+163
| | | | | Change-Id: Id936d44b08cbda400fd63448ff21d733551a2bf4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Entity unit tests updatedPaul Lemire2015-11-161-1/+10
| | | | | | Change-Id: I3f3ecc220d5a6ae57e40bb8a3db8cd71f84aa5a9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>