 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
17 #ifndef AGXRENDER_RENDERPROXY_H
18 #define AGXRENDER_RENDERPROXY_H
84 virtual void setColor(
const agx::Vec3& color );
94 virtual void setAlpha(
float alpha );
97 virtual float getAlpha()
const;
120 bool compare()
const;
132 void setEnable(
bool flag );
135 bool getEnable()
const;
144 void setRenderMode( RenderMode mode );
147 RenderMode getRenderMode()
const;
150 virtual void reset();
192 bool signalShapeChanged,
193 bool offsetHalfHeight =
true );
236 void set(
float radius );
238 float getRadius()
const;
247 void synchronizeParameters();
274 void synchronizeParameters();
302 void synchronizeParameters();
318 void set(
float radius,
float height );
322 float getRadius()
const;
325 float getHeight()
const;
334 void synchronizeParameters();
350 void set(
float radius,
float height,
float thickness );
355 float getRadius()
const;
358 float getHeight()
const;
361 float getThickness()
const;
370 void synchronizeParameters();
387 void set(
float radius,
float height );
391 float getRadius()
const;
394 float getHeight()
const;
403 void synchronizeParameters();
420 float bottomRadius );
422 void set(
float topRadius,
float bottomRadius,
float height );
427 float bottomRadius );
430 float getTopRadius()
const;
433 float getBottomRadius()
const;
436 float getHeight()
const;
445 void synchronizeParameters();
469 void set(
float topRadius,
481 float getTopRadius()
const;
484 float getBottomRadius()
const;
487 float getHeight()
const;
490 float getThickness()
const;
499 void synchronizeParameters();
517 void set(
float radius,
float height );
523 float getRadius()
const;
526 float getHeight()
const;
535 void synchronizeParameters();
558 void set(
float radius,
float height );
560 void set(
float radius,
573 float getRadius()
const;
576 float getHeight()
const;
592 void synchronizeParameters();
610 void set(
const agx::Vec3& halfExtents );
621 void synchronizeParameters();
726 : startPoint( sp ), endPoint( ep ), radius( r ) {}
768 void prepare(
agx::UInt numSegmentEstimate,
780 void addSegment(
const agx::Vec3& startPoint,
788 void addSegment(
const agx::Vec3& startPoint,
873 return m_modifiedCount;
879 m_geometry = geometry;
895 if ( m_enable != flag )
909 if ( mode != m_renderMode ) {
927 return agx::Vec3f( radius, radius, (
float)startPoint.distance( endPoint ) );
A box shape for geometric intersection tests.
virtual void updateShape()
Called when a Shape has been changed (for example radius on a sphere is changed).
void setRenderMode(RenderMode mode)
Set the render mode for this Proxy.
void callOnChange(EventType type)
Explicitly fires event of type.
LinearProbingHashSetImplementation< KeyT, HashT >::iterator end(LinearProbingHashSetImplementation< KeyT, HashT > &set)
@ COLOR
The color value for a proxy is updated.
EventType
Enum for specifying a type of event which might change a RenderProxy.
Implements a Capsule shape for geometric intersection tests.
A cylinder shape for geometric intersection tests.
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)
virtual void onAddNotification()
Called when the wire is added to the simulation.
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
void setEnable(bool flag)
Toggle this proxy for rendering on/off.
Namespace containing classes for handling debug rendering of collision geometries,...
A sphere class for geometric intersection tests.
static AffineMatrix4x4T< Real > rotate(const Vec3T< Real > &from, const Vec3T< Real > &to)
Return a matrix which rotate a vector from from to to.
agx::Vec3f getScale() const
agx::AffineMatrix4x4 m_transform
Subclass that implements a ConeProxy.
The rigid body class, combining a geometric model and a frame of reference.
@ ENABLE
A RenderProxy is enabled/disabled.
@ RENDERMODE
The RenderMode has been changed.
static AffineMatrix4x4T< Real > translate(const Vec3T< Real > &dv)
Return a matrix which translates according to dv.
const SphereDef * operator->() const
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
agx::AffineMatrix4x4 getTransform() const
SegmentDef(const agx::Vec3 &sp, const agx::Vec3 &ep, float r)
Subclass that implements a HeightfieldProxy.
agx::UInt32 getModifiedCount() const
This value tells us that if the proxy is synchronized with the associated shape.
@ ALPHA
The alpha value for a proxy is updated.
agx::VectorPOD< SegmentDef > SegmentDefContainer
Subclass that implements a CapsuleProxy.
A HeightField is a collision shape that can be created from a grid structure, like an image.
virtual ~TruncatedConeProxy()
virtual ~WireRenderProxy()
virtual void onRemoveNotification()
Called when the wire is removed from the simulation.
SphereDefContainer m_nodes
Subclass that implements a TruncatedConeProxy.
Subclass that implements a BoxProxy.
A right circular hollow cone shape for geometric intersection tests.
virtual void setTransform(const agx::AffineMatrix4x4 &transform)
Set the transform of this RenderProxy, if overridden, set the m_transform and call onUpdate(TRANSFORM...
Vector containing 'raw' data.
A hollow cylinder shape for geometric intersection tests.
#define AGXPHYSICS_EXPORT
Internal class used by agxWire::Wire.
virtual void onChange(EventType)
Pure virtual method that should response on the different events.
const agxCollide::Shape * getShape() const
LinearProbingHashSetImplementation< KeyT, HashT >::iterator begin(LinearProbingHashSetImplementation< KeyT, HashT > &set)
@ SHAPE
The Shape has been modified a rebuild is needed.
Subclass that implements a TextProxy.
@ REMOVE
The Shape has been removed from space, need to be removed from rendering.
SegmentDefContainer m_segments
virtual void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
Class holding rigid bodies that makes it possible to batch render these objects.
Smart pointer for handling referenced counted objects.
SphereDef(const agx::Vec3 &p)
Subclass that implements a CylinderProxy.
SegmentDefContainer m_edges
Subclass that implements a PlaneProxy.
A line shape for intersection tests, mostly for depth sensing and picking.
RenderMode getRenderMode() const
AGXOSG_EXPORT void setAlpha(osg::Node *node, float alpha)
Set the alpha part of the material for a node.
Abstract base class which encapsulated information for rendering a specific shape.
virtual float getAlpha() const
The geometry representation used by the collision detection engine.
void setModifiedCount(agx::UInt32 c)
Subclass that implements a HollowTruncatedConeProxy.
const agx::AffineMatrix4x4 & getTransform() const
agx::VectorPOD< SphereDef > SphereDefContainer
agx::Vec3 m_previousEndPoint0
@ TRANSFORM
The transformation for a proxy is updated.
Subclass that implements a SphereProxy.
Subclass that implements a CylinderProxy.
Base class providing referencing counted objects.
#define AGX_DECLARE_POINTER_TYPES(type)
agx::observer_ptr< agxCollide::Shape > m_shape
This namespace consists of a set of classes for handling geometric intersection tests including boole...
A right circular cone shape for geometric intersection tests.
virtual agx::Vec3 getColor() const
agx::Vector< const agx::RigidBody * > Container
agxRender::RigidBodyBatchRenderProxy::Container m_bodies
const agxCollide::Geometry * getGeometry() const
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
agx::Vec3 m_previousEndPoint1
agx::AffineMatrix4x4 getTransform() const
Subclass that implements a WireShapeProxy.
Triangle mesh for geometric intersection tests.
void setShape(agxCollide::Shape *shape, const agxCollide::Geometry *geometry)
Set the shape for this proxy.
virtual void setColor(const agx::Vec3 &color)
Set the color of this proxy.
Subclass that implements a LineProxy.
virtual void setAlpha(float alpha)
Set the alpha value of this proxy.
const SegmentDef * operator->() const
agx::ref_ptr< WireRenderProxy > WireRenderProxyRef
PlaneT< agx::Real > Plane
Subclass that implements a TrimeshProxy.