Page 4 of 10
Posted: Mon Jan 01, 2007 9:29 am
by tmyke
this evening if all is well…
Posted: Mon Jan 01, 2007 11:52 am
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!

Posted: Mon Jan 01, 2007 12:21 pm
by Chrono Syndrome
Oh, suggestion from me too: add Torus and Piramide primitives, and possiblity to load meshes from memory, plz.
Posted: Mon Jan 01, 2007 5:16 pm
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)
Posted: Mon Jan 01, 2007 5:52 pm
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…
Posted: Mon Jan 01, 2007 7:14 pm
by Chrono Syndrome
Cone = Pyramide

?!?!
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

.
Posted: Mon Jan 01, 2007 8:30 pm
by Cyan
Cone = Pyramide ?!?!
Поставь 4 сегмента и будет тебе пирамида

DM_CreateCone(4)
2tmyke
DM_PickedU(V) and DM_PickedDistance not working(return zero) in Beta2 too

Posted: Mon Jan 01, 2007 8:34 pm
by tmyke
I re-test and I keep you informed.
Posted: Mon Jan 01, 2007 8:57 pm
by tmyke
There A were a bug, Re-load the module here (just DLL and lib) and test again
http://www.dreamotion3d.com/_downloads/ ... dulePB.zip
good night...
Posted: Tue Jan 02, 2007 5:54 am
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

Posted: Tue Jan 02, 2007 6:34 am
by Heathen
Looking great man! I look forward to english docs. Btw, do you plan to add english sections to your forum?
Posted: Tue Jan 02, 2007 9:40 am
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.

Posted: Tue Jan 02, 2007 10:20 am
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
Posted: Tue Jan 02, 2007 10:40 am
by tmyke
The lastest module version, or with the Beta2 complet Pack ?
Posted: Tue Jan 02, 2007 10:46 am
by Chrono Syndrome
tmyke wrote:The lastest module version, or with the Beta2 complet Pack ?
Pack. Archive with last module version corrupted.