Ejemplo n.º 1
0
CylinderShape::CylinderShape(double _radius, double _height)
  : Shape(CYLINDER),
    mRadius(_radius),
    mHeight(_height) {
  assert(0.0 < _radius);
  assert(0.0 < _height);
  _updateBoundingBoxDim();
  updateVolume();
}
Ejemplo n.º 2
0
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();
}
Ejemplo n.º 3
0
void MeshShape::setMesh(const aiScene* _mesh) {
  assert(_mesh);
  mMesh = _mesh;
  _updateBoundingBoxDim();
  computeVolume();
}
Ejemplo n.º 4
0
void CylinderShape::setHeight(double _height) {
  assert(0.0 < _height);
  mHeight = _height;
  _updateBoundingBoxDim();
  updateVolume();
}
Ejemplo n.º 5
0
void CylinderShape::setRadius(double _radius) {
  assert(0.0 < _radius);
  mRadius = _radius;
  _updateBoundingBoxDim();
  updateVolume();
}