Skip to content

Conversation

@nowakf
Copy link

@nowakf nowakf commented May 3, 2025

This uses that barycentric coordinates trick: unfortunately, this approach has some limitations: meshes with shared vertices will not be displayed correctly.

I just did this for personal use -- so feel free to disregard for any combination of reasons (technical/aesthetic/etc) -- and there's also a couple of points in the code (specifically GeometryIds) where I didn't know what to do.

Anyway, if you're interested in the feature, I could extend the code to handle meshes with indexes (by duplicating verts). It's also probably possible to handle effects, although I'm not sure that's necessarily desirable.

I would obviously also add some documentation.

Unfortunately, this approach has some limitations: meshes with shared vertices will not be displayed correctly.
@JohnPiwinski
Copy link

This would be extremely helpful for debugging my math visualizations. Thank you!

Copy link

@Not-A-Normal-Robot Not-A-Normal-Robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a couple of improvements you can make

}

fn id(&self) -> EffectMaterialId {
//TODO!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unresolved TODO

use crate::core::*;
use crate::renderer::*;

pub struct Wireframe{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space, you should use cargo fmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants