HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GU_PolyReduce.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: Polygonal reduction tool (C++)
7
*
8
* COMMENTS:
9
*/
10
11
#ifndef __GU_PolyReduce_h__
12
#define __GU_PolyReduce_h__
13
14
#include "
GU_API.h
"
15
#include <
UT/UT_Vector3.h
>
16
class
GA_EdgeGroup
;
17
class
GEO_Detail
;
18
19
// Description of a single edge collapse
20
class
GU_API
GU_EdgeCollapseNode
21
{
22
public
:
23
int
myIv1,
myIv2
;
// Source indices to reduce.
24
int
myNewIv
;
// Resulting index.
25
int
myDegenTri
;
// Tris removed
26
UT_Vector3
myV
;
// Resulting position.
27
int
myNewPt
;
// New point number
28
29
private
:
30
friend
class
GU_EdgeCollapseList
;
31
GU_EdgeCollapseNode
*myNext, *myPrev;
32
};
33
34
// A list of edge collapses:
35
class
GU_API
GU_EdgeCollapseList
36
{
37
public
:
38
GU_EdgeCollapseList
() { myHead = 0; myTail = 0; }
39
~
GU_EdgeCollapseList
();
40
41
GU_EdgeCollapseNode
*next(
GU_EdgeCollapseNode
*node);
42
void
remove
(
GU_EdgeCollapseNode
*node);
43
void
append(
GU_EdgeCollapseNode
*node);
44
int
empty
()
const
{
return
myHead ? 0 : 1; }
45
GU_EdgeCollapseNode
*
first
()
const
{
return
myHead; }
46
47
private
:
48
GU_EdgeCollapseNode
*myHead, *myTail;
49
};
50
51
class
GU_API
GU_PolyReduceParms
52
{
53
public
:
54
GU_PolyReduceParms
();
55
~
GU_PolyReduceParms
();
56
57
int
numpolys
;
// Number of polys to reduce to.
58
float
percentage
;
// Percentage to reduce
59
int
usepercent
;
// Which method to use.
60
bool
useedgelimit
;
// Constrain number of edges to collapse
61
int
numedgecollapse
;
// Max edges to collapse.
62
int
meshinvert
;
// Test for mesh inversion?
63
float
optimization
;
// 1 for optimized point positions
64
// 0 for just mid points
65
float
borderweight
;
// Weighting to add to border planes
66
float
lengthweight
;
// Weighting to add to the length of sides
67
int
keepedges
;
// Never collapse the edges
68
int
snap
;
// Snap to existing vertices
69
70
// Feature edgse:
71
GEO_Detail
*
gdpf
;
// Detail containing feature edges
72
const
GA_EdgeGroup
*
features
;
// Feature edges
73
const
GA_EdgeGroup
*
forcecollapse
;
// Edges to collapse.
74
float
featureweight
;
// The weight thereof
75
76
int
altergeo
;
// Do we change the geometry at all?
77
78
GU_EdgeCollapseList
*
edgelist
;
// Where we accumulate all ecols.
79
int
uniquevertex
;
// Number unique vertex
80
int
initialtris
;
// Number stris started with
81
82
float
attribweight
;
// Importance of the weight attribute.
83
float
topologicalweight
;
// Penalty factor for high valences.
84
};
85
86
87
#endif
88
89
GU_EdgeCollapseNode::myIv2
int myIv2
Definition:
GU_PolyReduce.h:23
GU_PolyReduceParms::features
const GA_EdgeGroup * features
Definition:
GU_PolyReduce.h:72
GU_EdgeCollapseList
Definition:
GU_PolyReduce.h:35
GU_PolyReduceParms::meshinvert
int meshinvert
Definition:
GU_PolyReduce.h:62
UT_Vector3.h
GU_EdgeCollapseNode::myNewIv
int myNewIv
Definition:
GU_PolyReduce.h:24
GU_PolyReduceParms::altergeo
int altergeo
Definition:
GU_PolyReduce.h:76
GU_PolyReduceParms::numpolys
int numpolys
Definition:
GU_PolyReduce.h:57
GU_EdgeCollapseNode::myDegenTri
int myDegenTri
Definition:
GU_PolyReduce.h:25
GU_PolyReduceParms::optimization
float optimization
Definition:
GU_PolyReduce.h:63
GU_PolyReduceParms::borderweight
float borderweight
Definition:
GU_PolyReduce.h:65
UT_Vector3T< float >
GU_PolyReduceParms::edgelist
GU_EdgeCollapseList * edgelist
Definition:
GU_PolyReduce.h:78
GU_PolyReduceParms::featureweight
float featureweight
Definition:
GU_PolyReduce.h:74
GEO_Detail
Definition:
GEO_Detail.h:247
GU_PolyReduceParms::numedgecollapse
int numedgecollapse
Definition:
GU_PolyReduce.h:61
GU_PolyReduceParms::forcecollapse
const GA_EdgeGroup * forcecollapse
Definition:
GU_PolyReduce.h:73
GU_EdgeCollapseNode
Definition:
GU_PolyReduce.h:20
GU_EdgeCollapseList::GU_EdgeCollapseList
GU_EdgeCollapseList()
Definition:
GU_PolyReduce.h:38
GU_API
#define GU_API
Definition:
GU_API.h:14
GU_PolyReduceParms::topologicalweight
float topologicalweight
Definition:
GU_PolyReduce.h:83
GU_EdgeCollapseList::empty
int empty() const
Definition:
GU_PolyReduce.h:44
GU_PolyReduceParms::attribweight
float attribweight
Definition:
GU_PolyReduce.h:82
GU_PolyReduceParms
Definition:
GU_PolyReduce.h:51
GU_EdgeCollapseList::first
GU_EdgeCollapseNode * first() const
Definition:
GU_PolyReduce.h:45
GU_PolyReduceParms::snap
int snap
Definition:
GU_PolyReduce.h:68
GU_PolyReduceParms::usepercent
int usepercent
Definition:
GU_PolyReduce.h:59
GU_PolyReduceParms::useedgelimit
bool useedgelimit
Definition:
GU_PolyReduce.h:60
GA_EdgeGroup
Definition:
GA_EdgeGroup.h:42
GU_EdgeCollapseNode::myV
UT_Vector3 myV
Definition:
GU_PolyReduce.h:26
GU_API.h
GU_PolyReduceParms::gdpf
GEO_Detail * gdpf
Definition:
GU_PolyReduce.h:71
GU_PolyReduceParms::keepedges
int keepedges
Definition:
GU_PolyReduce.h:67
GU_PolyReduceParms::initialtris
int initialtris
Definition:
GU_PolyReduce.h:80
GU_EdgeCollapseNode::myNewPt
int myNewPt
Definition:
GU_PolyReduce.h:27
GU_PolyReduceParms::lengthweight
float lengthweight
Definition:
GU_PolyReduce.h:66
GU_PolyReduceParms::percentage
float percentage
Definition:
GU_PolyReduce.h:58
GU_PolyReduceParms::uniquevertex
int uniquevertex
Definition:
GU_PolyReduce.h:79
GU
GU_PolyReduce.h
Generated on Tue Dec 17 2024 03:39:48 for HDK by
1.8.6