| 1 |
#ifndef BIFURCATION_H |
| 2 |
#define BIFURCATION_H |
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
#include <Inventor/nodes/SoSeparator.h> |
| 6 |
#include <Inventor/nodes/SoMaterial.h> |
| 7 |
|
| 8 |
class Bifurcation { |
| 9 |
public: |
| 10 |
Bifurcation() {} |
| 11 |
~Bifurcation() {} |
| 12 |
void copyDataToWorkArray(int varIndices[]); |
| 13 |
SoSeparator *createScene(); |
| 14 |
void alloc(); |
| 15 |
void dealloc(); |
| 16 |
void denormalizePosition(float position[]); |
| 17 |
bool read(const char *bFileName, int varIndices[]); |
| 18 |
bool parse(const char *bFileName); |
| 19 |
void normalizeData(long int idx, float xyzCoords[3]); |
| 20 |
|
| 21 |
int nar() const {return nar_;} |
| 22 |
int maxndim() const {return maxndim_;} |
| 23 |
long int branchID(int i) const {return branchID_[i];} |
| 24 |
long int labels(int i) const {return orbits_[i].label;} |
| 25 |
int totalLabels() const {return totalLabels_;} |
| 26 |
long totalNumPoints() const {return totalNumPoints_;} |
| 27 |
int32_t numVerticesEachBranch(int i) const {return numVerticesEachBranch_[i];} |
| 28 |
float *data() const {return data_;} |
| 29 |
|
| 30 |
private: |
| 31 |
SoSeparator *render(); |
| 32 |
SoSeparator *drawALabel(int row, float xoffset, long int label); |
| 33 |
SoSeparator *drawLabelPtsInScene(); |
| 34 |
SoMaterial *setLabelMaterial(int lblType); |
| 35 |
SoSeparator *drawABranchUsingTubes(int iBranch, long int l, |
| 36 |
long int sumX, float scaler); |
| 37 |
SoSeparator *drawABranchUsingLines(int iBranch, long int l, long int si, |
| 38 |
float scaler); |
| 39 |
SoSeparator *drawABranchUsingNurbsCurve(int iBranch, long int l, |
| 40 |
long int si, float scaler); |
| 41 |
|
| 42 |
int varIndices_[3]; |
| 43 |
int32_t *numVerticesEachBranch_; |
| 44 |
int *xAxisItems_; |
| 45 |
int *yAxisItems_; |
| 46 |
int *zAxisItems_; |
| 47 |
int maxndim_; |
| 48 |
int nar_; |
| 49 |
|
| 50 |
unsigned char *ptStability_; |
| 51 |
long int totalNumPoints_; |
| 52 |
long int numBranches_; |
| 53 |
long int *branchID_; |
| 54 |
struct orbit |
| 55 |
{ |
| 56 |
int32_t numVerticesEachLabelInterval; |
| 57 |
long int label; |
| 58 |
} *orbits_; |
| 59 |
int numAxis_; |
| 60 |
int totalLabels_; |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
float max_[3], min_[3]; |
| 65 |
|
| 66 |
float *data_; |
| 67 |
}; |
| 68 |
|
| 69 |
extern Bifurcation *myBifNode; |
| 70 |
|
| 71 |
#endif |