Computational Embodied Neuroscience Simulator  1.1
3D simulation library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Protected Attributes | List of all members
cens::CENSSerializedEngine Class Reference

#include <cens_serialized_engine.h>

Inheritance diagram for cens::CENSSerializedEngine:
Inheritance graph
[legend]
Collaboration diagram for cens::CENSSerializedEngine:
Collaboration graph
[legend]

Public Member Functions

virtual void step (int timestep)
 
virtual CENSSerializedRobotloadBulletFile (const std::string &robotName, const std::string &file)
 
virtual CENSTouchSensoraddTouchSensor (btRigidBody *body, std::string name)
 
virtual int addCamera (std::string cameraName, btRigidBody *body, btTransform local_transform, std::string screenTitle, int screenWidth, int screenHeight, int screenXGap, int screenYGap, btVector3 up, float target, float foV=70.0, float near=1.0, float far=10000)
 
- Public Member Functions inherited from cens::CENSEngine
 CENSEngine ()
 
virtual ~CENSEngine ()
 
virtual void init (int argc, char **argv)
 
virtual void initObjects ()
 
virtual void display ()
 
virtual void run ()
 
virtual void stepRun ()
 
btRigidBody * localCreateRigidBody (float mass, const btTransform &startTransform, btCollisionShape *shape, const btVector3 &color=eigen2btVec(CENS_NULL_COLOR), const TexCoords &texCoords=CENS_NULL_TEXCOORDS, CENSPixelMap &pixmap=CENS_NULL_PIXMAP)
 
btRigidBody * localImportRigidBody (btRigidBody *body, const btVector3 &color=eigen2btVec(CENS_NULL_COLOR), const TexCoords &texCoords=CENS_NULL_TEXCOORDS, CENSPixelMap &pixmap=CENS_NULL_PIXMAP)
 
btSoftBody * localCreateSoftBody (float mass, btCollisionShape *shape, const btVector3 &color=eigen2btVec(CENS_NULL_COLOR), const TexCoords &texCoords=CENS_NULL_TEXCOORDS, CENSPixelMap &pixmap=CENS_NULL_PIXMAP)
 
btSoftBody * localLinkSoftBody (btSoftBody *body, const btVector3 &color=eigen2btVec(CENS_NULL_COLOR), const TexCoords &texCoords=CENS_NULL_TEXCOORDS, CENSPixelMap &pixmap=CENS_NULL_PIXMAP)
 
virtual int attachCamera (btRigidBody *body, btTransform local_transform, std::string screenTitle, int screenWidth, int screenHeight, int screenXGap, int screenYGap, btVector3 up, float target, float foV=70.0, float near=1.0, float far=10000)
 
- Public Member Functions inherited from cens::CENSPhysics
 CENSPhysics ()
 
virtual ~CENSPhysics ()
 
virtual void initCENSPhysics ()
 
virtual void cens_physics_step ()
 
virtual btDynamicsWorld * getDynamicsWorld ()
 
virtual btCollisionDispatcher * getDispatcher ()
 
virtual btRigidBody * localCreateRigidBody (float mass, const btTransform &startTransform, btCollisionShape *shape)
 
virtual btSoftBody * localCreateSoftBody (float mass, btCollisionShape *shape)
 
virtual void setCollisionFilter (CENSNonCollidingTable _non_colliding_table)
 
virtual CENSTouchSensoraddTouchSensor (btRigidBody *body)
 
btScalar getStep ()
 
btScalar getSubstep ()
 
Vector3f getGravity ()
 
- Public Member Functions inherited from cens::CENSGraphics
 CENSGraphics ()
 
 ~CENSGraphics ()
 
virtual void initCENSGraphics (int argc, char **argv)
 
virtual void loop ()
 
virtual void stepToStepLoop ()
 
virtual bool isIdle ()
 
virtual void quit ()
 
virtual void keyboard (unsigned char key, int x, int y)
 
