DR_rs!
上学去喽~
This commit is contained in:
parent
73d7bb84e0
commit
35cd62011c
@ -62,5 +62,9 @@ if TYPE_CHECKING:
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
|
||||
|
||||
class PartFrame_rs:
|
||||
...
|
||||
|
||||
|
||||
# class CenterCamera_rs(Camera_rs):
|
||||
# """ 用于依旧闲的没事 用 rust 写一个中央对齐的 camera """
|
||||
|
@ -36,5 +36,6 @@ fn module_init(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
|
||||
m.add_function(wrap_pyfunction!(simulator::simluation, m)?)?;
|
||||
m.add_class::<sr1_render::types::PartDatas>()?;
|
||||
m.add_class::<render::camera::CameraRs>()?;
|
||||
m.add_class::<render::screen::PartFrame>()?;
|
||||
Ok(())
|
||||
}
|
@ -127,3 +127,28 @@ pub mod camera {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod screen {
|
||||
use pyo3::prelude::*;
|
||||
|
||||
#[pyclass]
|
||||
#[pyo3(name = "PartFrame_rs")]
|
||||
pub struct PartFrame {
|
||||
pub box_size: i32,
|
||||
pub width: i64,
|
||||
pub height: i64,
|
||||
// pub frame_box: Vec<Vec<>>
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl PartFrame {
|
||||
#[new]
|
||||
pub fn py_new() -> PyResult<Self> {
|
||||
Ok(PartFrame {
|
||||
box_size: 111,
|
||||
width: 111,
|
||||
height: 111
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user