File mechanics/src/collision/SiconosShape.hpp

Go to the source code of this file

Definition of an abstract rigid shape.

Typedefs

typedef std::vector<unsigned int> VUInt

Functions

TYPEDEF_SPTR(VUInt)
class SiconosBox : public SiconosShape, public std11::enable_shared_from_this<SiconosBox>

Public Functions

SiconosBox(double width, double height, double depth)
SiconosBox(SP::SiconosVector dimensions)
virtual ~SiconosBox()
ACCEPT_VISITORS()

visitors hook

SP::SiconosVector dimensions() const
void setDimensions(double width, double height, double depth)
void setDimensions(SP::SiconosVector dim)
void setDimensions(const SiconosVector &dim)

Protected Functions

ACCEPT_SERIALIZATION(SiconosBox)

serialization hooks

Protected Attributes

SP::SiconosVector _dimensions

Private Functions

SiconosBox()
class SiconosConvexHull : public SiconosShape, public std11::enable_shared_from_this<SiconosConvexHull>

Public Functions

SiconosConvexHull(SP::SiconosMatrix vertices)
virtual ~SiconosConvexHull()
ACCEPT_VISITORS()

visitors hook

void setVertices(SP::SiconosMatrix vertices)
SP::SiconosMatrix vertices() const

Protected Functions

ACCEPT_SERIALIZATION(SiconosConvexHull)

serialization hooks

Protected Attributes

SP::SiconosMatrix _vertices

Private Functions

SiconosConvexHull()
class SiconosCylinder : public SiconosShape, public std11::enable_shared_from_this<SiconosCylinder>

Public Functions

SiconosCylinder(float radius, float length)
virtual ~SiconosCylinder()
ACCEPT_VISITORS()

visitors hook

double length()
double radius()
void setLength(double length)
void setRadius(double radius)

Protected Functions

ACCEPT_SERIALIZATION(SiconosCylinder)

serialization hooks

Protected Attributes

double _length
double _radius

Private Functions

SiconosCylinder()
class SiconosHeightMap : public SiconosShape, public std11::enable_shared_from_this<SiconosHeightMap>

Public Functions

SiconosHeightMap(SP::SiconosMatrix height_data, double length_x, double length_y)
virtual ~SiconosHeightMap()
ACCEPT_VISITORS()

visitors hook

SP::SiconosMatrix height_data()
double length_x()
double length_y()

Protected Functions

ACCEPT_SERIALIZATION(SiconosHeightMap)

serialization hooks

Protected Attributes

SP::SiconosMatrix _height_data
double _length_x
double _length_y

Private Functions

SiconosHeightMap()
class SiconosPlane : public SiconosShape, public std11::enable_shared_from_this<SiconosPlane>

Public Functions

SiconosPlane()
virtual ~SiconosPlane()
ACCEPT_VISITORS()

visitors hook

Protected Functions

ACCEPT_SERIALIZATION(SiconosPlane)

serialization hooks

class SiconosShape

Subclassed by SiconosBox, SiconosConvexHull, SiconosCylinder, SiconosHeightMap, SiconosPlane, SiconosSphere

Public Functions

virtual ~SiconosShape()
double insideMargin()
double outsideMargin()
void setInsideMargin(double margin)

Set the inside margin of the shape.

This is a distance that the contour should be shrunk to improve contact detection robustness. It will have an effect on the roundness of corners.

void setOutsideMargin(double margin)

Set the outside margin of the shape.

This is the distance from the contact shell to an external shell used to detect contacts in advance. The implementation will detect contact points on the external shell and project them back to the contact shell. Note: Currently not working in Bullet implementation! Better to leave at zero.

unsigned int version() const
VIRTUAL_ACCEPT_VISITORS()

visitors hook

Protected Functions

SiconosShape()
ACCEPT_SERIALIZATION(SiconosShape)

serialization hooks

Protected Attributes

double _inside_margin
double _outside_margin
unsigned int _version
class SiconosSphere : public SiconosShape, public std11::enable_shared_from_this<SiconosSphere>

Public Functions

SiconosSphere(float radius)
virtual ~SiconosSphere()
ACCEPT_VISITORS()

visitors hook

float radius() const
void setRadius(float r)

Protected Functions

ACCEPT_SERIALIZATION(SiconosSphere)

serialization hooks

Protected Attributes

float _radius

Private Functions

SiconosSphere()