-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct Complex { | ||
pub re: f64, | ||
pub im: f64, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use crate::types::pixel_data::PixelData; | ||
use crate::types::pixel_intensity::PixelIntensity; | ||
use crate::types::range::Range; | ||
use crate::types::resolution::Resolution; | ||
use crate::types::u8data::U8Data; | ||
|
||
#[derive(Debug, Clone, PartialEq)] | ||
pub enum FragmentRequest { | ||
Request { | ||
range: Range, | ||
resolution: Resolution, | ||
max_iter: u32, | ||
}, | ||
Cancel, | ||
} | ||
|
||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct FragmentTask { | ||
pub id: u32, | ||
pub range: Range, | ||
pub resolution: Resolution, | ||
pub max_iter: u32, | ||
} | ||
|
||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct FragmentResult { | ||
pub id: u32, | ||
pub u8_data: U8Data, | ||
pub pixel_data: PixelData, | ||
pub pixel_intensity: Vec<PixelIntensity>, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct PixelData { | ||
pub offset: u32, | ||
pub count: u32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct PixelIntensity { | ||
pub zn: f32, | ||
pub count: f32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct Point { | ||
pub x: f64, | ||
pub y: f64, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use crate::types::point::Point; | ||
|
||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct Range { | ||
pub min: Point, | ||
pub max: Point, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct Resolution { | ||
pub nx: u16, | ||
pub ny: u16, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct U8Data { | ||
pub offset: u32, | ||
pub count: u32, | ||
} |