BSphere.java
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright (c) 2012 Stefan Profanter. All rights reserved. This program and the accompanying
00003  * materials are made available under the terms of the GNU Public License v3.0 which accompanies
00004  * this distribution, and is available at http://www.gnu.org/licenses/gpl.html
00005  * 
00006  * Contributors: Stefan Profanter - initial API and implementation, Year: 2012
00007  ******************************************************************************/
00008 package edu.tum.cs.vis.model.util;
00009 
00010 import javax.vecmath.Vector3f;
00011 
00018 public class BSphere {
00022         private final float             r;
00026         private final Vector3f  center;
00027 
00036         public BSphere(float r, Vector3f center) {
00037                 this.r = r;
00038                 this.center = center;
00039         }
00040 
00046         public Vector3f getCenter() {
00047                 return (Vector3f) center.clone();
00048         }
00049 
00055         public float getR() {
00056                 return r;
00057         }
00058 
00064         public float getArea() {
00065 
00066                 return (float) (4f * Math.PI * (r * r));
00067         }
00068 
00074         public float getVolume() {
00075 
00076                 return (float) ((4 / 3 * Math.PI) * r * r * r);
00077         }
00078 }


knowrob_cad_parser
Author(s): Stefan Profanter
autogenerated on Mon Oct 6 2014 01:29:56