HShellWrapper
-
class
HShellWrapper The
HShellWrapperclass is wraps shell information and provides methods to manipulate this information.HShellWrapperclass 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.Index
Methods
AddFace()AddFace()AddFaceDirect()AddNextFaceWithDistinctNormals()AddNextFaceWithDistinctNormalsAndColor()AddNextFaceWithDistinctNormalsAndTexture()AddPoints()BeginAddFaces()BeginFaceIteration()CalculateFaceCenter()EndAddFaces()EndFaceIteration()FindExtents()GetFace()GetKey()GrowArrays()GrowFaceArray()GrowPointArray()GrowPointArray2()HShellWrapper()HShellWrapper()Insert()MakeLod()MakePolygon()NextFace()OpenOwnerSegment()Optimize()Optimize2()Regenerate()Replace()ReplaceWithParameters()ReplaceWithParameters()Set()SetEmptyShell()SetFaceRegion()SetVertexColors()SetVertexColors()Show()ShowVertexColors()ShowVertexColors()SubdivideOneQuadFace()SubdivideOneQuadFace2()SubdivideQuadFaces()TransformPoints()~HShellWrapper()
Variables
Methods
-
HShellWrapper::HShellWrapper(HC_KEY key) Constructs an
HShellWrapperobject.Parameters
key: The key associated with the shell for this object.
-
HShellWrapper::HShellWrapper() Construcst an
HShellWrapperobject.
-
HShellWrapper::~HShellWrapper()
-
HC_KEY
HShellWrapper::Insert(int plen, HPoint const points[], int flen, int const 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.
-
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.
-
HC_KEY
HShellWrapper::GetKey() const const
Returns
The key associated with the shell.
-
void
HShellWrapper::TransformPoints(float const matrix[]) This method performs a transformation of the shells given a transformation matrix.
Parameters
matrix: The matrix that describes the transformation.
-
HC_KEY
HShellWrapper::Optimize(char const *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.
-
HC_KEY
HShellWrapper::Optimize2(char const *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.
-
void
HShellWrapper::MakePolygon(int facelen, int const face[], HPoint points[])
-
void
HShellWrapper::OpenOwnerSegment() const const
This method opens the owner segment of the shell.
-
void
HShellWrapper::BeginFaceIteration() Call this method to initialize member variables before making calls to
NextFace.
-
void
HShellWrapper::EndFaceIteration() Call this method to end the face iteration process.
-
int
HShellWrapper::GetFace(int facenum, int **face)
-
int
HShellWrapper::NextFace(int **face) Call this method after
BeginFaceIterationto 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.
-
void
HShellWrapper::CalculateFaceCenter(int const face[], int flen, HPoint *mid) const const
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.
-
void
HShellWrapper::AddPoints(HPoint const points[], int pnum, HPoint const param[] = 0, HPoint const normals[] = 0) 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.
-
void
HShellWrapper::AddFace(int const face[], int fnum, int regionnum, HPoint const points[], HPoint const normals[] = 0) 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.
-
void
HShellWrapper::AddFaceDirect(int const face[], int fnum, bool reverse = 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.
-
void
HShellWrapper::AddFace(HPoint const points[], int fnum) 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.
-
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.
-
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.
-
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.
-
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.
-
void
HShellWrapper::GrowPointArray2(int fnum, bool growparamarray = false, bool grownormalarray = false, bool growfnarray = false, bool growcolorarray = false)
-
void
HShellWrapper::AddNextFaceWithDistinctNormals(HPoint const *points, HPoint const *normals, int const *face1, int const *face2, int fnum)
-
void
HShellWrapper::AddNextFaceWithDistinctNormalsAndTexture(HPoint const *points, HPoint const *normals, HPoint const *texcor, int const *face1, int const *face2, int const *face3, int fnum)
-
void
HShellWrapper::AddNextFaceWithDistinctNormalsAndColor(HPoint const points[], HPoint const normals[], int const face1[], int const face2[], HPoint const face3[], int fnum)
-
void
HShellWrapper::BeginAddFaces(int pnum)
-
void
HShellWrapper::EndAddFaces()
-
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.
-
void
HShellWrapper::SubdivideOneQuadFace(int const face[], HShellWrapper &wrapper, bool generateIsolines, int *facecolorlist, int &fclnum) This is a helper function to SubdivideQuadFaces and is for internal use only.
-
void
HShellWrapper::SubdivideOneQuadFace2(int const face[]) This is a helper function to SubdivideQuadFaces and is for internal use only.
-
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.
-
void
HShellWrapper::SetVertexColors(HPoint *color) This method sets the shell’s vertices with the given color.
Parameters
color: Pass anHPointpopulated with the r, g, and b values in the x, y, z position respectively.
-
void
HShellWrapper::ShowVertexColors(HPoint *color) This method show the shell’s vertices with the given color.
Parameters
color: Pass anHPointpopulated with the r, g, and b values in the x, y, z position respectively.
-
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.
-
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.
-
void
HShellWrapper::MakeLod(int lodnum, int percent) const const
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.
-
void
HShellWrapper::FindExtents(HPoint ¢er, HPoint &min, HPoint &max) const const
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.
-
void
HShellWrapper::ReplaceWithParameters(int plen, HPoint const *points, int flen, int const *flist, HPoint const *normals = 0, float const *params = 0, int paranum = 3, HPoint const *vcolors = 0, bool emptyshell = false)
-
void
HShellWrapper::ReplaceWithParameters(int plen, HPoint const *points, int flen, int const *flist, HPoint const *normals, float const *params, int paranum, bool emptyshell)
-
void
HShellWrapper::Replace(int plen, HPoint const *points, int flen, int const *flist, HPoint const *normals = 0, bool emptyshell = false)
-
void
HShellWrapper::SetFaceRegion(int regionnum)
-
void
HShellWrapper::SetEmptyShell(HC_KEY segmentkey, bool MakeSegment)
Variables
-
int
HShellWrapper::m_plen - int
The number of points in the points list.
-
int
HShellWrapper::m_flen - int
The length of the face list.
-
HPoint *
HShellWrapper::m_Points
-
HPoint *
HShellWrapper::m_VParams
-
HPoint *
HShellWrapper::m_VColors
-
HPoint *
HShellWrapper::m_VNormals
-
int *
HShellWrapper::m_Flist - int
The list that defines the configuration of the faces in the shell in relation to the points as described in #HC_Insert_Shell.
-
HC_KEY
HShellWrapper::m_Key - HC_KEY
The key of the shell.
-
int
HShellWrapper::m_facepointer - int
For Internal Use Only
-
int
HShellWrapper::m_totalflen - int
For Internal Use Only
-
int
HShellWrapper::m_totalplen - int
For Internal Use Only
-
int
HShellWrapper::m_totalnumfaceslen - int
-
int
HShellWrapper::m_numfaceslen - int
-
int *
HShellWrapper::m_faceregion - int
-
int *
HShellWrapper::m_faceindirect - int
-
FaceWithNormalInfo *
HShellWrapper::m_FNArray