HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_MergeUtils.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU_MergeUtils.h ( GU Library, C++)
7  *
8  * COMMENTS: Utilities to merge geometry
9  */
10 
11 #ifndef __GU_MergeUtils__
12 #define __GU_MergeUtils__
13 
14 #include "GU_API.h"
15 #include <UT/UT_Array.h>
16 
17 class GU_Detail;
18 class GU_DetailHandle;
19 
20 /// @{
21 /// Merge multiple geometry details into a single detail.
22 ///
23 /// Before merging, this function will perform analysis on the input details to
24 /// ensure that attributes will be promoted to a level which will prevent any
25 /// loss of data.
26 ///
27 /// For example, if one source detail has a point attribute which matches a
28 /// vertex attribute on another source, the attribute will be promoted to a
29 /// vertex attribute before merging.
30 ///
31 /// In addition, if any geometry has detail attributes which have different
32 /// values from other geometry detail attributes, the attributes will be
33 /// promoted to primitive attributes to preserve the information.
34 ///
35 /// @note The source details must be non-const since attributes may be promoted.
40 /// @}
41 
42 /// Perform attribute matching and merging on two details.
44 
45 /// Perform attribute matching and merging on two details. This may be
46 /// significantly more expensive since the source detail is considered
47 /// constant. If the source is constant and attributes need to be promoted,
48 /// the source is duplicated before merging.
50 
51 /// Perform attribute matching and merging on an array of details.
53  GU_Detail *const*sources,
54  int nsources);
55 
56 #endif
GU_API bool GUexpensiveMatchAndMerge(GU_Detail &dest, const GU_Detail &src)
GLsizei GLenum * sources
Definition: glcorearb.h:2542
GU_API bool GUmatchAttributesAndMerge(GU_Detail &dest, const UT_Array< GU_Detail * > &sources)
#define GU_API
Definition: GU_API.h:14
GLenum src
Definition: glcorearb.h:1793