52 #if( defined( GLSGEN_EXPORT_GLS3DCABLE ) || defined( GLSGEN_IMPORT_GLS3DCABLE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \ 
   53     && defined( _MSC_VER ) 
   54 #    if defined( GLSGEN_EXPORT_GLS3DCABLE ) || defined( GLS_EXPORT_GENERATED ) 
   55 #        define GLSGEN_GLS3DCABLE_EXPORT __declspec( dllexport ) 
   57 #        define GLSGEN_GLS3DCABLE_EXPORT __declspec( dllimport ) 
   60 #    define GLSGEN_GLS3DCABLE_EXPORT 
   65 #define LIB_BASE_NAME "gls_3d_cable" 
   75     GLS_3DCABLE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
 
   77     GLS_3DCABLE_FLEXIBILITY,
 
   78     GLS_3DCABLE_NUMBEROFSEGMENTS,
 
   79     GLS_3DCABLE_NUMBEROFSIDES,
 
   83     GLS_3DCABLE_SECTIONSLACKPCT,
 
   84     GLS_3DCABLE_SECTIONFLOORDIST,
 
   85     GLS_3DCABLE_COLLISIONSTYLE,
 
   86     GLS_3DCABLE_FILLCOLOR,
 
   90 typedef DynamicArray<double, false> DynamicDoubleArray; 
 
  114         const float DIFF = 0.0001f;
 
  116         if( BETWEEN( x, 0.0 - DIFF, 0.0 + DIFF ) )
 
  121         if( BETWEEN( y, 0.0 - DIFF, 0.0 + DIFF ) )
 
  126         if( BETWEEN( z, 0.0 - DIFF, 0.0 + DIFF ) )
 
  138         const double DIFF = 0.0001;
 
  140         if( !BETWEEN( length, 0.0 - DIFF, 0.0 + DIFF ) )
 
  143             double inv_length = 1.0 / length;
 
  145             x = float( x * inv_length );
 
  146             y = float( y * inv_length );
 
  147             z = float( z * inv_length );
 
  163         const double DIFF = 0.0001;
 
  164         return ( BETWEEN( x, arg.x - DIFF, arg.x + DIFF ) && BETWEEN( y, arg.y - DIFF, arg.y + DIFF ) && BETWEEN( z, arg.z - DIFF, arg.z + DIFF ) );
 
  173         const double DIFF = 0.0001;
 
  174         return ( !BETWEEN( x, arg.x - DIFF, arg.x + DIFF ) || !BETWEEN( y, arg.y - DIFF, arg.y + DIFF ) || !BETWEEN( z, arg.z - DIFF, arg.z + DIFF ) );
 
  190         TEXTUREPOINT_MULT = 50
 
  196         MIN_NUMBER_OF_SIDES = 1,
 
  197         MAX_NUMBER_OF_SIDES = 100 
 
  204         MAX_SEGEMENTS = 10000 
 
  209         COLLISIONSTYLE_NONE = 0,
 
  211 #if defined( USE_COLLISIONSTYLE_SLOW ) 
  217     friend class Gls3DCableEditor;
 
  223     GLSGEN_GLS3DCABLE_EXPORT 
Gls3DCable( 
bool generateInstance = 
false );
 
  229     GLSGEN_GLS3DCABLE_EXPORT 
Gls3DCable( 
const Gls3DCable& that, 
const bool generateNames );
 
  234     static GLSGEN_GLS3DCABLE_EXPORT 
DisplayObject* CreateInstance();
 
  254     virtual GLSGEN_GLS3DCABLE_EXPORT 
void Draw( 
void );
 
  256     virtual GLSGEN_GLS3DCABLE_EXPORT 
void Calculate( 
double time );
 
  260     virtual GLSGEN_GLS3DCABLE_EXPORT 
void SetValue( 
int spec, va_list& args );
 
  262     virtual GLSGEN_GLS3DCABLE_EXPORT 
void CalculateBoundingBox( 
void );
 
  276     virtual GLSGEN_GLS3DCABLE_EXPORT 
