Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Voxel Class Reference

#include <Voxel.h>

Collaboration diagram for Voxel:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 6 of file Voxel.h.

Public Member Functions

 Voxel ()
void setFilled (bool fill)
bool isFilled ()
void setInternalCavity (bool internalCv)
bool isInternalCavity ()
void setSurfaceVoxel (bool surface)
bool isSurfaceVoxel ()
void setActiveSite (bool activesite)
bool isActiveSite ()
void setBlockedDirectionSize (int blockedNumber)
int getBlockedDirectionSize ()
void setDirectionalVisibility (int x, int y, int z, int visibility)
int getDirectionalVisibility (int x, int y, int z)
void setGID (int id)
int getGID ()
void setAtomID (Atom *)
AtomgetAtomID ()
Amino_AcidgetResidueID ()

Private Attributes

char flags
int GID
char blockedDirectionSize
int directionalVisibility
AtomatomID


Constructor & Destructor Documentation

Voxel::Voxel  ) 
 

Definition at line 11 of file Voxel.cpp.

References atomID, directionalVisibility, flags, and GID.

00011              {
00012         flags = 0;
00013         directionalVisibility = 0;
00014         GID = -1;
00015         atomID = NULL;
00016 }


Member Function Documentation

Atom * Voxel::getAtomID  ) 
 

Definition at line 99 of file Voxel.cpp.

References atomID.

Referenced by VoxelSeries::getAtomID().

00099                         {
00100         return atomID;
00101 }

int Voxel::getBlockedDirectionSize  ) 
 

Definition at line 64 of file Voxel.cpp.

References blockedDirectionSize.

Referenced by VoxelSeries::getBlockedDirectionSize().

00064                                    {
00065         return blockedDirectionSize;
00066 }

int Voxel::getDirectionalVisibility int  x,
int  y,
int  z
 

Definition at line 78 of file Voxel.cpp.

References addr, and directionalVisibility.

Referenced by VoxelSeries::getDirectionalVisibility().

00078                                                        {
00079         int index = addr(x,y,z);
00080         int flag = (int)pow(2,index);
00081         if ( (directionalVisibility & flag) == flag)
00082                 return 1;
00083         else
00084                 return 0;
00085 }

int Voxel::getGID  ) 
 

Definition at line 91 of file Voxel.cpp.

References GID.

Referenced by VoxelSeries::getGID().

00091                   {
00092         return GID;
00093 }

Amino_Acid * Voxel::getResidueID  ) 
 

Definition at line 119 of file Voxel.cpp.

References atomID, and Atom::residue.

Referenced by VoxelSeries::getResidueID().

00119                                  {
00120         if ( atomID == NULL )
00121                 return NULL;
00122         return atomID->residue;
00123 }

bool Voxel::isActiveSite  ) 
 

Definition at line 111 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::isActiveSite().

00112 {
00113         if ( (flags & 8) == 8)
00114                 return true;
00115         else
00116                 return false;
00117 }

bool Voxel::isFilled  ) 
 

Definition at line 25 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::isCoreVoxel(), and VoxelSeries::isVoxelFilled().

00025                      {
00026         if ( (flags & 1) == 1)
00027                 return true;
00028         else
00029                 return false;
00030 }

bool Voxel::isInternalCavity  ) 
 

Definition at line 39 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::isInternalCavity().

00039                              {
00040         if ( (flags & 2) == 2)
00041                 return true;
00042         else
00043                 return false;
00044 }

bool Voxel::isSurfaceVoxel  ) 
 

Definition at line 53 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::isCoreVoxel(), and VoxelSeries::isSurfaceVoxel().

00053                            {
00054         if ( (flags & 4) == 4)
00055                 return true;
00056         else
00057                 return false;
00058 }

void Voxel::setActiveSite bool  activesite  ) 
 

Definition at line 103 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::setActiveSite().

00104 {
00105         if (activesite == true)
00106                 flags = flags | 8;
00107         else 
00108                 if ( (flags & 8) == 8)
00109                         flags = flags - 8;
00110 }

void Voxel::setAtomID Atom  ) 
 

Definition at line 95 of file Voxel.cpp.

References atomID.

Referenced by VoxelSeries::setAtomID().

00095                                  {
00096         atomID = atom;
00097 }

void Voxel::setBlockedDirectionSize int  blockedNumber  ) 
 

Definition at line 60 of file Voxel.cpp.

References blockedDirectionSize.

Referenced by VoxelSeries::setBlockedDirectionSize().

00060                                                      {
00061         blockedDirectionSize = blockedNumber;
00062 }

void Voxel::setDirectionalVisibility int  x,
int  y,
int  z,
int  visibility
 

Definition at line 68 of file Voxel.cpp.

References addr, and directionalVisibility.

Referenced by VoxelSeries::setDirectionalVisibility().

00068                                                                  {
00069         int index = addr(x,y,z);
00070         int flag = (int)pow(2,index);
00071         if (vis == 1)
00072                 directionalVisibility = (directionalVisibility | flag);
00073         else 
00074                 if ( (directionalVisibility & flag) == flag)
00075                         directionalVisibility = directionalVisibility - flag;
00076 }

void Voxel::setFilled bool  fill  ) 
 

Definition at line 17 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::initialize(), VoxelSeries::setVoxel(), and VoxelSeries::setVoxelFilled().

00017                                {
00018         if (fill == true)
00019                 flags = flags | 1;
00020         else 
00021                 if ( (flags & 1) == 1)
00022                         flags = flags - 1;
00023 }

void Voxel::setGID int  id  ) 
 

Definition at line 87 of file Voxel.cpp.

References GID.

Referenced by VoxelSeries::setGID().

00087                          {
00088         GID = id;
00089 }

void Voxel::setInternalCavity bool  internalCv  ) 
 

Definition at line 32 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::initialize(), and VoxelSeries::setInternalCavity().

00032                                              {
00033         if (internalCv == true)
00034                 flags = flags | 2;
00035         else 
00036                 if ( (flags & 2) == 2)
00037                         flags = flags - 2;
00038 }

void Voxel::setSurfaceVoxel bool  surface  ) 
 

Definition at line 46 of file Voxel.cpp.

References flags.

Referenced by VoxelSeries::setSurfaceVoxel().

00046                                         {
00047         if (surface == true)
00048                 flags = flags | 4;
00049         else 
00050                 if ( (flags & 4) == 4)
00051                         flags = flags - 4;
00052 }


Member Data Documentation

Atom* Voxel::atomID [private]
 

Definition at line 32 of file Voxel.h.

Referenced by getAtomID(), getResidueID(), setAtomID(), and Voxel().

char Voxel::blockedDirectionSize [private]
 

Definition at line 30 of file Voxel.h.

Referenced by getBlockedDirectionSize(), and setBlockedDirectionSize().

int Voxel::directionalVisibility [private]
 

Definition at line 31 of file Voxel.h.

Referenced by getDirectionalVisibility(), setDirectionalVisibility(), and Voxel().

char Voxel::flags [private]
 

Definition at line 28 of file Voxel.h.

Referenced by isActiveSite(), isFilled(), isInternalCavity(), isSurfaceVoxel(), setActiveSite(), setFilled(), setInternalCavity(), setSurfaceVoxel(), and Voxel().

int Voxel::GID [private]
 

Definition at line 29 of file Voxel.h.

Referenced by getGID(), setGID(), and Voxel().


The documentation for this class was generated from the following files:
Generated on Fri Oct 21 00:21:41 2005 for Cavity by  doxygen 1.4.4