33 #ifndef DART_DYNAMICS_ARROWSHAPE_HPP_
34 #define DART_DYNAMICS_ARROWSHAPE_HPP_
55 Properties(
double _radius=0.01,
double _headRadiusScale=2.0,
56 double _headLengthScale=0.15,
57 double _minHeadLength=0,
double _maxHeadLength=INFINITY,
58 bool _doubleArrow=
false);
70 ArrowShape(
const Eigen::Vector3d& _tail,
const Eigen::Vector3d& _head,
72 const Eigen::Vector4d& _color=Eigen::Vector4d(0.5,0.5,1.0,1.0),
73 std::size_t _resolution=10);
77 void setPositions(
const Eigen::Vector3d& _tail,
const Eigen::Vector3d& _head);
80 const Eigen::Vector3d&
getTail()
const;
83 const Eigen::Vector3d&
getHead()
const;
95 const Eigen::Vector3d& _head,
Definition: ArrowShape.hpp:42
void notifyColorUpdated(const Eigen::Vector4d &_color) override
Set the color of this arrow.
Definition: ArrowShape.cpp:98
void setProperties(const Properties &_properties)
Set the properties of this arrow.
Definition: ArrowShape.cpp:92
const Eigen::Vector3d & getTail() const
Get the location of the tail of this arrow.
Definition: ArrowShape.cpp:80
Properties mProperties
Definition: ArrowShape.hpp:105
const Eigen::Vector3d & getHead() const
Get the location of the head of this arrow.
Definition: ArrowShape.cpp:86
const Properties & getProperties() const
Get the properties of this arrow.
Definition: ArrowShape.cpp:112
Eigen::Vector3d mTail
Definition: ArrowShape.hpp:102
Eigen::Vector3d mHead
Definition: ArrowShape.hpp:103
void instantiate(std::size_t resolution)
Definition: ArrowShape.cpp:243
void configureArrow(const Eigen::Vector3d &_tail, const Eigen::Vector3d &_head, const Properties &_properties)
Definition: ArrowShape.cpp:165
ArrowShape(const Eigen::Vector3d &_tail, const Eigen::Vector3d &_head, const Properties &_properties=Properties(), const Eigen::Vector4d &_color=Eigen::Vector4d(0.5, 0.5, 1.0, 1.0), std::size_t _resolution=10)
This will produce an arrow that reaches from _tail to _head with the given properties.
Definition: ArrowShape.cpp:56
void setPositions(const Eigen::Vector3d &_tail, const Eigen::Vector3d &_head)
Set the positions of the tail and head of the arrow without changing any settings.
Definition: ArrowShape.cpp:73
Definition: MeshShape.hpp:53
Definition: BulletCollisionDetector.cpp:63
Definition: ArrowShape.hpp:46
double mMaxHeadLength
Definition: ArrowShape.hpp:64
double mRadius
Definition: ArrowShape.hpp:60
double mHeadLengthScale
Definition: ArrowShape.hpp:62
bool mDoubleArrow
Definition: ArrowShape.hpp:65
double mMinHeadLength
Definition: ArrowShape.hpp:63
Properties(double _radius=0.01, double _headRadiusScale=2.0, double _headLengthScale=0.15, double _minHeadLength=0, double _maxHeadLength=INFINITY, bool _doubleArrow=false)
_radius affects the thickness of the arrow.
Definition: ArrowShape.cpp:41
double mHeadRadiusScale
Definition: ArrowShape.hpp:61