gz/rendering/base/BaseJointVisual.hh
virtual ~BaseJointVisual()
Destructor.
Definition: gz/rendering/base/BaseJointVisual.hh:180
virtual JointVisualPtr CreateJointVisual()=0
Create new joint visual. A unique ID and name will automatically be assigned to the Joint visual.
virtual bool UpdateAxis(const ignition::math::Vector3d &_axis, bool _useParentFrame) override
Update an axis' arrow visual.
Definition: gz/rendering/base/BaseJointVisual.hh:354
virtual JointVisualPtr ParentAxisVisual() const override
Get the JointVisual which is attached to the parent.
Definition: gz/rendering/base/BaseJointVisual.hh:515
Base implementation of a joint visual.
Definition: gz/rendering/base/BaseJointVisual.hh:40
STL class.
Vector3 Perpendicular() const
#define IGN_PI
bool equal(const T &_a, const T &_b, const T &_epsilon=T(1e-6))
virtual void SetType(const JointVisualType _type) override
Set type for joint visual.
Definition: gz/rendering/base/BaseJointVisual.hh:486
void CreateAxis()
Helper function to create axis visual.
Definition: gz/rendering/base/BaseJointVisual.hh:283
virtual void SetAxis(const ignition::math::Vector3d &_axis, bool _useParentFrame) override
Create an axis and attach it to the joint visual.
Definition: gz/rendering/base/BaseJointVisual.hh:272
void Axis(const Vector3< T > &_axis, T _a)
virtual void Init() override
Definition: gz/rendering/base/BaseJointVisual.hh:232
#define ignlog
static const Vector3 One
bool updateAxis
Flag to update the axis visual.
Definition: gz/rendering/base/BaseJointVisual.hh:155
Represents a joint visual.
Definition: gz/rendering/JointVisual.hh:69
bool parentAxisUseParentFrame
Flag to indicate whether parent axis vector is expressed in joint parent frame.
Definition: gz/rendering/base/BaseJointVisual.hh:166
virtual ArrowVisualPtr ArrowVisual() const override
Get the arrow visual which represents the axis attached to the child.
Definition: gz/rendering/base/BaseJointVisual.hh:522
Manages a single scene-graph. This class updates scene-wide properties and holds the root scene node....
Definition: gz/rendering/Scene.hh:49
@ JVT_GEARBOX
Gearbox joint type.
Definition: gz/rendering/JointVisual.hh:60
static const Vector3 Zero
virtual void SetVisible(bool _visible) override
Specify if this visual is visible.
Definition: gz/rendering/base/BaseJointVisual.hh:529
JointVisualType
Enum for JointVisual types.
Definition: gz/rendering/JointVisual.hh:36
static const Vector3 UnitY
@ JVT_REVOLUTE2
Revolute2 joint type.
Definition: gz/rendering/JointVisual.hh:45
bool useParentFrame
Flag to indicate whether axis vector is expressed in joint parent frame.
Definition: gz/rendering/base/BaseJointVisual.hh:152
ignition::math::Vector3d parentAxis
Parent axis vector.
Definition: gz/rendering/base/BaseJointVisual.hh:158
ArrowVisualPtr arrowVisual
The visual representing the one joint axis. There can be only one axis visual per joint visual,...
Definition: gz/rendering/base/BaseJointVisual.hh:127
virtual bool UpdateParentAxis(const ignition::math::Vector3d &_axis, bool _useParentFrame) override
Update the parent axis' arrow visual if it exists.
Definition: gz/rendering/base/BaseJointVisual.hh:368
@ JVT_UNIVERSAL
Universal joint type.
Definition: gz/rendering/JointVisual.hh:51
bool dirtyAxis
Flag to indicate axis data has changed.
Definition: gz/rendering/base/BaseJointVisual.hh:141
ignition::math::Vector3d axis
Joint visual axis vector.
Definition: gz/rendering/base/BaseJointVisual.hh:147
BaseJointVisual()
Constructor.
Definition: gz/rendering/base/BaseJointVisual.hh:174
virtual ignition::math::Vector3d ParentAxis() const override
Get parent axis vector.
Definition: gz/rendering/base/BaseJointVisual.hh:501
Vector3 Normalize()
AxisVisualPtr axisVisual
The joint's XYZ frame visual.
Definition: gz/rendering/base/BaseJointVisual.hh:122
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
Definition: gz/rendering/base/BaseJointVisual.hh:186
static const Vector3 UnitX
virtual void SetVisible(bool _visible)=0
Specify if this visual is visible.
static const Vector3 UnitZ
std::string jointParentName
Joint parent name.
Definition: gz/rendering/base/BaseJointVisual.hh:162
virtual void Destroy() override
Destroy any resources associated with this object. Invoking any other functions after destroying an o...
Definition: gz/rendering/base/BaseJointVisual.hh:243
Quaternion< T > Inverse() const
virtual ArrowVisualPtr CreateArrowVisual()=0
Create new arrow visual. A unique ID and name will automatically be assigned to the visual.
T Dot(const Vector3< T > &_v) const
JointVisualType jointVisualType
Type of joint visualization.
Definition: gz/rendering/base/BaseJointVisual.hh:118
@ JVT_REVOLUTE
Revolute joint type.
Definition: gz/rendering/JointVisual.hh:42
virtual void SetParentAxis(const ignition::math::Vector3d &_axis, const std::string &_parentName, bool _useParentFrame) override
Create a parent axis for hinge2 and universal joint types and attach it to the joint visual.
Definition: gz/rendering/base/BaseJointVisual.hh:303
ignition::math::Vector3d scaleToChild
Scale based on the size of the joint's child.
Definition: gz/rendering/base/BaseJointVisual.hh:134
void CreateParentAxis()
Helper function to create parent axis visual.
Definition: gz/rendering/base/BaseJointVisual.hh:325
JointVisualPtr parentAxisVis
Second joint visual for hinge2 and universal joints. It is a simplified visual without an XYZ frame.
Definition: gz/rendering/base/BaseJointVisual.hh:131
bool dirtyJointType
Flag to indicate joint visual type has changed.
Definition: gz/rendering/base/BaseJointVisual.hh:138
bool updateParentAxis
Flag to update the parent axis visual.
Definition: gz/rendering/base/BaseJointVisual.hh:169
T max(T... args)
void UpdateAxisImpl(ArrowVisualPtr _arrowVisual, const ignition::math::Vector3d &_axis, bool _useParentFrame)
Implementation for updating an axis' arrow visual.
Definition: gz/rendering/base/BaseJointVisual.hh:386
virtual JointVisualType Type() const override
Get joint visual type.
Definition: gz/rendering/base/BaseJointVisual.hh:508
void ScaleToChild()
Scale the joint visual according to the joint's child.
Definition: gz/rendering/base/BaseJointVisual.hh:463
virtual ignition::math::Vector3d Axis() const override
Get axis vector.
Definition: gz/rendering/base/BaseJointVisual.hh:494
bool dirtyParentAxis
Flag to indicate parent axis data has changed.
Definition: gz/rendering/base/BaseJointVisual.hh:144
Vector3< double > Vector3d
virtual NodePtr NodeByName(const std::string &_name) const =0
Get node with the given name. If no node exists with the given name, NULL will be returned.
virtual AxisVisualPtr CreateAxisVisual()=0
Create new axis visual. A unique ID and name will automatically be assigned to the visual.
Vector3 Cross(const Vector3< T > &_v) const
Represents a arrow composite visual.
Definition: gz/rendering/ArrowVisual.hh:31