MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / primitiveCone

Function primitiveCone

source/MRMesh/MRFeatures.cpp:148–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148Primitives::ConeSegment primitiveCone( const Vector3f& a, const Vector3f& b, float rad )
149{
150 Vector3f delta = b - a;
151 float deltaLen = delta.length();
152 return {
153 .referencePoint = a,
154 .dir = delta / ( deltaLen > 0 ? deltaLen : 1 ),
155 .negativeSideRadius = rad,
156 .positiveLength = deltaLen,
157 };
158}
159
160std::optional<Primitives::Variant> primitiveFromObject( const Object& object )
161{

Callers 1

primitiveCylinderFunction · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected