SpatialConstraint.h



Classes

SpatialSign -- Spatial Sign helper class (full description)
SpatialConstraint -- Spatial Constraint class (full description)

class SpatialSign

Interface

Public Members
SpatialSign(Sign sign = zERO)
SpatialSign(const SpatialSign &)
SpatialSign & operator =(const SpatialSign &)

Description

The sign class is inherited by Constraint and Convex. Assignment and copy operators are used in both scopes.

Member Description

SpatialSign(Sign sign = zERO)

Constructor

SpatialSign(const SpatialSign &)

Copy constructor

SpatialSign & operator =(const SpatialSign &)

Assignment


class SpatialConstraint : public SpatialSign

Interface

SpatialConstraint()
SpatialConstraint(SpatialVector, float64)
SpatialConstraint(const SpatialConstraint &)
SpatialConstraint & operator =(const SpatialConstraint &)
void invert()
bool contains(const SpatialVector v)
SpatialVector & v()
float64 d() const
void read(istream &in)
void write(ostream &out) const

Description

The Constraint is really a cone on the sky-sphere. It is characterized by its direction a_, the opening angle s_ and its cosine -- the distance of the plane intersecting the sphere and the sphere center. If d_ = 0, we have a half-sphere. If it is negative, we have a 'hole' i.e. the room angle is larger than 90degrees.

Example: positive distance

                   ____
                ---    ---
               /        /|\
              /        / |=\
             |        /  |==|     this side is in the convex.
            |        /\s |===|
            |------------|---| -> direction a
            |        \   |===|
             |        \  |==|
              \        \ |=/
               \        \|/
                ---____---


                     <-d-> is positive (s < 90)

Example: negative distance
                   ____
                ---====---
  this side is /========/|\
  in the      /========/=| \
  convex     |==== s__/==|  |
            |===== / /===|   |
  dir. a <- |------------|---|  'hole' in the sphere
            |========\===|   |
             |========\==|  |
              \========\=| /
               \========\|/
                ---____---


                     <-d-> is negative (s > 90)
for d=0 we have a half-sphere. Combining such, we get triangles, rectangles etc on the sphere surface (pure ZERO convexes)

Member Description

SpatialConstraint()

Constructor

SpatialConstraint(SpatialVector, float64)

Initialization constructor

SpatialConstraint(const SpatialConstraint &)

Copy constructor

SpatialConstraint & operator =(const SpatialConstraint &)

Assignment

void invert()

Invert

bool contains(const SpatialVector v)

check whether a vector is inside this

SpatialVector & v()

give back vector

float64 d() const

give back distance

void read(istream &in)

read

void write(ostream &out) const

write

© Copyright The Johns Hopkins University 1999, All Rights Reserved.
Peter Z. Kunszt,