bool Hit( 
float x, 
float y, 
float z, 
float scale, 
const Vector& directionVector, 
Vector* collisionPoint );
 
  283     virtual GLSGEN_GLS3DCABLE_EXPORT 
void  LineWidth( 
float width );
 
  284     virtual GLSGEN_GLS3DCABLE_EXPORT 
float LineWidth( 
void );
 
  292     virtual GLSGEN_GLS3DCABLE_EXPORT 
int  PolygonMode( 
void );
 
  293     virtual GLSGEN_GLS3DCABLE_EXPORT 
void PolygonMode( 
int mode );
 
  295     virtual GLSGEN_GLS3DCABLE_EXPORT 
void PolygonEnd( 
const int mode );
 
  296     virtual GLSGEN_GLS3DCABLE_EXPORT 
int  PolygonEnd( 
void );
 
  298     virtual GLSGEN_GLS3DCABLE_EXPORT 
void Shading( 
const int mode );
 
  299     virtual GLSGEN_GLS3DCABLE_EXPORT 
int  Shading( 
void );
 
  301     virtual GLSGEN_GLS3DCABLE_EXPORT 
void DepthTest( 
unsigned char mode );
 
  302     virtual GLSGEN_GLS3DCABLE_EXPORT 
int  DepthTest( 
void );
 
  304     virtual GLSGEN_GLS3DCABLE_EXPORT 
void AntiAlias( 
bool mode );
 
  305     virtual GLSGEN_GLS3DCABLE_EXPORT 
bool AntiAlias( 
void );
 
  307     virtual GLSGEN_GLS3DCABLE_EXPORT 
void AlphaMode( 
int mode );
 
  308     virtual GLSGEN_GLS3DCABLE_EXPORT 
int  AlphaMode( 
void );
 
  310     virtual GLSGEN_GLS3DCABLE_EXPORT 
void CullBackFace( 
const bool mode );
 
  311     virtual GLSGEN_GLS3DCABLE_EXPORT 
bool CullBackFace( 
void );
 
  314     virtual GLSGEN_GLS3DCABLE_EXPORT 
void LightingEnabled( 
bool lighting );
 
  325     virtual GLSGEN_GLS3DCABLE_EXPORT 
void TextureRepeat( 
const int rep );
 
  347     GLSGEN_GLS3DCABLE_EXPORT 
void Flexibility( 
const float& value );
 
  362     GLSGEN_GLS3DCABLE_EXPORT 
void NumberOfSegments( 
const unsigned int& value );
 
  377     GLSGEN_GLS3DCABLE_EXPORT 
void NumberOfSides( 
const unsigned int& value );
 
  389     GLSGEN_GLS3DCABLE_EXPORT 
void Radius( 
const float& value );
 
  394     GLSGEN_GLS3DCABLE_EXPORT 
float Radius();
 
  403     GLSGEN_GLS3DCABLE_EXPORT 
void Length( 
const float& value );
 
  408     GLSGEN_GLS3DCABLE_EXPORT 
float Length();
 
  435     GLSGEN_GLS3DCABLE_EXPORT 
void SlackPct( 
unsigned int section, 
double pct );
 
  443     GLSGEN_GLS3DCABLE_EXPORT 
double SlackPct( 
unsigned int section );
 
  471     GLSGEN_GLS3DCABLE_EXPORT 
