50 ALL = MOTOR1D | RANGE1D | LOCK1D,
194 statisticsMask(mask),
212 for (
int i = 0; i < NUM_FORCES; i++)
agx::Vector< agx::ref_ptr< RendererStatistic > > statistics
agx::RigidBodyObserver body
BodyData(agx::RigidBody *b, agx::Real smoothFactor, const agx::Vec3 &r, const agxRender::Color &c)
agx::ref_ptr< RendererStatistic > statistic
ConstraintData(agx::Constraint1DOF *c, RendererStatistic *s, const agx::Vec3 &r, const agxRender::Color &col, ConstraintForceStatistics mask)
agx::Constraint1DOFObserver constraint
ConstraintForceStatistics statisticsMask
Creates an arrow visualizing force, either contact force (for added bodies), or motor force for added...
void drawArrow(const agx::Vec3 &start, const agx::Vec3 &force, const agxRender::Color &color)
virtual void update(float x, float y)
Called once per simulation frame.
agx::Bool setColor(agx::Constraint1DOF *constraint, const agxRender::Color &color)
Set the color of the force vector for the specified constraint.
agx::Real getSmoothFactor() const
bool add(agx::RigidBody *body, const agx::Vec3 &localOffsetRelBody, const agxRender::Color &color=agxRender::Color::Red())
Add body for contact force visualization, normal and friction force are visualized with one arrow eac...
agx::HashVector< agx::Constraint1DOF *, agx::ref_ptr< ConstraintData > > ConstraintHashVector
agx::Bool remove(agx::Constraint1DOF *constraint)
Remove a constraint from the constraint force arrow visualization.
ConstraintHashVector m_constraints
ForceArrowRenderer()
Constructor.
virtual ~ForceArrowRenderer()
agx::Real getConeHeight() const
bool add(agx::Constraint1DOF *constraint, const agx::Vec3 &localOffsetRelBody1, const agxRender::Color &color=agxRender::Color::Red(), ConstraintForceStatistics statisticsMask=DEFAULT)
void setArrowRadius(agx::Real radius)
Set the unit radius of the arrow.
RigidBodyHashVector m_bodies
agx::Bool setColor(agx::RigidBody *body, const agxRender::Color &color)
Set the color of the force vector for the specified body.
agx::HashVector< agx::RigidBody *, agx::ref_ptr< BodyData > > RigidBodyHashVector
void setSmoothFactor(agx::Real smoothFactor)
A smooth factor for a filter, smoothing the force arrow size.
ConstraintForceStatistics
Specifies which secondary constraints that should be included in the statistics.
void setScale(agx::Real scale)
Scale the size of the arrow (scale 1 would result in 1 Newton giving length of 1 l....
ContactForceStatistics
Contact force directions.
Statistic< agxUtil::ExponentialMovingAverageStatistic > RendererStatistic
agx::Bool remove(agx::RigidBody *body)
Remove a body from the contact force arrow visualization.
agx::Real getScale() const
void setConeHeight(agx::Real height)
Set the unit height of the cone part of the arrow.
agx::Real getArrowRadius() const
Utility color class with "common colors".
static agxRender::Color Red()
Derive from this class to implement a listener for simulation GuiEvents.
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
Smart pointer for handling referenced counted objects.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.