40 #ifndef _GLSDYNAMICPATH_H 
   41 #define _GLSDYNAMICPATH_H 
   47 #if( defined( GLSGEN_EXPORT_GLSDYNAMICPATH ) || defined( GLSGEN_IMPORT_GLSDYNAMICPATH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \ 
   48     && defined( _MSC_VER ) 
   49 #    if defined( GLSGEN_EXPORT_GLSDYNAMICPATH ) || defined( GLS_EXPORT_GENERATED ) 
   50 #        define GLSGEN_GLSDYNAMICPATH_EXPORT __declspec( dllexport ) 
   52 #        define GLSGEN_GLSDYNAMICPATH_EXPORT __declspec( dllimport ) 
   55 #    define GLSGEN_GLSDYNAMICPATH_EXPORT 
   59 #define LIB_BASE_NAME "gls_dynamic_path" 
   68     GLS_DYNAMICPATH_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
 
   69     GLS_DYNAMICPATH_AFFECTS_LOCATION_X,
 
   70     GLS_DYNAMICPATH_AFFECTS_LOCATION_Y,
 
   71     GLS_DYNAMICPATH_AFFECTS_LOCATION_Z,
 
   72     GLS_DYNAMICPATH_AFFECTS_ROTATION_X,
 
   73     GLS_DYNAMICPATH_AFFECTS_ROTATION_Y,
 
   74     GLS_DYNAMICPATH_AFFECTS_ROTATION_Z,
 
   75     GLS_DYNAMICPATH_AFFECTS_SCALE_X,
 
   76     GLS_DYNAMICPATH_AFFECTS_SCALE_Y,
 
   77     GLS_DYNAMICPATH_AFFECTS_SCALE_Z,
 
   78     GLS_DYNAMICPATH_USE_SHORT_ROTATION_PATHS,
 
   79     GLS_DYNAMICPATH_STATE_COUNT,
 
   86     friend class GlsDynamicPathEditor;
 
   93     DISTI_DEPRECATED( 
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
 
  100     GLSGEN_GLSDYNAMICPATH_EXPORT 
GlsDynamicPath( 
bool generateInstanceName = 
false );
 
  107     GLSGEN_GLSDYNAMICPATH_EXPORT GlsDynamicPath( 
const GlsDynamicPath& that, 
const bool generateNames );
 
  112     static GLSGEN_GLSDYNAMICPATH_EXPORT 
DisplayObject* CreateInstance();
 
  126     virtual GLSGEN_GLSDYNAMICPATH_EXPORT 
void Draw( 
void );
 
  130     virtual GLSGEN_GLSDYNAMICPATH_EXPORT 
bool Hit( 
float x, 
float y, 
float z, 
float scale, 
const Vector& directionVector, 
Vector* collisionPoint );
 
  132     virtual GLSGEN_GLSDYNAMICPATH_EXPORT 
void SetValue( 
int spec, va_list& args );
 
  142     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsLocationX( 
const bool& value );
 
  143     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsLocationX()
 const { 
return _affectsLocationX; }
 
  146     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsLocationY( 
const bool& value );
 
  147     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsLocationY()
 const { 
return _affectsLocationY; }
 
  150     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsLocationZ( 
const bool& value );
 
  151     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsLocationZ()
 const { 
return _affectsLocationZ; }
 
  154     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsRotationX( 
const bool& value );
 
  155     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsRotationX()
 const { 
return _affectsRotationX; }
 
  158     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsRotationY( 
const bool& value );
 
  159     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsRotationY()
 const { 
return _affectsRotationY; }
 
  162     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsRotationZ( 
const bool& value );
 
  163     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsRotationZ()
 const { 
return _affectsRotationZ; }
 
  166     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsScaleX( 
const bool& value );
 
  167     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsScaleX()
 const { 
return _affectsScaleX; }
 
  170     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsScaleY( 
const bool& value );
 
  171     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsScaleY()
 const { 
return _affectsScaleY; }
 
  174     GLSGEN_GLSDYNAMICPATH_EXPORT 
void AffectsScaleZ( 
const bool& value );
 
  175     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool AffectsScaleZ()
 const { 
return _affectsScaleZ; }
 
  178     GLSGEN_GLSDYNAMICPATH_EXPORT 
void UseShortRotationPaths( 
const bool& value );
 
  179     GLSGEN_GLSDYNAMICPATH_EXPORT 
bool UseShortRotationPaths()
 const { 
return _useShortRotationPaths; }
 
  184         friend class GlsDynamicPath;
 
  187         GLSGEN_GLSDYNAMICPATH_EXPORT 
State();
 
  188         GLSGEN_GLSDYNAMICPATH_EXPORT State( 
const State& );
 
  189         GLSGEN_GLSDYNAMICPATH_EXPORT ~State();
 
  191         GLSGEN_GLSDYNAMICPATH_EXPORT 
const State& operator=( 
const State& );
 
  192         GLSGEN_GLSDYNAMICPATH_EXPORT 
void         MakeAttribDict();
 
  201         void   Location( 
const Vector& value ) { _location = value; }
 
  202         Vector Location() { 
return _location; }
 
  203         Vector Location()
 const { 
return _location; }
 
  204         void   Rotation( 
const Vector& value ) { _rotation = value; }
 
  205         Vector Rotation() { 
return _rotation; }
 
  206         Vector Rotation()
 const { 
return _rotation; }
 
  207         void   Scale( 
const Vector& value ) { _scale = value; }
 
  208         Vector Scale() { 
return _scale; }
 
  209         Vector Scale()
 const { 
return _scale; }
 
  210         void   Value( 
const float& value ) { _value = value; }
 
  211         float  Value() { 
return _value; }
 
  212         float  Value()
 const { 
return _value; }
 
  225     StateArrayType&       StateArray() { 
return _stateArray; }
 
  226     const StateArrayType& StateArray()
 const { 
return _stateArray; }
 
  236     GLSGEN_GLSDYNAMICPATH_EXPORT 
void FindFirstPathSegmentContainingValue( 
float value, 
int* index1, 
int* index2 );
 
  239     float FirstStateValue()
 
  241         if( _stateArray.
Count() )
 
  243             return _stateArray[ 0 ].Value();
 
  252     float LastStateValue()
 
  254         if( _stateArray.
Count() )
 
  256             return _stateArray[ _stateArray.
Count() - 1 ].Value();
 
  297     virtual GLS_EXPORT 
void SetFromGloData( GlsGloFileAttribute& data );
 
  300     bool _affectsLocationX;
 
  301     bool _affectsLocationY;
 
  302     bool _affectsLocationZ;
 
  303     bool _affectsRotationX;
 
  304     bool _affectsRotationY;
 
  305     bool _affectsRotationZ;
 
  310     bool _useShortRotationPaths;
 
  312     StateArrayType _stateArray;
 
void MoveObjectToState(DisplayObject *obj, int stateNumber)
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute. 
Definition: gls_cpp_lang_support.h:436
unsigned Count() const 
Definition: dynamic_array.h:204
Definition: dynamic_array.h:66
The disti::Group class. Implements groups of objects. 
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:296
Vector GetPathLocation(float value)
Definition: gls_dynamic_path.h:182
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
DisplayObject(float x, float y, float z)
virtual ~GlsDynamicPath()
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual DisplayObject * CloneObject(bool generateNames=false)
VertexNoColor Vector
Definition: gls_font_base.h:66
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Definition: gls_dynamic_path.h:84
virtual DistiAttributeBase & Resource(const char *name)
virtual void SetAvailableAttributes(unsigned int value)
Definition: disti_metadata.h:183
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
Definition: disti_metadata.h:665
void MoveObject(DisplayObject *obj, float value)
virtual void SetValue(int spec, va_list &args)
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter)
virtual DisplayObject * handle(DisplayEvent *ev)
Definition: gls_resources.h:50
Vector GetPathScale(float value)
Macros and helper code to determine what subset of C++11/14/17 is available. 
Definition: bmpimage.h:46
virtual void CopyProperties(DisplayObject *src)
Vector GetPathRotation(float value)