Hi !
I'm a little bit lost...
I'm trying to include a lib (swarmz.h) into the code of a new module.
did this in my .h file
#include "swarmz.h"
using namespace sw;
looks ok.
and then this in .cpp :
//---------------------------------------------------------------------------------
// define our swarm members
vector<Boid> boids;
boids.push_back(Boid(Vec3(1, 0, 0), Vec3(1, 0, 0)));
boids.push_back(Boid(Vec3(1.5, 0, 0), Vec3(1, 1, 0)));
boids.push_back(Boid(Vec3(1, 0.5, 0.5), Vec3(0, 1, 0)));
boids.push_back(Boid(Vec3(4, 4, -2), Vec3(1, 0, 0)));
//create the swarm!
Swarm swarm(&boids);
//---------------------------------------------------------------------------------
if I put the latter in void boidsOli::onInitModule
it compiles ok, but then when I put :
swarm.Update(deltaSeconds);
in onProcess()
it says class Swarm has no member swarm
hum ...
thanx for your help
using an external library
- oli_lab
- Member
- Posts: 1286
- Location: Brittany, France
- Contact:
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
