Enki  1.9
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Enki::PhysicalObject::Part Class Reference

A part is one of the convex geometrical element that composes the physical object. More...

#include <PhysicalEngine.h>

Public Member Functions

 Part (const Polygone &shape, double height)
 Constructor, builds a shaped part without any texture; shape must be closed and convex.
 
 Part (const Polygone &shape, double height, const Textures &textures)
 Constructor, builds a shaped part with a textured shape; shape must be closed and convex.
 
 Part (double l1, double l2, double height)
 Constructor, builds a rectangular part of size l1xl2, with a given height and color, and update radius.
 
void applyTransformation (const Matrix22 &rot, const Point &trans, double *radius)
 Compute the shape of this part wrt a particular rotation and translation.
 
double getHeight () const
 
double getArea () const
 
const PolygonegetShape () const
 
const PolygonegetTransformedShape () const
 
const PointgetCentroid () const
 
const PointgetTransformedCentroid () const
 
const TexturesgetTextures () const
 
bool isTextured () const
 

Private Member Functions

void computeAreaAndCentroid ()
 Compute the area and the centroid (barycenter) of this shape in object coordinates.
 
void computeTransformedShape (const Matrix22 &rot, const Point &trans)
 Compute the shape of this part in world coordinates with respect to object.
 

Private Attributes

double height
 The height of the part, used for interaction with the sensors of other robots.
 
double area
 The area of this part.
 
Polygone shape
 The shape of the part in object coordinates.
 
Polygone transformedShape
 The shape of the part in world coordinates, updated on initPhysicsInteractions().
 
Point centroid
 The centroid (barycenter) of the part in object coordinates.
 
Point transformedCentroid
 The centroid (barycenter) of the part in world coordinates, updated on initPhysicsInteractions().
 
Textures textures
 Texture for several faces of this object.
 

Friends

class PhysicalObject
 

Detailed Description

A part is one of the convex geometrical element that composes the physical object.


The documentation for this class was generated from the following files: