Dreamotion3d (and PhysX) continuation...

Advanced game related topics
tmyke
Enthusiast
Enthusiast
Posts: 132
Joined: Fri Sep 29, 2006 1:10 pm
Location: France

Post by tmyke »

this evening if all is well…
Strength and wisdom.
Image
Cyan
User
User
Posts: 11
Joined: Tue Oct 24, 2006 12:58 pm
Location: Russia
Contact:

Post by Cyan »

tmyke
Hello! Could you add such function as DM_PickedSurface()? Please, this function is very necessary for system of materials (glass, wood, concrete in FPS)
PS
By the way - functions DM_PickedU(V) causes linked error :(
POLINK: error: Unresolved external symbol '_DM_PickedU'
POLINK: error: Unresolved external symbol '_DM_PickedV'
PSS
Happy New Year! :-)
PureBasic forever!
Chrono Syndrome
Enthusiast
Enthusiast
Posts: 169
Joined: Thu Oct 05, 2006 6:44 am
Contact:

Post by Chrono Syndrome »

Oh, suggestion from me too: add Torus and Piramide primitives, and possiblity to load meshes from memory, plz.
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.
Anonymous

Post by Anonymous »

you can create Torus and Pyramides with :

DM_CreateCone()
DM_CreateTorus()

see Dreamotion3D.pbi for more infos

For mesh and memory , you can make a manual mesh , see example (12-CreateMesh.pb)
tmyke
Enthusiast
Enthusiast
Posts: 132
Joined: Fri Sep 29, 2006 1:10 pm
Location: France

Post by tmyke »

The Beta2 version is here: http://www.purebasicgames.fr/e107_plugi ... p?150.last

Sorry, but for the moment it's only in French, but english doc coming soon (some weeks).

@Cyan: Do you use the last version, which has been on line for this morning?

@Chrono Syndrome: Like says it Cpl.Bator, the function “Torus” already exists, for the function pyramid, I will see…
Strength and wisdom.
Image
Chrono Syndrome
Enthusiast
Enthusiast
Posts: 169
Joined: Thu Oct 05, 2006 6:44 am
Contact:

Post by Chrono Syndrome »

Code: Select all

DM_CreateCone()
Cone = Pyramide :shock: ?!?!
For mesh and memory , you can make a manual mesh , see example (12-CreateMesh.pb)
I really don't like this way... It's unpure ;) .
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.
Cyan
User
User
Posts: 11
Joined: Tue Oct 24, 2006 12:58 pm
Location: Russia
Contact:

Post by Cyan »

Cone = Pyramide ?!?!
Поставь 4 сегмента и будет тебе пирамида :)
DM_CreateCone(4)

2tmyke
DM_PickedU(V) and DM_PickedDistance not working(return zero) in Beta2 too :(
PureBasic forever!
tmyke
Enthusiast
Enthusiast
Posts: 132
Joined: Fri Sep 29, 2006 1:10 pm
Location: France

Post by tmyke »

I re-test and I keep you informed.
Strength and wisdom.
Image
tmyke
Enthusiast
Enthusiast
Posts: 132
Joined: Fri Sep 29, 2006 1:10 pm
Location: France

Post by tmyke »

There A were a bug, Re-load the module here (just DLL and lib) and test again :wink:

http://www.dreamotion3d.com/_downloads/ ... dulePB.zip

good night...
Strength and wisdom.
Image
Cyan
User
User
Posts: 11
Joined: Tue Oct 24, 2006 12:58 pm
Location: Russia
Contact:

Post by Cyan »

There A were a bug, Re-load the module here (just DLL and lib) and test again
Thanks, now is working.
But sorry for my persistence - DM_PickedU(V) returns local coordinates of picked triangle? I thought that global coordinates :(
PureBasic forever!
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Looking great man! I look forward to english docs. Btw, do you plan to add english sections to your forum?
I love Purebasic.
tmyke
Enthusiast
Enthusiast
Posts: 132
Joined: Fri Sep 29, 2006 1:10 pm
Location: France

Post by tmyke »

@Cyan:
there 3 instruction for find position in the world:
PickTriangle.l() is a traingle of surface picked,
PickedU.l() is Barycentric hit coordinates, U on this triangle
PickedV.l() is Barycentric hit coordinates, V on this triangle


if you want absolute coordinate, use PickedX()/PickedY()/PickedZ() like this:

Code: Select all

; Include files
IncludePath "Include\"
  IncludeFile "dreamotion3D.pbi"

  Global	*camera.CEntity
  Global *mesh.CEntity
  Global *boule.CEntity
  
  If InitSprite() = 0 Or InitKeyboard() = 0 Or InitMouse() = 0 
    End
  EndIf

  ; Initialize graphic windows
  DM_Graphics3D(800, 600, 32,  0, 1)
  ; some light
  DM_AmbiantLight(150,  150,  150)
  DM_CreateLight(3)
  ; little sphere
  *boule = DM_CreateSphere()
  DM_ScaleMesh(*boule, 0.2,0.2,0.2)
  DM_EntityPickMode(*boule, #False)
  ; big sphere, red
  *mesh  = DM_CreateSphere()
  DM_ScaleMesh(*mesh, 3,3,3)
  DM_EntityColor(*mesh, 255,0,0,255)
  DM_TranslateEntity(*mesh,3,0,0)
  ; one camera
  *camera   = DM_CreateCamera()
  DM_MoveEntity(*camera, 0,0,-15.0)
  DM_CameraClsColor(*camera, 125, 125, 125)
  ; main loop
  Repeat
  	ExamineKeyboard()
   	ExamineMouse() 
  	ShowCursor_(1)
 	
    If KeyboardReleased(#PB_Key_Escape) Or WindowEvent()=#PB_Event_CloseWindow
  	  Quit=1
    EndIf
 
   	If MouseButton(#PB_MouseButton_Right)
  		*mesh = DM_CameraPick(*camera, MouseX(), MouseY())
  		If *mesh<> #Null 
  		  DM_PositionEntity(*boule, DM_PickedX(),DM_PickedY(),DM_PickedZ())
  		EndIf
  	EndIf
   
  	DM_BeginScene()
    	DM_RenderWorld()
  	DM_EndScene()
  	
  Until Quit=1
  DM_ClearGraphics()
  End
Re-load the module (just somes bugs fixed):http://www.dreamotion3d.com/_downloads/ ... dulePB.zip


@Heathen:
For those who are not a Beta-tester, There is only the
section “General discution” on the forum, and which is in English. :wink:
Strength and wisdom.
Image
Chrono Syndrome
Enthusiast
Enthusiast
Posts: 169
Joined: Thu Oct 05, 2006 6:44 am
Contact:

Post by Chrono Syndrome »

BUGReprot: That's version crashes my OS x_x ! When I trying to run EVERY example, my PC rebooting after dispalying Dream3D's windows.

Using: PB 4.00 (final), WinXP, DX9.0C. Videocard: VIA/S3G UniChrome Pro IGP
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.
tmyke
Enthusiast
Enthusiast
Posts: 132
Joined: Fri Sep 29, 2006 1:10 pm
Location: France

Post by tmyke »

The lastest module version, or with the Beta2 complet Pack ?
Strength and wisdom.
Image
Chrono Syndrome
Enthusiast
Enthusiast
Posts: 169
Joined: Thu Oct 05, 2006 6:44 am
Contact:

Post by Chrono Syndrome »

tmyke wrote:The lastest module version, or with the Beta2 complet Pack ?
Pack. Archive with last module version corrupted.
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.
Post Reply