SubdivSchemeEditor Class Reference

SubdivSchemeEditor class. More...

#include <JViewer.h>

List of all members.

Public Slots

 S_SaveSubdivScheme ()
 S_LoadSubdivScheme ()
 S_ChangeSaveName (const QString &Name)
 S_ChangeCurrentSubScheme (int SS)
 S_ChangeCurrentMatrixU (int MU)
 S_ChangeCurrentMatrixV (int MV)
 S_ChangeCurrentMatrixW (int MW)
 S_ChangeNbTransfos (int NT)
 S_ChangePatchDim (int PD)
 S_ChangeCnx1 (int Cn)
 S_ChangeCnx2 (int Cn)
 S_ChangeMatrixValue (int L, int C)
 S_RebuildUVW ()
 S_ChangeSampleMeshUSize (int Size)
 S_ChangeSampleMeshVSize (int Size)
 S_ChangeSampleMeshWSize (int Size)
 S_ChangeSubdivDepth (int Depth)
 S_ChangeDrawMode (int DrawMode)

Signals

void S_DisplayQstring (const QString &Q)
void S_FitMatrixColumnWidth (int i)
void S_FitMatrixColumnHeight (int i)
void S_SetCurrentMatrixU (int MU)
void S_SetCurrentMatrixV (int MV)
void S_SetCurrentMatrixW (int MW)
void S_SetPatchDim (int PD)
void S_SetPatchCnx1 (int PC)
void S_SetPatchCnx2 (int PC)
void S_SetNbTransfos (int NbT)
void S_SetICnx (bool ICnx)
void S_SetBCnx (bool BCnx)
void S_EnableSave (bool B)
void S_EnablePatchDim (bool B)
void S_EnablePatchCnx (bool B)
void S_EnableNbTransfo (bool B)
void S_EnableSwitchVWTransfo (bool B)
void S_EnableMatrix (bool B)

Public Member Functions

 SubdivSchemeEditor (QWidget *parent, const char *name)

Public Attributes

float _Version
QString _SaveName
TDPoint_ControlPoints [TABLESIZE]
BaryPatch_RootPatches [TABLESIZE]
ManipulatedFrame * _MyManipulatedFrame
int _SubdivDepth
SSMatrix ** _SubdivResult
int _SubdivResultSize
bool _DrawRootPatches
TableTranslator_TableT
int _CurrentSubScheme
SSMatrix_SiUmatrices [3]
int _SiNbTransfos [3]
int _SiDimU [3]
int _SiUStart [3]
int _SiUStop [3]
bool _SiICnx [3]
bool _SiBCnx [3]
SSMatrix *** _S1xS2xS3TransfoMatrices
int _S1xS2xS3BuildDimU
int _S1xS2xS3BuildDimV
int _S1xS2xS3BuildDimW
int _SampleMeshUSize
int _SampleMeshVSize
int _SampleMeshWSize
int _CurrentMatrixU
int _CurrentMatrixV
int _CurrentMatrixW
int _DrawMode

Protected Member Functions

int GetFreePointName ()
int CreatePoint (Vec Position)
int GetFreePatchName ()
QString helpString () const
virtual void init ()
virtual void draw ()
virtual void fastDraw ()
virtual void drawWithNames ()
void drawSubdivResult ()
Vec SelectionCenterOfGravity ()
void postSelection (const QPoint &point)
void ReCreateSampleMesh (int SizeU, int SizeV, int Size)
void UpdateMatrixVizu ()
void BuildSubdivResult ()
void RecursiveBuildSubdivResult (int CurrentLevel, int MaxLevel, int &CurrentFillingIndice, SSMatrix *CurrentMatrix)
void keyPressEvent (QKeyEvent *e)


Detailed Description

SubdivSchemeEditor class.


Constructor & Destructor Documentation

SubdivSchemeEditor::SubdivSchemeEditor ( QWidget *  parent,
const char *  name 
)

