コード例 #1
0
ファイル: ParticleState.cpp プロジェクト: rafaelab/CRPropa3
ParticleState::ParticleState(int id, double E, Vector3d pos, Vector3d dir, double z) {
	setId(id);
	setEnergy(E);
	setPosition(pos);
	setDirection(dir);
	setRedshift(z);
}
コード例 #2
0
ファイル: Candidate.cpp プロジェクト: MartinUrban/CRPropa3
Candidate::Candidate(int id, double E, Vector3d pos, Vector3d dir, double z) :
		trajectoryLength(0), currentStep(0), nextStep(0), active(true) {
	ParticleState state(id, E, pos, dir);
	source = state;
	created = state;
	previous = state;
	current = state;
	setRedshift(z);
}