33 #ifndef DART_DYNAMICS_SHAPEFRAME_HPP_ 34 #define DART_DYNAMICS_SHAPEFRAME_HPP_ 36 #include <Eigen/Dense> 38 #include "dart/common/AspectWithVersion.hpp" 39 #include "dart/common/Signal.hpp" 40 #include "dart/common/SpecializedForAspect.hpp" 41 #include "dart/dynamics/EllipsoidShape.hpp" 42 #include "dart/dynamics/FixedFrame.hpp" 43 #include "dart/dynamics/TemplatedJacobianNode.hpp" 44 #include "dart/dynamics/detail/ShapeFrameAspect.hpp" 52 detail::VisualAspectProperties,
62 VisualAspect(
const PropertiesData& properties = PropertiesData());
67 void setRGBA(
const Eigen::Vector4d& color);
69 DART_COMMON_GET_ASPECT_PROPERTY(Eigen::Vector4d, RGBA)
72 DART_COMMON_SET_GET_ASPECT_PROPERTY(
bool, Hidden)
76 DART_COMMON_SET_GET_ASPECT_PROPERTY(
bool, Shadowed)
81 void setColor(
const Eigen::Vector3d& color);
84 void setColor(
const Eigen::Vector4d& color);
87 void setRGB(
const Eigen::Vector3d& rgb);
96 Eigen::Vector3d
getRGB()
const;
115 detail::CollisionAspectProperties,
122 DART_COMMON_SET_GET_ASPECT_PROPERTY(
bool, Collidable)
127 bool isCollidable()
const;
133 detail::DynamicsAspectProperties,
142 DynamicsAspect(
const DynamicsAspect&) =
delete;
144 DynamicsAspect(
const PropertiesData& properties = PropertiesData());
147 void setFrictionCoeff(
const double& value);
149 double getFrictionCoeff()
const;
152 void setPrimaryFrictionCoeff(
const double& value);
153 const double& getPrimaryFrictionCoeff()
const;
155 DART_COMMON_SET_GET_ASPECT_PROPERTY(
double, SecondaryFrictionCoeff)
158 DART_COMMON_SET_GET_ASPECT_PROPERTY(
double, RestitutionCoeff)
163 DART_COMMON_SET_GET_ASPECT_PROPERTY(
double, PrimarySlipCompliance)
170 DART_COMMON_SET_GET_ASPECT_PROPERTY(
double, SecondarySlipCompliance)
175 void setFirstFrictionDirectionFrame(
const Frame* value);
180 const Frame* getFirstFrictionDirectionFrame()
const;
182 DART_COMMON_SET_GET_ASPECT_PROPERTY(Eigen::Vector3d, FirstFrictionDirection)
188 DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_BEGIN
198 const ShapePtr& oldShape,
199 const ShapePtr& newShape)>;
203 const Eigen::Isometry3d& oldTransform,
204 const Eigen::Isometry3d& newTransform)>;
206 using UniqueProperties = AspectProperties;
207 using Properties = UniqueProperties;
216 void setAspectProperties(
const AspectProperties& properties);
218 const AspectProperties& getAspectProperties()
const;
221 void setShape(
const ShapePtr& shape);
227 ConstShapePtr getShape()
const;
239 const ShapeFrame* asShapeFrame()
const override;
242 bool isShapeNode()
const;
253 virtual const ShapeNode* asShapeNode()
const;
263 ShapeFrame(
const std::tuple<Frame*, Properties>& args);
285 DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_END
290 #endif // DART_DYNAMICS_SHAPEFRAME_HPP_ common::SlotRegister< ShapeUpdatedSignal > onShapeUpdated
Slot register for shape updated signal.
Definition: ShapeFrame.hpp:279
void setColor(const Eigen::Vector3d &color)
Identical to setRGB(const Eigen::Vector3d&)
Definition: ShapeFrame.cpp:116
Definition: ShapeFrame.hpp:131
Eigen::Vector3d getRGB() const
Get RGB color components.
Definition: ShapeFrame.cpp:153
void hide()
Hide the ShapeNode.
Definition: ShapeFrame.cpp:165
void setProperties(const PropertiesData &properties)
Set the Properties of this Aspect.
Definition: AspectWithVersion.hpp:356
The Frame class serves as the backbone of DART's kinematic tree structure.
Definition: Frame.hpp:57
VersionCounter is an interface for objects that count their versions.
Definition: VersionCounter.hpp:42
Definition: ShapeFrameAspect.hpp:51
void setRGBA(const Eigen::Vector4d &color)
Set RGBA color.
Definition: ShapeFrame.cpp:106
RelativeTransformUpdatedSignal mRelativeTransformUpdatedSignal
Relative transformation updated signal.
Definition: ShapeFrame.hpp:272
void show()
Show the ShapeNode.
Definition: ShapeFrame.cpp:171
Definition: Aspect.cpp:40
Definition: ShapeFrameAspect.hpp:89
Eigen::Vector3d getColor() const
Get color.
Definition: ShapeFrame.cpp:147
ShapeUpdatedSignal mShapeUpdatedSignal
Shape updated signal.
Definition: ShapeFrame.hpp:269
Definition: ShapeNode.hpp:48
common::SlotRegister< RelativeTransformUpdatedSignal > onRelativeTransformUpdated
Slot register for relative transformation updated signal.
Definition: ShapeFrame.hpp:283
bool isHidden() const
True iff the ShapeNode is set to be hidden.
Definition: ShapeFrame.cpp:177
VisualAspect(const PropertiesData &properties=PropertiesData())
Constructor.
Definition: ShapeFrame.cpp:99
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:74
AspectWithProtectedProperties generates implementations of the Property managing functions for an Asp...
Definition: AspectWithVersion.hpp:108
double getAlpha() const
Get the transparency of the Shape.
Definition: ShapeFrame.cpp:159
common::Connection mConnectionForShapeVersionChange
Connect to changes in the Shape version.
Definition: ShapeFrame.hpp:275
SlotRegister can be used as a public member for connecting slots to a private Signal member...
Definition: Signal.hpp:228
void setRGB(const Eigen::Vector3d &rgb)
Set RGB color components (leave alpha alone)
Definition: ShapeFrame.cpp:128
Definition: ShapeFrame.hpp:189
void setAlpha(const double alpha)
Set the transparency of the Shape.
Definition: ShapeFrame.cpp:137
Definition: ShapeFrame.hpp:113
This is an alternative to EmbedProperties which allows your class to also inherit other Composite obj...
Definition: EmbeddedAspect.hpp:237
class Connection
Definition: Signal.hpp:47
Definition: ShapeFrame.hpp:50
bool mAmShapeNode
Contains whether or not this is a ShapeNode.
Definition: ShapeFrame.hpp:266