pub struct PyGlobalTransform { /* private fields */ }Implementations§
Source§impl PyGlobalTransform
impl PyGlobalTransform
Sourcepub fn from_owned(component: GlobalTransform) -> (Self, PyComponent)
pub fn from_owned(component: GlobalTransform) -> (Self, PyComponent)
Create from an owned component value. Returns tuple for PyO3 class inheritance.
Sourcepub fn from_borrowed(
storage: ComponentStorage<GlobalTransform>,
) -> (Self, PyComponent)
pub fn from_borrowed( storage: ComponentStorage<GlobalTransform>, ) -> (Self, PyComponent)
Create from a borrowed component storage (for query iteration).
pub fn as_ref(&self) -> PyResult<&GlobalTransform>
pub fn as_mut(&mut self) -> PyResult<&mut GlobalTransform>
Source§impl PyGlobalTransform
impl PyGlobalTransform
pub fn new() -> (Self, PyComponent)
pub fn identity(py: Python<'_>) -> PyResult<Py<Self>>
pub fn translation(&self) -> PyResult<PyVec3>
pub fn rotation(&self) -> PyResult<PyQuat>
pub fn scale(&self) -> PyResult<PyVec3>
pub fn to_scale_rotation_translation( &self, ) -> PyResult<(PyVec3, PyQuat, PyVec3)>
pub fn to_matrix(&self) -> PyResult<PyMat4>
pub fn affine(&self) -> PyResult<PyAffine3A>
pub fn to_isometry(&self) -> PyResult<PyIsometry3d>
pub fn compute_transform(&self, py: Python<'_>) -> PyResult<Py<PyTransform>>
pub fn transform_point(&self, point: PyVec3) -> PyResult<PyVec3>
pub fn reparented_to( &self, py: Python<'_>, parent: &PyGlobalTransform, ) -> PyResult<Py<PyTransform>>
pub fn right(&self) -> PyResult<PyVec3>
pub fn left(&self) -> PyResult<PyVec3>
pub fn up(&self) -> PyResult<PyVec3>
pub fn down(&self) -> PyResult<PyVec3>
pub fn forward(&self) -> PyResult<PyVec3>
pub fn back(&self) -> PyResult<PyVec3>
pub fn mul_transform( &self, py: Python<'_>, transform: &PyTransform, ) -> PyResult<Py<PyGlobalTransform>>
pub fn __repr__(&self) -> PyResult<String>
Trait Implementations§
Source§impl Clone for PyGlobalTransform
impl Clone for PyGlobalTransform
Source§fn clone(&self) -> PyGlobalTransform
fn clone(&self) -> PyGlobalTransform
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PyGlobalTransform
impl Debug for PyGlobalTransform
Source§impl From<GlobalTransform> for PyGlobalTransform
impl From<GlobalTransform> for PyGlobalTransform
Source§fn from(component: GlobalTransform) -> Self
fn from(component: GlobalTransform) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PyGlobalTransform
impl PartialEq for PyGlobalTransform
Source§impl PyClass for PyGlobalTransform
impl PyClass for PyGlobalTransform
Source§impl PyClassImpl for PyGlobalTransform
impl PyClassImpl for PyGlobalTransform
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
Source§const IS_SUBCLASS: bool = true
const IS_SUBCLASS: bool = true
#[pyclass(extends=…)]
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
#[pyclass(immutable_type)]
Source§const RAW_DOC: &'static CStr = c"\x00"
const RAW_DOC: &'static CStr = c"\x00"
Docstring for the class provided on the struct or enum. Read more
Source§const DOC: &'static CStr
const DOC: &'static CStr
Fully rendered class doc, including the
text_signature if a constructor is defined. Read moreSource§type BaseType = PyComponent
type BaseType = PyComponent
Base class
Source§type ThreadChecker = SendablePyClass<PyGlobalTransform>
type ThreadChecker = SendablePyClass<PyGlobalTransform>
This handles following two situations: Read more
type Inventory = Pyo3MethodsInventoryForPyGlobalTransform
Source§type PyClassMutability = <<PyComponent as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyComponent as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§type BaseNativeType = <<PyGlobalTransform as PyClassImpl>::BaseType as PyClassBaseType>::BaseNativeType
type BaseNativeType = <<PyGlobalTransform as PyClassImpl>::BaseType as PyClassBaseType>::BaseNativeType
The closest native ancestor. This is
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for PyGlobalTransform
impl PyClassNewTextSignature for PyGlobalTransform
const TEXT_SIGNATURE: &'static str = "()"
Source§impl PyTypeInfo for PyGlobalTransform
impl PyTypeInfo for PyGlobalTransform
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
Source§impl TryFrom<&GlobalTransform> for PyGlobalTransform
impl TryFrom<&GlobalTransform> for PyGlobalTransform
Source§impl TryFrom<PyGlobalTransform> for GlobalTransform
impl TryFrom<PyGlobalTransform> for GlobalTransform
impl DerefToPyAny for PyGlobalTransform
impl ExtractPyClassWithClone for PyGlobalTransform
Auto Trait Implementations§
impl Freeze for PyGlobalTransform
impl RefUnwindSafe for PyGlobalTransform
impl Send for PyGlobalTransform
impl Sync for PyGlobalTransform
impl Unpin for PyGlobalTransform
impl UnsafeUnpin for PyGlobalTransform
impl UnwindSafe for PyGlobalTransform
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<'a, 'py, T> FromPyObject<'a, 'py> for T
impl<'a, 'py, T> FromPyObject<'a, 'py> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
👎Deprecated since 0.27.0:
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.
Name of self. This is used in error messages, for example.
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.