symmetries_2_c Class Reference

this is the symmetries class for spheres. More...

#include <symmetries_2.h>

Inheritance diagram for symmetries_2_c:

Inheritance graph
[legend]
Collaboration diagram for symmetries_2_c:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 symmetries_2_c (void)
unsigned int getNumTransformations (void) const
 Get the number of possible transformations for a voxel space.
unsigned int getNumTransformationsMirror (void) const
 Get the number of possible transformations for a voxel space.
bool symmetrieContainsTransformation (symmetries_t s, unsigned int t) const
 This return true, if the symmetry contains the given transformation.
unsigned char transAdd (unsigned char t1, unsigned char t2) const
 returns the transformation that results, when you first carry out transformation t1 and then transformation t2
unsigned char minimizeTransformation (symmetries_t s, unsigned char trans) const
 Find the first transformation, for a shape with the given symmetry group that results in a shape identical to the given transformation.
unsigned int countSymmetryIntersection (symmetries_t resultSym, symmetries_t s2) const
 This counts how much 'overlap' there is in symmetry between the given result and the shape.
bool symmetriesLeft (symmetries_t resultSym, symmetries_t s2) const
 Do the result and the shape share common symmetries? This is a bit like countSymmetryIntersection() > 1, only faster.
symmetries_t calculateSymmetry (const voxel_c *pp) const
 calculate the symmetry group for the given voxel space
bool symmetryContainsMirror (symmetries_t sym) const
 returns true, if the symmetry group given contains a mirror transformation, meaning the shape that symmetry belongs to can be mirrored by using just rotations
bool symmetryKnown (const voxel_c *pp) const
 find out if the shape has an unknown symmetry group.
bool isTransformationUnique (symmetries_t s, unsigned int trans) const
 When you apply all the transformations to the shape with a given symmetry s for which this function returns true, you get all possible orientations that that shape can have.

Private Member Functions

 symmetries_2_c (const symmetries_2_c &)
void operator= (const symmetries_2_c &)


Detailed Description

this is the symmetries class for spheres.

Internally this class differs a bit from the other implementations because the spheres have so many orientations. To many that they don't fit into a long long, so we need to use a self made bitfield class for those things


Constructor & Destructor Documentation

symmetries_2_c::symmetries_2_c ( void   ) 

symmetries_2_c::symmetries_2_c ( const symmetries_2_c  )  [private]


Member Function Documentation

symmetries_t symmetries_2_c::calculateSymmetry ( const voxel_c pp  )  const [virtual]

calculate the symmetry group for the given voxel space

Implements symmetries_c.

References bt_assert, and symmetryKnown().

unsigned int symmetries_2_c::countSymmetryIntersection ( symmetries_t  resultSym,
symmetries_t  s2 
) const [virtual]

This counts how much 'overlap' there is in symmetry between the given result and the shape.

The value is small, when the 2 shapes have less symmetries in common

Implements symmetries_c.

References bt_assert, and bitfield_c< bits >::countbits().

unsigned int symmetries_2_c::getNumTransformations ( void   )  const [virtual]

Get the number of possible transformations for a voxel space.

This number does not include mirror transformations

Implements symmetries_c.

unsigned int symmetries_2_c::getNumTransformationsMirror ( void   )  const [virtual]

Get the number of possible transformations for a voxel space.

This time the mirror transformations are included. Normally this value is twice the number you get when calling getNumTransformations

Implements symmetries_c.

bool symmetries_2_c::isTransformationUnique ( symmetries_t  s,
unsigned int  t 
) const [virtual]

When you apply all the transformations to the shape with a given symmetry s for which this function returns true, you get all possible orientations that that shape can have.

Implements symmetries_c.

References bt_assert, and bitfield_c< bits >::get().

unsigned char symmetries_2_c::minimizeTransformation ( symmetries_t  s,
unsigned char  trans 
) const [virtual]

Find the first transformation, for a shape with the given symmetry group that results in a shape identical to the given transformation.

This functionality is used when rotating an assembly. The new transformation is found out by using transAdd but then we might end up with a high transformation number even though the symmetries of the shape would say otherwise.

An example. Suppose you have a cube in orientation 0. Now you transform that cube by transformation 1 resulting in orientation 1 for the cube. But a cube in orientation 1, well in _any_ orientation looks identical so we can just as well say we leave the cube in orientation 0

Implements symmetries_c.

References bt_assert, and transformationMinimizer.

void symmetries_2_c::operator= ( const symmetries_2_c  )  [private]

bool symmetries_2_c::symmetrieContainsTransformation ( symmetries_t  s,
unsigned int  t 
) const [virtual]

This return true, if the symmetry contains the given transformation.

A a symmetry group contains a list of transformations. This functions tells you whether the given symmetry group s contains transformation t

Implements symmetries_c.

References bt_assert, and bitfield_c< bits >::get().

bool symmetries_2_c::symmetriesLeft ( symmetries_t  resultSym,
symmetries_t  s2 
) const [virtual]

Do the result and the shape share common symmetries? This is a bit like countSymmetryIntersection() > 1, only faster.

Implements symmetries_c.

References bt_assert, bitfield_c< bits >::notNull(), and bitfield_c< bits >::reset().

bool symmetries_2_c::symmetryContainsMirror ( symmetries_t  sym  )  const [virtual]

returns true, if the symmetry group given contains a mirror transformation, meaning the shape that symmetry belongs to can be mirrored by using just rotations

Implements symmetries_c.

References bt_assert, bitfield_c< bits >::notNull(), and bitfield_c< bits >::reset().

bool symmetries_2_c::symmetryKnown ( const voxel_c pp  )  const [virtual]

find out if the shape has an unknown symmetry group.

This was especially useful when this feature with the symmetry groups was introduced and not all of the symmetry groups were known. Nowadays there should be very little chance of finding new symmetry groups. I still leave this extra check in just in case

Implements symmetries_c.

References bitfield_c< bits >::clear(), voxel_c::identicalInBB(), bitfield_c< bits >::set(), and voxel_2_c::transform().

Referenced by calculateSymmetry().

unsigned char symmetries_2_c::transAdd ( unsigned char  t1,
unsigned char  t2 
) const [virtual]

returns the transformation that results, when you first carry out transformation t1 and then transformation t2

the function might return TND, when the new required transformation doesn't exist

Implements symmetries_c.

References bt_assert, and transMult.


The documentation for this class was generated from the following files:

Generated on Sun Oct 10 10:03:13 2010 for BurrTools by  doxygen 1.5.8