SOFA plugin: SofaTest  master
Open source framework for multi-physics simuation
sofa::PrimitiveCreationTest Namespace Reference

Functions

void rotx (double ax, Vec3 &x, Vec3 &y, Vec3 &z)
 
void roty (double angle, Vec3 &x, Vec3 &y, Vec3 &z)
 
void rotz (double angle, Vec3 &x, Vec3 &y, Vec3 &z)
 
sofa::component::collision::geometry::TriangleCollisionModel< sofa::defaulttype::Vec3Types >::SPtr makeTri (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &v, sofa::simulation::Node::SPtr &father)
 Makes up an OBBCollisionModel<sofa::defaulttype::Rigid3Types> containing just one OBB. angles and order are the rotations used to make up this OBB. More...
 
sofa::component::collision::geometry::SphereCollisionModel< sofa::defaulttype::Rigid3Types >::SPtr makeRigidSphere (const Vec3 &p, SReal radius, const Vec3 &v, const double *angles, const int *order, sofa::simulation::Node::SPtr &father)
 
sofa::component::collision::geometry::SphereCollisionModel< sofa::defaulttype::Vec3Types >::SPtr makeSphere (const Vec3 &p, SReal radius, const Vec3 &v, sofa::simulation::Node::SPtr &father)
 
SOFA_SOFATEST_API sofa::component::collision::geometry::TriangleCollisionModel< sofa::defaulttype::Vec3Types >::SPtr makeTri (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &v, sofa::simulation::Node::SPtr &father)
 Makes up an OBBCollisionModel<sofa::defaulttype::Rigid3Types> containing just one OBB. angles and order are the rotations used to make up this OBB. More...
 
SOFA_SOFATEST_API sofa::component::collision::geometry::SphereCollisionModel< sofa::defaulttype::Rigid3Types >::SPtr makeRigidSphere (const Vec3 &p, SReal radius, const Vec3 &v, const double *angles, const int *order, sofa::simulation::Node::SPtr &father)
 
SOFA_SOFATEST_API sofa::component::collision::geometry::SphereCollisionModel< sofa::defaulttype::Vec3Types >::SPtr makeSphere (const Vec3 &p, SReal radius, const Vec3 &v, sofa::simulation::Node::SPtr &father)
 
void rotx (double ax, Vec3 &x, Vec3 &y, Vec3 &z)
 
void roty (double ax, Vec3 &x, Vec3 &y, Vec3 &z)
 
void rotz (double ax, Vec3 &x, Vec3 &y, Vec3 &z)
 

Function Documentation

◆ makeRigidSphere() [1/2]

sofa::component::collision::geometry::SphereCollisionModel<sofa::defaulttype::Rigid3Types>::SPtr sofa::PrimitiveCreationTest::makeRigidSphere ( const Vec3 &  p,
SReal  radius,
const Vec3 &  v,
const double *  angles,
const int *  order,
sofa::simulation::Node::SPtr &  father 
)

◆ makeRigidSphere() [2/2]

SOFA_SOFATEST_API sofa::component::collision::geometry::SphereCollisionModel<sofa::defaulttype::Rigid3Types>::SPtr sofa::PrimitiveCreationTest::makeRigidSphere ( const Vec3 &  p,
SReal  radius,
const Vec3 &  v,
const double *  angles,
const int *  order,
sofa::simulation::Node::SPtr &  father 
)

◆ makeSphere() [1/2]

sofa::component::collision::geometry::SphereCollisionModel<sofa::defaulttype::Vec3Types>::SPtr sofa::PrimitiveCreationTest::makeSphere ( const Vec3 &  p,
SReal  radius,
const Vec3 &  v,
sofa::simulation::Node::SPtr &  father 
)

◆ makeSphere() [2/2]

SOFA_SOFATEST_API sofa::component::collision::geometry::SphereCollisionModel<sofa::defaulttype::Vec3Types>::SPtr sofa::PrimitiveCreationTest::makeSphere ( const Vec3 &  p,
SReal  radius,
const Vec3 &  v,
sofa::simulation::Node::SPtr &  father 
)

◆ makeTri() [1/2]

sofa::component::collision::geometry::TriangleCollisionModel<sofa::defaulttype::Vec3Types>::SPtr sofa::PrimitiveCreationTest::makeTri ( const Vec3 &  p0,
const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  v,
sofa::simulation::Node::SPtr &  father 
)

Makes up an OBBCollisionModel<sofa::defaulttype::Rigid3Types> containing just one OBB. angles and order are the rotations used to make up this OBB.

Parameters
pthe center of the OBB
anglesit is of size 3 and contains the rotations around axes, i.e., angles[0] contains rotation around x axis etc...
orderit is the order we rotate, i.e, if we want to rotate first around z axis, then x axis and then y axis order will be {2,0,1}
vit is the velocity of the OBB
extentsit contains half-extents of the OBB
fatherit is a node that will contain the returned OBBModel

◆ makeTri() [2/2]

SOFA_SOFATEST_API sofa::component::collision::geometry::TriangleCollisionModel<sofa::defaulttype::Vec3Types>::SPtr sofa::PrimitiveCreationTest::makeTri ( const Vec3 &  p0,
const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  v,
sofa::simulation::Node::SPtr &  father 
)

Makes up an OBBCollisionModel<sofa::defaulttype::Rigid3Types> containing just one OBB. angles and order are the rotations used to make up this OBB.

Parameters
pthe center of the OBB
anglesit is of size 3 and contains the rotations around axes, i.e., angles[0] contains rotation around x axis etc...
orderit is the order we rotate, i.e, if we want to rotate first around z axis, then x axis and then y axis order will be {2,0,1}
vit is the velocity of the OBB
extentsit contains half-extents of the OBB
fatherit is a node that will contain the returned OBBModel

◆ rotx() [1/2]

void sofa::PrimitiveCreationTest::rotx ( double  ax,
Vec3 &  x,
Vec3 &  y,
Vec3 &  z 
)

◆ rotx() [2/2]

void sofa::PrimitiveCreationTest::rotx ( double  ax,
Vec3 &  x,
Vec3 &  y,
Vec3 &  z 
)

◆ roty() [1/2]

void sofa::PrimitiveCreationTest::roty ( double  angle,
Vec3 &  x,
Vec3 &  y,
Vec3 &  z 
)

◆ roty() [2/2]

void sofa::PrimitiveCreationTest::roty ( double  ax,
Vec3 &  x,
Vec3 &  y,
Vec3 &  z 
)

◆ rotz() [1/2]

void sofa::PrimitiveCreationTest::rotz ( double  angle,
Vec3 &  x,
Vec3 &  y,
Vec3 &  z 
)

◆ rotz() [2/2]

void sofa::PrimitiveCreationTest::rotz ( double  ax,
Vec3 &  x,
Vec3 &  y,
Vec3 &  z 
)