CylinderShape::CylinderShape(double _radius, double _height) : Shape(CYLINDER), mRadius(_radius), mHeight(_height) { assert(0.0 < _radius); assert(0.0 < _height); _updateBoundingBoxDim(); updateVolume(); }
MeshShape::MeshShape(const Eigen::Vector3d& _scale, const aiScene* _mesh) : Shape(MESH), mScale(_scale), mMesh(_mesh), mDisplayList(0) { assert(_scale[0] > 0.0); assert(_scale[1] > 0.0); assert(_scale[2] > 0.0); _updateBoundingBoxDim(); computeVolume(); initMeshes(); }
void MeshShape::setMesh(const aiScene* _mesh) { assert(_mesh); mMesh = _mesh; _updateBoundingBoxDim(); computeVolume(); }
void CylinderShape::setHeight(double _height) { assert(0.0 < _height); mHeight = _height; _updateBoundingBoxDim(); updateVolume(); }
void CylinderShape::setRadius(double _radius) { assert(0.0 < _radius); mRadius = _radius; _updateBoundingBoxDim(); updateVolume(); }