Computational Embodied Neuroscience Simulator  1.1
3D simulation library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Typedefs | Enumerations | Functions | Variables
cens Namespace Reference

Computational Embodied Neuroscience Simulator library. More...

Classes

class  CENSEngine
 Initializing and manipulating physics objects. More...
 
class  CENSGraphics
 A C++ wrapper for OpenGL. More...
 
class  CENSGraphicsShape
 Graphic processing of an object. More...
 
class  CENSHashMap
 
class  CENSHingeConstraint
 A custom HingeConstraint Class. More...
 
struct  CENSHingeData
 
class  CENSImporter
 
class  CENSPhysics
 An interface to the bullet physics library. More...
 
class  CENSPixelMap
 Use a byte vector as a matrix. More...
 
class  CENSSerializedEngine
 
struct  CENSSerializedRobot
 
class  CENSSliderConstraint
 A custom SliderConstraint Class. More...
 
struct  CENSTouchSensor
 

Typedefs

typedef std::map
< btCollisionObject
*, CENSGraphicsShape * > 
CENSShapes
 
typedef std::pair
< btCollisionObject
*, btCollisionObject * > 
CENSNCPair
 
typedef std::map< CENSNCPair,
bool > 
CENSNonCollidingTable
 
typedef std::map< std::string,
btRigidBody * > 
Bodies
 
typedef std::map< std::string,
btTypedConstraint * > 
Constraints
 
typedef std::map< const
std::string,
CENSSerializedRobot * > 
Robots
 
typedef std::map< const
std::string, CENSTouchSensor * > 
Sensors
 
typedef std::map< const
std::string, int > 
Cameras
 
typedef std::vector< Vector3f > Vertices
 
typedef std::vector< Vector2f > TexCoords
 
typedef std::vector< std::string > strings
 
typedef std::vector< int > Integers
 
typedef std::vector< float > Floats
 

Enumerations

enum  CENSConstraint { CENS_FIXED_CONSTRAINT, CENS_HINGE_CONSTRAINT, CENS_CONETWIST_CONSTRAINT, CENS_SLIDER_CONSTRAINT }
 
enum  GS_TYPE {
  GS_NULL = 1, GS_PLANE, GS_BOX, GS_SPHERE,
  GS_CONVEX, GS_SOFT
}
 

Functions

Eigen::Vector3f btVec2eigen (const btVector3 &v)
 
btVector3 eigen2btVec (const Eigen::Vector3f &v)
 
btMatrix3x3 eigen2btMat (const Eigen::Matrix3f &v)
 
Eigen::Matrix3f btMat2eigen (const btMatrix3x3 &v)
 
void glutKeyboardCallback (unsigned char key, int x, int y)
 
void glutDisplayCallback (void)
 
void glutTimerCallback (int value)
 
void collisionFilteringCallback (btBroadphasePair &collisionPair, btCollisionDispatcher &dispatcher, const btDispatcherInfo &dispatchInfo)
 
void internalTickCallback (btDynamicsWorld *world, btScalar timestep)
 
float scalarFromString (std::string str)
 
std::string str_replace (std::string str, const std::string &searchString, const std::string &replaceString)
 
std::vector< std::string > str_split (std::string str, const std::string &sep)
 
bool str_match (const std::string &str, const std::string &comp)
 
float rad2degree (float grad)
 
float degree2rad (float degree)
 

Variables

CENSGraphicscens_graphics = 0
 
Vector3f GS_NULL_COLOR = Vector3f(-1,-1,-1)
 
Vector3f CENS_NULL_COLOR = Vector3f(-1,-1,-1)
 
Vertices CENS_NULL_VERTICES = Vertices()
 
TexCoords CENS_NULL_TEXCOORDS = TexCoords()
 
CENSPixelMap CENS_NULL_PIXMAP = CENSPixelMap()
 
strings CENS_NULL_STRINGS = strings()
 
const std::string CENS_DEFAULT_CONTROL = "CENS_DEFAULT_CONTROL"
 
const std::string CENS_PD_CONTROL = "CENS_PD_CONTROL"
 
const int GS_SPHERE_LATS = 20
 
const int GS_SPHERE_LONGS = 20
 

Detailed Description

Computational Embodied Neuroscience Simulator library.

Typedef Documentation

typedef std::map<std::string, btRigidBody *> cens::Bodies

maps of groups of bodies

Definition at line 256 of file cens_serialized_engine.h.

typedef std::map<const std::string, int > cens::Cameras

maps of cameras

Definition at line 264 of file cens_serialized_engine.h.

typedef std::pair<btCollisionObject *, btCollisionObject * > cens::CENSNCPair

Pairs of collision objects

Definition at line 72 of file cens_physics.h.

typedef std::map< CENSNCPair , bool > cens::CENSNonCollidingTable

Maps of pairs of collision objects to bool. For each pair in a map true if it collides, false otherwise

Definition at line 77 of file cens_physics.h.

typedef std::map< btCollisionObject *, CENSGraphicsShape * > cens::CENSShapes

maps of graphics shapes to bodies

Definition at line 59 of file cens_engine.h.

typedef std::map<std::string, btTypedConstraint *> cens::Constraints

