|
| | BodyPolygon () |
| | Default constructor.
|
| |
| virtual | ~BodyPolygon () |
| | Default destruction.
|
| |
| void | setPoints (vector< Vector3d > polygon_points) |
| | Configure the geometrical points of the polygon.
|
| |
| virtual void | setMaterialId (int material_id) |
| | Configure the material id.
|
| |
| virtual int | getMaterialId () const |
| | Return the material identification.
|
| |
| virtual void | create (Mesh &mesh, Material *material) |
| | Create a body in space using a polygon in 2D.
|
| |
| void | setExtrudeDirection (string extrude_direction) |
| | Configures the extrude direction.
|
| |
| void | setExtrudeDisplacement (double extrude_displacement) |
| | Configures the extrude displacement.
|
| |
| void | setDiscretizationLength (double distretization_length) |
| | Configures the discretization parameter.
|
| |
Public Member Functions inherited from Body |
| | Body () |
| | Default constructor.
|
| |
| virtual | ~Body () |
| | Default destructor.
|
| |
| int | getId () const |
| | Return the body identification.
|
| |
| Vector3d | getInitialVelocity () const |
| | Return the initial velocity of the body.
|
| |
| vector< Particle * > * | getParticles () |
| | Return the particles forming the body.
|
| |
| void | setId (int body_id) |
| | Return the body friction Coefficient.
|
| |
| void | setInitialVelocity (Vector3d initial_velocity) |
| | Configure the initial velocity of the body.
|
| |
| void | setParticles (const vector< Particle * > &particle_list) |
| | Configure the particles in the body.
|
| |
| void | insertParticles (const vector< Particle * > &particle_list) |
| | Configure the friction coefficient of the body.
|
| |
Is a type of Body created by the extrusion of a 2D polygon.
Introduction
This class allows to create a 3D body in the space by extrusion of a 2D polygon.
The extrusion is performed according to a direction and to a displacement. The direction of the extrusion is represented by the extrudeDirection attribute. The displacement of the extrusion is represented by the extrudeDisplacement attribute. This body is fill up with particles according to a discretization parameter distretizationLength.
Extrusion direction
The extrude direction is the axis by with the polygon will be extruded.
Extrusion in x Extrusion in y Extrusion in z
z x y ^ ^ ^ | | | o—> y o—> z o—> x
o : is the axis pointing out of the plane
Extrusion displacement
Is the total displacement of the polygon through the extrusion direction.
The Discretization Length
When the particles are put in the body an auxiliary grid is used. The discretizationLength attribute is the dimension of a grid cell.
How the material points are placed in the body
Once the body was created by extrusion, the material points need to be distributed inside the body. For do that the create method performs this operations:
- calculates the bounding box of the body;
- defines the material point size by the discretization parameter and by assuming 2 material points in each direction inside a cell;
- puts the material points beginning by the left lower point of the bounding box, verifying if the material point is inside the polygon.