C# Класс OpenSim.Region.Physics.OdePlugin.OdeScene

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

Открытые свойства

Свойство Тип Описание
MeshSculptphysicalLOD float
OdeLock Object
WorldExtents System.Vector2
actor_name_map PhysicsActor>.Dictionary
bodyFramesAutoDisable int
bodyMotorJointMaxforceTensor float
bodyPIDD float
bodyPIDG float
forceSimplePrimMeshing bool
geomContactPointsStartthrottle int
geomCrossingFailuresBeforeOutofbounds int
geomDefaultDensity float
geomUpdatesPerThrottledUpdate int
geom_name_map String>.Dictionary
gravityx float
gravityy float
gravityz float
hpr Ode.NET.d.Vector3
maximumMassObject float
meshSculptLOD float
meshSculptedPrim bool
mesher IMesher
physics_logging bool
physics_logging_append_existing_logfile bool
physics_logging_interval int
space IntPtr
staticPrimspace ].IntPtr[
triArrayCallback d.TriArrayCallback
triCallback d.TriCallback
voxmesher IVoxelMesher
world IntPtr
xyz d.Vector3

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

Метод Описание
AddAvatar ( string avName, System.Vector3 position, System.Vector3 size, bool isFlying ) : PhysicsActor
AddCharacter ( OpenSim.Region.Physics.OdePlugin.OdeCharacter chr ) : void
AddPhysicsActorTaint ( PhysicsActor prim ) : void

Called after our prim properties are set Scale, position etc. We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex This assures us that we have no race conditions

AddPrimShape ( string primName, OpenSim.Framework.PrimitiveBaseShape pbs, System.Vector3 position, System.Vector3 size, Quaternion rotation ) : PhysicsActor
AddPrimShape ( string primName, OpenSim.Framework.PrimitiveBaseShape pbs, System.Vector3 position, System.Vector3 size, Quaternion rotation, bool isPhysical ) : PhysicsActor
BadCharacter ( OpenSim.Region.Physics.OdePlugin.OdeCharacter chr ) : void
Combine ( PhysicsScene pScene, System.Vector3 offset, System.Vector3 extents ) : void
DeleteTerrain ( ) : void
Dispose ( ) : void
DumpJointInfo ( ) : void
GetJointAnchor ( OpenSim.Region.Physics.Manager.PhysicsJoint joint ) : System.Vector3
GetJointAxis ( OpenSim.Region.Physics.Manager.PhysicsJoint joint ) : System.Vector3
GetResults ( ) : void
GetTerrainHeightAtXY ( float x, float y ) : float
GetTopColliders ( ) : float>.Dictionary
GetWaterLevel ( ) : float
Initialise ( IMesher meshmerizer, IVoxelMesher voxmesh, IConfigSource config ) : void
OdeScene ( OpenSim.Region.Physics.Manager.CollisionLocker dode, string sceneIdentifier ) : System

Initiailizes the scene Sets many properties that ODE requires to be stable These settings need to be tweaked 'exactly' right or weird stuff happens.

RaycastWorld ( System.Vector3 position, System.Vector3 direction, float length, RaycastCallback retMethod ) : void
RemoveAllJointsConnectedToActorThreadLocked ( PhysicsActor actor ) : void
RemoveAvatar ( PhysicsActor actor ) : void
RemoveCharacter ( OpenSim.Region.Physics.OdePlugin.OdeCharacter chr ) : void
RemovePrim ( PhysicsActor prim ) : void
RemovePrimThreadLocked ( OpenSim.Region.Physics.OdePlugin.OdePrim prim ) : void

This is called from within simulate but outside the locked portion We need to do our own locking here Essentially, we need to remove the prim from our space segment, whatever segment it's in. If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory that the space was using.

RequestJointCreation ( string objectNameInScene, PhysicsJointType jointType, System.Vector3 position, Quaternion rotation, string parms, List bodyNames, string trackedBodyName, Quaternion localRotation ) : OpenSim.Region.Physics.Manager.PhysicsJoint
RequestJointDeletion ( string ObjectNameInScene ) : void
ResizeTerrain512Interpolation ( float heightMap ) : float[]
ResizeTerrain512NearestNeighbour ( float heightMap ) : float[]
SetTerrain ( bool voxmap ) : void
SetTerrain ( bool voxmap, System.Vector3 pOffset ) : void
SetWaterLevel ( float baseheight ) : void
Simulate ( float timeStep ) : float

This is our main simulate loop It's thread locked by a Mutex in the scene. It holds Collisions, it instructs ODE to step through the physical reactions It moves the objects around in memory It calls the methods that report back to the object owners.. (scenepresence, SceneObjectGroup)

SupportsCombining ( ) : bool
SupportsRayCast ( ) : bool
TriArrayCallback ( IntPtr trimesh, IntPtr refObject, int triangleIndex, int triCount ) : int
TriCallback ( IntPtr trimesh, IntPtr refObject, int triangleIndex ) : int
UnCombine ( PhysicsScene pScene ) : void
addActivePrim ( OpenSim.Region.Physics.OdePlugin.OdePrim activatePrim ) : void
addCollisionEventReporting ( PhysicsActor obj ) : void
calculateSpaceArrayItemFromPos ( System.Vector3 pos ) : int[]

Holds the space allocation logic

calculateSpaceForGeom ( System.Vector3 pos ) : IntPtr

Calculates the space the prim should be in by its position

command ( int cmd ) : void
createprimspace ( int iprimspaceArrItemX, int iprimspaceArrItemY ) : IntPtr

Creates a new space at X Y

needsMeshing ( OpenSim.Framework.PrimitiveBaseShape pbs ) : bool

Routine to figure out if we need to mesh this prim with our mesher

randomizeWater ( float baseheight ) : void
recalculateSpaceForGeom ( IntPtr geom, Vector3 pos, IntPtr currentspace ) : IntPtr

Called when a static prim moves. Allocates a space for the prim based on its position

remActivePrim ( OdePrim deactivatePrim ) : void
remCollisionEventReporting ( PhysicsActor obj ) : void
resetSpaceArrayItemToZero ( IntPtr pSpace ) : void

Takes a space pointer and zeros out the array we're using to hold the spaces

resetSpaceArrayItemToZero ( int arrayitemX, int arrayitemY ) : void
start ( int unused ) : void
startvisualization ( object o ) : void
step ( int pause ) : void
whichspaceamIin ( Vector3 pos ) : string

Debug space message for printing the space that a prim/avatar is in.

Приватные методы

Метод Описание
AddPrim ( String name, System.Vector3 position, System.Vector3 size, Quaternion rotation, IMesh mesh, OpenSim.Framework.PrimitiveBaseShape pbs, bool isphysical ) : PhysicsActor
CreateRequestedJoints ( ) : void
DeleteRequestedJoints ( ) : void
InternalAddActiveJoint ( OpenSim.Region.Physics.Manager.PhysicsJoint joint ) : void
InternalAddPendingJoint ( OpenSim.Region.Physics.OdePlugin.OdePhysicsJoint joint ) : void
InternalRemoveActiveJoint ( OpenSim.Region.Physics.Manager.PhysicsJoint joint ) : void
InternalRemovePendingJoint ( OpenSim.Region.Physics.Manager.PhysicsJoint joint ) : void
RemoveAllJointsConnectedToActor ( PhysicsActor actor ) : void
checkDupe ( Ode.NET.d contactGeom, int atype ) : bool
collision_accounting_events ( PhysicsActor p1, PhysicsActor p2, ContactPoint contact ) : void
collision_optimized ( float timeStep ) : void

This is our collision testing routine in ODE

near ( IntPtr space, IntPtr g1, IntPtr g2 ) : void

This is our near callback. A geometry is near a body

waitForSpaceUnlock ( IntPtr space ) : void

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

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

public AddAvatar ( string avName, System.Vector3 position, System.Vector3 size, bool isFlying ) : PhysicsActor
avName string
position System.Vector3
size System.Vector3
isFlying bool
Результат PhysicsActor

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

public AddCharacter ( OpenSim.Region.Physics.OdePlugin.OdeCharacter chr ) : void
chr OpenSim.Region.Physics.OdePlugin.OdeCharacter
Результат void

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

Called after our prim properties are set Scale, position etc. We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex This assures us that we have no race conditions
public AddPhysicsActorTaint ( PhysicsActor prim ) : void
prim PhysicsActor
Результат void

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

public AddPrimShape ( string primName, OpenSim.Framework.PrimitiveBaseShape pbs, System.Vector3 position, System.Vector3 size, Quaternion rotation ) : PhysicsActor
primName string
pbs OpenSim.Framework.PrimitiveBaseShape
position System.Vector3
size System.Vector3
rotation Quaternion
Результат PhysicsActor

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

public AddPrimShape ( string primName, OpenSim.Framework.PrimitiveBaseShape pbs, System.Vector3 position, System.Vector3 size, Quaternion rotation, bool isPhysical ) : PhysicsActor
primName string
pbs OpenSim.Framework.PrimitiveBaseShape
position System.Vector3
size System.Vector3
rotation Quaternion
isPhysical bool
Результат PhysicsActor

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

public BadCharacter ( OpenSim.Region.Physics.OdePlugin.OdeCharacter chr ) : void
chr OpenSim.Region.Physics.OdePlugin.OdeCharacter
Результат void

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

public Combine ( PhysicsScene pScene, System.Vector3 offset, System.Vector3 extents ) : void
pScene PhysicsScene
offset System.Vector3
extents System.Vector3
Результат void

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

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

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

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

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

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

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

public GetJointAnchor ( OpenSim.Region.Physics.Manager.PhysicsJoint joint ) : System.Vector3
joint OpenSim.Region.Physics.Manager.PhysicsJoint
Результат System.Vector3

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

public GetJointAxis ( OpenSim.Region.Physics.Manager.PhysicsJoint joint ) : System.Vector3
joint OpenSim.Region.Physics.Manager.PhysicsJoint
Результат System.Vector3

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

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

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

public GetTerrainHeightAtXY ( float x, float y ) : float
x float
y float
Результат float

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

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

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

public GetWaterLevel ( ) : float
Результат float

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

public Initialise ( IMesher meshmerizer, IVoxelMesher voxmesh, IConfigSource config ) : void
meshmerizer IMesher
voxmesh IVoxelMesher
config IConfigSource
Результат void

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

Initiailizes the scene Sets many properties that ODE requires to be stable These settings need to be tweaked 'exactly' right or weird stuff happens.
public OdeScene ( OpenSim.Region.Physics.Manager.CollisionLocker dode, string sceneIdentifier ) : System
dode OpenSim.Region.Physics.Manager.CollisionLocker
sceneIdentifier string
Результат System

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

public RaycastWorld ( System.Vector3 position, System.Vector3 direction, float length, RaycastCallback retMethod ) : void
position System.Vector3
direction System.Vector3
length float
retMethod RaycastCallback
Результат void

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

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

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

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

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

public RemoveCharacter ( OpenSim.Region.Physics.OdePlugin.OdeCharacter chr ) : void
chr OpenSim.Region.Physics.OdePlugin.OdeCharacter
Результат void

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

public RemovePrim ( PhysicsActor prim ) : void
prim PhysicsActor
Результат void

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

This is called from within simulate but outside the locked portion We need to do our own locking here Essentially, we need to remove the prim from our space segment, whatever segment it's in. If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory that the space was using.
public RemovePrimThreadLocked ( OpenSim.Region.Physics.OdePlugin.OdePrim prim ) : void
prim OpenSim.Region.Physics.OdePlugin.OdePrim
Результат void

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

public RequestJointCreation ( string objectNameInScene, PhysicsJointType jointType, System.Vector3 position, Quaternion rotation, string parms, List bodyNames, string trackedBodyName, Quaternion localRotation ) : OpenSim.Region.Physics.Manager.PhysicsJoint
objectNameInScene string
jointType PhysicsJointType
position System.Vector3
rotation Quaternion
parms string
bodyNames List
trackedBodyName string
localRotation Quaternion
Результат OpenSim.Region.Physics.Manager.PhysicsJoint

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

public RequestJointDeletion ( string ObjectNameInScene ) : void
ObjectNameInScene string
Результат void

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

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

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

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

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

public SetTerrain ( bool voxmap ) : void
voxmap bool
Результат void

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

public SetTerrain ( bool voxmap, System.Vector3 pOffset ) : void
voxmap bool
pOffset System.Vector3
Результат void

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

public SetWaterLevel ( float baseheight ) : void
baseheight float
Результат void

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

This is our main simulate loop It's thread locked by a Mutex in the scene. It holds Collisions, it instructs ODE to step through the physical reactions It moves the objects around in memory It calls the methods that report back to the object owners.. (scenepresence, SceneObjectGroup)
public Simulate ( float timeStep ) : float
timeStep float
Результат float

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

public SupportsCombining ( ) : bool
Результат bool

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

public SupportsRayCast ( ) : bool
Результат bool

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

public TriArrayCallback ( IntPtr trimesh, IntPtr refObject, int triangleIndex, int triCount ) : int
trimesh System.IntPtr
refObject System.IntPtr
triangleIndex int
triCount int
Результат int

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

public TriCallback ( IntPtr trimesh, IntPtr refObject, int triangleIndex ) : int
trimesh System.IntPtr
refObject System.IntPtr
triangleIndex int
Результат int

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

public UnCombine ( PhysicsScene pScene ) : void
pScene PhysicsScene
Результат void

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

public addActivePrim ( OpenSim.Region.Physics.OdePlugin.OdePrim activatePrim ) : void
activatePrim OpenSim.Region.Physics.OdePlugin.OdePrim
Результат void

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

public addCollisionEventReporting ( PhysicsActor obj ) : void
obj PhysicsActor
Результат void

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

Holds the space allocation logic
public calculateSpaceArrayItemFromPos ( System.Vector3 pos ) : int[]
pos System.Vector3
Результат int[]

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

Calculates the space the prim should be in by its position
public calculateSpaceForGeom ( System.Vector3 pos ) : IntPtr
pos System.Vector3
Результат System.IntPtr

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

public command ( int cmd ) : void
cmd int
Результат void

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

Creates a new space at X Y
public createprimspace ( int iprimspaceArrItemX, int iprimspaceArrItemY ) : IntPtr
iprimspaceArrItemX int
iprimspaceArrItemY int
Результат System.IntPtr

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

Routine to figure out if we need to mesh this prim with our mesher
public needsMeshing ( OpenSim.Framework.PrimitiveBaseShape pbs ) : bool
pbs OpenSim.Framework.PrimitiveBaseShape
Результат bool

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

public randomizeWater ( float baseheight ) : void
baseheight float
Результат void

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

Called when a static prim moves. Allocates a space for the prim based on its position
public recalculateSpaceForGeom ( IntPtr geom, Vector3 pos, IntPtr currentspace ) : IntPtr
geom IntPtr the pointer to the geom that moved
pos Vector3 the position that the geom moved to
currentspace IntPtr a pointer to the space it was in before it was moved.
Результат IntPtr

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

public remActivePrim ( OdePrim deactivatePrim ) : void
deactivatePrim OdePrim
Результат void

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

public remCollisionEventReporting ( PhysicsActor obj ) : void
obj PhysicsActor
Результат void

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

Takes a space pointer and zeros out the array we're using to hold the spaces
public resetSpaceArrayItemToZero ( IntPtr pSpace ) : void
pSpace IntPtr
Результат void

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

public resetSpaceArrayItemToZero ( int arrayitemX, int arrayitemY ) : void
arrayitemX int
arrayitemY int
Результат void

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

public start ( int unused ) : void
unused int
Результат void

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

public startvisualization ( object o ) : void
o object
Результат void

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

public step ( int pause ) : void
pause int
Результат void

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

Debug space message for printing the space that a prim/avatar is in.
public whichspaceamIin ( Vector3 pos ) : string
pos Vector3
Результат string

Описание свойств

MeshSculptphysicalLOD публичное свойство

public float MeshSculptphysicalLOD
Результат float

OdeLock публичное свойство

public Object OdeLock
Результат Object

WorldExtents публичное свойство

public Vector2,System WorldExtents
Результат System.Vector2

actor_name_map публичное свойство

public Dictionary actor_name_map
Результат PhysicsActor>.Dictionary

bodyFramesAutoDisable публичное свойство

public int bodyFramesAutoDisable
Результат int

bodyMotorJointMaxforceTensor публичное свойство

public float bodyMotorJointMaxforceTensor
Результат float

bodyPIDD публичное свойство

public float bodyPIDD
Результат float

bodyPIDG публичное свойство

public float bodyPIDG
Результат float

forceSimplePrimMeshing публичное свойство

public bool forceSimplePrimMeshing
Результат bool

geomContactPointsStartthrottle публичное свойство

public int geomContactPointsStartthrottle
Результат int

geomCrossingFailuresBeforeOutofbounds публичное свойство

public int geomCrossingFailuresBeforeOutofbounds
Результат int

geomDefaultDensity публичное свойство

public float geomDefaultDensity
Результат float

geomUpdatesPerThrottledUpdate публичное свойство

public int geomUpdatesPerThrottledUpdate
Результат int

geom_name_map публичное свойство

public Dictionary geom_name_map
Результат String>.Dictionary

gravityx публичное свойство

public float gravityx
Результат float

gravityy публичное свойство

public float gravityy
Результат float

gravityz публичное свойство

public float gravityz
Результат float

hpr публичное свойство

public d.Vector3,Ode.NET hpr
Результат Ode.NET.d.Vector3

maximumMassObject публичное свойство

public float maximumMassObject
Результат float

meshSculptLOD публичное свойство

public float meshSculptLOD
Результат float

meshSculptedPrim публичное свойство

public bool meshSculptedPrim
Результат bool

mesher публичное свойство

public IMesher mesher
Результат IMesher

physics_logging публичное свойство

public bool physics_logging
Результат bool

physics_logging_append_existing_logfile публичное свойство

public bool physics_logging_append_existing_logfile
Результат bool

physics_logging_interval публичное свойство

public int physics_logging_interval
Результат int

space публичное свойство

public IntPtr space
Результат IntPtr

staticPrimspace публичное свойство

public IntPtr[,] staticPrimspace
Результат ].IntPtr[

triArrayCallback публичное свойство

public d.TriArrayCallback triArrayCallback
Результат d.TriArrayCallback

triCallback публичное свойство

public d.TriCallback triCallback
Результат d.TriCallback

voxmesher публичное свойство

public IVoxelMesher voxmesher
Результат IVoxelMesher

world публичное свойство

public IntPtr world
Результат IntPtr

xyz публичное свойство

public d.Vector3 xyz
Результат d.Vector3