TK_Polyhedron
-
class
TK_Polyhedron Base class for shell and mesh.
Shells and Meshes both have attributes that can bind to faces, edges and vertices and may optionally be present. This base class helps allows the two to share the code to parse and execute those features that are common between the two. Refer to ::HC_Insert_Shell and Section 2.8 of the HOOPS/3dGS Programming Guide for more details.
Inherits from:
BBaseOpcodeHandlerIndex
Methods
AppendObject()GetBounding()GetCellCount()GetDPoints()GetDPoints()GetExists()GetExists()GetFaceColors()GetFaceColors()GetFaceExists()GetFaceExists()GetFaceIndices()GetFaceIndices()GetFaceRegions()GetFaceRegions()GetKey()GetLodLevel()GetPointCount()GetPoints()GetPoints()GetPriority()GetSubop()GetSubop2()GetVertexColors()GetVertexColors()GetVertexEdgeColors()GetVertexEdgeColors()GetVertexEdgeIndices()GetVertexEdgeIndices()GetVertexFaceColors()GetVertexFaceColors()GetVertexFaceIndices()GetVertexFaceIndices()GetVertexIndices()GetVertexIndices()GetVertexMarkerColorCount()GetVertexMarkerColorcount()GetVertexMarkerColors()GetVertexMarkerColors()GetVertexMarkerIndices()GetVertexMarkerIndices()GetVertexMarkerRGBAs()GetVertexMarkerRGBAs()GetVertexNormals()GetVertexNormals()GetVertexParameters()GetVertexParameters()HasEdgeAttributes()HasEdgeColors()HasEdgeIndices()HasEdgeNormals()HasEdgePatterns()HasEdgeVisibilities()HasEdgeWeights()HasFaceAttributes()HasFaceAttributesCommunicator()HasFaceColors()HasFaceIndices()HasFaceNormals()HasFacePatterns()HasFaceRegions()HasFaceVisibilities()HasOptionals()HasOptionalsCommunicator()HasVertexAttributes()HasVertexColors()HasVertexEdgeColors()HasVertexEdgeIndices()HasVertexFaceColors()HasVertexFaceIndices()HasVertexIndices()HasVertexMarkerColors()HasVertexMarkerIndices()HasVertexMarkerRGBAs()HasVertexMarkerSizes()HasVertexMarkerSymbols()HasVertexMarkerVisibilities()HasVertexNormals()HasVertexParameters()InitSubop()PopObject()SetBounding()SetCellCount()SetDPoints()SetEdgeColors()SetEdgeExists()SetEdgeIndices()SetEdgeNormals()SetEdgePatterns()SetEdgePatternStrings()SetEdgeVisibilities()SetEdgeWeights()SetExists()SetFaceColors()SetFaceExists()SetFaceIndices()SetFaceNormals()SetFacePatterns()SetFaceRegions()SetFaceVisibilities()SetKey()SetLodLevel()SetPoints()SetPriority()SetSubop()SetSubop2()SetVertexColors()SetVertexEdgeColors()SetVertexEdgeIndices()SetVertexFaceColors()SetVertexFaceIndices()SetVertexIndices()SetVertexMarkerColors()SetVertexMarkerIndices()SetVertexMarkerRGBAs()SetVertexMarkerSizes()SetVertexMarkerSymbols()SetVertexMarkerSymbolStrings()SetVertexMarkerVisibilities()SetVertexNormals()SetVertexParameters()
Enumerations
Methods
-
float const *
TK_Polyhedron::GetPoints() const const
Returns
a pointer to the array of vertex locations
-
float *
TK_Polyhedron::GetPoints() Returns
a pointer to the array of vertex locations
-
double const *
TK_Polyhedron::GetDPoints() const const
Returns
a pointer to the array of vertex locations
-
double *
TK_Polyhedron::GetDPoints() Returns
a pointer to the array of vertex locations
-
int
TK_Polyhedron::GetPointCount() const const
Returns
the number of points in the polyhedron
-
unsigned int const *
TK_Polyhedron::GetExists() const const
Returns
a pointer to the existence array, a bitmask indicating presence/absence of attributes
-
unsigned int *
TK_Polyhedron::GetExists() Returns
a pointer to the existence array, a bitmask indicating presence/absence of attributes
-
unsigned int const *
TK_Polyhedron::GetFaceExists() const const
Returns
a pointer to the existence array for faces, mp_face_exists, indicating face attributes
-
unsigned int *
TK_Polyhedron::GetFaceExists() Returns
a pointer to the existence array for faces, mp_face_exists, indicating face attributes
-
ID_Key
TK_Polyhedron::GetKey() const const
Returns
the id by which the graphics knows this piece of geometry (could be pointer or integer)
-
unsigned char
TK_Polyhedron::GetSubop() const const
Returns
the suboption that will be transmitted to indicate formatting options
-
unsigned short
TK_Polyhedron::GetSubop2() const const
Returns
the 2nd suboption that will be transmitted to indicate formatting options
-
float const *
TK_Polyhedron::GetBounding() const const
Returns
a pointer to the bounding box (x_min, y_min, z_min, x_max, y_max, z_max)
-
float const *
TK_Polyhedron::GetVertexNormals() const const
Returns
a pointer to the array of vertex normals
-
float *
TK_Polyhedron::GetVertexNormals() Returns
a pointer to the array of vertex normals
-
float const *
TK_Polyhedron::GetVertexParameters() const const
Returns
a pointer to the array of vertex parameters
-
float *
TK_Polyhedron::GetVertexParameters() Returns
a pointer to the array of vertex parameters
-
float const *
TK_Polyhedron::GetVertexFaceColors() const const
Returns
a pointer to the array of vertex colors (as applied to the faces)
-
float *
TK_Polyhedron::GetVertexFaceColors() Returns
a pointer to the array of vertex colors (as applied to the faces)
-
float const *
TK_Polyhedron::GetVertexEdgeColors() const const
Returns
a pointer to the array of vertex colors (as applied to the edges)
-
float *
TK_Polyhedron::GetVertexEdgeColors() Returns
a pointer to the array of vertex colors (as applied to the edges)
-
float const *
TK_Polyhedron::GetVertexMarkerColors() const const
Returns
a pointer to the array of vertex colors (as applied to the markers)
-
float *
TK_Polyhedron::GetVertexMarkerColors() Returns
a pointer to the array of vertex colors (as applied to the markers)
-
float const *
TK_Polyhedron::GetVertexMarkerRGBAs() const const
Returns
a pointer to the array of vertex rgba colors (as applied to the markers)
-
float *
TK_Polyhedron::GetVertexMarkerRGBAs() Returns
a pointer to the array of vertex rgba colors (as applied to the markers)
-
int
TK_Polyhedron::GetVertexMarkerColorcount() const const
Returns
the first non-null pointer it among the following: mp_vmcolors (a.k.a. VertexMarkerColors), mp_vfcolors (a.k.a. VertexFaceColors), mp_vecolors (a.k.a. VertexEdgeColors)
-
int &
TK_Polyhedron::GetVertexMarkerColorCount() Returns
a reference to the number of vertex colors (as applied to the markers)
-
float const *
TK_Polyhedron::GetVertexColors() const const
-
float *
TK_Polyhedron::GetVertexColors() Returns
the first non-null pointer it among the following: mp_vmcolors (a.k.a. VertexMarkerColors), mp_vfcolors (a.k.a. VertexFaceColors), mp_vecolors (a.k.a. VertexEdgeColors)
-
float const *
TK_Polyhedron::GetVertexFaceIndices() const const
Returns
a pointer to the array of vertex colors-by-index (as applied to the faces)
-
float *
TK_Polyhedron::GetVertexFaceIndices() Returns
a pointer to the array of vertex colors-by-index (as applied to the faces)
-
float const *
TK_Polyhedron::GetVertexEdgeIndices() const const
Returns
a pointer to the array of vertex colors-by-index (as applied to the edges)
-
float *
TK_Polyhedron::GetVertexEdgeIndices() Returns
a pointer to the array of vertex colors-by-index (as applied to the edges)
-
float const *
TK_Polyhedron::GetVertexMarkerIndices() const const
Returns
a pointer to the array of vertex colors-by-index (as applied to the markers)
-
float *
TK_Polyhedron::GetVertexMarkerIndices() Returns
a pointer to the array of vertex colors-by-index (as applied to the markers)
-
float const *
TK_Polyhedron::GetVertexIndices() const const
Returns
the first non-null pointer it among the following: mp_vmindices (a.k.a. VertexMarkerIndices), mp_vfindices (a.k.a. VertexFaceIndices), mp_veindices (a.k.a. VertexEdgeIndices)
-
float *
TK_Polyhedron::GetVertexIndices() Returns
the first non-null pointer it among the following: mp_vmindices (a.k.a. VertexMarkerIndices), mp_vfindices (a.k.a. VertexFaceIndices), mp_veindices (a.k.a. VertexEdgeIndices)
-
float const *
TK_Polyhedron::GetFaceColors() const const
Returns
a pointer to the array of face colors
-
float *
TK_Polyhedron::GetFaceColors() Returns
a pointer to the array of face colors
-
float const *
TK_Polyhedron::GetFaceIndices() const const
Returns
a pointer to the array of face colors-by-index
-
float *
TK_Polyhedron::GetFaceIndices() Returns
a pointer to the array of face colors-by-index
-
int const *
TK_Polyhedron::GetFaceRegions() const const
Returns
a pointer to the array of face regiions
-
int *
TK_Polyhedron::GetFaceRegions() Returns
a pointer to the array of face regions, which may be modified in-place
-
int
TK_Polyhedron::GetPriority() Gets the priority to this object
-
void
TK_Polyhedron::SetPriority(int priority) Sets priority to this object
-
TK_Status
TK_Polyhedron::SetKey(BStreamFileToolkit &tk, ID_Key key) informs the
TK_Polyhedronof the id by which this piece of geometry is known
-
TK_Status
TK_Polyhedron::SetSubop(unsigned char subop) sets the suboption to be used when transmitting. See also InitSubop
Parameters
subop: a set of bit flags as documented in enumTK_Polyhedron::Suboptions
-
TK_Status
TK_Polyhedron::SetSubop2(unsigned short subop2) sets the 2nd suboption to be used when transmitting. See also InitSubop
Parameters
subop2: a set of bit flags as documented in enumTK_Polyhedron::Suboptions2
-
TK_Status
TK_Polyhedron::InitSubop(BStreamFileToolkit &tk, int lodlevel, bool is_firstpass) initializes some bits in the suboption according to the write flags in the toolkit.
Parameters
tk: the toolkit.
lodlevel: which lod variant is to be encoded.
is_firstpass: indicates whether or not this particular object has been seen before in the file.
-
TK_Status
TK_Polyhedron::SetBounding(float const bbox[]) Set the bounding box for the object.
Parameters
bbox: the bounding volume, in order minx,miny,minz,maxx,maxy,maxz
-
TK_Status
TK_Polyhedron::SetPoints(int count, float const points[] = 0) Allocates the vertex locations, and fills them with the specified values. Be careful not to call this function more than once, as it can cause a memory leak.
Parameters
count: the number of points in the polyhedron
points: a pointer to an array of xyz triplets to specify vertex locations.
-
TK_Status
TK_Polyhedron::SetDPoints(int count, double const points[] = 0) Allocates the vertex locations, and fills them with the specified values. Be careful not to call this function more than once, as it can cause a memory leak.
Parameters
count: the number of points in the polyhedron
points: a pointer to an array of xyz triplets to specify vertex locations.
-
TK_Status
TK_Polyhedron::SetVertexNormals(float const normals[] = 0) Allocates the vertex normals, and fills with values, and sets the flags in mp_exists.
Parameters
normals: can be null, in which case normals are left untouched (assumed to be specified at a later point. Normally, however, “normals” should refer to the xyz triplets for the values of the vertex normals. These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexParameters(float const parameters[] = 0, int width = 0) Allocates the vertex parameters (a.k.a. texture coordinates), and fills with values and sets mp_exists.
Parameters
parameters: can be null, in which case parameters are left untouched (assumed to be specified at a later point. Normally, however, “parameters” should refer to the stu triplets (again, triplets, not pairs) for the values of the vertex parameters. These values will be copied, and the appropriate bits in mp_exists will be updated. If “width” is <= 0, this function will use the value from mp_paramwidth.
width: specifies the number of floating point values per parameter. For example, a single 2d texture will have 2, whereas two 3d textures will have 6.
Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexFaceColors(float const colors[] = 0) Allocates the vertex colors (as applied to faces), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
colors: can be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, “colors” should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexEdgeColors(float const colors[] = 0) Allocates the vertex colors (as applied to edges), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
colors: can be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, “colors” should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexMarkerColors(float const colors[] = 0) Allocates the vertex colors (as applied to markers), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
colors: can be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, “colors” should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexMarkerRGBAs(float const colors[] = 0) Allocates the vertex rgba colors (as applied to markers), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
colors: can be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, “colors” should refer to the rgba quads for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexColors(float const colors[] = 0) Allocates the vertex colors in all 3 arrays (faces, edges, markers). Also handles setting bits in mp_exists (the existence array) if input is non-null. Equivalent to SetVertexFaceColors, SetVertexFaceColors and SetVertexMarkerColors called in succession. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
colors: can be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, “colors” should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexFaceIndices(float const indices[] = 0) Allocates the vertex colors-by-index (as applied to faces), and fills with values and sets the flags in mp_exists. Assumes the prior existence of a color table in the current segment. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
indices: can be null, in which case the indices are left untouched (assumed to be specified at a later point. Normally, however, “indices” should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexEdgeIndices(float const indices[] = 0) Allocates the vertex colors-by-index (as applied to edges), and fills with values and sets the flags in mp_exists. Assumes the prior existence of a color table in the current segment. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
indices: can be null, in which case indices are left untouched (assumed to be specified at a later point. Normally, however, “indices” should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexMarkerIndices(float const indices[] = 0) Allocates the vertex colors-by-index (as applied to markers), and fills with values and sets the flags in mp_exists. Assumes the prior existence of a color table either in or inherited by the current segment. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
indices: can be null, in which case indices are left untouched (assumed to be specified at a later point. Normally, however, “indices” should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexIndices(float const indices[] = 0) Allocates the vertex colors-by-index in all 3 arrays (faces, edges, markers). Also handles setting bits in mp_exists (the existence array) if input is non-null. Equivalent to SetVertexFaceIndices, SetVertexFaceIndices and SetVertexMarkerIndices called in succession. All arrays allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
indices: can be null, in which case indices are left untouched (assumed to be specified at a later point. Normally, however, “indices” should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexMarkerVisibilities(char const *visibilities = 0) Allocates the vertex marker visibilities, and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
visibilities: can be null, in which case the contents of the visibility array are left untouched (assumed to be specified at a later point). If non-null, should to be at least of length mp_pointcountReturns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexMarkerSizes(float const sizes[] = 0) Allocates the vertex marker sizes, and fills with values and sets the flags in mp_exists. Marker sizes are specified as a proportion of their default size. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
sizes: can be null, in which case the contents of the sizes array are left untouched (assumed to be specified at a later point). If non-null, should to be at least of length mp_pointcountReturns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexMarkerSymbols(char const *symbols = 0) Allocates the vertex marker symbols, and fills with values and sets the flags in mp_exists. Symbol interpretations are as specified in TKE_Marker_Symbol. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
symbols: can be null, in which case the contents of the symbols array are left untouched (assumed to be specified at a later point). If non-null, should to be at least of length mp_pointcountReturns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetVertexMarkerSymbolStrings() Allocates the vertex marker symbol strings, and initializes to empty. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.
Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetFaceColors(float const colors[] = 0) Allocates the face colors, and fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.
Parameters
colors: can be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecountReturns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetFaceNormals(float const normals[] = 0) Allocates the face normals, and fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.
Parameters
normals: can be null, in which case the normals are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecountReturns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetFaceVisibilities(char const *visibilities = 0) Allocates the face visibility settings, fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.
Parameters
visibilities: can be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecountReturns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetFacePatterns(char const *patterns = 0) Allocates the face pattern settings (i.e. per face, which pattern to choose), fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.
Parameters
patterns: can be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecountReturns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetFaceIndices(float const indices[] = 0) Allocates the face colors-by-index, and fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified (thus the array size is mp_facecount*sizeof(float))).
Parameters
indices: can be null, in which case indices are left untouched (assumed to be specified at a later point). If non-null, These values will be copied, and the appropriate bits in mp_face_exists will be updated.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetFaceRegions(int const regions[] = 0) Allocates an array of integers to specify a region identifier per face.
Parameters
regions: are the identifiers. If set as null, the array will default to all zero
-
TK_Status
TK_Polyhedron::SetEdgeColors(float const colors[] = 0) Allocates the edge colors, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified. Note (as with all SetEdge* methods) that if the value for mp_edgecount is unknown (left at its initial value of -1), it is calculated during the process of EnumerateEdges, called from SetEdgeExists, called automatically from this function if necessary.
Parameters
colors: can be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetEdgeIndices(float const indices[] = 0) Allocates the edge colors-by-index, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.
Parameters
indices: can be null, in which case colors-by-index are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetEdgeNormals(float const normals[] = 0) Allocates the edge normals, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.
Parameters
normals: can be null, in which case normals are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetEdgeVisibilities(char const *visibilities = 0) Allocates the edge visibility settings, and fills with values and sets the flags in mp_edge_exists. For each edge, non-zero indicates that that edge is visibile. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.
Parameters
visibilities: can be null, in which case visibility settings are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetEdgePatterns(char const *patterns = 0) Allocates the edge patterns, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.
Parameters
patterns: can be null, in which case patterns are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetEdgePatternStrings() Allocates the edge pattern strings, and initializes to empty. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.
Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetEdgeWeights(float const weights[] = 0) Allocates the edge weights, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.
Parameters
weights: can be null, in which case weights are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetExists(unsigned int const vals[] = 0) Allocates the array of integers on which bits indicate the presence of attributes on vertices. Allocates length of mp_pointcount, regardless of the number of values that are intended to be specified.
Parameters
vals: can be null, in which case colors are left untouched. If non-null, it should be of length mp_pointcount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetFaceExists(unsigned int const vals[] = 0) Allocates the array of integers on which bits indicate the presence of attributes on faces. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.
Parameters
vals: can be null, in which case colors are left untouched. If non-null, it should be of length mp_facecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetEdgeExists(unsigned int const vals[] = 0) Allocates the array of integers on which bits indicate the presence of attributes on edges. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified. Note that if the value for mp_edgecount is unknown (left at its initial value of -1), it is calculated during the process of EnumerateEdges, which is called from within this function.
Parameters
vals: can be null, in which case colors are left untouched. If non-null, it should be of length mp_edgecount.Returns
TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
TK_Polyhedron::SetLodLevel(int level) Sets the lod level for this representation (as in HOOPS, ‘0’ means original base resolution)
-
int
TK_Polyhedron::GetLodLevel() const const
Returns
the LOD level
-
void
TK_Polyhedron::SetCellCount(int count) Sets the cell count for volumes.
-
int
TK_Polyhedron::GetCellCount() const const
Returns
the cell count for volumes
-
TK_Status
TK_Polyhedron::AppendObject(BStreamFileToolkit &tk, BBaseOpcodeHandler *obj) Adds an object to the set of items to be sent as part of the collection. Caller retains ownership of the object, and is responsible for deleting it during the write phase. This function automatically sets the TKSH2_COLLECTION bit, converting this shell to a collection
Parameters
tk: the toolkit
obj: the object to be appended
-
BBaseOpcodeHandler *
TK_Polyhedron::PopObject() Pops an object off the list of collection parts.
Returns
the object to caller (presumably so that it can be deleted)
-
bool
TK_Polyhedron::HasOptionals() Returns
true if and only if there are some attributes set on any of the faces or vertices
-
bool
TK_Polyhedron::HasOptionalsCommunicator()
-
bool
TK_Polyhedron::HasVertexNormals() const const
Returns
true if and only if at least one vertex normal has been set
-
bool
TK_Polyhedron::HasVertexParameters() const const
Returns
true if and only if at least one vertex parameter has been set
-
bool
TK_Polyhedron::HasVertexFaceColors() const const
Returns
true if and only if at least one vertex color has been set (to apply to an interpolated face)
-
bool
TK_Polyhedron::HasVertexEdgeColors() const const
Returns
true if and only if at least one vertex color has been set (to apply to an interpolated edge)
-
bool
TK_Polyhedron::HasVertexMarkerColors() const const
Returns
true if and only if at least one vertex color has been set (to apply to a marker)
-
bool
TK_Polyhedron::HasVertexMarkerRGBAs() const const
Returns
true if and only if at least one vertex rgba color has been set (to apply to a marker)
-
bool
TK_Polyhedron::HasVertexColors() const const
Returns
true if and only if at least one vertex color has been set (to apply to anything)
-
bool
TK_Polyhedron::HasVertexFaceIndices() const const
Returns
true if and only if at least one vertex color-by-index has been set (to apply to an interpolated face)
-
bool
TK_Polyhedron::HasVertexEdgeIndices() const const
Returns
true if and only if at least one vertex color-by-index has been set (to apply to an interpolated edge)
-
bool
TK_Polyhedron::HasVertexMarkerIndices() const const
Returns
true if and only if at least one vertex color-by-index has been set (to apply to a marker)
-
bool
TK_Polyhedron::HasVertexIndices() const const
Returns
true if and only if at least one vertex color-by-index has been set (to apply to anything)
-
bool
TK_Polyhedron::HasVertexMarkerVisibilities() const const
Returns
true if and only if at least one explicit vertex marker visibility has been set
-
bool
TK_Polyhedron::HasVertexMarkerSymbols() const const
Returns
true if and only if at least one explicit vertex marker symbol has been set
-
bool
TK_Polyhedron::HasVertexMarkerSizes() const const
Returns
true if and only if at least one explicit vertex marker size has been set
-
bool
TK_Polyhedron::HasVertexAttributes() const const
Returns
-
bool
TK_Polyhedron::HasFaceColors() const const
Returns
true if there are face colors set on the current polyhedron
-
bool
TK_Polyhedron::HasFaceIndices() const const
Returns
true if and only if at least one face color-by-index has been set
-
bool
TK_Polyhedron::HasFaceNormals() const const
Returns
true if and only if at least one explicit face normal has been set
-
bool
TK_Polyhedron::HasFaceVisibilities() const const
Returns
true if and only if at least one explicit face visibility has been set
-
bool
TK_Polyhedron::HasFacePatterns() const const
Returns
true if and only if at least one face pattern has been set
-
bool
TK_Polyhedron::HasFaceRegions() const const
Returns
true if and only if at least one face region has been set
-
bool
TK_Polyhedron::HasFaceAttributes() const const
Returns
-
bool
TK_Polyhedron::HasFaceAttributesCommunicator() const const
-
bool
TK_Polyhedron::HasEdgeColors() const const
Returns
true if there are edge colors set on the polyhedron
-
bool
TK_Polyhedron::HasEdgeIndices() const const
Returns
true if colors-by-index are set on the polyhedron edges.
-
bool
TK_Polyhedron::HasEdgeNormals() const const
Returns
true if explicit normals are set on the polyhedron edges
-
bool
TK_Polyhedron::HasEdgeVisibilities() const const
Returns
true if explicit edge visibilities are set on the polyhedron edges
-
bool
TK_Polyhedron::HasEdgePatterns() const const
Returns
true if edge patterns are set on the polyhedron edges
-
bool
TK_Polyhedron::HasEdgeWeights() const const
Returns
true if explicit weights are set on the polyhedron edges
-
bool
TK_Polyhedron::HasEdgeAttributes() const const
Returns
true if any edge attributes are set: colors, indices, normals, visibilities, patterns, or weights