Search in sources :

Example 1 with ThreeSpacePointImmutable

use of cbit.vcell.geometry.concept.ThreeSpacePointImmutable in project vcell by virtualcell.

the class SphereTestFixture method getTestSphere.

/**
 * @return test spherical tessellation
 * @throws ProgrammingException if not {@link #isSphereTest()}
 */
public List<? extends Polygon> getTestSphere() {
    if (isSphereTest()) {
        IcoSphere icoSphere = IcoSphere.get();
        List<PolygonImmutable> tessel = icoSphere.getTessellation(level);
        ThreeSpacePoint centerPoint = new ThreeSpacePointImmutable(center[0], center[1], center[2]);
        List<Triangle> tl = Triangle.scale(tessel, radius, centerPoint);
        return tl;
    }
    throw new ProgrammingException("getTestSphere called on non test Simulation");
}
Also used : ThreeSpacePointImmutable(cbit.vcell.geometry.concept.ThreeSpacePointImmutable) PolygonImmutable(cbit.vcell.geometry.concept.PolygonImmutable) Triangle(cbit.vcell.geometry.surface.Triangle) ThreeSpacePoint(cbit.vcell.geometry.concept.ThreeSpacePoint) ProgrammingException(org.vcell.util.ProgrammingException) IcoSphere(cbit.vcell.geometry.surface.IcoSphere)

Aggregations

PolygonImmutable (cbit.vcell.geometry.concept.PolygonImmutable)1 ThreeSpacePoint (cbit.vcell.geometry.concept.ThreeSpacePoint)1 ThreeSpacePointImmutable (cbit.vcell.geometry.concept.ThreeSpacePointImmutable)1 IcoSphere (cbit.vcell.geometry.surface.IcoSphere)1 Triangle (cbit.vcell.geometry.surface.Triangle)1 ProgrammingException (org.vcell.util.ProgrammingException)1