#include <Circle.h>
Inheritance diagram for Circle:
Definition at line 15 of file Circle.h.
|
Constructor, sets the position and radius, the tactile sensors (if any), computes the mass and inertia based on default density. Definition at line 7 of file Circle.cpp. References computeBox(), computeInertia(), computeMass(), Vector2::x, and Vector2::y. |
|
Destructor, does nothing. Definition at line 22 of file Circle.cpp. |
|
Computes the bounding box. Reimplemented from PhysicalObject. Definition at line 62 of file Circle.h. References real. Referenced by Circle(), and setRadius(). |
|
Computes the moment of inertia around the z axis that passes through the center, based on the mass and the radius. Reimplemented from PhysicalObject. Definition at line 38 of file Circle.cpp. References R. Referenced by Circle(), and setRadius(). |
|
Sets the mass based on the radius and the density. Reimplemented from PhysicalObject. Definition at line 34 of file Circle.cpp. References R. Referenced by Circle(), and setRadius(). |
|
Tests for contacts between this object and a circle. Reimplemented from PhysicalObject. Definition at line 81 of file Circle.cpp. References getISensor(), M_PI, Vector2::normalize(), R, PhysicalObject::r, real, sqr(), Vector2::x, and Vector2::y. |
|
Tests for contacts between this object and a border. Reimplemented from PhysicalObject. Definition at line 43 of file Circle.cpp. References getISensor(), Border::normal, PhysicalObject::r, real, Vector2::setToZero(), Vector2::x, and Vector2::y. |
|
Redirects contact detection. Implements PhysicalObject. Definition at line 45 of file Circle.h. References PhysicalObject::detectContacts(). Referenced by Spherus::detectContacts(), and Spherus::detectInternalContacts(). |
|
Detects whether a click of the mouse at rMouse has touched the object. In case of contact, returns true and sets p to the relative vector between the center of the object and the contact point; p is expressed in the object reference frame because it rotates with the object while the object is dragged. Reimplemented from PhysicalObject. Definition at line 121 of file Circle.cpp. References Vector2::getSquaredModule(), R, and Vector2::rotate(). Referenced by Spherus::detectMouseContact(). |
|
Draws the circle on the user interface. Implements GraphicalObject. Definition at line 160 of file Circle.cpp. References GUI::drawCircle(), R, GUI::setBrushColor(), GUI::setPenColor(), Vector2::x, and Vector2::y. Referenced by Spherus::draw(). |
|
Draws the activation of the circle's contact sensors. Definition at line 170 of file Circle.cpp. References GUI::drawLine(), M_PI, R, real, sensorsStartAngle, Vector2::x, and Vector2::y. |
|
Returns the index of the tactile sensor activated by a contact at relative position p. Definition at line 137 of file Circle.cpp. References real, Vector2::x, and Vector2::y. Referenced by detectContacts(), and CappedRectangle::detectContacts(). |
|
Tells that this object has circular symmetry. Reimplemented from PhysicalObject. |
|
Sets the radius of the circle, computes the mass and inertia based on default density. Definition at line 27 of file Circle.cpp. References computeBox(), computeInertia(), and computeMass(). |
|
Sets the activation of a tactile sensor, corresponding to the given contact. To be overridden. Reimplemented from PhysicalObject. Definition at line 151 of file Circle.cpp. References ContactInfo::force, ContactInfo::iSensor, and real. |
|
Radius of the circle Definition at line 29 of file Circle.h. Referenced by computeInertia(), computeMass(), Iunctus::controll(), VisualSensor::detectContacts(), detectContacts(), CappedRectangle::detectContacts(), detectMouseContact(), Iunctus::draw(), draw(), and drawSensors(). |
|
The start angle for the contact sensors; 0..2Pi Definition at line 69 of file Circle.h. Referenced by drawSensors(). |
Thyrix homepage Users' guide
(C) Arxia 2004-2005