Core 1.0
Scales Class Reference

Scales defined as the difference between two spheres, not a lens. More...

#include <scales.h>

Public Member Functions

 Scales (const Sphere &, const Sphere &)
 Create a scale as the difference of two spheres.
 
 Scales (const Circle &, const double &, const double &)
 Create a scale from a circle given and two heights.
 
Scales Translated (const Vector &) const
 Translate a scale.
 
Scales Rotated (const Matrix &) const
 Return a scale rotated by a given matrix.
 
Box GetBox () const
 Compute the bouding box.
 
Cylinder GetCylinder () const
 Compute the bouding cylinder.
 
double Signed (const Vector &) const
 Compute the signed distance between the scale and a point.
 
double R (const Vector &) const
 Compute the squared distance between the scale and a point.
 
Vector Normal (const Vector &) const
 Compute the distance vector.
 

Protected Attributes

Sphere cut
 Sphere and the cutting sphere
 
Circle circle
 Intersection circle.
 

Detailed Description

Scales defined as the difference between two spheres, not a lens.

See also
Lens

Constructor & Destructor Documentation

◆ Scales() [1/2]

Scales::Scales ( const Sphere & a,
const Sphere & b )

Create a scale as the difference of two spheres.

Parameters
a,bSphere and cutting sphere.

◆ Scales() [2/2]

Scales::Scales ( const Circle & circle,
const double & a,
const double & b )

Create a scale from a circle given and two heights.

Parameters
circleThe circle.
a,bHeights, starting with the greatest.

Member Function Documentation

◆ GetBox()

Box Scales::GetBox ( ) const

Compute the bouding box.

Calls Scales::GetCylinder()

◆ Normal()

Vector Scales::Normal ( const Vector & p) const

Compute the distance vector.

Parameters
pPoint.

◆ R()

double Scales::R ( const Vector & p) const

Compute the squared distance between the scale and a point.

Parameters
pPoint.

◆ Rotated()

Scales Scales::Rotated ( const Matrix & r) const

Return a scale rotated by a given matrix.

Parameters
rRotation matrix.

◆ Signed()

double Scales::Signed ( const Vector & p) const

Compute the signed distance between the scale and a point.

Parameters
pPoint.

◆ Translated()

Scales Scales::Translated ( const Vector & t) const

Translate a scale.

Parameters
tTranslation vector.