use of maspack.spatialmotion.SpatialInertia in project artisynth_core by artisynth.
the class RigidCompositeBody method addMeshInertia.
protected void addMeshInertia(MeshBase base, double density) {
if (base == null) {
throw new IllegalStateException("Mesh has not been set");
}
if (base instanceof PolygonalMesh) {
PolygonalMesh mesh = (PolygonalMesh) base;
SpatialInertia M = mesh.createInertia(density);
mySpatialInertia.add(M);
} else if (base instanceof PointMesh) {
// XXX to implement
} else if (base instanceof PolylineMesh) {
// XXX to implement
}
}
Aggregations