Basic constructor using the QObject constructor


Member Function Documentation

void SubdivSchemeEditor::BuildSubdivResult (  )  [protected]

Builds the transformation matrixes

int SubdivSchemeEditor::CreatePoint ( Vec  Position  )  [protected]

Creates a point given its position

void SubdivSchemeEditor::draw (  )  [protected, virtual]

Defines the draw parameters and draws the elements

void SubdivSchemeEditor::drawSubdivResult (  )  [protected]

Draws the patches calculated after the iterations of subdivision

void SubdivSchemeEditor::drawWithNames (  )  [protected, virtual]

Draws the elements (points)

int SubdivSchemeEditor::GetFreePatchName (  )  [protected]

Gets the first number that has still not been taken by a patch

int SubdivSchemeEditor::GetFreePointName (  )  [protected]

Gets the first number that has still not been taken by a point

QString SubdivSchemeEditor::helpString (  )  const [protected]

Sets the message displayed in the help window

void SubdivSchemeEditor::init (  )  [protected, virtual]

Starts the program and sets the datas

void SubdivSchemeEditor::keyPressEvent ( QKeyEvent *  e  )  [protected]

What happens when a keyboard button is pressed. See help for keyboard shortcuts.

void SubdivSchemeEditor::postSelection ( const QPoint &  point  )  [protected]

What happens when something is selected (ManipulatedFrame is set to the new SelectionCenterOfGravity and point coordinates are refreshed accordingly)

void SubdivSchemeEditor::ReCreateSampleMesh ( int  SizeU,
int  SizeV,
int  Size 
) [protected]

Clears the old structure and builds a new one

void SubdivSchemeEditor::RecursiveBuildSubdivResult ( int  CurrentLevel,
int  MaxLevel,
int &  CurrentFillingIndice,
SSMatrix CurrentMatrix 
) [protected]

Recursive version of BuildSubdivResult

SubdivSchemeEditor::S_ChangeCnx1 ( int  Cn  )  [slot]

Makes the modifications on the connexions

SubdivSchemeEditor::S_ChangeCnx2 ( int  Cn  )  [slot]

See also:
S_ChangeCnx1

SubdivSchemeEditor::S_ChangeCurrentMatrixU ( int  MU  )  [slot]

Changes the displayed transformation matrix

SubdivSchemeEditor::S_ChangeCurrentMatrixV ( int  MV  )  [slot]

See also:
S_ChangeCurrentMatrixU

SubdivSchemeEditor::S_ChangeCurrentMatrixW ( int  MW  )  [slot]

See also:
S_ChangeCurrentMatrixU

SubdivSchemeEditor::S_ChangeCurrentSubScheme ( int  SS  )  [slot]

Displays the current SubdivScheme
SS = 1,2 or 3 stands for axis U,V or W
SS=4 stands for UVW scheme

SubdivSchemeEditor::S_ChangeDrawMode ( int  DrawMode  )  [slot]

Makes the modifications on the draw mode

See also:
_DrawMode

SubdivSchemeEditor::S_ChangeMatrixValue ( int  L,
int  C 
) [slot]

Makes the modifications on a matrix value

SubdivSchemeEditor::S_ChangeNbTransfos ( int  NT  )  [slot]

Makes the modifications on the numbers of transformations

SubdivSchemeEditor::S_ChangePatchDim ( int  PD  )  [slot]

Makes the modifications on the patches dimension

SubdivSchemeEditor::S_ChangeSampleMeshUSize ( int  Size  )  [slot]

Makes the modifications on the mesh size

SubdivSchemeEditor::S_ChangeSampleMeshVSize ( int  Size  )  [slot]

See also:
S_ChangeSampleMeshUSize

SubdivSchemeEditor::S_ChangeSampleMeshWSize ( int  Size  )  [slot]

See also:
S_ChangeSampleMeshUSize

