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
SIM_BuildCollisionMaskFromPieces.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: SIM_BuildCollisionMaskFromPieces.h (SIMZ Library, C++)
7
*
8
* COMMENTS:
9
* Implements an operator to build a collision mask (and a field of collision
10
* velocities) from instanced rigid body pieces.
11
*/
12
13
#ifndef __SIM_BuildCollisionMaskFromPieces__
14
#define __SIM_BuildCollisionMaskFromPieces__
15
16
#include "
SIMZ_API.h
"
17
18
#include <
GAS/GAS_SubSolver.h
>
19
#include <
SIM/SIM_RawField.h
>
20
21
class
sim_ColliderInstance;
22
23
// This class implements the collision mask building logic.
24
class
SIMZ_API
SIM_BuildCollisionMaskFromPieces
:
public
GAS_SubSolver
25
{
26
public
:
27
GET_DATA_FUNC_S
(
GAS_NAME_COLLISION
, CollisionField);
28
GET_DATA_FUNC_S
(
GAS_NAME_COLLISIONVELOCITY
, CollisionVelocity);
29
GET_DATA_FUNC_S
(
GAS_NAME_STENCIL
, StencilField);
30
31
GET_DATA_FUNC_V3
(
"wind"
, WindVelocity);
32
33
GET_DATA_FUNC_B
(
"clearmask"
, ClearMask);
34
GET_DATA_FUNC_F
(
"minmaskval"
, StartingValue);
35
36
GET_DATA_FUNC_I
(
"referenceframe"
, CollectFrame);
37
GET_DATA_FUNC_I
(
"input"
,
Input
);
38
GET_DATA_FUNC_S
(
"soppath"
, SopPath);
39
GET_DATA_FUNC_S
(
"instgeo"
, InstanceGeo);
40
41
GET_DATA_FUNC_S
(
"surfvol"
, SurfaceVolume);
42
43
protected
:
44
explicit
SIM_BuildCollisionMaskFromPieces
(
const
SIM_DataFactory
* factory);
45
~
SIM_BuildCollisionMaskFromPieces
()
override
;
46
47
bool
solveGasSubclass
(
SIM_Engine
& engine,
48
SIM_Object
* obj,
49
SIM_Time
time
,
50
SIM_Time
timestep)
override
;
51
52
THREADED_METHOD7_CONST
(
SIM_BuildCollisionMaskFromPieces
,
53
mask
->shouldMultiThread(),
54
buildCollisionMask,
55
SIM_RawField
*,
mask
,
56
UT_VoxelArrayF
**, vel,
57
const
SIM_RawField
*,
stencil
,
58
const
UT_Array<sim_ColliderInstance>
&, colliders,
59
bool, clear,
60
float
, def_val,
61
const
UT_Vector3
&, neg_wind);
62
void
buildCollisionMaskPartial(
SIM_RawField
*
mask
,
UT_VoxelArrayF
* vel[3],
63
const
SIM_RawField
*
stencil
,
64
const
UT_Array<sim_ColliderInstance>
& cs,
65
bool
clear,
float
def_val,
66
const
UT_Vector3
& neg_wind,
67
const
UT_JobInfo
& info)
const
;
68
69
private
:
70
static
const
SIM_DopDescription
* getDopDescription();
71
72
DECLARE_STANDARD_GETCASTTOTYPE
();
73
DECLARE_DATAFACTORY
(
SIM_BuildCollisionMaskFromPieces
,
GAS_SubSolver
,
74
"Gas Build Collision Mask From Pieces"
,
75
getDopDescription());
76
};
77
78
#endif
79
SIM_Engine
Definition:
SIM_Engine.h:65
SIMZ_API
#define SIMZ_API
Definition:
SIMZ_API.h:10
DECLARE_STANDARD_GETCASTTOTYPE
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition:
SIM_DataUtils.h:50
SIM_BuildCollisionMaskFromPieces
Definition:
SIM_BuildCollisionMaskFromPieces.h:24
GET_DATA_FUNC_V3
#define GET_DATA_FUNC_V3(DataName, FuncName)
Definition:
SIM_OptionsUser.h:117
SIM_Time
Definition:
SIM_Time.h:19
GT_Names::time
GT_API const UT_StringHolder time
SIM_RawField.h
GAS_NAME_COLLISION
#define GAS_NAME_COLLISION
Definition:
GAS_Utils.h:21
GAS_SubSolver::solveGasSubclass
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
UT_Vector3T< float >
UT_Array
Definition:
BV_KDOPTree.h:18
DECLARE_DATAFACTORY
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition:
SIM_DataUtils.h:63
GET_DATA_FUNC_I
#define GET_DATA_FUNC_I(DataName, FuncName)
Definition:
SIM_OptionsUser.h:48
Input
Definition:
Interface.h:209
THREADED_METHOD7_CONST
#define THREADED_METHOD7_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6, PARMTYPE7, PARMNAME7)
Definition:
UT_ThreadedAlgorithm.h:537
UT_VoxelArray< fpreal32 >
SIM_DopDescription
Definition:
SIM_DopDescription.h:23
GAS_NAME_COLLISIONVELOCITY
#define GAS_NAME_COLLISIONVELOCITY
Definition:
GAS_Utils.h:23
SIM_DataFactory
Definition:
SIM_DataFactory.h:33
mask
GLint GLuint mask
Definition:
glcorearb.h:124
float
float
Definition:
ImfStandardAttributes.h:375
SIMZ_API.h
GET_DATA_FUNC_B
#define GET_DATA_FUNC_B(DataName, FuncName)
Definition:
SIM_OptionsUser.h:64
GAS_SubSolver.h
SIM_Object
Definition:
SIM_Object.h:33
GET_DATA_FUNC_F
#define GET_DATA_FUNC_F(DataName, FuncName)
Definition:
SIM_OptionsUser.h:71
GAS_SubSolver
Definition:
GAS_SubSolver.h:70
UT_JobInfo
Definition:
UT_ThreadedAlgorithm.h:92
stencil
GLint GLfloat GLint stencil
Definition:
glcorearb.h:1278
GET_DATA_FUNC_S
#define GET_DATA_FUNC_S(DataName, FuncName)
Definition:
SIM_OptionsUser.h:166
GAS_NAME_STENCIL
#define GAS_NAME_STENCIL
Definition:
GAS_Utils.h:19
SIM_RawField
Definition:
SIM_RawField.h:108
SIMZ
SIM_BuildCollisionMaskFromPieces.h
Generated on Mon May 13 2024 03:18:49 for HDK by
1.8.6