MeshLib C++ Docs
Loading...
Searching...
No Matches
MRCylinder3.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMesh/MRMeshFwd.h"
4#include "MRLine.h"
5
6namespace MR
7{
10
13template <typename T>
15{
16public:
18 {}
19
20 Cylinder3( const Vector3<T>& inCenter, const Vector3<T>& inDirectoin, T inRadius, T inLength )
21 :
22 mainAxis( inCenter, inDirectoin ),
23 radius( inRadius ),
24 length( inLength )
25 {}
26 Cylinder3( const Line3<T>& inAxis, T inRadius, T inLength )
27 :
28 mainAxis( inAxis ),
29 radius( inRadius ),
30 length( inLength )
31 {}
32
34 {
35 return mainAxis.p;
36 }
37
38 const Vector3<T>& center( void ) const
39 {
40 return mainAxis.p;
41 }
42
44 {
45 return mainAxis.d;
46 }
47
48 const Vector3<T>& direction( void ) const
49 {
50 return mainAxis.d;
51 }
52
53 Line3<T> mainAxis;
54 T radius = 0;
55 T length = 0;
56};
57
58}
Definition MRCylinder3.h:15
T radius
Definition MRCylinder3.h:54
Cylinder3(const Vector3< T > &inCenter, const Vector3< T > &inDirectoin, T inRadius, T inLength)
Definition MRCylinder3.h:20
Cylinder3()
Definition MRCylinder3.h:17
Cylinder3(const Line3< T > &inAxis, T inRadius, T inLength)
Definition MRCylinder3.h:26
T length
Definition MRCylinder3.h:55
Line3< T > mainAxis
Definition MRCylinder3.h:53
const Vector3< T > & center(void) const
Definition MRCylinder3.h:38
Vector3< T > & direction(void)
Definition MRCylinder3.h:43
Vector3< T > & center(void)
Definition MRCylinder3.h:33
const Vector3< T > & direction(void) const
Definition MRCylinder3.h:48
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRVector3.h:33