SubdivSchemeEditor::S_ChangeSaveName ( const QString &  Name  )  [slot]

Sets the _SaveName variable

See also:
_SaveName

SubdivSchemeEditor::S_ChangeSubdivDepth ( int  Depth  )  [slot]

Makes the modifications on the number of iterations to make

void SubdivSchemeEditor::S_DisplayQstring ( const QString &  Q  )  [signal]

Display a string in the frame above the viewer window. Used to display useful information on program execution.

void SubdivSchemeEditor::S_EnableMatrix ( bool  B  )  [signal]

Enables or disables changing the matrixes' values

void SubdivSchemeEditor::S_EnableNbTransfo ( bool  B  )  [signal]

Enables or disables changing the number of transformations

void SubdivSchemeEditor::S_EnablePatchCnx ( bool  B  )  [signal]

Enables or disables changing the patch connection

void SubdivSchemeEditor::S_EnablePatchDim ( bool  B  )  [signal]

Enables or disables changing the patch dimension

void SubdivSchemeEditor::S_EnableSave ( bool  B  )  [signal]

Enables or disables saving the scheme

void SubdivSchemeEditor::S_EnableSwitchVWTransfo ( bool  B  )  [signal]

Enables or disables switching transformations

void SubdivSchemeEditor::S_FitMatrixColumnHeight ( int  i  )  [signal]

Sets the matrix's columns' height

void SubdivSchemeEditor::S_FitMatrixColumnWidth ( int  i  )  [signal]

Sets the matrix's columns' width

SubdivSchemeEditor::S_LoadSubdivScheme (  )  [slot]

Finds the /SubFiles/_SaveName SubFile and loads the scheme written in it

See also:
_SaveName

SubdivSchemeEditor::S_RebuildUVW (  )  [slot]

Rebuilds the UVW transformation matrixes and the geometry

SubdivSchemeEditor::S_SaveSubdivScheme (  )  [slot]

Saves the subdivision scheme under the name _SaveName located in ObjFile folder

See also:
_SaveName

void SubdivSchemeEditor::S_SetBCnx ( bool  BCnx  )  [signal]

Sets the "Border Cnx" option true or false

void SubdivSchemeEditor::S_SetCurrentMatrixU ( int  MU  )  [signal]

Sets which matrix to display on this axis

void SubdivSchemeEditor::S_SetCurrentMatrixV ( int  MV  )  [signal]

See also:
S_SetCurrentMatrixU

void SubdivSchemeEditor::S_SetCurrentMatrixW ( int  MW  )  [signal]

See also:
S_SetCurrentMatrixU

void SubdivSchemeEditor::S_SetICnx ( bool  ICnx  )  [signal]

Sets the "In Cnx" option true or false

void SubdivSchemeEditor::S_SetNbTransfos ( int  NbT  )  [signal]

Sets the number of iterations

void SubdivSchemeEditor::S_SetPatchCnx1 ( int  PC  )  [signal]

Sets the patch connexions

void SubdivSchemeEditor::S_SetPatchCnx2 ( int  PC  )  [signal]

See also:
S_SetPatchCnx1

void SubdivSchemeEditor::S_SetPatchDim ( int  PD  )  [signal]

Sets the patch dimension

Vec SubdivSchemeEditor::SelectionCenterOfGravity (  )  [protected]

The center of gravity of the selection at a given level

void SubdivSchemeEditor::UpdateMatrixVizu (  )  [protected]

Updates the matrixes' values


Member Data Documentation

TDPoint* SubdivSchemeEditor::_ControlPoints[TABLESIZE]

Points from the Level 0 structure

int SubdivSchemeEditor::_CurrentMatrixU

Displayed Transformation Matrix may refer to 1D schemes : _SiUmatrices[_CurrentSubScheme][_CurrentMatrixU]
or to 3D scheme _S1xS2xS3TransfoMatrices[_CurrentMatrixU][_CurrentMatrixV][_CurrentMatrixW] if _CurrentSubScheme==4

