summaryrefslogtreecommitdiffstats
path: root/src/render/backend/entity.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Unify license header usageAntti Kokko2016-01-261-11/+14
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Move QCamera/QCameraLens to Qt3DRenderPaul Lemire2016-01-161-1/+1
| | | | | | | | Also get rid of Qt3DRender::QWindow and of the hard codes camera controller. Change-Id: I307735d01caf97b7a690b28de8dc99fc9866c35f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Entity: add reference to QComputeJob componentPaul Lemire2016-01-131-0/+21
| | | | | Change-Id: I1a99115b78478ec143a83a2f768a7249d9038ac0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use QList::reserve.Volker Krause2016-01-061-0/+6
| | | | | | | | The intermediate QLists are still not optimal here, as these methods are called per frame, but at least this is now down to one allocation each. Change-Id: I7705172aabc5e526c5123d70450d3ae2dec20d03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make parentEntityId privateKevin Ottens2015-12-181-1/+3
| | | | | | | | 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>
* Lights phase 1: infrastructureLaszlo Agocs2015-11-261-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractLight becomes QLight and gets its own backend node. This way we can easily gather all lights for the scene and filter them when building render commands. Both the frontend and backend remain a subclass of (Q)ShaderData but will not be part of the ordinary ShaderData component list. This prevents mixing up ShaderDatas and Lights but allows reusing the same underlying infrastructure so that properties can automatically be transformed for example. It is worth noting that the position property for lights is now removed: the position is determined by the entity's (to which the light component belongs) position. A number of changes are made to ShaderData itself as backend subclassing with different managers is not straightforward. For now the distance between the rendered entity and the entity with the light component is calculated and lights will be chosen based on this distance. A framegraph node for controlling this will be added in future patches. No uniform setting or shader changes are included here. Task-number: QTBUG-48834 Change-Id: I43a6c5f9420d4254d798c558bd58680b2b09eceb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Entity: add a boundingVolumeDirty flagPaul Lemire2015-11-161-16/+32
| | | | | Change-Id: I175a2bd4ed2ed59f070b8371495cc573941f1c1d Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Renderer: use NodeManagersPaul Lemire2015-11-161-40/+40
| | | | | Change-Id: I8d505034b24c3ec00b93ace02e5a4fe450939478 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Entity: add reference to QBoundingVolumeDebug componentsPaul Lemire2015-11-161-0/+21
| | | | | | Change-Id: I338d55d8c6f81a55ecc61a247b9a1791bd25bb7d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Entity: reorganize template functors for better readabilityPaul Lemire2015-11-161-42/+49
| | | | | | Change-Id: I404d35ff9e159d47c53660220cf5899b6df1cf89 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* QNode: Introduce enabled propertyAndy Nichols2015-10-271-0/+20
| | | | | | | | | | | | | | | | | Previously there was only and enable property for the QNode subclass QComponent, but now all QNode subclasses should also have an enable property. This means that it is now possible to disable a QEntity which would also disable all of its children. This is a bit tricky though because each Aspect needs to now check if the corresponding QEntities are disabled or not before processing. This has been accounted for with RenderEntity in the Renderer already, but will need to be respected in each Aspect. This behavior is similar to the Unity3D GameObject active property which disabled the entity and disables all components. Change-Id: I5233b2b43f04aa5dfa7910eac6a88a9da656a997 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Sphere moved into Render namespace and made privatePaul Lemire2015-10-241-1/+1
| | | | | Change-Id: I940a8ea898a338f20bb9abbebcc1fcef9830a118 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Entity: create bounding sphere with the Entity idPaul Lemire2015-10-241-9/+6
| | | | | | | | Will be needed to retrive Entity from hits reported by the RayCasting service. Change-Id: I91f1f3c2277d468c2ec60509a04095138a5eafcb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Entity: cleaning up QNodeId doesn't require rendererPaul Lemire2015-10-241-11/+11
| | | | | Change-Id: I673cd1d8385d3e54c066fbd7dec522e4da5a9f79 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Entity: keep ObjectPicker component node idPaul Lemire2015-10-241-0/+21
| | | | | Change-Id: I30b2149b5e90c92e012b77b4101200990610d96a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-191-11/+11
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Resurrect bounding volumesLaszlo Agocs2015-10-141-2/+3
| | | | | | | | | | | | | | For BackToFront sorting to work we need to calculate a depth value based on the entity's bounding spheres. This is currently missing as there is no AABB from which the RenderEntity's localBoundingVolume could be calculated. Bring it back. RenderEntity contains two world bounding volumes from now on: just having one that includes the children is not ideal because in some cases we want to know the entitys own bounding volume not including the children. This is the case when building render commands for example. Change-Id: I20f5bccdc3f868bcbd5faa3164f0e9995a3171ec Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-131-19/+19
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename RenderTransform -> TransformSean Harmer2015-10-131-3/+3
| | | | | Change-Id: Ide8d0d0831755b0eb5f8f724c2e7c0ed838e4b9d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename RenderShaderData -> ShaderDataSean Harmer2015-10-131-4/+4
| | | | | Change-Id: I254f2205cd1587bb599d26a087c515d526bf289b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename RenderMaterial -> MaterialSean Harmer2015-10-131-3/+3
| | | | | Change-Id: I4fed4482fe3620caed638f36a054db374a8e8942 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename RenderLayer -> LayerSean Harmer2015-10-131-4/+4
| | | | | Change-Id: I3da5588470de57b5ed144f60b9e28a74f96d164f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename RenderGeometryRenderer to GeometryRendererSean Harmer2015-10-131-3/+3
| | | | | Change-Id: I6e6352de622a7b18eaa5f1f89d15a1d90dd68329 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename RenderEntity -> EntitySean Harmer2015-10-131-0/+407
Change-Id: Ifb5f3882e9bd584536321dde97eac2c471528f27 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>