pub struct Args {Show 19 fields
pub config: Option<PathBuf>,
pub mcp: bool,
pub output: Option<PathBuf>,
pub output_size: Option<(u32, u32)>,
pub render_size: Option<(u32, u32)>,
pub scale: Option<(f32, f32)>,
pub samples: Option<u32>,
pub no_depth: bool,
pub clear: Option<[f64; 4]>,
pub eye: Option<[f32; 3]>,
pub target: Option<[f32; 3]>,
pub up: Option<[f32; 3]>,
pub fov_y: Option<f32>,
pub z_near: Option<f32>,
pub camera_view_matrix: Option<[f32; 16]>,
pub camera_projection_matrix: Option<[f32; 16]>,
pub document: Vec<PathBuf>,
pub animation: Option<String>,
pub time: Option<f32>,
}Expand description
The command-line arguments.
Every option overrides the same-named field of the JSON configuration.
Fields§
§config: Option<PathBuf>a JSON configuration file. Command-line options override its fields.
mcp: boolserve the Model Context Protocol over stdio instead of rendering once. The host starts from an empty offscreen world and the tool calls build the scene; every other option is ignored.
output: Option<PathBuf>the output image path; its extension chooses the format (png, webp or jpeg). Required unless –mcp is given.
output_size: Option<(u32, u32)>the output image size, as WxH.
render_size: Option<(u32, u32)>the render size the camera and viewport are based on, as WxH.
scale: Option<(f32, f32)>the factors scaling the render size inside the output size, as S or SX,SY.
samples: Option<u32>the multisample count: 1, 2, 4 or 8.
no_depth: boolrender without a depth buffer.
clear: Option<[f64; 4]>the clear colour, as R,G,B or R,G,B,A, each in 0..=1.
eye: Option<[f32; 3]>the camera eye position, as X,Y,Z.
target: Option<[f32; 3]>the camera target position, as X,Y,Z.
up: Option<[f32; 3]>the camera up vector, as X,Y,Z.
fov_y: Option<f32>the vertical field of view in degrees.
z_near: Option<f32>the near plane distance.
camera_view_matrix: Option<[f32; 16]>a view (world-to-view) matrix, column-major, as 16 comma-separated numbers; give it together with –camera-projection-matrix.
camera_projection_matrix: Option<[f32; 16]>a projection (view-to-clip) matrix, column-major, as 16 comma-separated numbers; give it together with –camera-view-matrix.
document: Vec<PathBuf>a glTF document to render; repeatable. Replaces the configuration list.
animation: Option<String>the animation to play, by name or index; applies to every document.
time: Option<f32>the animation time in seconds.
Implementations§
Trait Implementations§
Source§impl FromArgs for Args
impl FromArgs for Args
Source§fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>
fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>
Source§fn redact_arg_values(
__cmd_name: &[&str],
__args: &[&str],
) -> Result<Vec<String>, EarlyExit>
fn redact_arg_values( __cmd_name: &[&str], __args: &[&str], ) -> Result<Vec<String>, EarlyExit>
impl StructuralPartialEq for Args
impl TopLevelCommand for Args
Auto Trait Implementations§
impl Forget for Args
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnsafeUnpin for Args
impl UnwindSafe for Args
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for Twhere
T: 'static,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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> ⓘ
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> ⓘ
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 more