-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change agent colour during execution #148
Comments
Short answer: I've got nothing for you. Long answer: visualization is a layer on top of agent visualization. In fact, all of the visualization artifacts are in a different library than the core Menge simulation code. Currently, the visualization of agents is hard-coded. It's been long an intention of mine to make the visualization configurable akin to how the simulation is configured. That's one of the reason that there's a However, if you want to hack some code, you can do the following:
|
Ok, I understand. Thank you for the reply.
Em ter, 3 de mar de 2020 21:34, curds01 <notifications@github.com> escreveu:
… Short answer: I've got nothing for you.
Long answer: visualization is a layer on top of agent visualization. In
fact, all of the visualization artifacts are in a different library
<https://github.com/MengeCrowdSim/Menge/tree/master/src/Menge/MengeVis>
than the core Menge simulation code. Currently, the visualization of agents
is *hard-coded*.
It's been long an intention of mine to make the visualization configurable
akin to how the simulation is configured. That's *one* of the reason that
there's a sceneV.xml file. However, currently, the only thing you can
configure is camera, lighting, and the like.
However, if you want to hack some code, you can do the following:
1. The class you want is VisAgent
<https://github.com/MengeCrowdSim/Menge/blob/master/src/Menge/MengeVis/Runtime/VisAgent/VisAgent.cpp>.
It draws the little cylinders. Right now the logic for picking a color
<https://github.com/MengeCrowdSim/Menge/blob/master/src/Menge/MengeVis/Runtime/VisAgent/VisAgent.cpp#L121-L169>
simply looks at the class id and maps it to a color (in a really, truly,
horrible way). If you gut that function you can define an (r, g, b) triple
based on any logic you like.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#148?email_source=notifications&email_token=ADF43U6MHHSY5NOW5YCRFZLRFWOY3A5CNFSM4LAWCUC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENVXA4Q#issuecomment-594243698>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADF43U6J67XRDUMIVYX5FRLRFWOY3ANCNFSM4LAWCUCQ>
.
|
I've seen that I can change some agent attributes like velocity and radius using actions and events, but I didn't find out how to change the agent colour after something happens, for example because of a change of state or because of being in some region of the environment. I tryed to do it changing the agent class inside an event, but it didn't work. Could you tell me how could I do it?
The text was updated successfully, but these errors were encountered: