C# Класс Universe.Framework.Physics.PhysicsScene

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddAvatar ( string avName, Vector3 position, Quaternion rotation, Vector3 size, bool isFlying, uint localID, UUID uuid ) : PhysicsActor
AddGravityPoint ( bool isApplyingForces, Vector3 position, float forceX, float forceY, float forceZ, float gravForce, float radius, int identifier ) : void
AddPrimShape ( UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical, int material, float friction, float restitution, float gravityMultiplier, float density ) : PhysicsActor
Dispose ( ) : void
GetGravityForce ( ) : float[]
GetResults ( ) : void
GetTopColliders ( ) : float>.Dictionary
Initialize ( IMesher meshmerizer, IScene scene ) : void
PostInitialize ( IConfigSource config ) : void
RaycastWorld ( Vector3 position, Vector3 direction, float length, int Count ) : List
RaycastWorld ( Vector3 position, Vector3 direction, float length, RaycastCallback retMethod ) : void

Queue a raycast against the physics scene. The provided callback method will be called when the raycast is complete Many physics engines don't support collision testing at the same time as manipulating the physics scene, so we queue the request up and callback a custom method when the raycast is complete. This allows physics engines that give an immediate result to callback immediately and ones that don't, to callback when it gets a result back. ODE for example will not allow you to change the scene while collision testing or it asserts, 'opteration not valid for locked space'. This includes adding a ray to the scene. This is named RayCastWorld to not conflict with modrex's Raycast method.

RaycastWorld ( Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod ) : void
RemoveAvatar ( PhysicsActor actor ) : void
RemovePrim ( PhysicsActor prim ) : void

Removes a single prim from the group that it is in (or removes it entirely from the scene if it is as single prim)

SetGravityForce ( bool enabled, float forceX, float forceY, float forceZ ) : void
SetTerrain ( ITerrainChannel channel, short heightMap ) : void
SetWaterLevel ( double height, short map ) : void
Simulate ( float timeStep ) : void
SupportsRayCast ( ) : bool

True if the physics plugin supports raycasting against the physics scene

UpdatesLoop ( ) : void

Описание методов

AddAvatar() публичный абстрактный Метод

public abstract AddAvatar ( string avName, Vector3 position, Quaternion rotation, Vector3 size, bool isFlying, uint localID, UUID uuid ) : PhysicsActor
avName string
position Vector3
rotation Quaternion
size Vector3
isFlying bool
localID uint
uuid UUID
Результат PhysicsActor

AddGravityPoint() публичный Метод

public AddGravityPoint ( bool isApplyingForces, Vector3 position, float forceX, float forceY, float forceZ, float gravForce, float radius, int identifier ) : void
isApplyingForces bool
position Vector3
forceX float
forceY float
forceZ float
gravForce float
radius float
identifier int
Результат void

AddPrimShape() публичный абстрактный Метод

public abstract AddPrimShape ( UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical, int material, float friction, float restitution, float gravityMultiplier, float density ) : PhysicsActor
primID UUID
localID uint
name string
physicsType byte
shape PrimitiveBaseShape
position Vector3
size Vector3
rotation Quaternion
isPhysical bool
material int
friction float
restitution float
gravityMultiplier float
density float
Результат PhysicsActor

Dispose() публичный абстрактный Метод

public abstract Dispose ( ) : void
Результат void

GetGravityForce() публичный Метод

public GetGravityForce ( ) : float[]
Результат float[]

GetResults() публичный Метод

public GetResults ( ) : void
Результат void

GetTopColliders() публичный абстрактный Метод

public abstract GetTopColliders ( ) : float>.Dictionary
Результат float>.Dictionary

Initialize() публичный абстрактный Метод

public abstract Initialize ( IMesher meshmerizer, IScene scene ) : void
meshmerizer IMesher
scene IScene
Результат void

PostInitialize() публичный абстрактный Метод

public abstract PostInitialize ( IConfigSource config ) : void
config IConfigSource
Результат void

RaycastWorld() публичный Метод

public RaycastWorld ( Vector3 position, Vector3 direction, float length, int Count ) : List
position Vector3
direction Vector3
length float
Count int
Результат List

RaycastWorld() публичный Метод

Queue a raycast against the physics scene. The provided callback method will be called when the raycast is complete Many physics engines don't support collision testing at the same time as manipulating the physics scene, so we queue the request up and callback a custom method when the raycast is complete. This allows physics engines that give an immediate result to callback immediately and ones that don't, to callback when it gets a result back. ODE for example will not allow you to change the scene while collision testing or it asserts, 'opteration not valid for locked space'. This includes adding a ray to the scene. This is named RayCastWorld to not conflict with modrex's Raycast method.
public RaycastWorld ( Vector3 position, Vector3 direction, float length, RaycastCallback retMethod ) : void
position Vector3 Origin of the ray
direction Vector3 Direction of the ray
length float Length of ray in meters
retMethod RaycastCallback Method to call when the raycast is complete
Результат void

RaycastWorld() публичный Метод

public RaycastWorld ( Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod ) : void
position Vector3
direction Vector3
length float
Count int
retMethod RayCallback
Результат void

RemoveAvatar() публичный абстрактный Метод

public abstract RemoveAvatar ( PhysicsActor actor ) : void
actor PhysicsActor
Результат void

RemovePrim() публичный абстрактный Метод

Removes a single prim from the group that it is in (or removes it entirely from the scene if it is as single prim)
public abstract RemovePrim ( PhysicsActor prim ) : void
prim PhysicsActor
Результат void

SetGravityForce() публичный Метод

public SetGravityForce ( bool enabled, float forceX, float forceY, float forceZ ) : void
enabled bool
forceX float
forceY float
forceZ float
Результат void

SetTerrain() публичный абстрактный Метод

public abstract SetTerrain ( ITerrainChannel channel, short heightMap ) : void
channel ITerrainChannel
heightMap short
Результат void

SetWaterLevel() публичный абстрактный Метод

public abstract SetWaterLevel ( double height, short map ) : void
height double
map short
Результат void

Simulate() публичный абстрактный Метод

public abstract Simulate ( float timeStep ) : void
timeStep float
Результат void

SupportsRayCast() публичный Метод

True if the physics plugin supports raycasting against the physics scene
public SupportsRayCast ( ) : bool
Результат bool

UpdatesLoop() публичный Метод

public UpdatesLoop ( ) : void
Результат void