TK_Polyhedron
Fields
Vertex_None |
|
Vertex_Normal |
|
Vertex_Parameter |
|
Vertex_Face_Color |
|
Vertex_Edge_Color |
|
Vertex_Marker_Color |
|
Vertex_Face_Index |
|
Vertex_Edge_Index |
|
Vertex_Marker_Index |
|
Vertex_Marker_Visibility |
|
Vertex_Marker_Size |
|
Vertex_Marker_Symbol |
|
Vertex_Marker_RGBA |
|
Vertex_Any_Color |
|
Face_None |
|
Face_Color |
|
Face_Index |
|
Face_Any_Color |
|
Face_Normal |
|
Face_Visibility |
|
Face_Pattern |
|
Edge_None |
|
Edge_Color |
|
Edge_Index |
|
Edge_Any_Color |
|
Edge_Normal |
|
Edge_Visibility |
|
Edge_Pattern |
|
Edge_Weight |
|
Fake_Edge |
|
TKSH_STANDARD |
|
TKSH_COMPRESSED_POINTS |
|
TKSH_COMPRESSED_FACES |
|
TKSH_TRISTRIPS |
|
TKSH_HAS_OPTIONALS |
|
TKSH_FIRSTPASS |
|
TKSH_BOUNDING_ONLY |
|
TKSH_CONNECTIVITY_COMPRESSION |
|
TKSH_EXPANDED |
|
TKSH2_COLLECTION |
|
TKSH2_NULL |
|
TKSH2_HAS_NEGATIVE_VALUES |
|
TKSH2_GLOBAL_QUANTIZATION |
|
OPT_TERMINATE |
|
OPT_ALL_NORMALS_COMPRESSED |
|
OPT_NORMALS_COMPRESSED |
|
OPT_ALL_PARAMETERS_COMPRESSED |
|
OPT_PARAMETERS_COMPRESSED |
|
OPT_ALL_VFCOLORS |
|
OPT_VERTEX_FCOLORS |
|
OPT_ALL_VECOLORS |
|
OPT_VERTEX_ECOLORS |
|
OPT_ALL_VMCOLORS |
|
OPT_VERTEX_MCOLORS |
|
OPT_ALL_VFINDICES |
|
OPT_VERTEX_FINDICES |
|
OPT_ALL_VEINDICES |
|
OPT_VERTEX_EINDICES |
|
OPT_ALL_VMINDICES |
|
OPT_VERTEX_MINDICES |
|
OPT_ALL_NORMALS |
|
OPT_NORMALS |
|
OPT_ALL_NORMALS_POLAR |
|
OPT_NORMALS_POLAR |
|
OPT_ALL_VMVISIBILITIES |
|
OPT_VERTEX_MARKER_VISIBILITIES |
|
OPT_ALL_VMSYMBOLS |
|
OPT_VERTEX_MARKER_SYMBOLS |
|
OPT_ALL_VMSIZES |
|
OPT_VERTEX_MARKER_SIZES |
|
OPT_PARAMETERS |
|
OPT_ALL_PARAMETERS |
|
OPT_ALL_VMRGBAS |
|
OPT_VERTEX_MRGBAS |
|
OPT_ALL_FACE_COLORS |
|
OPT_FACE_COLORS |
|
OPT_ALL_FACE_INDICES |
|
OPT_FACE_INDICES |
|
OPT_ALL_FACE_NORMALS_POLAR |
|
OPT_FACE_NORMALS_POLAR |
|
OPT_ALL_FACE_VISIBILITIES |
|
OPT_FACE_VISIBILITIES |
|
OPT_ALL_FACE_PATTERNS |
|
OPT_FACE_PATTERNS |
|
OPT_FACE_REGIONS |
|
OPT_ALL_EDGE_COLORS |
|
OPT_EDGE_COLORS |
|
OPT_ALL_EDGE_INDICES |
|
OPT_EDGE_INDICES |
|
OPT_ALL_EDGE_NORMALS_POLAR |
|
OPT_EDGE_NORMALS_POLAR |
|
OPT_ALL_EDGE_VISIBILITIES |
|
OPT_EDGE_VISIBILITIES |
|
OPT_ALL_EDGE_PATTERNS |
|
OPT_EDGE_PATTERNS |
|
OPT_ALL_EDGE_WEIGHTS |
|
OPT_EDGE_WEIGHTS |
|
OPT_RESERVED_SPATIAL |
|
OPT_ENTITY_ATTRIBUTES |
|
OPT_ALL_VFCOLORS_UNCOMPRESSED |
|
OPT_VERTEX_FCOLORS_UNCOMPRESSED |
|
OPT_ALL_VECOLORS_UNCOMPRESSED |
|
OPT_VERTEX_ECOLORS_UNCOMPRESSED |
|
OPT_ALL_VMCOLORS_UNCOMPRESSED |
|
OPT_VERTEX_MCOLORS_UNCOMPRESSED |
|
OPT_ALL_VMRGBAS_UNCOMPRESSED |
|
OPT_VERTEX_MRGBAS_UNCOMPRESSED |
|
OPT_ALL_VFINDICES_UNCOMPRESSED |
|
OPT_VERTEX_FINDICES_UNCOMPRESSED |
|
OPT_ALL_VEINDICES_UNCOMPRESSED |
|
OPT_VERTEX_EINDICES_UNCOMPRESSED |
|
OPT_ALL_VMINDICES_UNCOMPRESSED |
|
OPT_VERTEX_MINDICES_UNCOMPRESSED |
|
OPT_ALL_FACE_COLORS_UNCOMPRESSED |
|
OPT_FACE_COLORS_UNCOMPRESSED |
|
OPT_ALL_FACE_INDICES_UNCOMPRESSED |
|
OPT_FACE_INDICES_UNCOMPRESSED |
Functions
Detailed Description
-
class
TK_Polyhedron
: public BBaseOpcodeHandler 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.
Subclassed by TK_Cellular_Volume, TK_Mesh, TK_PolyCylinder, TK_Shell
Public Types
-
enum
Exists
Flags for declaring existence of local vertex attributes in mp_exists
Values:
-
enumerator
Vertex_None
no local vertex attributes
-
enumerator
Vertex_Normal
explicit normals
-
enumerator
Vertex_Parameter
parameters (for texturing, etc…)
-
enumerator
Vertex_Face_Color
vertex color, to be applied to interpolated faces
-
enumerator
Vertex_Edge_Color
vertex color, to be applied to interpolated edges
-
enumerator
Vertex_Marker_Color
vertex color, to be applied to marker
-
enumerator
Vertex_Face_Index
vertex color-by-index, to be applied to interpolated faces
-
enumerator
Vertex_Edge_Index
vertex color-by-index, to be applied to interpolated edges
-
enumerator
Vertex_Marker_Index
vertex color-by-index, to be applied to marker
-
enumerator
Vertex_Marker_Visibility
-
enumerator
Vertex_Marker_Size
-
enumerator
Vertex_Marker_Symbol
-
enumerator
Vertex_Marker_RGBA
vertex color in rgba format, to be applied to marker
-
enumerator
Vertex_Any_Color
multi-bit alias to quickly test for any color or color-by-index
-
enumerator
-
enum
Face_Exists
Flags for declaring existence of local face attributes in mp_face_exists
Values:
-
enumerator
Face_None
no local face attributes
-
enumerator
Face_Color
self-explanatory
-
enumerator
Face_Index
face color-by-index
-
enumerator
Face_Any_Color
multi-bit alias to quickly test for color or color-by-index
-
enumerator
Face_Normal
self-explanatory
-
enumerator
Face_Visibility
self-explanatory
-
enumerator
Face_Pattern
self-explanatory
-
enumerator
-
enum
Edge_Exists
Flags for declaring existence of local edge attributes in mp_edge_exists
Values:
-
enumerator
Edge_None
no local face attributes
-
enumerator
Edge_Color
self-explanatory
-
enumerator
Edge_Index
face color-by-index
-
enumerator
Edge_Any_Color
multi-bit alias to quickly test for color or color-by-index
-
enumerator
Edge_Normal
self-explanatory
-
enumerator
Edge_Visibility
self-explanatory
-
enumerator
Edge_Pattern
self-explanatory
-
enumerator
Edge_Weight
edge thickness, given as a proportion of the default
-
enumerator
Fake_Edge
-
enumerator
-
enum
Suboptions
contains the meanings of the bits put into mp_subop mp_subop is a bit field containing information about the shell or mesh.
Values:
-
enumerator
TKSH_STANDARD
no special suboptions
-
enumerator
TKSH_COMPRESSED_POINTS
points are compressed
-
enumerator
TKSH_COMPRESSED_FACES
faces are compressed
-
enumerator
TKSH_TRISTRIPS
face list represents tristrips
-
enumerator
TKSH_HAS_OPTIONALS
optionals exist; refer to Opt_Opcode
-
enumerator
TKSH_FIRSTPASS
this is not a refinement of a previously-seen entity
-
enumerator
TKSH_BOUNDING_ONLY
a bounding box representation only.
-
enumerator
TKSH_CONNECTIVITY_COMPRESSION
the polyedra is compressed using the ‘connectivity compression’ algorithm
-
enumerator
TKSH_EXPANDED
expanded suboptions exist; refer to Suboptions2
-
enumerator
-
enum
Suboptions2
contains the meanings of the bits put into mp_subop2 mp_subop2 is a bit field containing information about the shell or mesh. It is assumed to be zero unless mp_subop contains the TKSH_EXPANDED bit.
Values:
-
enumerator
TKSH2_COLLECTION
instead of a shell, this opcode contains a TKE_Terminate-terminated list of opcodes to be inserted into a shell’s LOD. Incompatible with TKSH_FIRSTPASS.
-
enumerator
TKSH2_NULL
an empty shell used only as a placeholder for later revisiting
-
enumerator
TKSH2_HAS_NEGATIVE_VALUES
negative faces/cell values exist
-
enumerator
TKSH2_GLOBAL_QUANTIZATION
polyhedra points are globally quantized
-
enumerator
-
enum
Opt_Opcode
The supported optional fields for local attributes. Note: Odd values indicate that an attribute is present on all vertices (or all faces or all edges)
Values:
-
enumerator
OPT_TERMINATE
terminate the list of optional attributes
-
enumerator
OPT_ALL_NORMALS_COMPRESSED
set compressed normals on all vertices
-
enumerator
OPT_NORMALS_COMPRESSED
set compressed normals on some vertices
-
enumerator
OPT_ALL_PARAMETERS_COMPRESSED
set compressed parameters (texture coordinates) on all vertices
-
enumerator
OPT_PARAMETERS_COMPRESSED
set compressed parameters on some vertices
-
enumerator
OPT_ALL_VFCOLORS
set colors on all vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_VERTEX_FCOLORS
set colors on some vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_ALL_VECOLORS
set colors on all vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_VERTEX_ECOLORS
set colors on some vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_ALL_VMCOLORS
set colors on all vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_VERTEX_MCOLORS
set colors on some vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_ALL_VFINDICES
set colors-by-index on all vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_VERTEX_FINDICES
set colors-by-index on some vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_ALL_VEINDICES
set colors-by-index on all vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_VERTEX_EINDICES
set colors-by-index on some vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_ALL_VMINDICES
set colors-by-index on all vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_VERTEX_MINDICES
set colors-by-index on some vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_ALL_NORMALS
set normals on all vertices
-
enumerator
OPT_NORMALS
set normals on some vertices
-
enumerator
OPT_ALL_NORMALS_POLAR
set normals (specified as polar coordinates) on all vertices
-
enumerator
OPT_NORMALS_POLAR
set normals (specified as polar coordinates) on some vertices
-
enumerator
OPT_ALL_VMVISIBILITIES
put explicit local visibility setting on all vertex markers
-
enumerator
OPT_VERTEX_MARKER_VISIBILITIES
put explicit local visibility setting on some vertex markers
-
enumerator
OPT_ALL_VMSYMBOLS
put explicit local marker symbol setting on all vertices
-
enumerator
OPT_VERTEX_MARKER_SYMBOLS
put explicit local marker symbol setting on some vertices
-
enumerator
OPT_ALL_VMSIZES
put explicit local size setting on all vertex markers
-
enumerator
OPT_VERTEX_MARKER_SIZES
put explicit local size setting on some vertex markers
-
enumerator
OPT_PARAMETERS
set parameters (texture coordinates) on some vertices
-
enumerator
OPT_ALL_PARAMETERS
set parameters (texture coordinates) on all vertices
-
enumerator
OPT_ALL_VMRGBAS
set rgba colors on all vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_VERTEX_MRGBAS
set rgba colors on some vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_ALL_FACE_COLORS
set colors on all faces
-
enumerator
OPT_FACE_COLORS
set colors on some faces
-
enumerator
OPT_ALL_FACE_INDICES
set colors-by-index on all faces
-
enumerator
OPT_FACE_INDICES
set colors-by-index on some faces
-
enumerator
OPT_ALL_FACE_NORMALS_POLAR
set normals (specified as polar coordinates) on all faces
-
enumerator
OPT_FACE_NORMALS_POLAR
set normals (specified as polar coordinates) on some faces
-
enumerator
OPT_ALL_FACE_VISIBILITIES
put explicit local visibility setting on all faces
-
enumerator
OPT_FACE_VISIBILITIES
put explicit local visibility setting on some faces
-
enumerator
OPT_ALL_FACE_PATTERNS
put explicit local pattern setting on all faces
-
enumerator
OPT_FACE_PATTERNS
put explicit local pattern setting on some faces
-
enumerator
OPT_FACE_REGIONS
apply region identifiers to some faces (for the purposes of grouping faces so that their attributes can be set at once)
-
enumerator
OPT_ALL_EDGE_COLORS
set colors on all edges
-
enumerator
OPT_EDGE_COLORS
set colors on some edges
-
enumerator
OPT_ALL_EDGE_INDICES
set colors-by-index on all edges
-
enumerator
OPT_EDGE_INDICES
set colors-by-index on some edges
-
enumerator
OPT_ALL_EDGE_NORMALS_POLAR
set normals (specified as polar coordinates) on all edges
-
enumerator
OPT_EDGE_NORMALS_POLAR
set normals (specified as polar coordinates) on some edges
-
enumerator
OPT_ALL_EDGE_VISIBILITIES
put explicit local visibility setting on all edges
-
enumerator
OPT_EDGE_VISIBILITIES
put explicit local visibility setting on some edges
-
enumerator
OPT_ALL_EDGE_PATTERNS
put explicit local pattern setting on all edges
-
enumerator
OPT_EDGE_PATTERNS
put explicit local pattern setting on some edges
-
enumerator
OPT_ALL_EDGE_WEIGHTS
put explicit local thickness setting on all edges
-
enumerator
OPT_EDGE_WEIGHTS
put explicit local thickness setting on some edges
-
enumerator
OPT_RESERVED_SPATIAL
-
enumerator
OPT_ENTITY_ATTRIBUTES
-
enumerator
OPT_ALL_VFCOLORS_UNCOMPRESSED
set uncompressed colors on all vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_VERTEX_FCOLORS_UNCOMPRESSED
set uncompressed colors on some vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_ALL_VECOLORS_UNCOMPRESSED
set uncompressed colors on all vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_VERTEX_ECOLORS_UNCOMPRESSED
set uncompressed colors on some vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_ALL_VMCOLORS_UNCOMPRESSED
set uncompressed colors on all vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_VERTEX_MCOLORS_UNCOMPRESSED
set uncompressed colors on some vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_ALL_VMRGBAS_UNCOMPRESSED
set uncompressed rgba colors on all vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_VERTEX_MRGBAS_UNCOMPRESSED
set uncompressed rgba colors on some vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_ALL_VFINDICES_UNCOMPRESSED
set uncompressed colors-by-index on all vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_VERTEX_FINDICES_UNCOMPRESSED
set uncompressed colors-by-index on some vertices, to apply to drawing of interpolated faces
-
enumerator
OPT_ALL_VEINDICES_UNCOMPRESSED
set uncompressed colors-by-index on all vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_VERTEX_EINDICES_UNCOMPRESSED
set uncompressed colors-by-index on some vertices, to apply to drawing of interpolated edges
-
enumerator
OPT_ALL_VMINDICES_UNCOMPRESSED
set uncompressed colors-by-index on all vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_VERTEX_MINDICES_UNCOMPRESSED
set uncompressed colors-by-index on some vertices, to apply to drawing of vertex_markers
-
enumerator
OPT_ALL_FACE_COLORS_UNCOMPRESSED
set uncompressed colors on all faces
-
enumerator
OPT_FACE_COLORS_UNCOMPRESSED
set uncompressed colors on some faces
-
enumerator
OPT_ALL_FACE_INDICES_UNCOMPRESSED
set uncompressed colors-by-index on all faces
-
enumerator
OPT_FACE_INDICES_UNCOMPRESSED
set uncompressed colors-by-index on some faces
-
enumerator
Public Functions
-
inline float const *
GetPoints
() const Returns: a pointer to the array of vertex locations
-
inline float *
GetPoints
() Returns: a pointer to the array of vertex locations
-
inline double const *
GetDPoints
() const Returns: a pointer to the array of vertex locations
-
inline double *
GetDPoints
() Returns: a pointer to the array of vertex locations
-
inline int
GetPointCount
() const Returns: the number of points in the polyhedron
-
inline unsigned int const *
GetExists
() const Returns: a pointer to the existence array, a bitmask indicating presence/absence of attributes
-
inline unsigned int *
GetExists
() Returns: a pointer to the existence array, a bitmask indicating presence/absence of attributes
-
inline unsigned int const *
GetFaceExists
() const Returns: a pointer to the existence array for faces, mp_face_exists, indicating face attributes
-
inline unsigned int *
GetFaceExists
() Returns: a pointer to the existence array for faces, mp_face_exists, indicating face attributes
-
inline ID_Key
GetKey
() const Returns: the id by which the graphics knows this piece of geometry (could be pointer or integer)
-
inline unsigned char
GetSubop
() const Returns: the suboption that will be transmitted to indicate formatting options
-
inline unsigned short
GetSubop2
() const Returns: the 2nd suboption that will be transmitted to indicate formatting options
-
inline float const *
GetBounding
() const Returns: a pointer to the bounding box (x_min, y_min, z_min, x_max, y_max, z_max)
-
inline float const *
GetVertexNormals
() const Returns: a pointer to the array of vertex normals
-
inline float *
GetVertexNormals
() Returns: a pointer to the array of vertex normals
-
inline float const *
GetVertexParameters
() const Returns: a pointer to the array of vertex parameters
-
inline float *
GetVertexParameters
() Returns: a pointer to the array of vertex parameters
-
inline float const *
GetVertexFaceColors
() const Returns: a pointer to the array of vertex colors (as applied to the faces)
-
inline float *
GetVertexFaceColors
() Returns: a pointer to the array of vertex colors (as applied to the faces)
-
inline float const *
GetVertexEdgeColors
() const Returns: a pointer to the array of vertex colors (as applied to the edges)
-
inline float *
GetVertexEdgeColors
() Returns: a pointer to the array of vertex colors (as applied to the edges)
-
inline float const *
GetVertexMarkerColors
() const Returns: a pointer to the array of vertex colors (as applied to the markers)
-
inline float *
GetVertexMarkerColors
() Returns: a pointer to the array of vertex colors (as applied to the markers)
-
inline float const *
GetVertexMarkerRGBAs
() const Returns: a pointer to the array of vertex rgba colors (as applied to the markers)
-
inline float *
GetVertexMarkerRGBAs
() Returns: a pointer to the array of vertex rgba colors (as applied to the markers)
-
inline int
GetVertexMarkerColorcount
() 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) Returns: the number vertex colors (as applied to the markers)
-
inline int &
GetVertexMarkerColorCount
() Returns: a reference to the number of vertex colors (as applied to the markers)
-
inline float const *
GetVertexColors
() const
-
inline float *
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)
-
inline float const *
GetVertexFaceIndices
() const Returns: a pointer to the array of vertex colors-by-index (as applied to the faces)
-
inline float *
GetVertexFaceIndices
() Returns: a pointer to the array of vertex colors-by-index (as applied to the faces)
-
inline float const *
GetVertexEdgeIndices
() const Returns: a pointer to the array of vertex colors-by-index (as applied to the edges)
-
inline float *
GetVertexEdgeIndices
() Returns: a pointer to the array of vertex colors-by-index (as applied to the edges)
-
inline float const *
GetVertexMarkerIndices
() const Returns: a pointer to the array of vertex colors-by-index (as applied to the markers)
-
inline float *
GetVertexMarkerIndices
() Returns: a pointer to the array of vertex colors-by-index (as applied to the markers)
-
inline float const *
GetVertexIndices
() 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)
-
inline float *
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)
-
inline float const *
GetFaceColors
() const Returns: a pointer to the array of face colors
-
inline float *
GetFaceColors
() Returns: a pointer to the array of face colors
-
inline float const *
GetFaceIndices
() const Returns: a pointer to the array of face colors-by-index
-
inline float *
GetFaceIndices
() Returns: a pointer to the array of face colors-by-index
-
inline int const *
GetFaceRegions
() const Returns: a pointer to the array of face regiions
-
inline int *
GetFaceRegions
() Returns: a pointer to the array of face regions, which may be modified in-place
-
inline int
GetPriority
() Gets the priority to this object
-
inline void
SetPriority
(int priority) Sets priority to this object
-
inline TK_Status
SetKey
(BStreamFileToolkit &tk, ID_Key key) informs the TK_Polyhedron of the id by which this piece of geometry is known
-
inline TK_Status
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 enum TK_Polyhedron::Suboptions
-
inline TK_Status
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 enum TK_Polyhedron::Suboptions2
-
TK_Status
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.
-
inline TK_Status
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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_pointcount Returns: TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
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_pointcount Returns: TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
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_pointcount Returns: TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
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
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_facecount Returns: TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
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_facecount Returns: TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
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_facecount Returns: TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
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_facecount Returns: TK_Normal or TK_Error to indicate success or failure.
-
TK_Status
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
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
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
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
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
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
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
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
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
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
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
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.
-
inline TK_Status
SetLodLevel
(int level) Sets the lod level for this representation (as in HOOPS, ‘0’ means original base resolution)
-
inline int
GetLodLevel
() const Returns: the LOD level
-
inline void
SetCellCount
(int count) Sets the cell count for volumes.
-
inline int
GetCellCount
() const Returns: the cell count for volumes
-
TK_Status
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 *
PopObject
() Pops an object off the list of collection parts.
Returns: the object to caller (presumably so that it can be deleted)
-
inline bool
HasOptionals
() Returns: true if and only if there are some attributes set on any of the faces or vertices
-
inline bool
HasOptionalsCommunicator
()
-
inline bool
HasVertexNormals
() const Returns: true if and only if at least one vertex normal has been set
-
inline bool
HasVertexParameters
() const Returns: true if and only if at least one vertex parameter has been set
-
inline bool
HasVertexFaceColors
() const Returns: true if and only if at least one vertex color has been set (to apply to an interpolated face)
-
inline bool
HasVertexEdgeColors
() const Returns: true if and only if at least one vertex color has been set (to apply to an interpolated edge)
-
inline bool
HasVertexMarkerColors
() const Returns: true if and only if at least one vertex color has been set (to apply to a marker)
-
inline bool
HasVertexMarkerRGBAs
() const Returns: true if and only if at least one vertex rgba color has been set (to apply to a marker)
-
inline bool
HasVertexColors
() const Returns: true if and only if at least one vertex color has been set (to apply to anything)
-
inline bool
HasVertexFaceIndices
() const Returns: true if and only if at least one vertex color-by-index has been set (to apply to an interpolated face)
-
inline bool
HasVertexEdgeIndices
() const Returns: true if and only if at least one vertex color-by-index has been set (to apply to an interpolated edge)
-
inline bool
HasVertexMarkerIndices
() const Returns: true if and only if at least one vertex color-by-index has been set (to apply to a marker)
-
inline bool
HasVertexIndices
() const Returns: true if and only if at least one vertex color-by-index has been set (to apply to anything)
-
inline bool
HasVertexMarkerVisibilities
() const Returns: true if and only if at least one explicit vertex marker visibility has been set
-
inline bool
HasVertexMarkerSymbols
() const Returns: true if and only if at least one explicit vertex marker symbol has been set
-
inline bool
HasVertexMarkerSizes
() const Returns: true if and only if at least one explicit vertex marker size has been set
-
inline bool
HasVertexAttributes
() const Returns: true if HasVertexColors() or HasVertexIndices() or HasVertexNormals() or HasVertexParameters() or HasVertexMarkerVisibilities() or HasVertexMarkerSymbols() or HasVertexMarkerSizes()
-
inline bool
HasFaceColors
() const Returns: true if there are face colors set on the current polyhedron
-
inline bool
HasFaceIndices
() const Returns: true if and only if at least one face color-by-index has been set
-
inline bool
HasFaceNormals
() const Returns: true if and only if at least one explicit face normal has been set
-
inline bool
HasFaceVisibilities
() const Returns: true if and only if at least one explicit face visibility has been set
-
inline bool
HasFacePatterns
() const Returns: true if and only if at least one face pattern has been set
-
inline bool
HasFaceRegions
() const Returns: true if and only if at least one face region has been set
-
inline bool
HasFaceAttributes
() const Returns: true if HasFaceColors(), HasFaceIndices(), HasFaceRegions(), HasFaceVisibilities(), HasFacePatterns(), or HasFaceRegions()
-
inline bool
HasFaceAttributesCommunicator
() const
-
inline bool
HasEdgeColors
() const Returns: true if there are edge colors set on the polyhedron
-
inline bool
HasEdgeIndices
() const Returns: true if colors-by-index are set on the polyhedron edges.
-
inline bool
HasEdgeNormals
() const Returns: true if explicit normals are set on the polyhedron edges
-
inline bool
HasEdgeVisibilities
() const Returns: true if explicit edge visibilities are set on the polyhedron edges
-
inline bool
HasEdgePatterns
() const Returns: true if edge patterns are set on the polyhedron edges
-
inline bool
HasEdgeWeights
() const Returns: true if explicit weights are set on the polyhedron edges
-
inline bool
HasEdgeAttributes
() const Returns: true if any edge attributes are set: colors, indices, normals, visibilities, patterns, or weights
-
enum