Skip to content

raisim::Sphere ​

class · #include <raisim/object/singleBodies/Sphere.hpp>

Inherits: raisim::SingleBodyObject

A rigid sphere. The body frame origin is at the sphere center (= COM). Create it with World::addSphere(). Spheres use EXPLICIT_GYROSCOPIC_FORCE by default.

Constructors & destructor ​

Sphere ​

cpp
explicit Sphere(double radius, double mass)

Parameters

ParameterDescription
radius (in)radius (m), finite and positive
mass (in)mass (kg)

Public member functions ​

getRadius ​

cpp
double getRadius() const

returns the radius of the sphere

Returns the radius of the sphere (m)

updateContactAabbs ​

cpp
void updateContactAabbs() override

Internal: recomputes the world-frame AABBs used by the broadphase.

Inherited members ​

From raisim::SingleBodyObject: clearExternalForcesAndTorques, getAngularVelocity, getAppearance, getBodyToComPosition_rs, getCollisionBody, getCollisionGroup, getCollisionMask, getCom, getComPosition, getComPosition_rs, getContactPointVel, getDOF, getEnergy, getGeneralizedCoordinateDim, getGyroscopicMode, getInertiaMatrix_B, getInertiaMatrix_B_rs, getInertiaMatrix_W, getInertiaMatrix_W_rs, getKineticEnergy, getLinearMomentum, getLinearVelocity, getMass, getObjectType, getOrientation, getPosition, getPotentialEnergy, getQuaternion, getRotationMatrix, getVelocity, integrate, preContactSolverUpdate1, preContactSolverUpdate2, setAngularDamping, setAngularVelocity, setAppearance, setBodyType, setCom, setConstraintForce, setExternalForce, setExternalTorque, setGyroscopicMode, setInertia, setLinearDamping, setLinearVelocity, setMass, setOrientation, setPose, setPosition, setVelocity, updateCollision

From raisim::Object: addContactToPerObjectContact, clearPerObjectContact, getBodyType, getContactAabb, getContactAabbCount, getContacts, getExternalForce, getExternalForcePosition, getExternalTorque, getExternalTorquePosition, getId, getIndexInWorld, getName, getRenderRevision, Id, lock, lockMutex, setIndexInWorld, setName, try_lock, unlock, unlockMutex

RaiSim — physics for robotics and AI.