Class SliceO_Geom

 

The "SliceO_Geom" class is used to store 3D polygonal geometries. SliceOmatic keep 2 arrays of these geometries:

 

The  "Geom_TAG_Pt" array is used for the geometries created by sliceOmatic.  Geometries are created from the TAG data associated with the frames.  The TAG data has a maximum of TAG_MAX values, so the array contain TAG_MAX pointers to geometries.  If no geometries have been created for a TAG value, the pointer is NULL

 

The "Geom_File_Pt" array is used for the geometries that have been read into sliceOmatic.  The number of these geometries is variable and normally, none of the pointers are NULL.

 

 

int Geom_TAG_Nb ;

SliceO_Geom **Geom_TAG_Pt = (SliceO_Geom **)   Fct_Variable_Value( "$GEOM_TAG_PT", &Geom_TAG_Nb ) ;

 

int Geom_File_Nb ;

SliceO_Geom **Geom_File_Pt = (SliceO_Geom **)  Fct_Variable_Value( "$GEOM_FILE_PT", &Geom_File_Nb ) ;

 

SliceO_Geom Class

 

The SliceO_Geom class contain:

 

 

Constructors

 

The constructor and destructor for the class

 

Public:

 

 

 

 

SliceO_Geom

Class constructor.

 

~SliceO_Geom

Class destructor.

 

 

Note:

 

The Constructor and destructor are given for the sake of completion.  You should not have to use them.  SliceOmatic already has a module to read in files and to close them.  If you want to read a file, use the "...", and to close a file, use the "..." of the SliceO_5 library.

 

 

Identification

 

These are derived from the parent (SliceO) class:

 

Private:

m_class_a (unsigned short)

 

The exact meaning of the content of "A" depend on the class:

SliceO_Geom

The display mode of the Geometry (SHADE_LINE,SHADE_FLAT,SHADE_ON, SHADE_OFF

 

Public:

Class_A_Get

Return the value of the "m_class_a" variable.

 

Class_A_Set

Set the value of the "m_class_a" variable.

 

Private:

m_class_b (unsigned short)

 

The exact meaning of content of "B" depend on the class:

SliceO_Geom

 

 

Public:

Class_B_Get

Return the value of the "m_class_b" variable.

 

Class_B_Set

Set the value of the "m_class_b" variable.

 

 

Private:

m_name (char *)

 

Name of the class instance

Public:

Name_Get

 

Return the name of the class instance

Name_Set

 

Assign a name to the class instance

 

 

Data

 

Private:

 

m_tag (unsigned short)

 

If the geometry was created from the TAG data, then it is associated with a TAG value. The color of the geometry will be the color of the TAG value.

m_color (unsigned int)

 

If the geometry was not created from the TAG data, then it has an RGB color.

Public:

TAG_Get

 

Return the TAG value associated with this geometry (if there is one)

TAG_Set

 

Assign a TAG value to the geometry

Color_Get

 

Return the RGB color associated with the geometry (if not associated with a TAG)

Color_Set

 

Assign an RGB color to the geometry

 

 

Public:

m_mat (Matrix)

 

Local 3D transformation associated with the geometry (by default this is an identity matrix).

 

 

Public:

m_mov (void *)

 

Pointer to the associated "MOVIE" structure.  This is the structure that contain the actual points lines and polygons.

m_group (SliceO_Class *)

 

If the geometry has been created from TAG data, this pointer point to the "group" of frames that where used to create the geometry.  The "group" is the parent class of the frames.

m_ima (void *)

 

Pointer to a "Tomo_Image" class from the first file used to create the geometry.

 

 

Callbacks

 

SliceOmatic provide you with a number of callback hooks in the class "SliceO_Geom". If you want, you can use these to have your own function called instead of the default callback functions.

 

The callbacks are explained in more details in "The Callback Fct" section.

 

Public:

Fct_Draw_Geom

 

This function is used to draw the geometry in an OpenGL window.  To keep the real-time interaction, the drawing process is split in multiple steps.  Each step should draw some of the geometry.