void initCamera (CENSCamera &camera, CENSLight light)
 
void focusCamera (int camera_index)
 
void updateCamera (int camera_index)
 
const CENSPixelMapgetCameraPixelMap (int camera_index)
 
void saveCameraPixelMap (int camera_index, int t, const char *type="jpg")
 
void drawLine (const Vector3f &v1, const Vector3f &v2, const Vector3f color)
 
void drawPlane (const Vector3f &orig, const Vector3f &vec0, const Vector3f &vec1)
 
void drawBox (const Vector3f &orig, const Matrix3f &rotMat, const Vector3f &halfExtent)
 
void drawSphere (const Vector3f &orig, const Matrix3f &rot, float radius)
 
void drawConvex (const Vector3f &orig, const Matrix3f &rot, const std::vector< Vector3f > &vtx, const unsigned int *idx, int nvtxs, int nidxs, int ntrns)
 
void drawAxis (const Vector3f &origin, const Matrix3f &rotation, float length)
 
void drawVector (const Vector3f &v)
 
void drawTriangle (const Vector3f &v1, const Vector3f &v2, const Vector3f &v3, const Vector3f n)
 
void stepLeft ()
 
void stepRight ()
 
void stepFront ()
 
void stepBack ()
 
void zoomIn ()
 
void zoomOut ()
 
void toggleStop ()
 
void toggleTexture ()
 
void toggleAxis ()
 
void toggleObjectAxes ()
 
void toggleJointAxes ()
 
void toggleCameraAxis ()
 

Protected Attributes

Robots m_eRobots
 
Sensors m_eSensors
 
Cameras m_eCameras
 
Bodies m_eBodies
 
Constraints m_eConstraints
 
- Protected Attributes inherited from cens::CENSEngine
CENSShapes m_eShapes
 
std::vector< CENSBodyCameraDatam_eAttachedCameras
 
- Protected Attributes inherited from cens::CENSPhysics
btSoftRigidDynamicsWorld * m_phDynamicsWorld
 
btAlignedObjectArray
< btCollisionShape * > 
m_phCollisionShapes
 
btAlignedObjectArray
< CENSTouchSensor * > 
m_phTouchSensors
 
btAlignedObjectArray
< btSoftSoftCollisionAlgorithm * > 
m_phSoftSoftCollisionAlgorithms
 
btAlignedObjectArray
< btSoftRididCollisionAlgorithm * > 
m_phSoftRigidCollisionAlgorithms
 
btSoftBodyWorldInfo m_phSoftBodyWorldInfo
 
btBroadphaseInterface * m_phBroadphase
 
btCollisionDispatcher * m_phDispatcher
 
btConstraintSolver * m_phSolver
 
btDefaultCollisionConfiguration * m_phCollisionConfiguration
 
btScalar m_phDefaultContactProcessingThreshold
 
Vector3f m_phGravity
 
double m_phStep
 
double m_phSubstep
 
CENSParameterManager m_phParameterManager
 
- Protected Attributes inherited from cens::CENSGraphics
int m_grTimestep
 
int m_grArgc
 
char ** m_grArgv
 
Vector3f m_grEnvColor
 
Vector3f m_grGroundColor
 
Vector3f m_grObjectColor
 
Vector3f m_grBoxColor
 
Vector3f m_grCapsuleColor
 
Vector3f m_grSphereColor
 
Vector3f m_grSoftColor
 
Vector3f m_grCompoundColor
 
bool m_grTextureEnabled
 
bool m_grTextureInitialized
 
bool m_grHide
 
CENSLight m_grLight
 
bool m_grAxisEnabled
 
bool m_grSimEnabled
 
bool m_grCameraAxisEnabled
 
bool m_grObjectAxesEnabled
 
bool m_grJointAxesEnabled
 
CENSCamera m_grViewCamera
 
int m_grEyeCameraNumber
 
