Struct Component

Source
pub struct Component {
Show 14 fields pub path: String, pub visible: bool, pub selectable: Option<ComponentSelectable>, pub geometry: Option<String>, pub geometry_parameters: Option<HashMap<String, String>>, pub deformation: Option<f64>, pub layer: Option<String>, pub material_category: Option<String>, pub mapping: Option<GeometryMapping>, pub transform: Option<Transform>, pub interactor: Option<String>, pub interactor_parameters: Option<HashMap<String, String>>, pub tags: Option<Vec<String>>, pub options: Option<Vec<String>>,
}
Expand description

A 3D component that is used to model products. A product corresponds to a tree of Objects. Inside the tree, transforms are always inherited from parent to child and concatenated. Material Categories are inherited from parent to child, as long as the child does not have one.

IGXC Compatibility: Points and Categories are moved to the Product. Evaluator and Evaluator Parameters have been removed.

Fields§

§path: String

The Path describes the tree structure. The root path “.” is mandatory. First-level children may be “o1”, “o2”, “e1”, and so on. Again, “o1.o1” is a child of “o1”. And so on. The sequence of objects must be compatible to the corresponding tree defined by Path of these objects. So any parent must occur in the array before it’s children, and so on.

§visible: bool

The attribute controls the visibility of the object. If it is invisible, all children are invisible too (recursively). If the attribute is unspecified in a JSON file, it is considered to be true!

default value = true

§selectable: Option<ComponentSelectable>

The attribute controls if the object is selectable or–if not–what should happen then. Allowed values are: “Self”, “Parent” (default) and “None” (see above for description).

default value = “Parent”

§geometry: Option<String>

The optional attribute specifies a fully scoped geometry.

§geometry_parameters: Option<HashMap<String, String>>

The optional attribute specifies additional parameters to be applied to the geometry.

§deformation: Option<f64>

The optional attribute defines a deformation value in the range of 0 to 1, to be applied to the geometry. 0 means no deformation, 1 means full deformation. This setting has a higher priority, compared with the Deformation specified as Geometry Parameter in ig.Geometry.

§layer: Option<String>

The optional attribute defines a layer tag for this object.

§material_category: Option<String>

The optional attribute sets a material category for the object and all children (recursively) that do not set one themselves.

§mapping: Option<GeometryMapping>

The optional attribute sets a mapping to be applied to the non-object bound UV set - typically, the UV set used for the material.

§transform: Option<Transform>

The optional attribute specifies an offset to the parent. The parent’s transform will always be concatenated with the child’s one. The transform of root objects (Path: “.”) will be ignored if existing!

§interactor: Option<String>

Optional attribute that assigns an interactor script to the object. Fully scoped name of an interactor class. The class must be provided by the scripts in the scene.

§interactor_parameters: Option<HashMap<String, String>>

Optional attribute that provides further parameters for the created interactor.

§tags: Option<Vec<String>>

One or more symbolic id to identify a component at run-time. Unlike Path, a Tag is more robust and not biunique. Version: OC 1.1

§options: Option<Vec<String>>

The optional attribute defines property ids that are linked to this object (and it’s children). This information may be used for context- sensitive configuration.

Trait Implementations§

Source§

impl Clone for Component

Source§

fn clone(&self) -> Component

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Component

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Component

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Component

Source§

fn eq(&self, other: &Component) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Component

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Component

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,