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_Measure.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_Measure.h ( GU Library, C++)
7
*
8
* COMMENTS: Compute some measurements on geometry.
9
*/
10
11
#ifndef __GU_Measure__
12
#define __GU_Measure__
13
14
#include "
GU_API.h
"
15
#include <
GA/GA_Handle.h
>
16
#include <
UT/UT_Vector3.h
>
17
#include <
SYS/SYS_Types.h
>
18
19
class
GU_Detail
;
20
class
GA_PointGroup
;
21
class
GA_PrimitiveGroup
;
22
23
class
GU_API
GU_Measure
24
{
25
public
:
26
enum
CurvatureType
27
{
28
CURVE_ALL
,
29
CURVE_CONCAVE
,
30
CURVE_CONVEX
31
};
32
33
//! Measure the perimeter of primitives
34
/// The perimeter of each primitive will be computed and stored in the
35
/// attribute handle passed in. The attribute handle MUST point to a
36
/// primitive attribute.
37
static
void
computePerimeter(
38
GU_Detail
&gdp,
39
const
GA_RWHandleF
&
perimeter
,
40
const
GA_PrimitiveGroup
*group);
41
42
//! Measure the area of primitives
43
/// The area of each primitive will be computed and stored in the
44
/// attribute handle passed in. The attribute handle MUST point to a
45
/// primitive attribute.
46
static
void
computeArea(
47
GU_Detail
&gdp,
48
const
GA_RWHandleF
&
area
,
49
const
GA_PrimitiveGroup
*group);
50
51
//! Measure the curvature of points
52
/// The curvature of each point will be computed and stored in the
53
/// attribute handle passed in. The normal attribute handle should point
54
/// to an attribute containing the normal for each point (which does not
55
/// have to be normalized). This is used in the curvature computations.
56
/// The curvature computed is an approximation which is more accurate for
57
/// polygon meshes. No special code is used to compute curvature on higher
58
/// order surfaces.
59
/// mode
60
static
void
computeCurvature(
61
GU_Detail
&gdp,
62
const
GA_RWHandleF
&curvature,
63
const
GA_ROHandleV3
&normal,
64
const
GA_PointGroup
*pgroup,
65
const
CurvatureType
type
,
66
fpreal
min
,
67
fpreal
max
);
68
69
static
void
computeVolume(
70
GU_Detail
&gdp,
71
const
UT_Vector3
&refpt,
72
const
GA_RWHandleF
&volume,
73
const
GA_PrimitiveGroup
*group);
74
};
75
76
#endif
GA_PrimitiveGroup
Definition:
GA_ElementGroup.h:74
GA_ROHandleT< UT_Vector3F >
UT_Vector3.h
ImageBufAlgo::min
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
UT_Vector3T< float >
GA_PointGroup
Definition:
GA_ElementGroup.h:33
GU_Measure::CURVE_CONCAVE
Definition:
GU_Measure.h:29
SYS_Types.h
GA_RWHandleT< fpreal32 >
GA_Handle.h
GA_Names::perimeter
GA_API const UT_StringHolder perimeter
GU_Measure::CURVE_ALL
Definition:
GU_Measure.h:28
GU_Measure
Definition:
GU_Measure.h:23
GU_Measure::CurvatureType
CurvatureType
Definition:
GU_Measure.h:26
GU_API
#define GU_API
Definition:
GU_API.h:14
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
GU_Detail
Definition:
GU_Detail.h:154
ImageBufAlgo::max
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GU_API.h
type
type
Definition:
core.h:1059
GA_Names::area
GA_API const UT_StringHolder area
SOP_Measure_2_0Enums::CurvatureType
CurvatureType
Definition:
SOP_Measure-2.0.proto.h:73
GU
GU_Measure.h
Generated on Sun Nov 17 2024 03:01:17 for HDK by
1.8.6