WireframeGeometry
Converts triangle-based geometry into wireframe-renderable geometry.
WireframeGeometry takes an existing indexed geometry and generates a new geometry that can be rendered using GeometryPrimitiveTypeLines. It preserves the original vertex data and replaces the index buffer with one that represents the edges of the original triangle mesh.
This is commonly used for debugging purposes, such as visualizing mesh topology, bounding volumes, or silhouette edges.
cpp
auto original = vglx::BoxGeometry::Create();
auto wireframe = std::make_shared<vglx::WireframeGeometry>(original.get());
mesh->geometry = wireframe;INFO
Derives from Geometry and inherits all public properties and methods.
Construction
Constructors
WireframeGeometry()
Constructs a WireframeGeometry object from an existing geometry.
cpp
WireframeGeometry::WireframeGeometry(const Geometry* geometry);| Parameter | Description |
|---|---|
| geometry | Pointer to the original triangle-based geometry. |
Factories preferred
WireframeGeometry::Create() auto
Creates a shared pointer to a WireframeGeometry object.
cpp
static auto WireframeGeometry::Create(const Geometry* geometry);| Parameter | Description |
|---|---|
| geometry | Pointer to the original triangle-based geometry. |