39#ifndef DISTI_INCLUDED_GLS_CYLINDER_H
40#define DISTI_INCLUDED_GLS_CYLINDER_H
51#define DEF_CYLINDER_SEGMENTS 1
52#define DEF_CYLINDER_FACES 30
53#define DEF_CYLINDER_FACE_START 0.0f
54#define DEF_CYLINDER_FACE_END 360.0f
55#define DEF_CYLINDER_TOP_SIZE 1.0f
56#define DEF_CYLINDER_BOTTOM_SIZE 1.0f
57#define DEF_CYLINDER_TOP_FACE false
58#define DEF_CYLINDER_BOTTOM_FACE false
67 GLS_CYLINDER_COLOR = GLS_LAST_INITIALIZER + 1,
68 GLS_CYLINDER_SEGMENTS,
70 GLS_CYLINDER_FACE_START,
71 GLS_CYLINDER_FACE_END,
72 GLS_CYLINDER_TOP_SIZE,
73 GLS_CYLINDER_BOTTOM_SIZE,
74 GLS_CYLINDER_TOP_FACE,
75 GLS_CYLINDER_BOTTOM_FACE,
86 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
89 friend class GlsCylinderEditor;
93 void CommonConstructorInit();
109 bool FirstHit( const
Vector& point, const
Vector& directionVector,
Vector* collisionPoint );
118 bool BestHit( const
Vector& point, const
Vector& directionVector,
Vector* collisionPoint );
120 bool EndCapFirstPick(
unsigned int startIndex, const
Vector& point, const
Vector& directionVector,
Vector* collisionPoint );
122 void UpdateBestPickStatus( const
Vector& point, const
Vector& directionVector,
Vector& tempCollisionPoint,
Vector& closestPoint,
float& pickDistance );
Definition: dynamic_array.h:79
Definition: gls_color.h:53
Definition: gls_cylinder.h:84
virtual float FaceStartAngle()
unsigned int _segments
Number of segments used to draw the cylinder.
Definition: gls_cylinder.h:134
bool _topFace
True when there is a circle on top of the cylinder.
Definition: gls_cylinder.h:139
virtual void GetRadii(Vector &r1, Vector &r2, Vector &r3)
float _topSize
0 - 1, scale of top and bottom ends.
Definition: gls_cylinder.h:131
void SetAvailableAttributes(unsigned int value) override
GlsCylinder(bool newGlsCylinder=true)
bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) override
Vector _radii[3]
Cylinder radii, 3 vectors.
Definition: gls_cylinder.h:125
void CopyProperties(DisplayObject *src) override
bool _needsResize
True when the cylinder needs to be resized.
Definition: gls_cylinder.h:138
virtual void SetRadii(const Vector &r1, const Vector &r2, const Vector &r3)
float _faceStartDeg
0-360, where 0 is positive x-axis of cylinder.
Definition: gls_cylinder.h:129
virtual bool BottomFace()
void CopyGeometry(DisplayObject *src) override
void SetValue(int spec, va_list &args) override
GlsCylinder(const GlsCylinder &that, const bool generateName)
virtual float TopSizeFactor()
void SetResizeRecalculate()
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) override
GlsCylinder(float x, float y, float z)
void SetFillColor(const GlsColor &color) override
virtual unsigned int Segments()
bool _bottomFace
True when there is a circle on bottom of the cylinder.
Definition: gls_cylinder.h:140
unsigned int _faces
Number of faces used to draw the cylinder.
Definition: gls_cylinder.h:135
GlsColor _objectColor
Fill color of the object.
Definition: gls_cylinder.h:127
DisplayObject * CloneObject(bool generateNames=false) override
GlsColor GetFillColor() override
virtual unsigned int Faces()
void CalculateTextureCoordinates() override
void GetCppInterfaceDescriptionFree(InterfaceListType *array) override
void Rotate(const Vector &orig, float angle, const Vector &axis) override
virtual int TextureIndex()
virtual float BottomSizeFactor()
void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0) override
virtual float FaceEndAngle()
bool _needsRecalculate
True when the cylinder vertices need to be recalculated.
Definition: gls_cylinder.h:137
bool GetPlaneVectorPoints(Vertex &p1, Vertex &p2, Vertex &p3, Vertex &planeVector) override
void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1) override
float _bottomSize
0 - 1, scale of top and bottom ends.
Definition: gls_cylinder.h:132
float _faceEndDeg
0-360, where 0 is positive x-axis of cylinder.
Definition: gls_cylinder.h:130
Definition: gls_glo_file.h:1241
The disti::DisplayObject class and global enumerations.
The disti::DynamicArray class. A templated array of objects capable of dynamically growing.
The disti::GLPolygon class. Implements Polygons.
The Color class: Implements a 4 component RGBA color.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:245
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
A file for all GL Studio files to include.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:50
The disti::Group class. Implements groups of objects.
Definition: bmpimage.h:46
GLS_Cylinder_Initializers
Definition: gls_cylinder.h:66
The disti::Timer class. An OS portable timing class.