+
+// This returns a pointer to the point passed in, if it coincides. Otherwise returns NULL.
+/*virtual*/ Vector * Object::GetPointAt(Vector)
+{
+ return 0;
+}
+
+
+// This is meant for writing object data to a file.
+/*virtual*/ void Object::Enumerate(FILE *)
+{
+}
+
+
+/*virtual*/ Object * Object::Copy(void)
+{
+ return new Object(position, parent);
+}
+
+
+// This returns a point on the object at 'parameter', which is between 0 and 1.
+// Default is to return the object's position.
+/*virtual*/ Vector Object::GetPointAtParameter(double)
+{
+ return position;
+}
+
+
+// Since these functions are pretty much non-object specific, we can implement
+// them here. :-)
+/*virtual*/ void Object::Connect(Object * obj, double parameter)
+{
+ connected.push_back(Connection(obj, parameter));
+}
+
+
+/*virtual*/ void Object::Disconnect(Object * obj, double parameter)
+{
+ for(uint i=0; i<connected.size(); i++)
+ {
+ if (connected[i].object == obj && connected[i].t == parameter)
+ {
+ connected.erase(connected.begin() + i);
+ return;
+ }
+ }
+}
+
+
+/*virtual*/ void Object::DisconnectAll(Object * obj)
+{
+ // According the std::vector docs, only items at position i and beyond are
+ // invalidated, everything before i is still valid. So we use that here.
+ for(uint i=0; i<connected.size();)
+ {
+ // If we found our object, erase it from the vector but don't advance
+ // the iterator. Otherwise, advance the iterator. :-)
+ if (connected[i].object == obj)
+ connected.erase(connected.begin() + i);
+ else
+ i++;
+ }
+}
+
+
+/*virtual*/ QRectF Object::Extents(void)
+{
+ // Generic object returns an empty rect...
+ return QRectF();
+}
+
+
+#if 0
+/*virtual*/ ObjectType Object::Type(void)
+{
+ return OTObject;
+}
+#endif
+
+
+/*virtual*/ void Object::Translate(Vector amount)
+{
+ position += amount;
+}
+
+
+/*virtual*/ void Object::Rotate(Vector, double)
+{
+}
+
+
+/*virtual*/ void Object::Scale(Vector, double)
+{
+}
+
+