~yade-dev/yade/0.80

« back to all changes in this revision

Viewing changes to pkg/dem/Ig2_Box_Sphere_ScGeom.hpp

  • Committer: Anton Gladky
  • Date: 2012-05-02 21:50:42 UTC
  • Revision ID: gladky.anton@gmail.com-20120502215042-v1fa9r65usqe7kfk
0.80.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*************************************************************************
 
2
*  Copyright (C) 2004 by Olivier Galizzi                                 *
 
3
*  olivier.galizzi@imag.fr                                               *
 
4
*  Copyright (C) 2004 by Janek Kozicki                                   *
 
5
*  cosurgi@berlios.de                                                    *
 
6
*  Copyright (C) 2006 by Bruno Chareyre                                  *
 
7
*  bruno.chareyre@hmg.inpg.fr                                            *
 
8
*                                                                        *
 
9
*  This program is free software; it is licensed under the terms of the  *
 
10
*  GNU General Public License v2 or later. See file LICENSE for details. *
 
11
*************************************************************************/
 
12
 
 
13
#pragma once
 
14
#include<yade/pkg/common/Sphere.hpp>
 
15
#include<yade/pkg/common/Box.hpp>
 
16
#include<yade/pkg/common/Dispatching.hpp>
 
17
 
 
18
 
 
19
class Ig2_Box_Sphere_ScGeom : public IGeomFunctor
 
20
{
 
21
        public :
 
22
                virtual bool go(const shared_ptr<Shape>& cm1, const shared_ptr<Shape>& cm2, const State& state1, const State& state2, const Vector3r& shift2, const bool& force, const shared_ptr<Interaction>& c);
 
23
 
 
24
                virtual bool goReverse( const shared_ptr<Shape>& cm1, const shared_ptr<Shape>& cm2, const State& state1, const State& state2, const Vector3r& shift2, const bool& force, const shared_ptr<Interaction>& c);
 
25
 
 
26
        YADE_CLASS_BASE_DOC(Ig2_Box_Sphere_ScGeom,IGeomFunctor,"Create an interaction geometry :yref:`ScGeom` from :yref:`Box` and :yref:`Sphere`, representing the box with a projected virtual sphere of same radius.")
 
27
        FUNCTOR2D(Box,Sphere);
 
28
        DEFINE_FUNCTOR_ORDER_2D(Box,Sphere);
 
29
};
 
30
REGISTER_SERIALIZABLE(Ig2_Box_Sphere_ScGeom);
 
31
 
 
32
class Ig2_Box_Sphere_ScGeom6D : public Ig2_Box_Sphere_ScGeom
 
33
{
 
34
        public :
 
35
                virtual bool go(const shared_ptr<Shape>& cm1, const shared_ptr<Shape>& cm2, const State& state1, const State& state2, const Vector3r& shift2, const bool& force, const shared_ptr<Interaction>& c);
 
36
 
 
37
                virtual bool goReverse(const shared_ptr<Shape>& cm1, const shared_ptr<Shape>& cm2, const State& state1, const State& state2, const Vector3r& shift2, const bool& force, const shared_ptr<Interaction>& c);
 
38
 
 
39
        YADE_CLASS_BASE_DOC(Ig2_Box_Sphere_ScGeom6D,Ig2_Box_Sphere_ScGeom,"Create an interaction geometry :yref:`ScGeom6D` from :yref:`Box` and :yref:`Sphere`, representing the box with a projected virtual sphere of same radius.")
 
40
        FUNCTOR2D(Box,Sphere);
 
41
        DEFINE_FUNCTOR_ORDER_2D(Box,Sphere);
 
42
};
 
43
REGISTER_SERIALIZABLE(Ig2_Box_Sphere_ScGeom6D);
 
44