cct.poly
Class Polygonizer

java.lang.Object
  extended by cct.poly.Polygonizer

public class Polygonizer
extends java.lang.Object

Title: Molecular Structure Viewer/Editor

Description: Computational Chemistry Toolkit

********************************************************************* polygonizer.h This is Jules Bloomenthal's implicit surface polygonizer from GRAPHICS GEMS IV. Bloomenthal's polygonizer is still used and the present code is simply the original code morphed into C++. J. Andreas Bærentzen 2003.

Copyright: Copyright (c) 2006

Company: ANU


Field Summary
(package private) static int B
           
(package private)  int[] bounds
           
(package private)  java.util.ArrayList CENTERLIST
           
(package private)  java.util.ArrayList CORNERLIST
           
(package private) static boolean dotet
           
(package private)  java.util.ArrayList EDGELIST
           
(package private) static int F
           
(package private)  ImplicitFunctionInterface func
           
(package private)  java.util.ArrayList gnormals
          Polygonizer is the class used to perform polygonization.
(package private)  java.util.ArrayList gtriangles
           
(package private)  java.util.ArrayList gvertices
           
(package private) static int HASHBIT
           
static int HASHSIZE
           
(package private)  java.util.ArrayList INTLIST
           
(package private)  java.util.ArrayList INTLISTS
           
(package private) static int L
           
(package private) static int LBF
           
(package private) static int LBN
           
(package private) static int LTF
           
(package private) static int LTN
           
(package private) static int MASK
           
(package private) static int N
           
(package private) static int NOTET
           
(package private) static int R
           
(package private) static int RBF
           
(package private) static int RBN
           
(package private) static int RES
           
(package private) static int RTF
           
(package private) static int RTN
           
(package private)  float[] size
           
(package private) static int T
           
(package private) static int TET
           
 
Constructor Summary
Polygonizer(ImplicitFunctionInterface _func, float[] _size, int[] _bounds)
           
 
Method Summary
(package private)  int BIT(int i, int bit)
           
static void converge(POINT p1, POINT p2, float v, ImplicitFunctionInterface function, POINT p)
           
static int FLIP(int i, int bit)
           
(package private)  INTLISTS get_cubetable_entry(int i)
           
 NORMAL get_normal(int i)
           
 TRIANGLE get_triangle(int i)
           
 VERTEX get_vertex(int i)
           
static int HASH(int i, int j, int k)
           
static void main(java.lang.String[] args)
           
 void march(boolean tetra, float x, float y, float z)
           
 void march2(boolean tetra, float[] dataOrigin, int[] numberOfVoxels, float[] xyz_step)
           
 void march3(boolean tetra, float[] dataOrigin, int[] numberOfVoxels, float[] xyz_step)
           
(package private)  int no_normals()
          Return number of normals generated after the polygonization.
 int no_triangles()
          Return number of triangles generated after the polygonization.
(package private)  int no_vertices()
          Return number of vertices generated after the polygonization.
static boolean setcenter(java.util.ArrayList table, int i, int j, int k)
           
static NORMAL vnormal(ImplicitFunctionInterface function, POINT point, NORMAL n, float delta)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dotet

static boolean dotet

TET

static int TET

NOTET

static int NOTET

RES

static int RES

L

static int L

R

static int R

B

static int B

T

static int T

N

static int N

F

static int F

LBN

static int LBN

LBF

static int LBF

LTN

static int LTN

LTF

static int LTF

RBN

static int RBN

RBF

static int RBF

RTN

static int RTN

RTF

static int RTF

HASHBIT

static int HASHBIT

HASHSIZE

public static final int HASHSIZE

MASK

static int MASK

gnormals

java.util.ArrayList gnormals
Polygonizer is the class used to perform polygonization.


gvertices

java.util.ArrayList gvertices

gtriangles

java.util.ArrayList gtriangles

func

ImplicitFunctionInterface func

size

float[] size

bounds

int[] bounds

CENTERLIST

java.util.ArrayList CENTERLIST

CORNERLIST

java.util.ArrayList CORNERLIST

EDGELIST

java.util.ArrayList EDGELIST

INTLIST

java.util.ArrayList INTLIST

INTLISTS

java.util.ArrayList INTLISTS
Constructor Detail

Polygonizer

public Polygonizer(ImplicitFunctionInterface _func,
                   float[] _size,
                   int[] _bounds)
Method Detail

no_triangles

public int no_triangles()
Return number of triangles generated after the polygonization. Call this function only when march has been called.


no_vertices

int no_vertices()
Return number of vertices generated after the polygonization. Call this function only when march has been called.


no_normals

int no_normals()
Return number of normals generated after the polygonization. Of course the result of calling this function is the same as no_vertices. Call this function only when march has been called.


get_triangle

public TRIANGLE get_triangle(int i)

get_vertex

public VERTEX get_vertex(int i)

get_normal

public NORMAL get_normal(int i)

HASH

public static int HASH(int i,
                       int j,
                       int k)

BIT

int BIT(int i,
        int bit)

FLIP

public static int FLIP(int i,
                       int bit)

converge

public static void converge(POINT p1,
                            POINT p2,
                            float v,
                            ImplicitFunctionInterface function,
                            POINT p)

vnormal

public static NORMAL vnormal(ImplicitFunctionInterface function,
                             POINT point,
                             NORMAL n,
                             float delta)

setcenter

public static boolean setcenter(java.util.ArrayList table,
                                int i,
                                int j,
                                int k)

get_cubetable_entry

INTLISTS get_cubetable_entry(int i)

march

public void march(boolean tetra,
                  float x,
                  float y,
                  float z)

march2

public void march2(boolean tetra,
                   float[] dataOrigin,
                   int[] numberOfVoxels,
                   float[] xyz_step)

march3

public void march3(boolean tetra,
                   float[] dataOrigin,
                   int[] numberOfVoxels,
                   float[] xyz_step)

main

public static void main(java.lang.String[] args)