#include <map>
#include <memory>
#include <string>
#include <sdf/Material.hh>
#include <sdf/Physics.hh>
#include <sdf/Joint.hh>
#include <gz/math/SphericalCoordinates.hh>
#include <gz/math/Vector3.hh>
#include <gz/sim/components/Component.hh>
#include <gz/sim/gui/GuiSystem.hh>
#include <gz/sim/Types.hh>
#include <gz/msgs/light.pb.h>
#include "Types.hh"
Go to the source code of this file.
Functions | |
Q_DECLARE_METATYPE (ComponentTypeId) namespace gz | |
Function Documentation
◆ Q_DECLARE_METATYPE()
Q_DECLARE_METATYPE | ( | ComponentTypeId | ) |
Generic function to set data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set string data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set light data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set vector data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set Physics data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set Spherical Coordinates data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set boolean data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set integer data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set double data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set stream data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Specialized to set material data.
- Parameters
-
[in] _item Item whose data will be set. [in] _data Data to set.
Set the unit of a given item.
- Parameters
-
[in] _item Item whose unit will be set. [in] _unit Unit to be displayed, such as 'm' for meters.
Model holding information about components, such as their type and data.
Constructor
Destructor
Static version of roleNames
- Returns
- A hash connecting a unique identifier to a role name.
Add a component type to the inspector.
- Parameters
-
[in] _typeId Type of component to be added.
- Returns
- Newly created item.
Remove a component type from the inspector.
- Parameters
-
[in] _typeId Type of component to be removed.
Keep track of items in the tree, according to type ID.
Displays a tree view with all the entities in the world.
Configuration
None
Entity
Type
Type
Type
Locked
Paused
Simulation paused
Nested Model
Constructor
Destructor
Callback in Qt thread when specular changes.
- Parameters
-
[in] _rSpecular specular red [in] _gSpecular specular green [in] _bSpecular specular blue [in] _aSpecular specular alpha [in] _rDiffuse Diffuse red [in] _gDiffuse Diffuse green [in] _bDiffuse Diffuse blue [in] _aDiffuse Diffuse alpha [in] _attRange Range attenuation [in] _attLinear Linear attenuation [in] _attConstant Constant attenuation [in] _attQuadratic Quadratic attenuation [in] _castShadows Specify if this light should cast shadows [in] _directionX X direction of the light [in] _directionY Y direction of the light [in] _directionZ Z direction of the light [in] _innerAngle Inner angle of the spotlight [in] _outerAngle Outer angle of the spotlight [in] _falloff Falloff of the spotlight [in] _intensity Intensity of the light [in] _type light type
Callback in Qt thread when physics' properties change.
- Parameters
-
[in] _stepSize step size [in] _realTimeFactor real time factor [in] _rAmbient ambient red [in] _gAmbient ambient green [in] _bAmbient ambient blue [in] _aAmbient ambient alpha [in] _rDiffuse diffuse red [in] _gDiffuse diffuse green [in] _bDiffuse diffuse blue [in] _aDiffuse diffuse alpha [in] _rSpecular specular red [in] _gSpecular specular green [in] _bSpecular specular blue [in] _aSpecular specular alpha [in] _rEmissive emissive red [in] _gEmissive emissive green [in] _bEmissive emissive blue [in] _aEmissive emissive alpha [in] _type if type is not empty, opens QColorDialog. The possible types are ambient, diffuse, specular, or emissive. [in] _currColor used for QColorDialog to show the current color in the open dialog.
Callback in Qt thread when spherical coordinates change.
- Parameters
-
[in] _surface Surface model [in] _latitude Latitude in degrees [in] _longitude Longitude in degrees [in] _elevation Elevation in meters [in] _heading Heading in degrees
Get whether the entity is a nested model or not
- Returns
- True if the entity is a nested model, false otherwise
Notify that is nested model property has changed
Get the entity currently inspected.
- Returns
- Entity ID.
Set the entity currently inspected.
- Parameters
-
[in] _entity Entity ID.
Notify that entity has changed.
Get the type of entity currently inspected.
- Returns
- Type, such as 'world' or 'model'
Set the type of entity currently inspected.
- Parameters
-
[in] _type Type, such as 'world' or 'model'.
Notify that entity type has changed
Get whether the inspector is currently locked on an entity.
- Returns
- True for locked
Set whether the inspector is currently locked on an entity.
- Parameters
-
[in] _locked True for locked.
Notify that locked has changed.
Get whether simulation is currently paused.
- Returns
- True for paused.
Notify that simulation paused state has changed.
Set whether simulation is currently paused.
- Parameters
-
[in] _paused True for paused.
Get whether the inspector is currently paused for updates.
- Returns
- True for paused.
Set whether the inspector is currently paused for updates.
- Parameters
-
[in] _paused True for paused.
Notify that paused has changed.
Callback in Qt thread when an entity is to be added
- Parameters
-
[in] _entity Entity to add, e.g. box, sphere, cylinder, etc [in] _type Entity type, e.g. link, visual, collision, etc
Callback in Qt thread when a joint is to be added
- Parameters
-
[in] _jointType Type of joint to add (revolute, fixed, etc) [in] _parentLink Name of the link to be the parent link [in] _childLink Name of the link to be the child link
Return the list of availabe links that are suitable for parent links in joints if a model is selected.
- Returns
- List of available links.
Return the list of availabe links that are suitable for child links in joints if a model is selected.
- Returns
- List of available links.
Set the list of availabe links when a model is selected.
- Parameters
-
[in] _modelLinks List of available links.
Notify that locked has changed.
Callback to insert a new entity
- Parameters
-
[in] _entity Entity to add, e.g. box, sphere, cylinder, etc [in] _type Entity type, e.g. link, visual, collision, etc [in] _mesh Mesh file to load.
Add a callback that will be executed during the next Update.
- Parameters
-
[in] _cb The callback to run.
Register a component creator. A component creator is responsible for selecting the correct QML and setting the appropriate data for a ComponentTypeId.
- Parameters
-
[in] _id The component type id to associate with the creation function. [in] _creatorFn Function to call in order to create the QML component.
References std::endl(), gzwarn, stringstream::str(), and IsOutStreamable< Stream, DataType >::value.