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,
88 friend class GlsCylinderEditor;
92 void CommonConstructorInit(
void );
108 bool FirstHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
117 bool BestHit(
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
119 bool EndCapFirstPick(
unsigned int startIndex,
const Vector& point,
const Vector& directionVector,
Vector* collisionPoint );
121 void UpdateBestPickStatus(
const Vector& point,
const Vector& directionVector,
Vector& tempCollisionPoint,
Vector& closestPoint,
float& pickDistance );
148 GLS_EXPORT
void Resize(
void );
151 virtual GLS_EXPORT
void SetValue(
int spec, va_list& args );
166 GLS_EXPORT
GlsCylinder(
float x,
float y,
float z );
169 GLS_EXPORT
GlsCylinder(
bool newGlsCylinder =
true );
197 virtual GLS_EXPORT
void GetExtents(
float& x,
float& y,
float& z,
float& x1,
float& y1,
float& z1 );
200 virtual GLS_EXPORT
void Draw(
void );
203 virtual GLS_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
209 virtual GLS_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 );
234 virtual GLS_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
290 virtual GLS_EXPORT
void Segments(
unsigned int segments );
295 virtual GLS_EXPORT
unsigned int Segments();
300 virtual GLS_EXPORT
void Faces(
unsigned int faces );
305 virtual GLS_EXPORT
unsigned int Faces();
310 virtual GLS_EXPORT
void TopFace(
bool top );
315 virtual GLS_EXPORT
bool TopFace();
320 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:126
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:62
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:136
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:835
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:134
virtual GlsColor GetFillColor(void)
virtual unsigned int Faces()
unsigned int _faces
Definition: gls_cylinder.h:131
float _topSize
Definition: gls_cylinder.h:129
Definition: gls_color.h:53
virtual bool BottomFace()
virtual void Rotate(float angle, int axis=Z_AXIS)
float _faceStartDeg
Definition: gls_cylinder.h:128
unsigned int _segments
Definition: gls_cylinder.h:131
void Scale(int handleBar, float px, float py, Vertex *anchor=NULL)
Definition: display.h:1111
bool _needsResize
Definition: gls_cylinder.h:135
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:137
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:663
virtual void SetFillColor(const GlsColor &color)
void SetResizeRecalculate()