Skip to content

Commit

Permalink
Rename Material to AlbedoFactor
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jul 10, 2024
1 parent 8c2ea07 commit 23a40fb
Show file tree
Hide file tree
Showing 64 changed files with 303 additions and 913 deletions.
4 changes: 2 additions & 2 deletions crates/store/re_types/definitions/rerun/archetypes/mesh3d.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ table Mesh3D (
/// An optional uv texture coordinate for each vertex.
vertex_texcoords: [rerun.components.Texcoord2D] ("attr.rerun.component_optional", nullable, order: 3200);

/// Optional material properties for the mesh as a whole.
mesh_material: rerun.components.Material ("attr.rerun.component_optional", nullable, order: 3300);
/// A color multiplier applied to the whole mesh.
albedo_factor: rerun.components.AlbedoFactor ("attr.rerun.component_optional", nullable, order: 3300);

/// Optional albedo texture.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/store/re_types/definitions/rerun/components.fbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include "./components/aggregation_policy.fbs";
include "./components/albedo_factor.fbs";
include "./components/annotation_context.fbs";
include "./components/axis_length.fbs";
include "./components/blob.fbs";
Expand All @@ -20,7 +21,6 @@ include "./components/line_strip3d.fbs";
include "./components/magnification_filter.fbs";
include "./components/marker_shape.fbs";
include "./components/marker_size.fbs";
include "./components/material.fbs";
include "./components/media_type.fbs";
include "./components/name.fbs";
include "./components/opacity.fbs";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
include "arrow/attributes.fbs";
include "python/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/datatypes.fbs";
include "rerun/attributes.fbs";

namespace rerun.components;

// ---

/// A color multiplier, usually applied to a whole entity, e.g. a mesh.
table AlbedoFactor (
"attr.rust.derive": "Copy, PartialEq, Eq, PartialOrd, Ord, Hash, bytemuck::Pod, bytemuck::Zeroable",
"attr.rust.repr": "transparent"
) {
albedo_factor: rerun.datatypes.Rgba32 (order: 100);
}

18 changes: 0 additions & 18 deletions crates/store/re_types/definitions/rerun/components/material.fbs

This file was deleted.

1 change: 0 additions & 1 deletion crates/store/re_types/definitions/rerun/datatypes.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ include "./datatypes/keypoint_id.fbs";
include "./datatypes/keypoint_pair.fbs";
include "./datatypes/mat3x3.fbs";
include "./datatypes/mat4x4.fbs";
include "./datatypes/material.fbs";
include "./datatypes/quaternion.fbs";
include "./datatypes/range1d.fbs";
include "./datatypes/range2d.fbs";
Expand Down
18 changes: 0 additions & 18 deletions crates/store/re_types/definitions/rerun/datatypes/material.fbs

This file was deleted.

33 changes: 17 additions & 16 deletions crates/store/re_types/src/archetypes/mesh3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/store/re_types/src/components/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions crates/store/re_types/src/components/albedo_factor_ext.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::datatypes::Rgba32;

use super::AlbedoFactor;

impl Default for AlbedoFactor {
#[inline]
fn default() -> Self {
Self(Rgba32::WHITE)
}
}
11 changes: 0 additions & 11 deletions crates/store/re_types/src/components/material_ext.rs

This file was deleted.

6 changes: 3 additions & 3 deletions crates/store/re_types/src/components/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/store/re_types/src/datatypes/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 23a40fb

Please sign in to comment.