[PB6.10LTS] Absolute ScaleEntity() does not work

Everything related to 3D programming
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

[PB6.10LTS] Absolute ScaleEntity() does not work

Post by Psychophanta »

ScaleEntity() with the '#PB_Absolute' should RESIZE the entity to the entered params.
Please test yourself

Code: Select all

InitEngine3D(#PB_Engine3D_NoLog,#PB_Compiler_Home+"Compilers\Engine3d.dll")
InitSprite():InitKeyboard():InitMouse()
OpenWindow(0,0,0,800,600,"v",#PB_Window_BorderLess|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600,1,0,0,#PB_Screen_WaitSynchronization)
CreateCamera(0,0,0,100,100)
MoveCamera(0,0,0,2,#PB_Absolute)
CreateCylinder(0,0.05,1)
CreateEntity(0,MeshID(0),#PB_Material_None,-0.5,0,0)
CreateEntity(1,MeshID(0),#PB_Material_None,0.5,0,0)
ScaleEntity(1,1,1,1,#PB_Absolute); <- it should be the same height than width (1 world units for width, 1 world units for height, 1 world units for depth)   !!!!!!!!
Repeat
  Repeat:Eventodeventana.i=WindowEvent():Until Eventodeventana=0
  ExamineKeyboard()
  RenderWorld()
  FlipBuffers():Delay(16)
Until KeyboardPushed(#PB_Key_Escape)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: [PB6.10LTS] Absolute ScaleEntity() does not work

Post by Psychophanta »

Psychophanta wrote: Wed Mar 06, 2024 1:44 pm ScaleEntity() with the '#PB_Absolute' should RESIZE the entity to the entered params.
To manage size in relation to the original creation entity size, #PB_Absolute and #PB_Relative flags, are enough.
However, to RESIZE an Entity (i.e., to manage its size disregarding the original size with which it was created) we need another combined flag, which could be called '#PB_ReSize' or '#PB_ReSet' or whatever. :o
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: [PB6.10LTS] Absolute ScaleEntity() does not work

Post by jacdelad »

...which is not a bug, but a request.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: [PB6.10LTS] Absolute ScaleEntity() does not work

Post by Psychophanta »

I think yes, at least to have a powerful complete Scale functions :)
As the title says, absolute scale does not work now:
Just with the current status of the Scale commands, we really can not scale an entity to any given world units.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Post Reply