C# Class Universe.Framework.Physics.PhysicsScene

Afficher le fichier Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

AddAvatar() public abstract méthode

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
Résultat PhysicsActor

AddGravityPoint() public méthode

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
Résultat void

AddPrimShape() public abstract méthode

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
Résultat PhysicsActor

Dispose() public abstract méthode

public abstract Dispose ( ) : void
Résultat void

GetGravityForce() public méthode

public GetGravityForce ( ) : float[]
Résultat float[]

GetResults() public méthode

public GetResults ( ) : void
Résultat void

GetTopColliders() public abstract méthode

public abstract GetTopColliders ( ) : float>.Dictionary
Résultat float>.Dictionary

Initialize() public abstract méthode

public abstract Initialize ( IMesher meshmerizer, IScene scene ) : void
meshmerizer IMesher
scene IScene
Résultat void

PostInitialize() public abstract méthode

public abstract PostInitialize ( IConfigSource config ) : void
config IConfigSource
Résultat void

RaycastWorld() public méthode

public RaycastWorld ( Vector3 position, Vector3 direction, float length, int Count ) : List
position Vector3
direction Vector3
length float
Count int
Résultat List

RaycastWorld() public méthode

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
Résultat void

RaycastWorld() public méthode

public RaycastWorld ( Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod ) : void
position Vector3
direction Vector3
length float
Count int
retMethod RayCallback
Résultat void

RemoveAvatar() public abstract méthode

public abstract RemoveAvatar ( PhysicsActor actor ) : void
actor PhysicsActor
Résultat void

RemovePrim() public abstract méthode

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
Résultat void

SetGravityForce() public méthode

public SetGravityForce ( bool enabled, float forceX, float forceY, float forceZ ) : void
enabled bool
forceX float
forceY float
forceZ float
Résultat void

SetTerrain() public abstract méthode

public abstract SetTerrain ( ITerrainChannel channel, short heightMap ) : void
channel ITerrainChannel
heightMap short
Résultat void

SetWaterLevel() public abstract méthode

public abstract SetWaterLevel ( double height, short map ) : void
height double
map short
Résultat void

Simulate() public abstract méthode

public abstract Simulate ( float timeStep ) : void
timeStep float
Résultat void

SupportsRayCast() public méthode

True if the physics plugin supports raycasting against the physics scene
public SupportsRayCast ( ) : bool
Résultat bool

UpdatesLoop() public méthode

public UpdatesLoop ( ) : void
Résultat void