40 #ifndef _GLSDYNAMICPATH_H
41 #define _GLSDYNAMICPATH_H
47 #if (defined(GLSGEN_EXPORT_GLSDYNAMICPATH) || \
48 defined(GLSGEN_IMPORT_GLSDYNAMICPATH) || \
49 defined(GLS_EXPORT_GENERATED) || \
50 defined(GLS_IMPORT_GENERATED)) \
52 # if defined(GLSGEN_EXPORT_GLSDYNAMICPATH) || defined(GLS_EXPORT_GENERATED)
53 # define GLSGEN_GLSDYNAMICPATH_EXPORT __declspec(dllexport)
55 # define GLSGEN_GLSDYNAMICPATH_EXPORT __declspec(dllimport)
58 # define GLSGEN_GLSDYNAMICPATH_EXPORT
62 #define LIB_BASE_NAME "gls_dynamic_path"
71 GLS_DYNAMICPATH_FIRST_VALUE = GLS_LAST_INITIALIZER+1,
72 GLS_DYNAMICPATH_AFFECTS_LOCATION_X,
73 GLS_DYNAMICPATH_AFFECTS_LOCATION_Y,
74 GLS_DYNAMICPATH_AFFECTS_LOCATION_Z,
75 GLS_DYNAMICPATH_AFFECTS_ROTATION_X,
76 GLS_DYNAMICPATH_AFFECTS_ROTATION_Y,
77 GLS_DYNAMICPATH_AFFECTS_ROTATION_Z,
78 GLS_DYNAMICPATH_AFFECTS_SCALE_X,
79 GLS_DYNAMICPATH_AFFECTS_SCALE_Y,
80 GLS_DYNAMICPATH_AFFECTS_SCALE_Z,
81 GLS_DYNAMICPATH_USE_SHORT_ROTATION_PATHS,
82 GLS_DYNAMICPATH_STATE_COUNT,
89 friend class GlsDynamicPathEditor;
101 GLSGEN_GLSDYNAMICPATH_EXPORT
GlsDynamicPath(
bool generateInstanceName=
false);
108 GLSGEN_GLSDYNAMICPATH_EXPORT GlsDynamicPath(
const GlsDynamicPath& that,
const bool generateNames );
113 static GLSGEN_GLSDYNAMICPATH_EXPORT
DisplayObject* CreateInstance();
127 virtual GLSGEN_GLSDYNAMICPATH_EXPORT
void Draw(
void);
131 virtual GLSGEN_GLSDYNAMICPATH_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint);
133 virtual GLSGEN_GLSDYNAMICPATH_EXPORT
void SetValue(
int spec,va_list &args);
143 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsLocationX(
const bool& value );
144 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsLocationX()
const {
return _affectsLocationX; }
147 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsLocationY(
const bool& value );
148 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsLocationY()
const {
return _affectsLocationY; }
151 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsLocationZ(
const bool& value );
152 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsLocationZ()
const {
return _affectsLocationZ; }
155 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsRotationX(
const bool& value );
156 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsRotationX()
const {
return _affectsRotationX; }
159 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsRotationY(
const bool& value );
160 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsRotationY()
const {
return _affectsRotationY; }
163 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsRotationZ(
const bool& value );
164 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsRotationZ()
const {
return _affectsRotationZ; }
167 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsScaleX(
const bool& value );
168 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsScaleX()
const {
return _affectsScaleX; }
171 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsScaleY(
const bool& value );
172 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsScaleY()
const {
return _affectsScaleY; }
175 GLSGEN_GLSDYNAMICPATH_EXPORT
void AffectsScaleZ(
const bool& value );
176 GLSGEN_GLSDYNAMICPATH_EXPORT
bool AffectsScaleZ()
const {
return _affectsScaleZ; }
179 GLSGEN_GLSDYNAMICPATH_EXPORT
void UseShortRotationPaths(
const bool& value );
180 GLSGEN_GLSDYNAMICPATH_EXPORT
bool UseShortRotationPaths()
const {
return _useShortRotationPaths; }
184 friend class GlsDynamicPath;
186 GLSGEN_GLSDYNAMICPATH_EXPORT
State();
187 GLSGEN_GLSDYNAMICPATH_EXPORT State(
const State&);
188 GLSGEN_GLSDYNAMICPATH_EXPORT ~State();
190 GLSGEN_GLSDYNAMICPATH_EXPORT
const State& operator=(
const State&);
191 GLSGEN_GLSDYNAMICPATH_EXPORT
void MakeAttribDict();
195 if(!_attribDict) MakeAttribDict();
199 void Location(
const Vector& value ) { _location = value; }
200 Vector Location() {
return _location; }
201 Vector Location()
const {
return _location; }
202 void Rotation(
const Vector& value ) {_rotation = value; }
203 Vector Rotation() {
return _rotation; }
204 Vector Rotation()
const {
return _rotation; }
205 void Scale(
const Vector& value ) {_scale = value; }
206 Vector Scale() {
return _scale; }
207 Vector Scale()
const {
return _scale; }
208 void Value(
const float& value ) { _value = value; }
209 float Value() {
return _value; }
210 float Value()
const {
return _value; }
222 StateArrayType& StateArray() {
return _stateArray; }
223 const StateArrayType& StateArray()
const {
return _stateArray; }
233 GLSGEN_GLSDYNAMICPATH_EXPORT
void FindFirstPathSegmentContainingValue(
float value,
int* index1,
int* index2);
236 float FirstStateValue()
238 if(_stateArray.
Count())
245 float LastStateValue()
247 if(_stateArray.
Count())
287 virtual GLS_EXPORT
void SetFromGloData(GlsGloFileAttribute &data);
290 bool _affectsLocationX;
291 bool _affectsLocationY;
292 bool _affectsLocationZ;
293 bool _affectsRotationX;
294 bool _affectsRotationY;
295 bool _affectsRotationZ;
300 bool _useShortRotationPaths;
302 StateArrayType _stateArray;
void MoveObjectToState(DisplayObject *obj, int stateNumber)
Definition: dynamic_array.h:63
The disti::Group class. Implements groups of objects.
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:281
Vector GetPathLocation(float value)
Definition: gls_dynamic_path.h:183
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:68
void Count(const unsigned int count)
Definition: dynamic_array.h:120
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Definition: gls_dynamic_path.h:87
virtual DistiAttributeBase & Resource(const char *name)
virtual void SetAvailableAttributes(unsigned int value)
Definition: disti_metadata.h:179
T * InternalArray(void)
Definition: dynamic_array.h:394
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
Definition: disti_metadata.h:676
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)