Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: So Mai 19, 2024 00:06

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 3 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Newton and Materials
BeitragVerfasst: Di Okt 19, 2004 13:22 
Offline
DGL Member
Benutzeravatar

Registriert: Do Dez 11, 2003 13:23
Beiträge: 25
Wohnort: South Africa
Hi all

I have just started impementing Newton into our game engine, and have hit a small snag.

I would like my OpenGL Materials and my Newton Materials to be defined in the same class.

This should be easy enough, but the problem comes in when I want to generate the NewtonTreeCollision from my static mesh (this has Many Material changes)

It seems from looking at SOS's code that you can only have one Nweton material per NewtonTreeCollision pointer.

Is this correct?

and if so, do I create NewtonTreeCollision for each material change in the static mesh?

_________________
Im out of my mind but please leave a message...
www.sulaco.co.za


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Okt 19, 2004 14:05 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
The last parameter of NewtonTreeCollisionAddFace lets you specify custom data for that face. So in your case you would assign the material-ID of that face with the last parameter. And the second parameter of NewtonCreateTreeCollision as a special callback that gets called as soon as something collides with your treecollision.
So you define that callback and in that callback you can retrieve the material-ID you set with NewtonTreeCollisionAddFace and depending on that, you dynamically tell newton via the NewtonMaterialSetContact*-functions in that callback (those functions can only be called in a callback) your own material parameters.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Okt 19, 2004 22:01 
Offline
DGL Member
Benutzeravatar

Registriert: Do Dez 11, 2003 13:23
Beiträge: 25
Wohnort: South Africa
Thanks Sascha

I will try that and give some feedback once I have it working :D

_________________
Im out of my mind but please leave a message...
www.sulaco.co.za


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 3 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.007s | 14 Queries | GZIP : On ]