forked from 1b-agent/opencadstudio-upstream
feat(render): add scene environment pipeline
This commit is contained in:
1 parent
b667eeeb05
commit
c45daeffb6
17 files changed
+2236
-213
No files matched your search
@@ -349,7 +349,7 @@ impl ImageModel {
|
||||
|
||||
/// Decoded RGBA image shared between the raster pipeline and the
|
||||
/// unresolved-reference probe. Cheap to clone — the pixels are `Arc`-shared.
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct DecodedImage {
|
||||
pub pixels: Arc<Vec<u8>>,
|
||||
pub width: u32,
|
||||
|
||||
@@ -110,7 +110,7 @@ fn property_color(style: &VisualStyle, index: usize) -> Option<[f32; 4]> {
|
||||
}
|
||||
|
||||
impl MeshVisualStyle {
|
||||
fn from_dwg(handle: Handle, style: &VisualStyle) -> Self {
|
||||
pub(crate) fn from_dwg(handle: Handle, style: &VisualStyle) -> Self {
|
||||
Self {
|
||||
full_handle: Some(handle),
|
||||
face_handle: None,
|
||||
@@ -232,6 +232,14 @@ impl MeshVisualStyle {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn resolve_visual_style_handle(
|
||||
document: &CadDocument,
|
||||
handle: Handle,
|
||||
) -> Option<MeshVisualStyle> {
|
||||
visual_style(document, Some(handle))
|
||||
.map(|(handle, style)| MeshVisualStyle::from_dwg(handle, style))
|
||||
}
|
||||
|
||||
fn visual_style(
|
||||
document: &CadDocument,
|
||||
handle: Option<Handle>,
|
||||
|
||||
Reference in new issue
Block a user