void Gravity( 
const bool& value )
 
  493     void AllocateLineVertices();
 
  522     bool GlobalHit( 
DisplayObject* root, 
float x, 
float y, 
float z, 
float scale, 
const Vector& directionVector, 
float& collideDist, 
Vector* collisionPoint );
 
  530     bool RecalculateCable();
 
  537     void TubeGeneration();
 
  641     int _lineVertsPerSection;
 
  645     float _realCableLength;
 
  649     Gls3DCable& operator=( 
const Gls3DCable& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
 
  650     Gls3DCable( 
const Gls3DCable& src ) DISTI_SPECIAL_MEM_FUN_DELETE;
 
float _radius
Definition: gls_3d_cable.h:566
virtual int LineStippleMultiplier(void)
virtual DisplayObject * CloneObject(bool generateNames=false)
float _length
Definition: gls_3d_cable.h:574
virtual void SetColor(const GlsColor &color)
virtual bool LightingEnabled()
virtual int PolygonMode(void)
virtual void Normalize(void)
Definition: gls_3d_cable.h:133
virtual int AlphaMode(void)
virtual void Calculate(double time)
Definition: dynamic_array.h:62
The disti::Group class. Implements groups of objects. 
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:278
bool _needTubeGeneration
Definition: gls_3d_cable.h:584
Definition: gls_3d_cable.h:183
The Polygon class. Implements Polygons. 
Definition: glpolygon.h:55
virtual int TextureMappingTechnique(void)
virtual GlsColor GetBlendColor(void)
virtual DistiAttributeBase & Resource(const char *name)
unsigned int NumberOfSegments()
virtual int LineStipplePattern(void)
The disti::GLPolygon class. Implements Polygons. 
unsigned int _numberOfSegments
Definition: gls_3d_cable.h:552
bool operator!=(const VertexNoColor &arg) const 
Definition: gls_3d_cable.h:171
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Gls3DCable(bool generateInstance=false)
VertexNoColor()
Definition: vertex.h:89
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
GlsMatrixAffineD _cableDcs
Definition: gls_3d_cable.h:630
bool _inCableRecalc
Definition: gls_3d_cable.h:589
DynamicDoubleArray _sectionSlackPct
Definition: gls_3d_cable.h:622
The glTriMesh class. Implements Triangle Meshes. 
Definition: gltrimesh.h:92
std::vector< Vector > _endPointPos
Definition: gls_3d_cable.h:608
virtual int DepthTest(void)
virtual float LineWidth(void)
float _flexibility
Definition: gls_3d_cable.h:544
GLTriMesh _mesh
Definition: gls_3d_cable.h:601
unsigned int SlackSectionCount() const 
std::vector< GlsMatrixAffineD > _endPointOri
Definition: gls_3d_cable.h:615
virtual void CopyProperties(DisplayObject *src)
bool _needCableRecalc
Definition: gls_3d_cable.h:579
unsigned int _numberOfSides
Definition: gls_3d_cable.h:560
virtual void SetValue(int spec, va_list &args)
Definition: disti_metadata.h:174
unsigned int NumberOfSides()
Definition: gls_color.h:53
void ForceCableRecalc()
Definition: gls_3d_cable.h:461
virtual void SetAvailableAttributes(unsigned int value)
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &parentDrawn)
virtual GlsColor GetColor(void)
virtual void CalculateTextureCoordinates(void)
virtual void SetBlendColor(const GlsColor &color)
virtual bool TextureRepeat(void)
virtual int TextureMinificationFilter(void)
void Gravity(const bool &value)
Definition: gls_3d_cable.h:471
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
bool Gravity()
Definition: gls_3d_cable.h:482
virtual int Shading(void)
The disti::GlsQuaternion class. 
virtual bool CullBackFace(void)
void SlackPct(unsigned int section, double pct)
float Magnitude() const 
Definition: vertex.h:326
virtual void NearZero()
Definition: gls_3d_cable.h:112
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
GLPolygon _line
Definition: gls_3d_cable.h:595
Definition: gls_resources.h:50
Macros and helper code to determine what subset of C++11/14/17 is available. 
virtual bool operator==(const VertexNoColor &arg) const 
Definition: gls_3d_cable.h:161
ECollisionStyle _collisionStyle
Definition: gls_3d_cable.h:635
Definition: bmpimage.h:46
virtual int PolygonEnd(void)
virtual GlsColor GetFillColor(void)
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter)
virtual void SetFillColor(const GlsColor &color)
virtual DisplayObject * handle(DisplayEvent *ev)
Definition: gls_3d_cable.h:92
Definition: gls_matrix_affine.h:60
virtual bool AntiAlias(void)
The disti::GLTriMesh class. Implements Triangle Meshes. 
virtual int TextureMagnificationFilter(void)