40 #ifndef _GLS_CYLINDER_H
41 #define _GLS_CYLINDER_H
52 #define DEF_CYLINDER_SEGMENTS 1
53 #define DEF_CYLINDER_FACES 30
54 #define DEF_CYLINDER_FACE_START 0.0f
55 #define DEF_CYLINDER_FACE_END 360.0f
56 #define DEF_CYLINDER_TOP_SIZE 1.0f
57 #define DEF_CYLINDER_BOTTOM_SIZE 1.0f
58 #define DEF_CYLINDER_TOP_FACE false
59 #define DEF_CYLINDER_BOTTOM_FACE false
68 GLS_CYLINDER_COLOR = GLS_LAST_INITIALIZER + 1,
69 GLS_CYLINDER_SEGMENTS,
71 GLS_CYLINDER_FACE_START,
72 GLS_CYLINDER_FACE_END,
73 GLS_CYLINDER_TOP_SIZE,
74 GLS_CYLINDER_BOTTOM_SIZE,
75 GLS_CYLINDER_TOP_FACE,
76 GLS_CYLINDER_BOTTOM_FACE,
87 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
90 friend class GlsCylinderEditor;
94 void CommonConstructorInit(
void );
110 bool FirstHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
119 bool BestHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
121 bool EndCapFirstPick(
unsigned int startIndex,
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
123 void UpdateBestPickStatus(
const Vector& point,
const Vector& directionVector,
Vector& tempCollisionPoint,
Vector& closestPoint,
float& pickDistance );
150 GLS_EXPORT
void Resize(
void );
153 virtual GLS_EXPORT
void SetValue(
int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
168 GLS_EXPORT
GlsCylinder(
float x,
float y,
float z );
171 GLS_EXPORT
GlsCylinder(
bool newGlsCylinder =
true );
199 virtual GLS_EXPORT
void GetExtents(
float& x,
float& y,
float& z,
float& x1,
float& y1,
float& z1 ) DISTI_METHOD_OVERRIDE;
202 virtual GLS_EXPORT
void Draw(
void ) DISTI_METHOD_OVERRIDE;
205 virtual GLS_EXPORT
bool Hit(
float x,
float y,
float z,
float scale, const
Vector& directionVector,
Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
208 using BaseClass::
Scale;
211 virtual GLS_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 ) DISTI_METHOD_OVERRIDE;
217 virtual GLS_EXPORT
void TextureIndex(
int index ) DISTI_METHOD_OVERRIDE;
236 virtual GLS_EXPORT
void Rotate( const
Vector& orig,
float angle, const
Vector& axis ) DISTI_METHOD_OVERRIDE;
242 virtual GLS_EXPORT
void SetFillColor( const
GlsColor& color ) DISTI_METHOD_OVERRIDE;
247 virtual GLS_EXPORT
GlsColor GetFillColor(
void ) DISTI_METHOD_OVERRIDE;
292 virtual GLS_EXPORT
void Segments(
unsigned int segments );
297 virtual GLS_EXPORT
unsigned int Segments();
302 virtual GLS_EXPORT
void Faces(
unsigned int faces );
307 virtual GLS_EXPORT
unsigned int Faces();
312 virtual GLS_EXPORT
void TopFace(
bool top );
317 virtual GLS_EXPORT
bool TopFace();
322 virtual GLS_EXPORT
void BottomFace(
bool bottom );
GlsColor _objectColor
Definition: gls_cylinder.h:128
virtual ~GlsCylinder(void)
virtual GlsColor GetFillColor(void) override
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual void CopyGeometry(DisplayObject *src) override
virtual void SetRadii(const Vector &r1, const Vector &r2, const Vector &r3)
Definition: dynamic_array.h:66
virtual void Draw(void) override
The disti::Group class. Implements groups of objects.
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
virtual void GetRadii(Vector &r1, Vector &r2, Vector &r3)
virtual DisplayObject * CloneObject(bool generateNames=false) override
bool _topFace
Definition: gls_cylinder.h:138
virtual unsigned int Segments()
The disti::GLPolygon class. Implements Polygons.
The disti::Timer class. An OS portable timing class.
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) override
The Color class: Implements a 4 component RGBA color.
A file for all GL Studio files to include.
Definition: gls_glo_file.h:988
The disti::DisplayObject class and global enumerations.
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) override
virtual float TopSizeFactor()
virtual bool GetPlaneVectorPoints(Vertex &p1, Vertex &p2, Vertex &p3, Vertex &planeVector) override
virtual int TextureIndex(void)
bool _needsRecalculate
Definition: gls_cylinder.h:136
virtual unsigned int Faces()
unsigned int _faces
Definition: gls_cylinder.h:133
float _topSize
Definition: gls_cylinder.h:131
virtual void CopyProperties(DisplayObject *src) override
Definition: gls_color.h:53
virtual bool BottomFace()
float _faceStartDeg
Definition: gls_cylinder.h:130
unsigned int _segments
Definition: gls_cylinder.h:133
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) override
virtual void CalculateTextureCoordinates(void) override
virtual void SetValue(int spec, va_list &args) override
bool _needsResize
Definition: gls_cylinder.h:137
virtual float FaceStartAngle()
Definition: gls_cylinder.h:84
virtual float BottomSizeFactor()
GLS_Cylinder_Initializers
Definition: gls_cylinder.h:66
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0) override
bool _bottomFace
Definition: gls_cylinder.h:139
virtual void SetFillColor(const GlsColor &color) override
virtual void SetAvailableAttributes(unsigned int value) override
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual float FaceEndAngle()
Definition: bmpimage.h:46
void SetResizeRecalculate()
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) override
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1) override