candlewick 0.1.0
A renderer
Loading...
Searching...
No Matches
Primitives

Files

file  Primitives.h
 Omnibus header including all of the geometric primitives.
 

Functions

MeshData candlewick::loadArrowSolid (bool include_normals=false, float shaft_length=0.4f, float shaft_radius=0.01f, float head_length=0.1f, float head_radius=0.02f, Uint32 segments=32)
 Load a solid 3D arrow.
 
std::array< MeshData, 3 > candlewick::loadTriadSolid (float shaft_length=0.4f, float shaft_radius=0.01f, float head_length=0.1f, float head_radius=0.02f, Uint32 segments=32)
 Create a 3D triad.
 
MeshData candlewick::loadCapsuleSolid (Uint32 hemisphereRings, Uint32 segments, float length)
 Load a capsule primitive.
 
MeshData candlewick::loadConeSolid (Uint32 segments, float radius, float length)
 Load a 3D solid cone.
 
MeshDataView candlewick::loadCubeSolid ()
 Load MeshDataView for a cube.
 
MeshData candlewick::loadCylinderSolid (Uint32 rings, Uint32 segments, float radius, float height)
 Load a solid 3D cylinder.
 
MeshData candlewick::loadGrid (Uint32 xyHalfSize, float scale=0.5f)
 Load a line grid.
 
MeshData candlewick::loadHeightfield (const Eigen::Ref< const Eigen::MatrixXf > &heights, const Eigen::Ref< const Eigen::VectorXf > &xgrid, const Eigen::Ref< const Eigen::VectorXf > &ygrid)
 Load a heightfield, as line geometry.
 
MeshDataView candlewick::loadPlane ()
 
MeshData candlewick::loadPlaneTiled (float scale, Uint32 xrepeat, Uint32 yrepeat, bool centered=true)
 
MeshData candlewick::loadUvSphereSolid (Uint32 rings, Uint32 segments)
 Load a sphere primitive organized in bottom-up rings and left-right segments.
 

Detailed Description

A scene containing some geometric primitives (cone, cylinder, capsule, box, and some arrows).

Function Documentation

◆ loadArrowSolid()

MeshData candlewick::loadArrowSolid ( bool include_normals = false,
float shaft_length = 0.4f,
float shaft_radius = 0.01f,
float head_length = 0.1f,
float head_radius = 0.02f,
Uint32 segments = 32 )

Load a solid 3D arrow.

◆ loadCapsuleSolid()

MeshData candlewick::loadCapsuleSolid ( Uint32 hemisphereRings,
Uint32 segments,
float length )

Load a capsule primitive.

This will have unit radius. You can apply a scaling transform to change the radius to what you want. See apply3DTransformInPlace().

◆ loadConeSolid()

MeshData candlewick::loadConeSolid ( Uint32 segments,
float radius,
float length )

Load a 3D solid cone.

◆ loadCubeSolid()

MeshDataView candlewick::loadCubeSolid ( )

Load MeshDataView for a cube.

◆ loadCylinderSolid()

MeshData candlewick::loadCylinderSolid ( Uint32 rings,
Uint32 segments,
float radius,
float height )

Load a solid 3D cylinder.

◆ loadGrid()

MeshData candlewick::loadGrid ( Uint32 xyHalfSize,
float scale = 0.5f )

Load a line grid.

◆ loadHeightfield()

MeshData candlewick::loadHeightfield ( const Eigen::Ref< const Eigen::MatrixXf > & heights,
const Eigen::Ref< const Eigen::VectorXf > & xgrid,
const Eigen::Ref< const Eigen::VectorXf > & ygrid )

Load a heightfield, as line geometry.

◆ loadPlane()

MeshDataView candlewick::loadPlane ( )

◆ loadPlaneTiled()

MeshData candlewick::loadPlaneTiled ( float scale,
Uint32 xrepeat,
Uint32 yrepeat,
bool centered = true )

◆ loadTriadSolid()

std::array< MeshData, 3 > candlewick::loadTriadSolid ( float shaft_length = 0.4f,
float shaft_radius = 0.01f,
float head_length = 0.1f,
float head_radius = 0.02f,
Uint32 segments = 32 )

Create a 3D triad.

◆ loadUvSphereSolid()

MeshData candlewick::loadUvSphereSolid ( Uint32 rings,
Uint32 segments )

Load a sphere primitive organized in bottom-up rings and left-right segments.

This will have unit radius. You can apply a scaling transform to change the radius to what you want. See apply3DTransformInPlace().