std::vector< CENSCamera * > m_grEyeCameras
 
std::vector< CENSCamera * > m_grCameras
 
std::vector< CENSGraphicsShape * > m_grShapes
 
CENSParameterManager m_grParameterManager
 

Additional Inherited Members

- Protected Member Functions inherited from cens::CENSEngine
virtual void syncAttachedCamera (int index)
 
- Protected Member Functions inherited from cens::CENSPhysics
btTransform & getTransformFromBody (btRigidBody *body)
 
btTransform & getTransformFromBody (btSoftBody *body)
 
- Protected Member Functions inherited from cens::CENSGraphics
void beginRendering ()
 
void endRendering ()
 
void initTextures ()
 
void initTexture (const GLubyte *source=0, int width=0, int height=0)
 
- Static Protected Attributes inherited from cens::CENSPhysics
static CENSNonCollidingTable m_phNonCollidingTable
 

Detailed Description

Definition at line 266 of file cens_serialized_engine.h.

Member Function Documentation

virtual int cens::CENSSerializedEngine::addCamera ( std::string  cameraName,
btRigidBody *  body,
btTransform  local_transform,
std::string  screenTitle,
int  screenWidth,
int  screenHeight,
int  screenXGap,
int  screenYGap,
btVector3  up,
float  target,
float  foV = 70.0,
float  near = 1.0,
float  far = 10000 
)
inlinevirtual
Parameters
cameraNamename of the camera
bodyThe attached body
local_transformtransform of the camera
screenTitletarget view point
screenWidthwidth of screen view
screenHeightheight of screen view
screenXGaphorizontal screen position of view
screenYGapvertical screen position of view
upUp vector of the camera
targettarget view point
foVfield of view
nearnear plane
farfar plane

Definition at line 296 of file cens_serialized_engine.h.

References cens::CENSEngine::attachCamera(), and m_eCameras.

virtual CENSTouchSensor* cens::CENSSerializedEngine::addTouchSensor ( btRigidBody *  body,
std::string  name 
)
inlinevirtual

Add a touch sensor (overrides CENSPhysics method).

Parameters
bodythe body to become a touch sensor
namethe name of the touch sensor
Returns
the pointer to the sensor

Definition at line 287 of file cens_serialized_engine.h.

References cens::CENSPhysics::addTouchSensor(), and m_eSensors.

CENSSerializedRobot * cens::CENSSerializedEngine::loadBulletFile ( const std::string &  robotName,
const std::string &  file 
)
virtual
void cens::CENSSerializedEngine::step ( int  ts)
virtual

One step of cens_graphics rendering.

Reimplemented from cens::CENSEngine.

Definition at line 245 of file cens_serialized_engine.cpp.

References m_eRobots, and cens::CENSEngine::step().

Member Data Documentation

Bodies cens::CENSSerializedEngine::m_eBodies
protected

contains all bodies owned by an Engine labeled with a name

Definition at line 342 of file cens_serialized_engine.h.

Referenced by loadBulletFile().

Cameras cens::CENSSerializedEngine::m_eCameras
protected

contains all camera indices labeled with the name of their rigid body

Definition at line 336 of file cens_serialized_engine.h.

Referenced by addCamera().

Constraints cens::CENSSerializedEngine::m_eConstraints
protected

contains all constraints owned by an Engine labeled with a name

Definition at line 348 of file cens_serialized_engine.h.

Referenced by loadBulletFile().

Robots cens::CENSSerializedEngine::m_eRobots
protected

contains all hinges' groups owned by an Engine

Definition at line 324 of file cens_serialized_engine.h.

Referenced by step().

Sensors cens::CENSSerializedEngine::m_eSensors
protected

contains all sensors owned by an Engine labeled with the name of their rigid body

Definition at line 330 of file cens_serialized_engine.h.

Referenced by addTouchSensor().


The documentation for this class was generated from the following files: