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_SingleSolver.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
*/
7
8
#ifndef __SIM_SingleSolver_h__
9
#define __SIM_SingleSolver_h__
10
11
#include "
SIM_API.h
"
12
#include "
SIM_Solver.h
"
13
14
class
SIM_Object
;
15
16
/// This class is a specialized version of SIM_Solver for solvers that
17
/// handle all objects in mutual affector relationships independently.
18
/// This class implements the solveObjectsSubclass() and
19
/// initializeObjectsSubclass() functions by calling the new virtuals
20
/// solveSingleObjectSubclass() and initializeSingleObjectSubclass()
21
/// for each object.
22
class
SIM_API
SIM_SingleSolver
:
public
SIM_Solver
23
{
24
public
:
25
/// Solve for the given object. This function is called for each timestep
26
/// after the one where the objects are first created. This function calls
27
/// solveObjectSubclass to perform the real work.
28
SIM_Result
solveSingleObject(
SIM_Engine
&engine,
29
SIM_Object
&
object
,
30
SIM_ObjectArray
&feedbacktoobjects,
31
const
SIM_Time
×tep,
32
bool
newobject);
33
34
protected
:
35
/// Basic SIM_SingleSolver constructor.
36
explicit
SIM_SingleSolver
(
const
SIM_DataFactory
*factory);
37
/// Basic SIM_SingleSolver destructor.
38
~
SIM_SingleSolver
()
override
;
39
40
/// Override this method to call solveSingleObject().
41
SIM_Result
solveObjectsSubclass
(
SIM_Engine
&engine,
42
SIM_ObjectArray
&objects,
43
SIM_ObjectArray
&newobjects,
44
SIM_ObjectArray
&feedbacktoobjects,
45
const
SIM_Time
×tep)
override
;
46
47
/// This method is called for each object passed to
48
/// solveObjectsSubclass().
49
virtual
SIM_Result
solveSingleObjectSubclass(
SIM_Engine
&engine,
50
SIM_Object
&
object
,
51
SIM_ObjectArray
&feedbacktoobjects,
52
const
SIM_Time
×tep,
53
bool
newobject) = 0;
54
55
private
:
56
DECLARE_STANDARD_GETCASTTOTYPE
();
57
DECLARE_CLASSNAME
(
SIM_SingleSolver
,
SIM_Solver
);
58
};
59
60
#endif
61
SIM_Engine
Definition:
SIM_Engine.h:65
DECLARE_STANDARD_GETCASTTOTYPE
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition:
SIM_DataUtils.h:50
DECLARE_CLASSNAME
#define DECLARE_CLASSNAME(DataClass, SuperClass)
Definition:
SIM_DataUtils.h:20
SIM_Solver.h
SIM_Time
Definition:
SIM_Time.h:19
SIM_API.h
SIM_Solver
Definition:
SIM_Solver.h:25
SIM_ObjectArray
Holds pointers to a number of SIM_Object objects.
Definition:
SIM_ObjectArray.h:20
SIM_DataFactory
Definition:
SIM_DataFactory.h:33
SIM_Solver::solveObjectsSubclass
virtual SIM_Result solveObjectsSubclass(SIM_Engine &engine, SIM_ObjectArray &objects, SIM_ObjectArray &newobjects, SIM_ObjectArray &feedbacktoobjects, const SIM_Time ×tep)=0
SIM_Object
Definition:
SIM_Object.h:33
SIM_API
#define SIM_API
Definition:
SIM_API.h:12
SIM_SingleSolver
Definition:
SIM_SingleSolver.h:22
SIM_Solver::SIM_Result
SIM_Result
Definition:
SIM_Solver.h:32
SIM
SIM_SingleSolver.h
Generated on Fri Nov 8 2024 03:41:26 for HDK by
1.8.6