|
Computational Embodied Neuroscience Simulator
1.1
3D simulation library
|
#include <cens_serialized_engine.h>


Public Member Functions | |
| virtual void | step (int timestep) |
| virtual CENSSerializedRobot * | loadBulletFile (const std::string &robotName, const std::string &file) |
| virtual CENSTouchSensor * | addTouchSensor (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 CENSTouchSensor * | addTouchSensor (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 CENSPixelMap & | getCameraPixelMap (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 () |
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 |
Definition at line 266 of file cens_serialized_engine.h.
|
inlinevirtual |
| cameraName | name of the camera |
| body | The attached body |
| local_transform | transform of the camera |
| screenTitle | target view point |
| screenWidth | width of screen view |
| screenHeight | height of screen view |
| screenXGap | horizontal screen position of view |
| screenYGap | vertical screen position of view |
| up | Up vector of the camera |
| target | target view point |
| foV | field of view |
| near | near plane |
| far | far plane |
Definition at line 296 of file cens_serialized_engine.h.
References cens::CENSEngine::attachCamera(), and m_eCameras.
|
inlinevirtual |
Add a touch sensor (overrides CENSPhysics method).
| body | the body to become a touch sensor |
| name | the name of the touch sensor |
Definition at line 287 of file cens_serialized_engine.h.
References cens::CENSPhysics::addTouchSensor(), and m_eSensors.
|
virtual |
Load rigid bodies and constraints from a bullet file
Definition at line 257 of file cens_serialized_engine.cpp.
References cens::CENSSerializedRobot::addBody(), cens::CENSSerializedRobot::addGenericConstraint(), cens::CENSSerializedRobot::addHinge(), cens::CENSSerializedRobot::addTransform(), cens::CENSImporter::getBodyMap(), cens::CENSSerializedRobot::init(), cens::CENSEngine::localImportRigidBody(), m_eBodies, m_eConstraints, cens::CENSPhysics::m_phDynamicsWorld, cens::CENSPhysics::m_phGravity, and cens::CENSPhysics::m_phSoftBodyWorldInfo.
|
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().
|
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().
|
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().
|
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().
|
protected |
contains all hinges' groups owned by an Engine
Definition at line 324 of file cens_serialized_engine.h.
Referenced by step().
|
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().
1.8.8