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
GEO_Rolloff.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: GEO Library (C++)
7
*
8
* COMMENTS: Rolloff class for proportional modeling
9
*
10
*/
11
12
#ifndef __GEO_Rolloff_h__
13
#define __GEO_Rolloff_h__
14
15
#include "
GEO_API.h
"
16
// This must match PRM_Shared::prmSoftTypes in order...
17
18
enum
GEO_RolloffType
19
{
20
GEO_ROLLOFF_LINEAR
,
21
GEO_ROLLOFF_QUADRATIC
,
22
GEO_ROLLOFF_SMOOTH
,
23
GEO_ROLLOFF_META
,
24
GEO_ROLLOFF_INVALID
25
};
26
27
class
TS_MetaKernel
;
28
29
30
class
GEO_API
GEO_Rolloff
31
{
32
public
:
33
GEO_Rolloff
(
GEO_RolloffType
t
=
GEO_ROLLOFF_SMOOTH
,
34
float
r
= 1.0
f
,
bool
c
=
true
,
35
float
tdeg0 = 0.0
f
,
float
tdeg1 = 0.0
f
,
36
TS_MetaKernel
*kernel = 0);
37
38
// Not all rolloff functions require a fsqrted distance, so
39
// avoid it if necessary.
40
float
apply(
float
dist2,
bool
normalize
=
true
)
const
;
41
42
void
radius
(
float
r
) {
43
myRadius = (r >= 0.0f ? r : 0.0f);
44
myRadius2 = myRadius * myRadius;
45
}
46
float
radius
()
const
{
return
myRadius; }
47
float
radius2
()
const
{
return
myRadius2; }
48
49
void
connected
(
bool
c
) { myConnected =
c
; }
50
bool
connected
()
const
{
return
myConnected; }
51
52
void
type
(
GEO_RolloffType
t
) { myType =
t
; }
53
54
55
private
:
56
GEO_RolloffType
myType;
57
float
myRadius;
// normalized
58
float
myRadius2;
// myRadius squared cached for speed
59
bool
myConnected;
60
61
float
myTanRad0;
// Angle of tangent slope
62
float
myTanRad1;
63
TS_MetaKernel
*myKernel;
// My meta kernel
64
};
65
66
#endif
GEO_ROLLOFF_META
Definition:
GEO_Rolloff.h:23
GEO_Rolloff
Definition:
GEO_Rolloff.h:30
TS_MetaKernel
Definition:
TS_Expression.h:61
GEO_Rolloff::connected
bool connected() const
Definition:
GEO_Rolloff.h:50
GEO_Rolloff::radius
void radius(float r)
Definition:
GEO_Rolloff.h:42
GEO_Rolloff::connected
void connected(bool c)
Definition:
GEO_Rolloff.h:49
GEO_Rolloff::radius
float radius() const
Definition:
GEO_Rolloff.h:46
GEO_Rolloff::radius2
float radius2() const
Definition:
GEO_Rolloff.h:47
f
GLfloat f
Definition:
glcorearb.h:1926
GEO_RolloffType
GEO_RolloffType
Definition:
GEO_Rolloff.h:18
GEO_ROLLOFF_SMOOTH
Definition:
GEO_Rolloff.h:22
GEO_API
#define GEO_API
Definition:
GEO_API.h:14
t
GLdouble t
Definition:
glad.h:2397
GEO_ROLLOFF_LINEAR
Definition:
GEO_Rolloff.h:20
GEO_ROLLOFF_QUADRATIC
Definition:
GEO_Rolloff.h:21
GEO_API.h
nanovdb::io::c
c
Definition:
IO.h:328
GEO_Rolloff::type
void type(GEO_RolloffType t)
Definition:
GEO_Rolloff.h:52
GEO_ROLLOFF_INVALID
Definition:
GEO_Rolloff.h:24
r
GLboolean r
Definition:
glcorearb.h:1222
normalize
constexpr T normalize(UT_FixedVector< T, D > &a) noexcept
Definition:
UT_FixedVector.h:203
GEO
GEO_Rolloff.h
Generated on Sun Nov 17 2024 03:01:13 for HDK by
1.8.6