int SubdivSchemeEditor::_CurrentMatrixV

Displayed Transformation Matrix can refer only to 3D schemes

int SubdivSchemeEditor::_CurrentMatrixW

Displayed Transformation Matrix
can refer only to 3D schemes

int SubdivSchemeEditor::_CurrentSubScheme

Subdivision scheme selector : 0 to 2 are the 1D schemes, 3 is the 3D scheme

int SubdivSchemeEditor::_DrawMode

OpenGL draw option
_DrawMode = 0 : FILL
_DrawMode = 1 : LINE
_DrawMode = 2 : POINT

bool SubdivSchemeEditor::_DrawRootPatches

If root patches should be drawn or not ?

ManipulatedFrame* SubdivSchemeEditor::_MyManipulatedFrame

Frame associated with the selection

BaryPatch* SubdivSchemeEditor::_RootPatches[TABLESIZE]

Patches from the Level 0 structure, which use points from _ControlPoints

int SubdivSchemeEditor::_S1xS2xS3BuildDimU

Dimension on the U axis of the _S1xS2xS3TransfoMatrices

int SubdivSchemeEditor::_S1xS2xS3BuildDimV

Dimension on the V axis of the _S1xS2xS3TransfoMatrices

int SubdivSchemeEditor::_S1xS2xS3BuildDimW

Dimension on the W axis of the _S1xS2xS3TransfoMatrices

SSMatrix*** SubdivSchemeEditor::_S1xS2xS3TransfoMatrices

3D scheme transformation matrixes
these matrices are not automatically kept up to date with the modifications of the 1D schemes
the rebuilding of the 3D scheme is triggered by the user
it is therefore necessary to keep note of the dimensions of this table upon construction (as referrence to 1D schemes dimensions are likely to become erroneous)

int SubdivSchemeEditor::_SampleMeshUSize

Initial Level 0 structure size (number of patches along dimension U)

int SubdivSchemeEditor::_SampleMeshVSize

Initial Level 0 structure size (number of patches along dimension V)

int SubdivSchemeEditor::_SampleMeshWSize

Initial Level 0 structure size (number of patches along dimension W)

QString SubdivSchemeEditor::_SaveName

File name where subdiv scheme will be saved. The ".sub" extension is automatically added.

bool SubdivSchemeEditor::_SiBCnx[3]

Is the "Border Cnx" option set ?

int SubdivSchemeEditor::_SiDimU[3]

Patch dimensions for the 1D schemes _SiUmatrices[i] is of size _SiNbTransfos[i] at all times _SiUmatrices[i][j] are square matrixes of size _SiDimU[i] at all times

bool SubdivSchemeEditor::_SiICnx[3]

Is the "In Cnx" option set ?

int SubdivSchemeEditor::_SiNbTransfos[3]

Number of transformations for the 3 1D schemes

SSMatrix* SubdivSchemeEditor::_SiUmatrices[3]

Transformation matrixes for the 3 1D schemes

int SubdivSchemeEditor::_SiUStart[3]

What point does the connexion begin at ?

int SubdivSchemeEditor::_SiUStop[3]

What point does the connexion end at ?

int SubdivSchemeEditor::_SubdivDepth

how many subdivision iterations to build the attractor ?

SSMatrix** SubdivSchemeEditor::_SubdivResult

Matrices representing elements of the attractor. Each element of the attractor is one of these matrices applied to one of the _RootPatches

int SubdivSchemeEditor::_SubdivResultSize

The number of matrixes in _SubdivResult

TableTranslator* SubdivSchemeEditor::_TableT

Talks to the interface matrix display

float SubdivSchemeEditor::_Version

The program version


The documentation for this class was generated from the following files:
Generated on Thu Sep 28 09:43:43 2006 by  doxygen 1.4.7