C# 클래스 OpenSim.Region.Physics.OdePlugin.OdeScene

상속: PhysicsScene
파일 보기 프로젝트 열기: N3X15/VoxelSim 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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