GL Studio C++ Runtime API
gls_3d_cable.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::Gls3DCable class.
3
4 \par Copyright Information
5
6 Copyright (c) 2017 by The DiSTI Corporation.<br>
7 11301 Corporate Blvd; Suite 100<br>
8 Orlando, Florida 32817<br>
9 USA<br>
10 <br>
11 All rights reserved.<br>
12
13 This Software contains proprietary trade secrets of DiSTI and may not be
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State of Florida and the United States of America.
38*/
39
40#ifndef _GLS3DCABLE_H
41#define _GLS3DCABLE_H
42
43#include <vector>
44
45#include "glpolygon.h"
47#include "gls_quaternion.h"
48#include "gltrimesh.h"
49#include "group.h"
50
51/// Provides support for creating DLLs.
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 )
56# else
57# define GLSGEN_GLS3DCABLE_EXPORT __declspec( dllimport )
58# endif
59#else
60# define GLSGEN_GLS3DCABLE_EXPORT
61#endif
62///////////////////////////////////////////////////////////////////////////////
63
64/// Automatically link the runtime library plugin (on Windows).
65#define LIB_BASE_NAME "gls_3d_cable"
66#include "gls_auto_lib.h"
67#undef LIB_BASE_NAME
68
69namespace disti
70{
71// SetValue enumerations
72enum
73{
74 GLS_3DCABLE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
75
76 GLS_3DCABLE_FLEXIBILITY,
77 GLS_3DCABLE_NUMBEROFSEGMENTS,
78 GLS_3DCABLE_NUMBEROFSIDES,
79 GLS_3DCABLE_RADIUS,
80 GLS_3DCABLE_LENGTH,
81 GLS_3DCABLE_GRAVITY,
82 GLS_3DCABLE_SECTIONSLACKPCT,
83 GLS_3DCABLE_SECTIONFLOORDIST,
84 GLS_3DCABLE_COLLISIONSTYLE,
85 GLS_3DCABLE_FILLCOLOR,
86 GLS_3DCABLE_LINECOLOR
87};
88
89typedef DynamicArray<double> DynamicDoubleArray; ///< Typedef for dynamic array of slack percentages.
90
91/// \details The PreciseVertex class. Uses fuzzy floating point comparison rather than exact matches.
93{
94public:
97 {}
98
99 /// Constructor from Vector
100 /// \param vector The vector to construct from.
101 PreciseVertex( const Vector& vector )
102 : VertexNoColor( vector.x, vector.y, vector.z )
103 {}
104
105 /// Constructor from three floats
106 /// \param x The x component to construct from.
107 /// \param y The y component to construct from.
108 /// \param z The z component to construct from.
109 PreciseVertex( float x, float y, float z )
110 : VertexNoColor( x, y, z )
111 {}
112
113 /**
114 If the values are near zero, force them to be Zero!
115 \pre
116 \post
117 */
118 void NearZero()
119 {
120 const float DIFF = 0.0001f;
121
122 if( BETWEEN( x, 0.0 - DIFF, 0.0 + DIFF ) )
123 {
124 x = 0.0f;
125 }
126
127 if( BETWEEN( y, 0.0 - DIFF, 0.0 + DIFF ) )
128 {
129 y = 0.0f;
130 }
131
132 if( BETWEEN( z, 0.0 - DIFF, 0.0 + DIFF ) )
133 {
134 z = 0.0f;
135 }
136 }
137
138 /** Normalizes the vector into a unit vector */
140 {
141 double length = Magnitude();
142
143 // how close to zero do we want to be?
144 const double DIFF = 0.0001;
145
146 if( !BETWEEN( length, 0.0 - DIFF, 0.0 + DIFF ) )
147 {
148 // Divide is slow so calculate 1/length and multiply to save time
149 double inv_length = 1.0 / length;
150
151 x = float( x * inv_length );
152 y = float( y * inv_length );
153 z = float( z * inv_length );
154 }
155 else
156 {
157 x = 0.0f;
158 y = 0.0f;
159 z = 0.0f;
160 }
161 }
162
163 /** Determines if the vertex is identical to the supplied vertex, ignoring color
164 \param arg vertex to compare to
165 \return TRUE if equal, else FALSE
166 */
167 bool operator==( const VertexNoColor& arg ) const
168 {
169 const double DIFF = 0.0001;
170 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 ) );
171 }
172
173 /** Determines if the vertex is identical to the supplied vertex, ignoring color
174 \param arg vertex to compare to
175 \return TRUE if equal, else FALSE
176 */
177 bool operator!=( const VertexNoColor& arg ) const
178 {
179 const double DIFF = 0.0001;
180 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 ) );
181 }
182};
183
184/**
185 Runtime implementation of a Gls3DCable. The Gls3DCable is a cable mesh between
186 two or more endpoint objects. The user controls the length, the flexibility, the
187 diameter, the smoothness (segments and sides), and the droop of the cable.
188*/
189class Gls3DCable : public Group
190{
191public:
192 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
193 typedef Group _BaseClass; ///< Deprecated typedef for the base class.
194 typedef Group BaseClass; ///< Typedef for the base class.
195
196 enum
197 {
198 TEXTUREPOINT_MULT = 50
199 };
200
201 /** Sides limits */
202 enum
203 {
204 MIN_NUMBER_OF_SIDES = 1,
205 MAX_NUMBER_OF_SIDES = 100 // visually 50 looked good, 100 gives the user room
206 };
207
208 /** Segement limits */
209 enum
210 {
211 MIN_SEGEMENTS = 1,
212 MAX_SEGEMENTS = 10000 // Seems like 10,000 segements should be way big enough
213 };
214
215 /// Collision model
217 {
218 COLLISIONSTYLE_NONE = 0,
219 COLLISIONSTYLE_FAST
220#if defined( USE_COLLISIONSTYLE_SLOW )
221 ,
222 COLLISIONSTYLE_SLOW
223#endif
224 };
225
226 friend class Gls3DCableEditor;
227
228 /// Create a new Gls3DCable.
229 /// \param generateInstance Whether or not to generate an instance name for this object.
230 GLSGEN_GLS3DCABLE_EXPORT Gls3DCable( bool generateInstance = false );
231
232 /// Copy constructor for Gls3DCable
233 /// \param that The Gls3DCable to be copied from.
234 /// \param generateNames Whether or not to generate a new instance name.
235 GLSGEN_GLS3DCABLE_EXPORT Gls3DCable( const Gls3DCable& that, const bool generateNames );
236
237 /** Destructs a Gls3DCable object */
239
240 /// \return A pointer to a new Gls3DCable.
242
243 //////////////////////////////////////////////////
244 // Overridden base class methods
245 // The base class methods are overridden so that the Group Class methods
246 // are not called, generally DisplayObject methods are called, there
247 // are a few exceptions.
248 //////////////////////////////////////////////////
249
250 virtual void GetResources( std::ostream& outstr, GlsResourceFilter* filter ) DISTI_METHOD_OVERRIDE;
257 virtual GLSGEN_GLS3DCABLE_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler ) DISTI_METHOD_OVERRIDE;
261 virtual GLSGEN_GLS3DCABLE_EXPORT void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
263 virtual GLSGEN_GLS3DCABLE_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
264
265 virtual GLSGEN_GLS3DCABLE_EXPORT DisplayObject* Pick3D( const Vector& winLoc, const Vector& logicalCoords, float scale,
266 const Vector& directionVector, Vector& collisionWinLoc, const OpenGLMatrices& parentDrawn ) DISTI_METHOD_OVERRIDE;
267
281 virtual GLSGEN_GLS3DCABLE_EXPORT void DepthTest( unsigned char mode ) DISTI_METHOD_OVERRIDE;
305
306 //////////////////////////////////////////////////
307 // Gls3DCable specific operations
308 //////////////////////////////////////////////////
309
310 /** Sets flexibility.
311 * \param value Controls how stiff the cable is. The value should be in the
312 range of 0 to 1, inclusive. 0 is very inflexible, while 1 is very flexible.
313 \pre value must be in the range of 0 to 1
314 \post None
315 */
316 GLSGEN_GLS3DCABLE_EXPORT void Flexibility( const float& value );
317 /** Gets flexibility.
318 * \return How stiff the cable is.
319 */
321
322 /** Sets Number of Segements.
323 * \param value The number of cylindrical segments that will traverse
324 * the entire length of the cable. A cable with one section
325 * (that is, with only two control objects) would be a straight cylinder
326 * connecting two points, incapable of bending.
327 * The higher this number, the smoother your cable will appear.
328 \pre value must be in the range MIN_SEGEMENTS to MAX_SEGEMENTS
329 \post none
330 */
331 GLSGEN_GLS3DCABLE_EXPORT void NumberOfSegments( const unsigned int& value );
332
333 /** Gets the Number of Segements.
334 * \return The Number of Segments
335 */
337
338 /** Sets the Number Of Sides.
339 * \param value The number of sides the cable "tube" will have.
340 * The more sides, the smoother the cable will appear.
341 * A value of two will produce a ribbon-like cable.
342 * A value of one will render only a line.
343 \pre value must be in the range of 1 to 100 inclusive.
344 \post None
345 */
346 GLSGEN_GLS3DCABLE_EXPORT void NumberOfSides( const unsigned int& value );
347
348 /** Gets the Number of Sides.
349 * \return The number of sides
350 */
352
353 /** Sets the Radius of the cable in logical units
354 \param value The radius in logical units.
355 \pre value must be plus/minus MAX_FLT
356 \post none
357 */
358 GLSGEN_GLS3DCABLE_EXPORT void Radius( const float& value );
359
360 /** Gets the Radius of the cable
361 * \return The radius in logical units
362 */
364
365 /** Sets the Length of the cable.
366 * when not under duress (the cable will stretch when the end-points
367 * are moved too far from each other).
368 * \param value The approximate length of the cable in logical units
369 \pre value must be 0.0 to MAX_FLT
370 \post None
371 */
372 GLSGEN_GLS3DCABLE_EXPORT void Length( const float& value );
373
374 /** Gets the Length of the cable.
375 * \return The length of the cable in logical units
376 */
378
379 /** Sets the CollisionStyle.
380 * \param value The collision mode for the cable.
381 * COLLISIONSTYLE_NONE will disable all collision detection and
382 * therefore any cable deformation caused thereby.
383 * COLLISIONSTYLE_FAST will check for collisions with other objects in
384 * the scene, but will only move / orient the cable midpoint such that it
385 * appears as though the cable is laying flat on a single surface.
386 *
387 * Check if USE_COLLISIONSTYLE_SLOW is defined before using Slow.
388 */
389 GLSGEN_GLS3DCABLE_EXPORT void CollisionStyle( const int& value );
390
391 /** Gets the Collision Style
392 * \return The current Collision Style
393 */
395
396 /** Sets the Slack Percentage
397 * \param section Which section of the cable, 0 based
398 * \param pct The percent of the slace (0.0 -> 1.0)
399 * This will adjust the slack percentage in the cable for the section,
400 * the caller must ensure that all percents sum up to 1.0.
401 \pre section must be < _sectionSlackPct.Count(), and pct must be 0.0-1.0
402 \post Slack percentage will not change if preconditions are not met.
403 */
404 GLSGEN_GLS3DCABLE_EXPORT void SlackPct( unsigned int section, double pct );
405
406 /** Gets the Slack Percentage for a particular section
407 * \param section The section of interest.
408 * \return The slack percentage for the specified section.
409 \pre section must be < _sectionSlackPct.Count()
410 \post if preconditions are not met 0.0 is returned
411 */
412 GLSGEN_GLS3DCABLE_EXPORT double SlackPct( unsigned int section );
413
414 /**
415 How many Slack Sections are there? Can be used with SlackPct() to
416 get set Slack Sections.
417 \return Return the number of Slack Sections, 0 to N
418 \pre none
419 \post none
420 */
422
423 /**
424 Sometimes an outside source may need to recalculate the cable, such as
425 when the scene changes and the cable may not be colliding with another
426 object in the scene.
427 \pre None
428 \post None
429 */
431
432 /// Whether or not to simulate gravity on the cable.
433 /// \param value The new gravity flag value.
434 GLSGEN_GLS3DCABLE_EXPORT void Gravity( const bool& value );
435
436 /**
437 Returns wether or not gavity is simulated on the cable.
438 \return Returns wether or not gavity is simulated on the cable
439 \pre none
440 \post none
441 */
443 {
444 return _gravity;
445 }
446
447private:
448 /**
449 Reallocate, but do not set the vertices that make up the cable line
450 \pre None
451 \post Will clear _needNewLineVerts, and will set _needCableRecalc
452 */
453 void AllocateLineVertices();
454
455 /**
456 \param *root Pointer to a list of objects to search for a collision
457 \param &pos Starting point of the ray
458 \param &vec Direction vector of the ray
459 \param *mag_pct_chg If a float pointer is provided, this will return the percent
460 change between the new/old Ray magnitude.
461 This is an optional parameter.
462 \return Return true if the new magnitude is smaller than the old
463 \pre root must exist
464 \post
465 */
466 bool RaycastAdjusted( DisplayObject* root, Vector& pos, Vector& vec, float* mag_pct_chg = NULL );
467
468 /**
469 Determine if something is colliding with the cable.
470 \param *root Pointer to a list of objects to search for a collision
471 \param x The x starting location of the ray
472 \param y The y starting location of the ray
473 \param z The z starting location of the ray
474 \param scale The Scale factor of the window
475 \param directionVector Direction vector of the ray
476 \param &collideDist Return the distance to the collision point from the start point
477 \param *collisionPoint Return the closest collision point
478 \return true if a hit occurs
479 \pre root must exist
480 \post None
481 */
482 bool GlobalHit( DisplayObject* root, float x, float y, float z, float scale, const Vector& directionVector, float& collideDist, Vector* collisionPoint );
483
484 /**
485 Recompute the line vertices of the cable.
486 \return success or failure
487 \pre
488 \post will clear _needCableRecalc
489 */
490 bool RecalculateCable();
491
492 /**
493 Fill out/calculate the cable mesh.
494 \pre None
495 \post None
496 */
497 void TubeGeneration();
498
499protected:
500 /**
501 How flexibile is the cable, more flexibility gives a more rounded cable
502 This has a range of 0 to 1, 0 is inflexible, 1 is flexible.
503 */
505
506 /**
507 The number of pieces that the entire cable has, the more
508 segements the more smooth a cable will appear, e.g., 1 segment
509 gives you a straight line, two gives you a 'V', etc.
510 This has a range of MIN_SEGEMENTS to MAX_SEGEMENTS
511 */
512 unsigned int _numberOfSegments;
513
514 /**
515 How many sides does the cable have. 1 is a wire
516 2 is a ribbon cable, 3 a triangle, 4 a sqaure, etc. the more
517 sides the closer to a circle you get.
518 This has a range of MIN_NUMBER_OF_SIDES to MAX_NUMBER_OF_SIDES.
519 */
520 unsigned int _numberOfSides;
521
522 /**
523 The Radius of the cable. Units are in pixels.
524 This has a range of plus/minus FLT_MAX
525 */
526 float _radius;
527
528 /**
529 The requested length of the cable, the cable may be longer, if needed to
530 reach between the end points. A zero length cable can be used to "hide"
531 the cable, while leaving the end points intact. Units are in logical units.
532 This has a range of zero to FLT_MAX.
533 */
534 float _length;
535
536 /**
537 Does RecalculateCable () need to be called next frame?
538 */
540
541 /**
542 Does TubeGeneration () need to be called next frame?
543 */
545
546 /**
547 Prevents "Hit()" from being called from within RecalculateCable()
548 */
550
551 /**
552 The _lineVerts are stored in the _line object. The _line object is used
553 for drawing if sides == 1.
554 */
556
557 /**
558 The Mesh Verts, Normals, and TexCoords are stored in this object. The _mesh object
559 is used for drawing when sides > 1.
560 */
562
563 /**
564 Stores the locations of all of the "EndPoint" objects for ease of use in future calculations.
565 Also used to check if any of the positions have changed.
566 Endpoints, can be in the middle section of the cable, by "endpoints" it is meant the ends of the sections.
567 */
568 std::vector<Vector> _endPointPos;
569
570 /**
571 Stores the dcs orientations of all of the "EndPoint" objects for ease of use in future calculations.
572 Also used to check if any of the orientations have changed.
573 Endpoints, can be in the middle section of the cable, by "endpoints" it is meant the ends of the sections.
574 */
575 std::vector<GlsMatrixAffineD> _endPointOri;
576
577 /**
578 The percentage of slack that each cable segment has (starts out equally divided)...
579 but the User can set the percentages.
580 This has a range of >= 0 and <= 1. The total of all sections should add to 1.
581 */
583
584 /**
585 Store the DCS Rotation matrix used to calculate the mesh object. The
586 Z is the direction of gravity, so this will effect the slack in the cable.
587 Compare this old DCS with the current to determine if we need to recalculate
588 the mesh.
589 */
591
592 /**
593 The collision type.
594 */
596
597 bool _gravity; ///< If true, gravity will be simulated on this cable.
598
599 /// The number of vertices in the cable line, for each section of the cable.
600 /// This INCLUDES the first vertex and the last vertex of each section.
602
603 /// This will be the summed arc length for all sections.
604 /// It is stored because it is used for tube generation.
606
607private:
608 // Disable implicit generated Members
609 Gls3DCable& operator=( const Gls3DCable& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
611};
612
613} // namespace disti
614
615#endif
Definition: cull.h:50
Definition: events.h:113
Definition: display.h:96
Definition: disti_metadata.h:220
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
The glTriMesh class. Implements Triangle Meshes.
Definition: gltrimesh.h:95
Definition: gls_3d_cable.h:190
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual void CalculateTextureCoordinates() DISTI_METHOD_OVERRIDE
void SlackPct(unsigned int section, double pct)
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual int LineStipplePattern() DISTI_METHOD_OVERRIDE
virtual void Draw() DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
virtual int TextureMagnificationFilter() DISTI_METHOD_OVERRIDE
virtual int PolygonEnd() DISTI_METHOD_OVERRIDE
bool Gravity()
Definition: gls_3d_cable.h:442
virtual void CalculateBoundingBox() DISTI_METHOD_OVERRIDE
float _radius
Definition: gls_3d_cable.h:526
bool _gravity
If true, gravity will be simulated on this cable.
Definition: gls_3d_cable.h:597
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &parentDrawn) DISTI_METHOD_OVERRIDE
virtual void SetColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
GlsMatrixAffineD _cableDcs
Definition: gls_3d_cable.h:590
float _length
Definition: gls_3d_cable.h:534
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
Gls3DCable(bool generateInstance=false)
virtual void SetBlendColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
virtual int TextureMinificationFilter() DISTI_METHOD_OVERRIDE
virtual bool CullBackFace() DISTI_METHOD_OVERRIDE
virtual GlsColor GetColor() DISTI_METHOD_OVERRIDE
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
bool _needTubeGeneration
Definition: gls_3d_cable.h:544
virtual DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
virtual int LineStippleMultiplier() DISTI_METHOD_OVERRIDE
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
virtual GlsColor GetBlendColor() DISTI_METHOD_OVERRIDE
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter) DISTI_METHOD_OVERRIDE
virtual bool TextureRepeat() DISTI_METHOD_OVERRIDE
bool _inCableRecalc
Definition: gls_3d_cable.h:549
unsigned int _numberOfSides
Definition: gls_3d_cable.h:520
ECollisionStyle _collisionStyle
Definition: gls_3d_cable.h:595
unsigned int SlackSectionCount() const
virtual int PolygonMode() DISTI_METHOD_OVERRIDE
unsigned int NumberOfSegments()
virtual int Shading() DISTI_METHOD_OVERRIDE
virtual void Calculate(double time) DISTI_METHOD_OVERRIDE
static DisplayObject * CreateInstance()
Gls3DCable(const Gls3DCable &that, const bool generateNames)
GLTriMesh _mesh
Definition: gls_3d_cable.h:561
virtual int DepthTest() DISTI_METHOD_OVERRIDE
float _flexibility
Definition: gls_3d_cable.h:504
virtual DistiAttributeBase & Resource(const char *name) DISTI_METHOD_OVERRIDE
GLPolygon _line
Definition: gls_3d_cable.h:555
virtual ~Gls3DCable()
virtual int TextureMappingTechnique() DISTI_METHOD_OVERRIDE
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
DynamicDoubleArray _sectionSlackPct
Definition: gls_3d_cable.h:582
float _realCableLength
Definition: gls_3d_cable.h:605
virtual bool AntiAlias() DISTI_METHOD_OVERRIDE
ECollisionStyle
Collision model.
Definition: gls_3d_cable.h:217
virtual bool LightingEnabled() DISTI_METHOD_OVERRIDE
virtual GlsColor GetFillColor() DISTI_METHOD_OVERRIDE
unsigned int _numberOfSegments
Definition: gls_3d_cable.h:512
virtual float LineWidth() DISTI_METHOD_OVERRIDE
std::vector< Vector > _endPointPos
Definition: gls_3d_cable.h:568
virtual void SetFillColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
int _lineVertsPerSection
Definition: gls_3d_cable.h:601
unsigned int NumberOfSides()
bool _needCableRecalc
Definition: gls_3d_cable.h:539
std::vector< GlsMatrixAffineD > _endPointOri
Definition: gls_3d_cable.h:575
virtual int AlphaMode() DISTI_METHOD_OVERRIDE
Definition: gls_color.h:54
Definition: gls_resources.h:51
Definition: group.h:53
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
Definition: gls_3d_cable.h:93
bool operator==(const VertexNoColor &arg) const
Definition: gls_3d_cable.h:167
void NearZero()
Definition: gls_3d_cable.h:118
PreciseVertex(float x, float y, float z)
Definition: gls_3d_cable.h:109
bool operator!=(const VertexNoColor &arg) const
Definition: gls_3d_cable.h:177
void Normalize()
Definition: gls_3d_cable.h:139
PreciseVertex(const Vector &vector)
Definition: gls_3d_cable.h:101
Definition: vertex.h:85
float y
The Y component.
Definition: vertex.h:88
VertexNoColor()
Definition: vertex.h:92
float x
The X component.
Definition: vertex.h:87
float Magnitude() const
Definition: vertex.h:330
float z
The Z component.
Definition: vertex.h:89
The disti::GLPolygon class. Implements Polygons.
#define GLSGEN_GLS3DCABLE_EXPORT
Provides support for creating DLLs.
Definition: gls_3d_cable.h:60
The gls_auto_lib.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:235
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
The disti::GlsQuaternion class.
The disti::GLTriMesh class. Implements Triangle Meshes.
The disti::Group class. Implements groups of objects.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
bool BETWEEN(const X &x, const X1 &x1, const X2 &x2)
Definition: util.h:131
DynamicArray< double > DynamicDoubleArray
Typedef for dynamic array of slack percentages.
Definition: gls_3d_cable.h:89