40 #ifndef _GLS_EYEPOINT_H
41 #define _GLS_EYEPOINT_H
58 GLS_EYEPOINT_FOV = GLS_LAST_INITIALIZER+1,
59 GLS_EYEPOINT_ORTHOGRAPHIC,
60 GLS_EYEPOINT_ORTHO_SIZE,
61 GLS_EYEPOINT_FOV_IS_HORIZONTAL,
63 GLS_EYEPOINT_NEAR_CLIP,
64 GLS_EYEPOINT_FAR_CLIP,
65 GLS_EYEPOINT_MAINTAIN_ASPECT,
66 GLS_EYEPOINT_VIEW_VECTORS
76 virtual void Call(
int viewWidth,
87 typedef void (T::*MethodType)(
98 _container(container),
102 void Call(
int viewWidth,
109 (_container->*(_method))(viewWidth, viewHeight, thisEye, rval1, rval2);
119 friend class GlsEyePointEditor;
123 FOV_CONSTRAINT_GREATER,
125 FOV_CONSTRAINT_EXACTLY } FovConstraintType;
129 static bool _drawDebugGeometry;
153 virtual GLS_EXPORT
void SetFromGloData(GlsGloFileAttribute &data);
183 virtual GLS_EXPORT
void Draw(
void);
192 bool fovIsHorizontal,
194 double otherOrthoSize,
197 FovConstraintType horizontalConstraint,
198 FovConstraintType verticalConstraint,
224 virtual GLS_EXPORT
void SetValue(
int spec,va_list &args);
230 GLS_EXPORT
void FOV(
double fovDeg);
236 GLS_EXPORT
void OtherFOV(
double fovDeg);
263 GLS_EXPORT
void NearClip(
double val);
268 GLS_EXPORT
void FarClip(
double val);
287 GLS_EXPORT
double FOV(
void);
323 GLS_EXPORT
double FarClip(
void);
390 virtual GLS_EXPORT
void GetModelViewMatrix(
GlsMatrixType& modelview,
bool includeEyeToWorld =
true);
396 virtual GLS_EXPORT
void GetProjectionMatrix(
GlsMatrixType& proj,
int viewW,
int viewH);
408 static void SetAlternateCalcPerspectiveView(
GlsEyePoint* eye, T* container,
typename EyePointCalcViewCallback<T>::MethodType method)
412 if (eye->_alternateCalcPerspectiveView)
413 delete eye->_alternateCalcPerspectiveView;
414 eye->_alternateCalcPerspectiveView =
new EyePointCalcViewCallback<T>(container, method);
424 bool _getModelViewMatrixIncludeEyeToWorld;
430 int _getProjectionMatrixWidth;
431 int _getProjectionMatrixHeight;
447 virtual GLS_EXPORT ~DistiAttributeFovConstraintTypeEnum();
double _otherFov
Definition: gls_eyepoint.h:135
bool _orthographic
Definition: gls_eyepoint.h:136
double _farClip
Definition: gls_eyepoint.h:143
Definition: gls_eyepoint.h:72
EyePointCalcViewCallbackBase * _alternateCalcOrthographicView
Definition: gls_eyepoint.h:146
Definition: dynamic_array.h:63
double _orthoSize
Definition: gls_eyepoint.h:137
bool _fovIsHorizontal
Definition: gls_eyepoint.h:139
virtual void CalcOrthographicView(int viewWidth, int viewHeight, GlsEyePoint *thisEye, double &fovY, double &aspect)
double _otherOrthoSize
Definition: gls_eyepoint.h:138
virtual void SetValue(int spec, va_list &args)
void GetViewVectors(Vector &x, Vector &y, Vector &z)
void Orientation(const Vector &direction, float roll, const Vector &upVector=Vector(0, 1, 0))
The Color class: Implements a 4 component RGBA color.
Definition: gls_eyepoint.h:443
A file for all GL Studio files to include.
The disti::DisplayObject class and global enumerations.
FovConstraintType HorizontalConstraint(void)
Vector _viewVectors[3]
Definition: gls_eyepoint.h:144
VertexNoColor Vector
Definition: gls_font_base.h:68
Definition: disti_metadata.h:902
virtual void CopyProperties(DisplayObject *src)
FovConstraintType VerticalConstraint(void)
virtual void CalcPerspectiveView(int viewWidth, int viewHeight, GlsEyePoint *thisEye, double &fovY, double &aspect)
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList)
void SetViewVectors(const Vector &x, const Vector &y, const Vector &z)
GLS_EyePoint_Initializers
Definition: gls_eyepoint.h:56
FovConstraintType _horizontalConstraint
Definition: gls_eyepoint.h:140
Definition: gls_eyepoint.h:115
double OtherOrthoSize(void)
virtual void Rotate(float angle, int axis=Z_AXIS)
float Roll(const Vector upVector=Vector(0, 1, 0))
bool FovIsHorizontal(void)
double _nearClip
Definition: gls_eyepoint.h:142
double _fov
Definition: gls_eyepoint.h:134
virtual void DrawFrustum(bool selected, bool orthographic, bool fovIsHorizontal, double orthoSize, double otherOrthoSize, double fov, double otherFov, FovConstraintType horizontalConstraint, FovConstraintType verticalConstraint, double farClip, double nearClip)
EyePointCalcViewCallbackBase * _alternateCalcPerspectiveView
Definition: gls_eyepoint.h:147
virtual void GetModelViewMatrix(GlsMatrixType &modelview, bool includeEyeToWorld=true)
Definition: gls_eyepoint.h:84
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
virtual void CopyGeometry(DisplayObject *src)
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual ~GlsEyePoint(void)
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual void ApplyViewMatrices(void)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *list)
Definition: disti_metadata.h:83
virtual void SetAvailableAttributes(unsigned int value)
Definition: bmpimage.h:46
static void DrawDebugGeometry(bool draw)
Definition: gls_eyepoint.h:161
FovConstraintType _verticalConstraint
Definition: gls_eyepoint.h:141
virtual void GetProjectionMatrix(GlsMatrixType &proj, int viewW, int viewH)