waLBerla 7.3
Loading...
Searching...
No Matches
walberla::geometry::Sphere Class Reference

Detailed Description

Class representing a Sphere.

Implements body concept, i.e. a fastOverlapCheck and a contains() function, which can be used to initialize fields. For details about the body concept see BodyOverlapFunctions.h

#include <Sphere.h>

Public Member Functions

 Sphere (const Vector3< real_t > &midp, real_t rad)
 Sphere (const Sphere &o)=default
void setMidpoint (const Vector3< real_t > &point)
void setMidpoint (real_t newVal, uint_t coord)
void setRadius (real_t newRadius)
const Vector3< real_t > & midpoint () const
real_t radius () const
const AABBboundingBox () const
const AABBinnerBox () const

Private Member Functions

void updateBoxes ()
 Recalculates boundingBox_ and innerBox_.

Private Attributes

Vector3< real_tmidpoint_
real_t radius_
AABB boundingBox_
AABB innerBox_

Constructor & Destructor Documentation

◆ Sphere() [1/2]

walberla::geometry::Sphere::Sphere ( const Vector3< real_t > & midp,
real_t rad )
explicit

◆ Sphere() [2/2]

walberla::geometry::Sphere::Sphere ( const Sphere & o)
default

Member Function Documentation

◆ boundingBox()

const AABB & walberla::geometry::Sphere::boundingBox ( ) const
inline

◆ innerBox()

const AABB & walberla::geometry::Sphere::innerBox ( ) const
inline

◆ midpoint()

const Vector3< real_t > & walberla::geometry::Sphere::midpoint ( ) const
inline

◆ radius()

real_t walberla::geometry::Sphere::radius ( ) const
inline

◆ setMidpoint() [1/2]

void walberla::geometry::Sphere::setMidpoint ( const Vector3< real_t > & point)
inline

◆ setMidpoint() [2/2]

void walberla::geometry::Sphere::setMidpoint ( real_t newVal,
uint_t coord )
inline

◆ setRadius()

void walberla::geometry::Sphere::setRadius ( real_t newRadius)
inline

◆ updateBoxes()

void walberla::geometry::Sphere::updateBoxes ( )
private

Recalculates boundingBox_ and innerBox_.

Member Data Documentation

◆ boundingBox_

AABB walberla::geometry::Sphere::boundingBox_
private

◆ innerBox_

AABB walberla::geometry::Sphere::innerBox_
private

◆ midpoint_

Vector3<real_t> walberla::geometry::Sphere::midpoint_
private

◆ radius_

real_t walberla::geometry::Sphere::radius_
private

The documentation for this class was generated from the following files:
  • /builds/administration/walberla-website/walberla/src/geometry/bodies/Sphere.h
  • /builds/administration/walberla-website/walberla/src/geometry/bodies/Sphere.cpp