HolyLib Wiki

IPhysicsEnvironment

IPhysicsEvironment

Methods

IPhysicsEnvironment:CleanupDeleteList()
cleans the delete list?
IPhysicsObject IPhysicsEnvironment:CreatePolyObject( CPhysCollide collide, number materialIndex, Vector origin, Angle angles, table objectparams_t )
Creates a new IPhysicsObject in the environment.
IPhysicsObject IPhysicsEnvironment:CreatePolyObjectStatic( CPhysCollide collide, number materialIndex, Vector origin, Angle angles, table objectparams_t )
Creates a new static IPhysicsObject in the environment.
IPhysicsObject IPhysicsEnvironment:CreateSphereObject( number radius, number materialIndex, Vector origin, Angle angles, table objectparams_t, boolean static = false )
Creates a new perfect sphere IPhysicsObject in the environment.
IPhysicsObject IPhysicsEnvironment:CreateWorldPhysics( )
Creates the world physics object and also adds all static props.
IPhysicsEnvironment:DestroyObject( CPhysCollide collide )
Destroys the given physics object.
IPhysicsEnvironment:EnableDeleteQueue( boolean deleteQueue )
Enables/Disables the delete queue.
number IPhysicsEnvironment:GetActiveObjectCount( )
returns the number of active physics objects.
table IPhysicsEnvironment:GetActiveObjects( )
returns a table containing all active physics objects.
number IPhysicsEnvironment:GetAirDensity( )
Returns the current air density.
Vector IPhysicsEnvironment:GetGravity( )
Returns the current gravity in source_unit/s^2
number IPhysicsEnvironment:GetNextFrameTime( )
returns the current simulation clock's value at the next frame.
This is an absolute time.
table IPhysicsEnvironment:GetObjectList( )
returns a table containing all physics objects.
table IPhysicsEnvironment:GetPerformanceSettings( )
Returns the current performance settings.
The table will use the PhysEnvPerformanceSettings structure.
number IPhysicsEnvironment:GetSimulationTimestep( )
returns the next simulation timestep.
table IPhysicsEnvironment:GetTable( )
Returns the lua table used by newindex and index
boolean IPhysicsEnvironment:IsCollisionModelUsed( CPhysCollide collide )
Returns true if it uses a collision model. This function is internally use for debugging?
boolean IPhysicsEnvironment:IsValid( )
Returns true if the collision query is still valid.
IPhysicsEnvironment:ResetSimulationClock()
resets the simulation clock.
IPhysicsEnvironment:SetAirDensity( number airdensity )
Sets the new air density.
IPhysicsEnvironment:SetGravity( Vector newGravity )
Sets the new gravity in source_unit/s^2
IPhysicsEnvironment:SetObjectEventHandler( function onObjectWake(IPhysicsObject obj), function onObjectSleep(IPhysicsObject obj) )
Allows you to add callbacks when physics objects wake up or go to sleep in the environment.
IPhysicsEnvironment:SetPerformanceSettings( PhysEnvPerformanceSettings settings )
Sets the new performance settings.
Use the PhysEnvPerformanceSettings structure.
IPhysicsEnvironment:SetQuickDelete( boolean quickDelete )
Sets quick delete?
IPhysicsEnvironment:SetSimulationTimestep( number timeStep )
Sets the next simulation timestep.
IPhysicsEnvironment:Simulate( number deltaTime, boolean onlyEntities = false )
Simulates the given delta time in the environment.
If onlyEntities is set, it will only update the Entities, without simulating the physics environment.
boolean IPhysicsEnvironment:TransferObject( IPhysicsObject obj, IPhysicsEnvironment newEnvironment )
Transfers the physics object from this environment to the new environment. You shouldn't transfer players or vehicles.
It currently is quite buggy and shouldn't really be used.