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
69 GLS_CYLINDER_COLOR=GLS_LAST_INITIALIZER+1,
70 GLS_CYLINDER_SEGMENTS,
72 GLS_CYLINDER_FACE_START,
73 GLS_CYLINDER_FACE_END,
74 GLS_CYLINDER_TOP_SIZE,
75 GLS_CYLINDER_BOTTOM_SIZE,
76 GLS_CYLINDER_TOP_FACE,
77 GLS_CYLINDER_BOTTOM_FACE,
89 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);
152 GLS_EXPORT
void Resize(
void);
155 virtual GLS_EXPORT
void SetValue(
int spec,va_list &args);
161 virtual GLS_EXPORT
void SetFromGloData(GlsGloFileAttribute &data);
174 GLS_EXPORT
GlsCylinder(
bool newGlsCylinder =
true);
202 virtual GLS_EXPORT
void GetExtents(
float &x,
float &y,
float &z,
float &x1,
float &y1,
float &z1);
205 virtual GLS_EXPORT
void Draw(
void);
208 virtual GLS_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector *collisionPoint);
214 virtual GLS_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex *anchor,
int handleBar = 0);
295 virtual GLS_EXPORT
void Segments(
unsigned int segments);
300 virtual GLS_EXPORT
unsigned int Segments();
305 virtual GLS_EXPORT
void Faces(
unsigned int faces);
310 virtual GLS_EXPORT
unsigned int Faces();
315 virtual GLS_EXPORT
void TopFace(
bool top);
320 virtual GLS_EXPORT
bool TopFace();
325 virtual GLS_EXPORT
void BottomFace(
bool bottom);
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual ~GlsCylinder(void)
virtual bool GetPlaneVectorPoints(Vertex &p1, Vertex &p2, Vertex &p3, Vertex &planeVector)
virtual void SetRadii(const Vector &r1, const Vector &r2, const Vector &r3)
Definition: dynamic_array.h:63
The disti::Group class. Implements groups of objects.
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
virtual void SetFillColor(const glsColor &color)
virtual void SetAvailableAttributes(unsigned int value)
virtual void GetRadii(Vector &r1, Vector &r2, Vector &r3)
bool _topFace
Definition: gls_cylinder.h:139
virtual glsColor GetFillColor(void)
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.
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 int TextureIndex(void)
bool _needsRecalculate
Definition: gls_cylinder.h:137
virtual glsColor GetFillColor(void)
virtual unsigned int Faces()
unsigned int _faces
Definition: gls_cylinder.h:134
float _topSize
Definition: gls_cylinder.h:132
virtual bool BottomFace()
virtual void Rotate(float angle, int axis=Z_AXIS)
float _faceStartDeg
Definition: gls_cylinder.h:131
unsigned int _segments
Definition: gls_cylinder.h:134
Definition: gls_color.h:54
void Scale(int handleBar, float px, float py, Vertex *anchor=NULL)
Definition: display.h:1111
bool _needsResize
Definition: gls_cylinder.h:138
virtual float FaceStartAngle()
virtual void CalculateTextureCoordinates(void)
Definition: gls_cylinder.h:85
virtual float BottomSizeFactor()
GLS_Cylinder_Initializers
Definition: gls_cylinder.h:67
bool _bottomFace
Definition: gls_cylinder.h:140
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)
glsColor _objectColor
Definition: gls_cylinder.h:129
Definition: bmpimage.h:46
void SetFillColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: display.h:663
void SetResizeRecalculate()