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
RAY_ProcIsoBase.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: RAY_ProcIsoBase.h ( RAY Library, C++)
7
*
8
* COMMENTS: Iso-surface procedural baseclass
9
*/
10
11
#ifndef __RAY_ProcIsoBase__
12
#define __RAY_ProcIsoBase__
13
14
#include "
RAY_API.h
"
15
#include <
GA/GA_Handle.h
>
16
#include <
UT/UT_BoundingBox.h
>
17
#include "
RAY_Procedural.h
"
18
19
class
RAY_API
RAY_ProcIsoBase
:
public
RAY_Procedural
20
{
21
public
:
22
RAY_ProcIsoBase
();
23
~
RAY_ProcIsoBase
()
override
;
24
25
//
26
// The evalDensity method is used to evaluate the density of the iso
27
// surface. The surface will be generated where the density is 0.
28
virtual
fpreal
evaluateDensity(
const
float
pos[3])
const
= 0;
29
30
//
31
// The render method may require the full surface to be split into smaller
32
// procedurals. The box passed in to the createChild() method is the
33
// bounding box without motion vectors applied. This method is responsible
34
// for:
35
// a) Creating a new sub-class instance
36
// b) Setting the myBox member data. The myBox must be
37
// totally enclosed in the bounding box passed in.
38
// c) Setting the myVelBox member data (possibly to the same
39
// value as myBox if there is no motion blur)
40
//
41
virtual
RAY_ProcIsoBase
*
createChild
(
const
UT_BoundingBox
&box) = 0;
42
43
//
44
// Attributes must be created for geometry before it's added to mantra, but
45
// after the points and polygons have been created. The attributes can be
46
// arbitrary. However, since velocity is used in generation of motion blur
47
// data, the index of the velocity attribute in the gdp needs to be
48
// returned by this method. Thus the return codes are:
49
//
50
// false - An un-recoverable error
51
// true - The velocity_attribute parameter is either invalid (no
52
// velocity attribute) or valid and refers to the velocity
53
// attribute.
54
//
55
// By default there is no velocity attribute added
56
//
57
// If velocity attributes are added to the detail, an arbitrary scale can
58
// also be applied to the velocity (i.e. shutter).
59
virtual
bool
addAttributes(
GU_Detail
*gdp,
float
&velocityscale,
60
GA_ROHandleV3
&velocity_attribute);
61
62
//
63
// By default, this will return the bounding box with velocity motion
64
// vectors applied. This is required since mantra needs to know the entire
65
// possible range of geometry.
66
void
getBoundingBox
(
UT_BoundingBox
&box)
override
;
67
68
//
69
// The render method does not need to be overridden by the sub-class.
70
void
render
()
override
;
71
72
protected
:
73
// Data which is unique per iso-procedural
74
// Member data is:
75
// myBox - The bounding box without velocity motion blur
76
// information applied.
77
// myVelBox - The bounding box including motion blur vectors
78
// myLodScale - An level of detail scale independent of the shading
79
// quality of the instance. This allows larger polygons
80
// to be generated without sacrificing shading.
81
UT_BoundingBox
myBox
;
82
UT_BoundingBox
myVelBox
;
83
float
myLodScale
;
84
};
85
86
#endif
87
RAY_API.h
GA_ROHandleT< UT_Vector3F >
UT_BoundingBoxT< float >
RAY_ProcIsoBase::myBox
UT_BoundingBox myBox
Definition:
RAY_ProcIsoBase.h:81
RAY_Procedural::render
virtual void render()=0
RAY_Procedural
Procedural primitive for mantra (RAY)
Definition:
RAY_Procedural.h:631
RAY_Procedural::getBoundingBox
virtual void getBoundingBox(UT_BoundingBox &box)=0
The bounding box is the "object space" bounds of the procedural.
RAY_Procedural.h
RAY_ProcIsoBase
Definition:
RAY_ProcIsoBase.h:19
GA_Handle.h
RAY_Procedural::createChild
RAY_ProceduralChildPtr createChild() const
Definition:
RAY_Procedural.h:856
RAY_API
#define RAY_API
Definition:
RAY_API.h:12
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
RAY_ProcIsoBase::myVelBox
UT_BoundingBox myVelBox
Definition:
RAY_ProcIsoBase.h:82
GU_Detail
Definition:
GU_Detail.h:154
RAY_ProcIsoBase::myLodScale
float myLodScale
Definition:
RAY_ProcIsoBase.h:83
UT_BoundingBox.h
RAY
RAY_ProcIsoBase.h
Generated on Tue Dec 17 2024 03:41:44 for HDK by
1.8.6