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

Method setHeight

source/MRMesh/MRConeObject.cpp:53–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 return s_.get( id ).z.z;
52}
53void ConeObject::setHeight( float height, ViewportId id /*= {}*/ )
54{
55 auto direction = getDirection( id );
56 auto currentXf = xf( id );
57 auto radius = getNormalizedRadius_( id );
58 currentXf.A = getConeRotationMatrix( direction ) * Matrix3f::scale( radius * height, radius * height, height );
59 setXf( currentXf, id );
60}
61
62
63float ConeObject::getNormalizedRadius_( ViewportId id /*= {}*/ ) const

Callers 2

primitiveToObjectFunction · 0.80

Calls 2

getConeRotationMatrixFunction · 0.85
scaleClass · 0.50

Tested by

no test coverage detected