-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
444cb47
commit 3a4e152
Showing
9 changed files
with
149 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// | ||
// ParticleSystem.cpp | ||
// PlanetRendering | ||
// | ||
// Created by Christian Cosgrove on 1/30/15. | ||
// Copyright (c) 2015 Christian. All rights reserved. | ||
// | ||
|
||
#include "ParticleSystem.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// ParticleSystem.h | ||
// PlanetRendering | ||
// | ||
// Created by Christian Cosgrove on 1/30/15. | ||
// Copyright (c) 2015 Christian. All rights reserved. | ||
// | ||
#pragma once | ||
#include "PhysicsObject.h" | ||
#include <vector> | ||
#include "glm/glm.hpp" | ||
struct Particle : PhysicsObject | ||
{ | ||
bool Inactive = true; | ||
Particle(glm::dvec3 position, glm::dvec3 velocity, double mass); | ||
}; | ||
|
||
|
||
class ParticleSystem | ||
{ | ||
public: | ||
|
||
const int NUM_PARTICLES; | ||
|
||
|
||
ParticleSystem(); | ||
private: | ||
|
||
int currParticle; | ||
|
||
std::vector<Particle> particles = std::vector<Particle>(NUM_PARTICLES); | ||
|
||
inline void AddParticle(const Particle& particle); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.