Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfParticleTimeEventPy.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of Tissue Forge.
3 * Copyright (c) 2022-2024 T.J. Sego
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
24
25#ifndef _SOURCE_LANGS_PY_TFPARTICLETIMEEVENTPY_H_
26#define _SOURCE_LANGS_PY_TFPARTICLETIMEEVENTPY_H_
27
28#include "tf_py.h"
29
30#include "tfEventPyExecutor.h"
31
33
34
35namespace TissueForge {
36
37
38 namespace py {
39
40
42
44 HRESULT _result = 0;
45 };
46
48 HRESULT _result = 0;
49 };
50
51 // Time-dependent particle event
52 struct CAPI_EXPORT ParticleTimeEventPy : event::ParticleTimeEvent {
53
54 ParticleTimeEventPy() {}
55 ParticleTimeEventPy(
57 const FloatP_t &period,
59 ParticleTimeEventPyPredicatePyExecutor *predicateExecutor=NULL,
60 event::ParticleTimeEventNextTimeSetter *nextTimeSetter=NULL,
61 const FloatP_t &start_time=0,
62 const FloatP_t &end_time=-1,
63 event::ParticleTimeEventParticleSelector *particleSelector=NULL
64 );
65 virtual ~ParticleTimeEventPy();
66
67 virtual HRESULT predicate();
68 virtual HRESULT invoke();
69 virtual HRESULT eval(const FloatP_t &time);
70
71 private:
72
75
76 };
77
92 ParticleType *targetType,
93 const FloatP_t &period,
95 ParticleTimeEventPyPredicatePyExecutor *predicateExecutor=NULL,
96 const std::string &distribution="default",
97 const FloatP_t &start_time=0.0,
98 const FloatP_t &end_time=-1.0,
99 const std::string &selector="default"
100 );
101
102}};
103
104#endif // _SOURCE_LANGS_PY_TFPARTICLETIMEEVENTPY_H_
Tissue Forge Python language support.
Definition tf_bindPy.h:36
ParticleTimeEventPy * onParticleTimeEvent(ParticleType *targetType, const FloatP_t &period, ParticleTimeEventPyInvokePyExecutor *invokeExecutor, ParticleTimeEventPyPredicatePyExecutor *predicateExecutor=NULL, const std::string &distribution="default", const FloatP_t &start_time=0.0, const FloatP_t &end_time=-1.0, const std::string &selector="default")
Creates a time-dependent particle event using prescribed invoke and predicate python function executo...
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
Structure containing information on each particle type.
Definition tfParticle.h:768
Definition tfParticleTimeEvent.h:161
FloatP_t start_time
Time at which evaluations begin.
Definition tfParticleTimeEvent.h:186
FloatP_t end_time
Time at which evaluations stop.
Definition tfParticleTimeEvent.h:191
FloatP_t period
Period of event evaluations.
Definition tfParticleTimeEvent.h:181
ParticleType * targetType
Target particle type of this event.
Definition tfParticleTimeEvent.h:166
Definition tfEventPyExecutor.h:33
Definition tfParticleTimeEventPy.h:52
Definition tfParticleTimeEventPy.h:47
Definition tfParticleTimeEventPy.h:43
int32_t HRESULT
Definition tf_port.h:255