pub struct TypedDomain<S: DomainSpace> { /* private fields */ }Implementations§
Source§impl<S: DomainSpace> TypedDomain<S>
impl<S: DomainSpace> TypedDomain<S>
pub fn handle(&self) -> DomainHandle<S>
pub fn space(&self) -> &S
pub fn poses(&self) -> &Store<Pose<S>>
pub fn instances(&self) -> &Store<Instance>
pub fn instance_mut(&mut self, entity: Entity) -> Option<&mut Instance>
pub fn remove_instance( &mut self, entity: Entity, ) -> Result<Instance, StoreError>
Sourcepub fn set_pose(
&mut self,
entity: Entity,
pose: Pose<S>,
) -> Result<(), DomainError>
pub fn set_pose( &mut self, entity: Entity, pose: Pose<S>, ) -> Result<(), DomainError>
Inside a tick the move is drawn blended across that tick; outside one it is drawn at once.
Sourcepub fn teleport(
&mut self,
entity: Entity,
pose: Pose<S>,
) -> Result<(), DomainError>
pub fn teleport( &mut self, entity: Entity, pose: Pose<S>, ) -> Result<(), DomainError>
Moves without drawing the poses in between, for a jump such as a respawn.
Sourcepub fn drawn_pose(&self, entity: Entity, alpha: f32) -> Option<Pose<S>>
pub fn drawn_pose(&self, entity: Entity, alpha: f32) -> Option<Pose<S>>
The pose publish_at(alpha) draws: blended across the last tick when only that tick wrote the pose, otherwise the current pose.
pub fn set_point( &mut self, entity: Entity, point: S::Point, ) -> Result<(), DomainError>
pub fn set_frame( &mut self, entity: Entity, frame: S::Frame, ) -> Result<(), DomainError>
pub fn add_view(&mut self, spec: ViewSpec<S>) -> Result<ViewId, DomainError>
pub fn view(&self, id: ViewId) -> Option<&ViewStyle<S>>
pub fn view_eye(&self, id: ViewId) -> Option<Entity>
pub fn view_subject(&self, id: ViewId) -> Option<Entity>
pub fn view_mut(&mut self, id: ViewId) -> Option<&mut ViewStyle<S>>
pub fn set_view_eye( &mut self, id: ViewId, eye: Entity, ) -> Result<(), DomainError>
pub fn set_view_subject( &mut self, id: ViewId, subject: Option<Entity>, ) -> Result<(), DomainError>
pub fn fields(&self) -> Option<&Store<Field>>
pub fn field_mut(&mut self, entity: Entity) -> Option<&mut Field>
pub fn remove_field(&mut self, entity: Entity) -> Result<Field, StoreError>
pub fn walk( &mut self, entity: Entity, velocity: S::Vector, dt: f32, ) -> Result<(), DomainError>
pub fn move_to( &mut self, entity: Entity, point: ChartPoint, ) -> Result<(), DomainError>
Source§impl<S> TypedDomain<S>where
S: Homogeneous + PhysicsSpace + Copy,
S::Vector: VectorOps + Default,
S::Point: Sub<Output = S::Vector>,
impl<S> TypedDomain<S>where
S: Homogeneous + PhysicsSpace + Copy,
S::Vector: VectorOps + Default,
S::Point: Sub<Output = S::Vector>,
pub fn spawn_body( &mut self, entity: Entity, body: BodyDef<S>, ) -> Result<BodyId, DomainError>
Source§impl<S> TypedDomain<S>where
S: Homogeneous + PhysicsSpace + Copy,
S::Vector: VectorOps + Default,
S::Point: Sub<Output = S::Vector>,
impl<S> TypedDomain<S>where
S: Homogeneous + PhysicsSpace + Copy,
S::Vector: VectorOps + Default,
S::Point: Sub<Output = S::Vector>,
Trait Implementations§
Source§impl<S: DomainSpace> Domain for TypedDomain<S>
impl<S: DomainSpace> Domain for TypedDomain<S>
fn id(&self) -> DomainId
fn name(&self) -> &'static str
fn tracks_changes(&self) -> bool
fn views(&self) -> &[ViewTarget]
fn view(&self, id: ViewId) -> Option<ViewSummary>
fn pick( &self, view: ViewId, ray: &ImageRay, placement: Rigid, views: &Views, prepared: &[PreparedGeometry], ) -> Option<Pick>
fn image_of(&self, view: ViewId, entity: Entity) -> Option<[f32; 3]>
fn lift_origin( &self, view: ViewId, ray: &ImageRay, ) -> Result<ChartPoint, DomainError>
fn compile_fields(&mut self) -> Result<FieldCost, DomainError>
fn field_program(&self) -> &FieldProgram
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Auto Trait Implementations§
impl<S> !Freeze for TypedDomain<S>
impl<S> !RefUnwindSafe for TypedDomain<S>
impl<S> Send for TypedDomain<S>
impl<S> !Sync for TypedDomain<S>
impl<S> Unpin for TypedDomain<S>
impl<S> UnsafeUnpin for TypedDomain<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for TypedDomain<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more