function p = RigidBody(name,varargin)
%  Create a RigidBody object 
switch nargin
case 0
   p.name = '';
    
   % if no input arguments, create a default object
   p.dof = 6;
   
   p.I = zeros(3);
   p.mass = 0;
   p.disp = 0;
   p.xG = zeros(1,3);
   p.xB = zeros(1,3);
   p.S = 0;
   p.S11 = 0;
   p.S22 = 0;   
   
   p.mu_inf = zeros(6,6);
   
   p.dt = 0.1;
   p.N = 100;  %Total Timesteps
   p.t = p.dt*(0:p.N-1);
   
   p.g = 9.81;  %m/s^2
   p.rho = 1025;  %m/s^2
   
   p.x0 = [0 0 0 0 0 0];  %Location of bodies equilibrium position in global CS.
   
   p.x = zeros(p.N,p.dof);  %Relative to body in equilibrium position.
   p.xdot = zeros(p.N,p.dof);  
   p.xddot = zeros(p.N,p.dof);  
   
   p.sv = zeros(1,2*p.dof);
   
   p.n_Forces = 0;
   p.ForceFcns = {};
   p.Forces = {};
   
   p.Fixed = 0;  %(0 = Free to move)   (1 = Fixed in space)   (2 = Prescribed motion)
   
   p.Length = [0 0 0];
   
   p.Area = [0 0 0];
   p.Cd = [0 0 0];
   
   p.CdW = 0;
   p.AreaW = 0;
   
   
   p = class(p,'RigidBody');
case 1
   % if single argument of class RigidBody, return it
   if isa(name,'RigidBody')
      p = name;
   end
otherwise
   % create object using specified arguments
   disp('Specific arguments not implemented');
end