The HShellWrapper class is wraps shell information and provides methods to manipulate this information. More...
#include <HUtility.h>
Public Member Functions | |
void | AddFace (int face[], int fnum, int regionnum, HPoint points[], HPoint normals[]=0, bool AddImediately=false) |
void | AddFace (HPoint points[], int fnum, bool AddImmediatly=false) |
void | AddFaceDirect (int face[], int fnum, bool reverse=false, bool AddImmediatly=false) |
void | AddNextFaceWithDistinctNormals (HPoint const *points, HPoint const *normals, int const *face1, int const *face2, int fnum) |
void | AddNextFaceWithDistinctNormalsAndColor (HPoint const *points, HPoint const *normals, int const *face1, int const *face2, HPoint *face3, int fnum) |
void | AddNextFaceWithDistinctNormalsAndTexture (HPoint const *points, HPoint const *normals, HPoint const *texcor, int const *face1, int const *face2, int const *face3, int fnum) |
void | AddPoints (HPoint points[], int pnum, HPoint param[]=0, HPoint normals[]=0, bool AddImmediately=false) |
void | BeginAddFaces (int pnum) |
void | BeginFaceIteration () |
void | CalculateFaceCenter (int face[], int flen, HPoint *mid) |
void | EndAddFaces () |
void | EndFaceIteration () |
void | FindExtents (HPoint ¢er, HPoint &min, HPoint &max) |
int | GetFace (int facenum, int **face) |
HC_KEY | GetKey () |
void | GrowArrays (int fnum) |
void | GrowFaceArray (int fnum) |
void | GrowPointArray (int fnum, bool gorwvparams=false, bool grownormals=false) |
void | GrowPointArray2 (int fnum, bool growparamarray=false, bool grownormalarray=false, bool growfnarray=false, bool growcolorarray=false) |
HShellWrapper (HC_KEY key) | |
HShellWrapper () | |
HC_KEY | Insert (int plen, HPoint points[], int flen, int flist[], HC_KEY insertkey=INVALID_KEY) |
void | MakeLod (int lodnum, int percent) |
void | MakePolygon (int facelen, int face[], HPoint points[]) |
int | NextFace (int **face) |
void | OpenOwnerSegment () |
HC_KEY | Optimize (char *options) |
HC_KEY | Optimize2 (char *options) |
void | Regenerate (HC_KEY newowner=INVALID_KEY, bool makeSegment=true, bool regenerate=false) |
void | Replace (int plen, HPoint points[], int flen, int flist[], HPoint normals[]=0, bool emptyshell=false) |
void | ReplaceWithParameters (int plen, HPoint points[], int flen, int flist[], HPoint normals[]=0, float params[]=0, int paranum=3, HPoint vcolors[]=0, bool emptyshell=false) |
void | ReplaceWithParameters (int plen, HPoint points[], int flen, int flist[], HPoint normals[], float params[], int paranum, bool emptyshell) |
void | Set (HC_KEY key) |
void | SetEmptyShell (HC_KEY segmentkey, bool MakeSegment) |
void | SetFaceRegion (int regionnum) |
void | SetVertexColors (HPoint *color) |
void | SetVertexColors (float *findex) |
HC_KEY | Show (int *plen, HPoint **points, int *flen, int **flist) |
void | ShowVertexColors (HPoint *color) |
void | ShowVertexColors (float *color) |
void | SubdivideOneQuadFace (int face[], HShellWrapper &wrapper, bool generateIsolines, int *facecolorlist, int &fclnum) |
void | SubdivideOneQuadFace2 (int face[]) |
void | SubdivideQuadFaces (bool GenerateIsolines) |
void | TransformPoints (float matrix[]) |
Public Attributes | |
int * | m_faceindirect |
int | m_facepointer |
int * | m_faceregion |
int | m_flen |
The length of the face list. | |
int * | m_Flist |
The list that defines the configuration of the faces in the shell in relation to the points as described in HC_Insert_Shell. | |
FaceWithNormalInfo * | m_FNArray |
HC_KEY | m_Key |
The key of the shell. | |
int | m_numfaceslen |
int | m_plen |
The number of points in the points list. | |
HPoint * | m_Points |
int | m_totalflen |
int | m_totalnumfaceslen |
int | m_totalplen |
HPoint * | m_VColors |
HPoint * | m_VNormals |
HPoint * | m_VParams |
Detailed Description
The HShellWrapper class is wraps shell information and provides methods to manipulate this information.
HShellWrapper class contains all the information needed to describe a shell. It also have methods that allows you to manipulate and find out shell information such as adding points, iterating through the face list.
Constructor & Destructor Documentation
◆ HShellWrapper() [1/2]
|
inline |
Constructs an HShellWrapper object.
- Parameters
-
key The key associated with the shell for this object.
◆ HShellWrapper() [2/2]
|
inline |
Construcst an HShellWrapper object.
Member Function Documentation
◆ AddFace() [1/2]
void HShellWrapper::AddFace | ( | int | face[], |
int | fnum, | ||
int | regionnum, | ||
HPoint | points[], | ||
HPoint | normals[] = 0 , |
||
bool | AddImediately = false |
||
) |
This method adds a new face to the shell given the face and point list.
- Parameters
-
face A pointer to the face list as describe in HC_Insert_Shell. fnum The number of vertices for the face. points The list of vertices for the face. AddImmediately Pass true to add the face immediately.
◆ AddFace() [2/2]
void HShellWrapper::AddFace | ( | HPoint | points[], |
int | fnum, | ||
bool | AddImmediatly = false |
||
) |
This method adds a new face to the shell given the point list. A face list is derived from the point list by ordering the points as they appear in the point list.
- Parameters
-
points The list of vertices that define the face. fnum The number of vertices. AddImmediately Pass true to add the points immediately.
◆ AddFaceDirect()
void HShellWrapper::AddFaceDirect | ( | int | face[], |
int | fnum, | ||
bool | reverse = false , |
||
bool | AddImmediatly = false |
||
) |
This method add a new face to the shell given a face list. Note that no new points are added to the point list.
- Parameters
-
face A pointer to the face list as described in HC_Insert_Shell. fnum The number of vertices that define the face. reverse Pass true if you want to add the vertices in the face list in reverse order. AddImmediately Pass true to add the face immediately.
◆ AddPoints()
void HShellWrapper::AddPoints | ( | HPoint | points[], |
int | pnum, | ||
HPoint | param[] = 0 , |
||
HPoint | normals[] = 0 , |
||
bool | AddImmediately = false |
||
) |
This method adds the given points to the points list.
- Parameters
-
points A pointer to the list of points to add. pnum The number of entries in points. param A pointer to the list of parameters to add. AddImmediatly Pass true to add the points immediately.
◆ BeginFaceIteration()
void HShellWrapper::BeginFaceIteration | ( | ) |
Call this method to initialize member variables before making calls to NextFace.
◆ CalculateFaceCenter()
void HShellWrapper::CalculateFaceCenter | ( | int | face[], |
int | flen, | ||
HPoint * | mid | ||
) |
This method determines the centroid of a given face.
- Parameters
-
face A pointer the beginning of the list of points that describe the face in the face list. flen The number of vertices that face has. mid Returns the coordinates for the center of the face.
◆ EndFaceIteration()
|
inline |
Call this method to end the face iteration process.
◆ FindExtents()
This method finds the center, minimum and maximum points for the given shell.
- Parameters
-
center Pass by reference. This method returns the center point for the shell. min Pass by reference. This method returns the minimum point for the shell. max Pass by reference. This method returns the maxinum point for the shell.
◆ GetKey()
|
inline |
- Returns
- The key associated with the shell.
◆ GrowArrays()
void HShellWrapper::GrowArrays | ( | int | fnum | ) |
This is a helper function used by the AddFace and AddPoints methods. Given an additional number of points, the functions determines if the face and points lists sizes need to be increased and by the optimal amount.
- Parameters
-
fnum The number of points that will be added.
◆ GrowFaceArray()
void HShellWrapper::GrowFaceArray | ( | int | fnum | ) |
This is a helper function used by the AddFace and AddPoints methods. Given an additional number of points, the functions determines if the face list size need to be increased and by the optimal amount.
- Parameters
-
fnum The number of points that will be added.
◆ GrowPointArray()
void HShellWrapper::GrowPointArray | ( | int | fnum, |
bool | gorwvparams = false , |
||
bool | grownormals = false |
||
) |
This method is a helper functions used by the AddFace and AddPoints methods. Given an additional number of points, the functions determines if the points list size need to be increased and by the optimal amount.
- Parameters
-
fnum The number of points that will be added. growvparams Pass true if you will be adding parameter pointers in addition to vertices.
◆ Insert()
HC_KEY HShellWrapper::Insert | ( | int | plen, |
HPoint | points[], | ||
int | flen, | ||
int | flist[], | ||
HC_KEY | insertkey = INVALID_KEY |
||
) |
This method insert a new shell into the HOOPS database given a points list and face list as described in HC_Insert_Shell.
- Parameters
-
plen The number of points that describe the shell. points The list of points that describe the shell. flen The length of the face list. flist The list that describes the faces in relation to the points as specified in HC_Insert_Shell. insertkey Pass a key if you want to insert the shell under a specific segment other wise HOOPS will insert the shell into the currently open segment.
◆ MakeLod()
void HShellWrapper::MakeLod | ( | int | lodnum, |
int | percent | ||
) |
This method inserts a new level of detail given a number and percentage of simplification.
- Parameters
-
lodnum The level of the LOD. percent The percent that the number of total triangle will be reduced to in the shell as described by HC_Compute_Optimized_Shell.
◆ NextFace()
int HShellWrapper::NextFace | ( | int ** | face | ) |
Call this method after BeginFaceIteration to iterate through the shell's face list.
- Parameters
-
face Returns a pointer to the position in the face list that describes this face.
- Returns
- The number of vertices that the face has.
◆ OpenOwnerSegment()
void HShellWrapper::OpenOwnerSegment | ( | ) |
This method opens the owner segment of the shell.
◆ Optimize()
HC_KEY HShellWrapper::Optimize | ( | char * | options | ) |
This method performs optimization on the shell based on a set of given options.
- Parameters
-
options A pointer to the list of options in which you want the shell to be optimized. The available options are specified in HC_Compute_Optimized_Shell.
◆ Optimize2()
HC_KEY HShellWrapper::Optimize2 | ( | char * | options | ) |
This method performs optimization on the shell based on a set of given options as well as doing created an optimized color map for the faces.
- Parameters
-
options A pointer to the list of options in which you want the shell to be optimized. The available options are specified in HC_Compute_Optimized_Shell.
◆ Regenerate()
void HShellWrapper::Regenerate | ( | HC_KEY | newowner = INVALID_KEY , |
bool | makeSegment = true , |
||
bool | regenerate = false |
||
) |
This method regenerates the shell in the HOOPS database.
- Parameters
-
newowner Pass the key in which you want the shell to be recreated in. If you want it the be created the current location pass INVALID_KEY. makeSegment Pass true to create a new segment under the new owner key. Note this parameter only work if a newowner key is not INVALID_KEY.
◆ Set()
void HShellWrapper::Set | ( | HC_KEY | key | ) |
This method sets the key for the class.
- Parameters
-
key Pass the key that defines the shell you want to manipulate. If you pass INVALID_KEY, this method will insert a new shell and record the key that was generated.
◆ SetVertexColors() [1/2]
void HShellWrapper::SetVertexColors | ( | HPoint * | color | ) |
This method sets the shell's vertices with the given color.
- Parameters
-
color Pass an HPoint populated with the r, g, and b values in the x, y, z position respectively.
◆ SetVertexColors() [2/2]
void HShellWrapper::SetVertexColors | ( | float * | findex | ) |
This method sets the shell's v ertices with the given color.
- Parameters
-
findex Pass the index value in the colormap that indicates the color you want for this shell's vertices.
◆ Show()
HC_KEY HShellWrapper::Show | ( | int * | plen, |
HPoint ** | points, | ||
int * | flen, | ||
int ** | flist | ||
) |
This method get the current information associated with the shell from the HOOPS database.
- Parameters
-
plen Returns the length of the points list. points Returns a pointer to the array of points that describe the shell. flen Returns the length of the face list. flist Returns a pointer to an array that describes the faces as specified in HC_Insert_Shell.
◆ ShowVertexColors() [1/2]
void HShellWrapper::ShowVertexColors | ( | HPoint * | color | ) |
This method show the shell's vertices with the given color.
- Parameters
-
color Pass an HPoint populated with the r, g, and b values in the x, y, z position respectively.
◆ ShowVertexColors() [2/2]
void HShellWrapper::ShowVertexColors | ( | float * | color | ) |
This method show the shell's vertices with the given color.
- Parameters
-
color Pass the index value in the colormap that indicates the color you want for this shell's vertices.
◆ SubdivideOneQuadFace()
void HShellWrapper::SubdivideOneQuadFace | ( | int | face[], |
HShellWrapper & | wrapper, | ||
bool | generateIsolines, | ||
int * | facecolorlist, | ||
int & | fclnum | ||
) |
This is a helper function to SubdivideQuadFaces and is for internal use only.
◆ SubdivideOneQuadFace2()
void HShellWrapper::SubdivideOneQuadFace2 | ( | int | face[] | ) |
This is a helper function to SubdivideQuadFaces and is for internal use only.
◆ SubdivideQuadFaces()
void HShellWrapper::SubdivideQuadFaces | ( | bool | GenerateIsolines | ) |
This method retesselates a shell whose faces are all quads so that isolines can be drawn. Note that this will not work for shells whose faces are triangles or other types of polygons.
- Parameters
-
GenerateIsolines Pass true to generate isolines.
◆ TransformPoints()
void HShellWrapper::TransformPoints | ( | float | matrix[] | ) |
This method performs a transformation of the shells given a transformation matrix.
- Parameters
-
matrix The matrix that describes the transformation.
Member Data Documentation
◆ m_facepointer
int HShellWrapper::m_facepointer |
For Internal Use Only
◆ m_totalflen
int HShellWrapper::m_totalflen |
For Internal Use Only
◆ m_totalplen
int HShellWrapper::m_totalplen |
For Internal Use Only
The documentation for this class was generated from the following file: