4 #ifndef _3ESCYLINDER_H_ 5 #define _3ESCYLINDER_H_ 32 Cylinder(uint32_t
id = 0u,
const V3Arg ¢re =
V3Arg(0, 0, 0),
const V3Arg &axis = DefaultAxis,
float radius = 1.0f,
float length = 1.0f);
40 Cylinder(uint32_t
id, uint16_t category,
const V3Arg ¢re =
V3Arg(0, 0, 0),
const V3Arg &axis = DefaultAxis,
float radius = 1.0f,
float length = 1.0f);
79 :
Shape(SIdCylinder, id)
83 setScale(
Vector3f(radius, radius, length));
88 :
Shape(SIdCylinder, id, category)
92 setScale(
Vector3f(radius, radius, length));
142 if (axis.
v3.
dot(DefaultAxis) > -0.9998f)
162 #endif // _3ESCYLINDER_H_ A base class for encapsulating a shape which is to be represented remotely.
Definition: 3esshape.h:39
Vector3f axis() const
Get the cylinder primary axis.
Definition: 3escylinder.h:155
static const Vector3< T > axisx
The vector (1, 0, 0).
Definition: 3esvector3.h:44
Definition: 3esbounds.h:13
Vector3f centre() const
Get the cylinder centre position.
Definition: 3escylinder.h:133
Vector3< float > Vector3f
Defines a single precision vector.
Definition: 3esvector3.h:14
Quaternion< T > & setAxisAngle(const Vector3< T > &axis, const T &angle)
Sets this quaternion from an axis of rotation and the angle of rotation about that axis (radians)...
Vector3f v3
Vector 3 value.
Definition: 3esv3arg.h:45
float radius() const
Get the cylinder radius.
Definition: 3escylinder.h:105
Represents a vector in R3.
Definition: 3esvector3.h:14
A helper structure used to convert from float or double pointers to Vector3f arguments.
Definition: 3esv3arg.h:14
Defines a cylinder shape to display.
Definition: 3escylinder.h:21
Cylinder & setCentre(const V3Arg ¢re)
Set the position fo the cylinder centre.
Definition: 3escylinder.h:126
Cylinder & setAxis(const V3Arg &axis)
Set the cylinder primary axis.
Definition: 3escylinder.h:139
T x
Direct data member access.
Definition: 3esvector3.h:30
Quaternion< float > Quaternionf
Defines a single precision quaternion.
Definition: 3esquaternion.h:198
float length() const
Get the cylinder body length.
Definition: 3escylinder.h:120
Cylinder & setRadius(float radius)
Set the cylinder body radius.
Definition: 3escylinder.h:96
Cylinder & setLength(float radius)
Set the cylinder body length.
Definition: 3escylinder.h:111
T dot(const Vector3< T > &other) const
Calculates the dot product of this.other.
Definition: 3esvector3.h:422
static const Vector3f DefaultAxis
Default direction used as a reference orientation for packing the rotation.
Definition: 3escylinder.h:29
Cylinder(uint32_t id=0u, const V3Arg ¢re=V3Arg(0, 0, 0), const V3Arg &axis=DefaultAxis, float radius=1.0f, float length=1.0f)
Definition: 3escylinder.h:78