pub struct Poly3D {
pub id: GeoId,
pub tile_id: Uuid,
pub vertices: Vec<[f32; 4]>,
pub uvs: Vec<[f32; 2]>,
pub organic_uvs: Vec<[f32; 2]>,
pub indices: Vec<(usize, usize, usize)>,
pub layer: i32,
pub visible: bool,
pub opacity: f32,
pub tile_id2: Option<Uuid>,
pub blend_weights: Vec<f32>,
pub organic_detail: Option<OrganicSurfaceDetail>,
}Fields§
§id: GeoId§tile_id: Uuid§vertices: Vec<[f32; 4]>§uvs: Vec<[f32; 2]>§organic_uvs: Vec<[f32; 2]>§indices: Vec<(usize, usize, usize)>§layer: i32§visible: bool§opacity: f32§tile_id2: Option<Uuid>§blend_weights: Vec<f32>§organic_detail: Option<OrganicSurfaceDetail>Implementations§
Source§impl Poly3D
impl Poly3D
Sourcepub fn poly(
id: GeoId,
tile_id: Uuid,
vertices: Vec<[f32; 4]>,
uvs: Vec<[f32; 2]>,
indices: Vec<(usize, usize, usize)>,
) -> Self
pub fn poly( id: GeoId, tile_id: Uuid, vertices: Vec<[f32; 4]>, uvs: Vec<[f32; 2]>, indices: Vec<(usize, usize, usize)>, ) -> Self
Construct a Poly3D manually from geometry arrays.
Sourcepub fn cube(id: GeoId, tile_id: Uuid, center: Vec3<f32>, size: f32) -> Self
pub fn cube(id: GeoId, tile_id: Uuid, center: Vec3<f32>, size: f32) -> Self
Construct a cube centered at center with edge length size.
Sourcepub fn box_(
id: GeoId,
tile_id: Uuid,
center: Vec3<f32>,
size_x: f32,
size_y: f32,
size_z: f32,
) -> Self
pub fn box_( id: GeoId, tile_id: Uuid, center: Vec3<f32>, size_x: f32, size_y: f32, size_z: f32, ) -> Self
Construct a box centered at center with different sizes along each axis.
Sourcepub fn sphere(
id: GeoId,
tile_id: Uuid,
center: Vec3<f32>,
radius: f32,
stacks: usize,
slices: usize,
) -> Self
pub fn sphere( id: GeoId, tile_id: Uuid, center: Vec3<f32>, radius: f32, stacks: usize, slices: usize, ) -> Self
Construct a sphere centered at center with given radius.
Uses UV sphere generation with stacks and slices subdivisions.
pub fn with_layer(self, layer: i32) -> Self
pub fn with_visible(self, visible: bool) -> Self
pub fn with_opacity(self, opacity: f32) -> Self
pub fn with_vertices(self, vertices: Vec<[f32; 4]>) -> Self
pub fn with_uvs(self, uvs: Vec<[f32; 2]>) -> Self
pub fn with_indices(self, indices: Vec<(usize, usize, usize)>) -> Self
pub fn with_tile_id(self, tile_id: Uuid) -> Self
Sourcepub fn with_blend_texture(self, tile_id2: Uuid) -> Self
pub fn with_blend_texture(self, tile_id2: Uuid) -> Self
Set the secondary texture for vertex blending
Sourcepub fn with_blend_weights(self, blend_weights: Vec<f32>) -> Self
pub fn with_blend_weights(self, blend_weights: Vec<f32>) -> Self
Set per-vertex blend weights (0.0 = primary texture, 1.0 = secondary texture)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Poly3D
impl RefUnwindSafe for Poly3D
impl Send for Poly3D
impl Sync for Poly3D
impl Unpin for Poly3D
impl UnsafeUnpin for Poly3D
impl UnwindSafe for Poly3D
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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