25#ifndef _MDCORE_INCLUDE_TFCLUSTER_H_
26#define _MDCORE_INCLUDE_TFCLUSTER_H_
48 struct CAPI_EXPORT ClusterParticleType : ParticleType {
50 ClusterParticleType(
const bool &noReg=
false);
51 virtual ~ClusterParticleType();
53 std::string str()
const override;
66 bool has(
const int32_t &pid);
69 bool has(ParticleType *ptype);
91 virtual ClusterParticleType *
get()
override;
102 struct CAPI_EXPORT ClusterParticleHandle : ParticleHandle {
103 ClusterParticleHandle();
104 ClusterParticleHandle(
const int &
id);
106 std::string str()
const override;
129 FVector3 *position=NULL,
130 FVector3 *velocity=NULL
147 bool has(
const int32_t &pid);
152 ParticleHandle* fission(
156 FVector3 *normal=NULL,
174 FVector3 *normal=NULL,
222 FVector3 *position=NULL,
223 FVector3 *velocity=NULL
261 os << p.str().c_str();
267 os << p.str().c_str();
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
HRESULT Cluster_AddParticle(struct Cluster *cluster, struct Particle *part)
ClusterParticleType * ClusterParticleType_fromString(const std::string &str)
Create a cluster type from a JSON string representation.
Particle * Cluster_CreateParticle(Cluster *cluster, ParticleType *particleType, FVector3 *position=NULL, FVector3 *velocity=NULL)
ClusterParticleType * ClusterParticleType_FindFromName(const char *name)
Get a registered cluster type by type name.
Cluster * Cluster_fromString(const std::string &str)
Create a cluster from a JSON string representation.
HRESULT Cluster_ComputeAggregateQuantities(struct Cluster *cluster)
The cluster analogue to :class:Particle.
Definition tfCluster.h:40
The cluster analogue to :class:ParticleHandle.
Definition tfCluster.h:102
ParticleHandle * operator()(ParticleType *partType, const std::string &str)
Constituent particle constructor.
FMatrix3 getMomentOfInertia()
Cluster * cluster()
Gets the actual cluster of this handle.
ParticleHandle * operator()(ParticleType *partType, FVector3 *position=NULL, FVector3 *velocity=NULL)
Constituent particle constructor.
bool has(ParticleHandle *part)
bool has(const int32_t &pid)
FPTYPE getRadiusOfGyration()
ParticleHandle * split(FVector3 *axis=NULL, bool *random=NULL, FPTYPE *time=NULL, FVector3 *normal=NULL, FVector3 *point=NULL)
Split the cluster.
ParticleList items()
Get all particles of this cluster.
std::vector< int32_t > getPartIds()
FVector3 getCenterOfMass()
The cluster analogue to :class:ParticleType.
Definition tfCluster.h:48
HRESULT registerType() override
Registers a type with the engine.
virtual ClusterParticleType * get() override
Get the type engine instance.
bool hasType(const ParticleType *type)
Tests where this cluster has a particle type.
bool has(ParticleType *ptype)
bool has(const int32_t &pid)
bool has(ParticleHandle *part)
A handle to a particle.
Definition tfParticle.h:313
Particle * part()
Gets the actual particle of this handle.
Definition tfEngine.h:1414
Definition tfParticle.h:101
A special list with convenience methods for working with sets of particles.
Definition tfParticleList.h:52
Structure containing information on each particle type.
Definition tfParticle.h:768
int32_t HRESULT
Definition tf_port.h:255