Struct physx::visual_debugger::VisualDebugger
source · [−]pub struct VisualDebugger { /* private fields */ }
Expand description
Combines the Pvd and it’s current PvdTransport
, if there is one.
Implementations
sourceimpl VisualDebugger
impl VisualDebugger
sourcepub fn new(foundation: &mut impl Foundation, port: i32) -> Option<Self>
pub fn new(foundation: &mut impl Foundation, port: i32) -> Option<Self>
Create a new VisualDebugger
instance, a utility class that
combines the TCP setup and the Pvd into one object. The port
default for the PVD program is port 5425, so it is suggested to use this
unless you’re explicitly changing the other one as well.
This function internally calls new_with_timeout
with a default timeout
of 10 ms.
sourcepub fn new_remote(
foundation: &mut impl Foundation,
host: &str,
port: i32
) -> Option<Self>
pub fn new_remote(
foundation: &mut impl Foundation,
host: &str,
port: i32
) -> Option<Self>
Create a new VisualDebugger
instance, a utility class that
combines the TCP setup and the Pvd into one object. The port
default for the PVD program is port 5425, so it is suggested to use this
unless you’re explicitly changing the other one as well.
This function internally calls new_with_timeout
with a default timeout
of 10 ms.
sourcepub fn new_with_timeout(
foundation: &mut impl Foundation,
host: &str,
port: i32,
timeout: u32
) -> Option<Self>
pub fn new_with_timeout(
foundation: &mut impl Foundation,
host: &str,
port: i32,
timeout: u32
) -> Option<Self>
See description of new
sourcepub fn connect(&mut self, flags: PxPvdInstrumentationFlags) -> bool
pub fn connect(&mut self, flags: PxPvdInstrumentationFlags) -> bool
Connect the Pvd to the PvdTransport
.
sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Disconnect the Pvd it’s transport.
sourcepub fn is_connected(&mut self, use_cached_status: bool) -> bool
pub fn is_connected(&mut self, use_cached_status: bool) -> bool
Check if the Pvd is connected. The cached status may be up to one frame out of date.
When use_cached_status
is false, the low-level status is checked which requires locking
the network stream.
sourcepub fn get_transport(&mut self) -> Option<&mut PvdTransport>
pub fn get_transport(&mut self) -> Option<&mut PvdTransport>
Get the transport connected to the Pvd, if there is one.
sourcepub fn set_transport(
&mut self,
transport: Owner<PvdTransport>,
flags: PxPvdInstrumentationFlags
) -> bool
pub fn set_transport(
&mut self,
transport: Owner<PvdTransport>,
flags: PxPvdInstrumentationFlags
) -> bool
Connect to a new transport, disconnecting from and dropping the old one. Returns true if the connection succeeded.