Struct three_d_text_builder::TextMesh
source · pub struct TextMesh { /* private fields */ }
Expand description
A simple mesh geometry rendering mulitple rasterized font glyphs.
Trait Implementations§
source§impl Geometry for TextMesh
impl Geometry for TextMesh
source§fn aabb(&self) -> AxisAlignedBoundingBox
fn aabb(&self) -> AxisAlignedBoundingBox
Returns the AxisAlignedBoundingBox for this geometry in the global coordinate system.
source§fn id(&self, _required_attributes: FragmentAttributes) -> u16
fn id(&self, _required_attributes: FragmentAttributes) -> u16
Returns a unique ID for each variation of the shader source returned from
Geometry::vertex_shader_source
. Read moresource§fn draw(
&self,
camera: &Camera,
program: &Program,
render_states: RenderStates,
_: FragmentAttributes
)
fn draw( &self, camera: &Camera, program: &Program, render_states: RenderStates, _: FragmentAttributes )
Draw this geometry.
source§fn vertex_shader_source(&self, _: FragmentAttributes) -> String
fn vertex_shader_source(&self, _: FragmentAttributes) -> String
Returns the vertex shader source for this geometry given that the fragment shader needs the given vertex attributes.
source§fn render_with_material(
&self,
material: &dyn Material,
camera: &Camera,
lights: &[&dyn Light]
)
fn render_with_material( &self, material: &dyn Material, camera: &Camera, lights: &[&dyn Light] )
Render the geometry with the given Material.
Must be called in the callback given as input to a RenderTarget, ColorTarget or DepthTarget write method.
Use an empty array for the
lights
argument, if the material does not require lights to be rendered.source§fn render_with_effect(
&self,
material: &dyn Effect,
camera: &Camera,
lights: &[&dyn Light],
color_texture: Option<ColorTexture<'_>>,
depth_texture: Option<DepthTexture<'_>>
)
fn render_with_effect( &self, material: &dyn Effect, camera: &Camera, lights: &[&dyn Light], color_texture: Option<ColorTexture<'_>>, depth_texture: Option<DepthTexture<'_>> )
Render the geometry with the given Effect.
Must be called in the callback given as input to a RenderTarget, ColorTarget or DepthTarget write method.
Use an empty array for the
lights
argument, if the material does not require lights to be rendered.Auto Trait Implementations§
impl RefUnwindSafe for TextMesh
impl !Send for TextMesh
impl !Sync for TextMesh
impl Unpin for TextMesh
impl UnwindSafe for TextMesh
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