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
GD_TrimBezClip.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: Geometry Library (C++)
7
*
8
* COMMENTS:
9
* This handles bezier clipping of trim pieces, allowing fast
10
* point in tests.
11
*
12
*/
13
14
#ifndef __GD_TrimBezClip_h_
15
#define __GD_TrimBezClip_h_
16
17
#include "
GD_API.h
"
18
#include <
UT/UT_VectorTypes.h
>
19
#include <
GA/GA_Defines.h
>
20
class
GD_TrimPieceRBezCurve
;
21
22
enum
GD_TrimBezClipType
23
{
24
GD_TrimBezClipA
= 0,
25
GD_TrimBezClipBCross
= 1,
26
GD_TrimBezClipBNoCross
= 2,
27
GD_TrimBezClipC
= 3,
28
GD_TrimBezClipAorB
= 4,
29
GD_TrimBezClipUnknown
= 5
30
};
31
32
33
class
GD_API
GD_TrimBezClip
34
{
35
public
:
36
// Initialize for point in tests:
37
GD_TrimBezClip
();
38
~
GD_TrimBezClip
();
39
40
int
getIsectParity(
const
GD_TrimPieceRBezCurve
&curve,
41
const
UT_Vector2
&pt,
float
tol = 1E-4F);
42
43
private
:
44
// Intializes CV for order.
45
GD_TrimBezClip
(
int
order
);
46
47
// If left or right NULL, does not evaluate it.
48
// ucut e [0,1]
49
int
splitAt(
GD_TrimBezClip
*
left
,
50
GD_TrimBezClip
*
right
,
51
float
ucut,
52
UT_Vector2
bloss[][
GA_MAXORDER
])
53
const
;
54
55
// Returns maximum size of CV convex hull:
56
float
sizeMax();
57
58
// Find min/max x/y isections:
59
void
findXCVIsections(
float
&umin,
float
&umax);
60
void
findYCVIsections(
float
&umin,
float
&umax);
61
62
GD_TrimBezClipType
classify(
float
tol);
63
64
// Private stack of clips
65
GD_TrimBezClip
*myNext;
66
67
GD_TrimBezClipType
myType;
68
UT_Vector2
*myCV;
69
int
myDeg;
70
unsigned
int
myCVsize;
71
72
// Blossom array:
73
UT_Vector2
*myBloss;
74
};
75
76
#endif
GD_TrimBezClipBCross
Definition:
GD_TrimBezClip.h:25
GD_TrimBezClipUnknown
Definition:
GD_TrimBezClip.h:29
GD_TrimBezClipType
GD_TrimBezClipType
Definition:
GD_TrimBezClip.h:22
GD_TrimPieceRBezCurve
Definition:
GD_TrimPiece.h:124
left
GLint left
Definition:
glcorearb.h:2005
GD_TrimBezClipBNoCross
Definition:
GD_TrimBezClip.h:26
right
GLdouble right
Definition:
glad.h:2817
GA_MAXORDER
#define GA_MAXORDER
Definition:
GA_Defines.h:17
UT_Vector2T< float >
GA_Defines.h
GD_TrimBezClipA
Definition:
GD_TrimBezClip.h:24
order
GLdouble GLdouble GLint GLint order
Definition:
glad.h:2676
UT_VectorTypes.h
GD_TrimBezClipAorB
Definition:
GD_TrimBezClip.h:28
GD_TrimBezClipC
Definition:
GD_TrimBezClip.h:27
GD_API
#define GD_API
Definition:
GD_API.h:10
GD_TrimBezClip
Definition:
GD_TrimBezClip.h:33
GD_API.h
GD
GD_TrimBezClip.h
Generated on Tue Dec 17 2024 03:39:42 for HDK by
1.8.6