maps of groups of bodies

Definition at line 258 of file cens_serialized_engine.h.

typedef std::vector<float> cens::Floats

Definition at line 47 of file cens_types.h.

typedef std::vector<int> cens::Integers

Definition at line 46 of file cens_types.h.

typedef std::map<const std::string, CENSSerializedRobot *> cens::Robots

maps of groups of hinges

Definition at line 260 of file cens_serialized_engine.h.

typedef std::map<const std::string, CENSTouchSensor *> cens::Sensors

maps of groups of sensors

Definition at line 262 of file cens_serialized_engine.h.

typedef std::vector< std::string > cens::strings

Definition at line 45 of file cens_types.h.

typedef std::vector<Vector2f> cens::TexCoords

Definition at line 44 of file cens_types.h.

typedef std::vector<Vector3f> cens::Vertices

Definition at line 43 of file cens_types.h.

Enumeration Type Documentation

Enumerator
CENS_FIXED_CONSTRAINT 
CENS_HINGE_CONSTRAINT 
CENS_CONETWIST_CONSTRAINT 
CENS_SLIDER_CONSTRAINT 

Definition at line 55 of file cens_types.h.

Enumerator
GS_NULL 
GS_PLANE 
GS_BOX 
GS_SPHERE 
GS_CONVEX 
GS_SOFT 

Definition at line 65 of file cens_types.h.

Function Documentation

Eigen::Matrix3f cens::btMat2eigen ( const btMatrix3x3 &  v)

Get an eigen Matrix3f from a bullet btMatrix3x3

Definition at line 679 of file cens_engine.cpp.

Referenced by cens::CENSEngine::display().

Eigen::Vector3f cens::btVec2eigen ( const btVector3 &  v)
void cens::collisionFilteringCallback ( btBroadphasePair &  collisionPair,
btCollisionDispatcher &  dispatcher,
const btDispatcherInfo &  dispatchInfo 
)

Decides if collisions are dispatched based on CENSPhysycs::m_phNonCollidingTable

Definition at line 293 of file cens_physics.cpp.

References cens::CENSPhysics::m_phNonCollidingTable.

float cens::degree2rad ( float  degree)
inline

Definition at line 45 of file cens_utils.h.

btMatrix3x3 cens::eigen2btMat ( const Eigen::Matrix3f &  v)

Get a bullet btMatrix3x3 from an eigen Matrix3f

Definition at line 670 of file cens_engine.cpp.

btVector3 cens::eigen2btVec ( const Eigen::Vector3f &  v)

Get a bullet btVector3 from an eigen Vector3f

Definition at line 665 of file cens_engine.cpp.

Referenced by cens::CENSSerializedRobot::enableBodies().

void cens::glutDisplayCallback ( void  )

Definition at line 42 of file cens_graphics.cpp.

References cens_graphics, and cens::CENSGraphics::display().

Referenced by cens::CENSGraphics::initCamera().

void cens::glutKeyboardCallback ( unsigned char  key,
int  x,
int  y 
)
void cens::glutTimerCallback ( int  value)

Definition at line 49 of file cens_graphics.cpp.

References cens_graphics, and cens::CENSGraphics::step().

Referenced by cens::CENSGraphics::initCENSGraphics().

void cens::internalTickCallback ( btDynamicsWorld *  world,
btScalar  timestep 
)

To be called on every substep for collision manifold reading

Definition at line 326 of file cens_physics.cpp.

float cens::rad2degree ( float  grad)
inline

Definition at line 41 of file cens_utils.h.

float cens::scalarFromString ( std::string  str)

Definition at line 31 of file cens_utils.cpp.

bool cens::str_match ( const std::string &  str,
const std::string &  comp 
)

Definition at line 77 of file cens_utils.cpp.

std::string cens::str_replace ( std::string  str,
const std::string &  searchString,
const std::string &  replaceString 
)

Definition at line 36 of file cens_utils.cpp.

Referenced by str_split().

std::vector< std::string > cens::str_split ( std::string  str,
const std::string &  sep 
)

Definition at line 55 of file cens_utils.cpp.

References str_replace().

Variable Documentation

const std::string cens::CENS_DEFAULT_CONTROL = "CENS_DEFAULT_CONTROL"
CENSGraphics * cens::cens_graphics = 0
Vector3f cens::CENS_NULL_COLOR = Vector3f(-1,-1,-1)
CENSPixelMap cens::CENS_NULL_PIXMAP = CENSPixelMap()
strings cens::CENS_NULL_STRINGS = strings()

Definition at line 30 of file cens_types.cpp.

TexCoords cens::CENS_NULL_TEXCOORDS = TexCoords()

Definition at line 28 of file cens_types.cpp.

Vertices cens::CENS_NULL_VERTICES = Vertices()

Definition at line 27 of file cens_types.cpp.

const std::string cens::CENS_PD_CONTROL = "CENS_PD_CONTROL"
Vector3f cens::GS_NULL_COLOR = Vector3f(-1,-1,-1)

Definition at line 28 of file cens_graphics_shape.cpp.

const int cens::GS_SPHERE_LATS = 20
const int cens::GS_SPHERE_LONGS = 20