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 );
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 );
202 virtual GLS_EXPORT
void Draw(
void );
205 virtual GLS_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
211 virtual GLS_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 );
236 virtual GLS_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
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 );
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
GlsColor _objectColor
Definition: gls_cylinder.h:128
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual ~GlsCylinder(void)
virtual bool GetPlaneVectorPoints(Vertex &p1, Vertex &p2, Vertex &p3, Vertex &planeVector)
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual void SetRadii(const Vector &r1, const Vector &r2, const Vector &r3)
Definition: dynamic_array.h:66
The disti::Group class. Implements groups of objects.
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
virtual void SetAvailableAttributes(unsigned int value)
virtual void GetRadii(Vector &r1, Vector &r2, Vector &r3)
bool _topFace
Definition: gls_cylinder.h:138
virtual void CopyProperties(DisplayObject *src)
virtual unsigned int Segments()
The disti::GLPolygon class. Implements Polygons.
The disti::Timer class. An OS portable timing class.
The Color class: Implements a 4 component RGBA color.
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1)
A file for all GL Studio files to include.
Definition: gls_glo_file.h:982
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
The disti::DisplayObject class and global enumerations.
virtual float TopSizeFactor()
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void SetValue(int spec, va_list &args)
virtual void CopyGeometry(DisplayObject *src)
virtual GlsColor GetFillColor(void)
virtual int TextureIndex(void)
bool _needsRecalculate
Definition: gls_cylinder.h:136
virtual GlsColor GetFillColor(void)
virtual unsigned int Faces()
unsigned int _faces
Definition: gls_cylinder.h:133
float _topSize
Definition: gls_cylinder.h:131
Definition: gls_color.h:53
virtual bool BottomFace()
virtual void Rotate(float angle, int axis=Z_AXIS)
float _faceStartDeg
Definition: gls_cylinder.h:130
unsigned int _segments
Definition: gls_cylinder.h:133
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
bool _needsResize
Definition: gls_cylinder.h:137
virtual float FaceStartAngle()
virtual void CalculateTextureCoordinates(void)
Definition: gls_cylinder.h:84
virtual float BottomSizeFactor()
GLS_Cylinder_Initializers
Definition: gls_cylinder.h:66
bool _bottomFace
Definition: gls_cylinder.h:139
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual float FaceEndAngle()
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
Definition: bmpimage.h:46
void SetFillColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: display.h:678
virtual void SetFillColor(const GlsColor &color)
void SetResizeRecalculate()