40 #ifndef _GLS_EYEPOINT_H
41 #define _GLS_EYEPOINT_H
57 GLS_EYEPOINT_FOV = GLS_LAST_INITIALIZER + 1,
58 GLS_EYEPOINT_ORTHOGRAPHIC,
59 GLS_EYEPOINT_ORTHO_SIZE,
60 GLS_EYEPOINT_FOV_IS_HORIZONTAL,
62 GLS_EYEPOINT_NEAR_CLIP,
63 GLS_EYEPOINT_FAR_CLIP,
64 GLS_EYEPOINT_MAINTAIN_ASPECT,
65 GLS_EYEPOINT_VIEW_VECTORS
75 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 );
118 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
121 friend class GlsEyePointEditor;
126 FOV_CONSTRAINT_GREATER,
128 FOV_CONSTRAINT_EXACTLY
132 static bool _drawDebugGeometry;
174 GLS_EXPORT GlsEyePoint( const GlsEyePoint& that, const
bool generateNames );
177 virtual GLS_EXPORT ~GlsEyePoint(
void );
183 virtual GLS_EXPORT
void Draw(
void ) DISTI_METHOD_OVERRIDE;
192 bool fovIsHorizontal,
194 double otherOrthoSize,
197 FovConstraintType horizontalConstraint,
198 FovConstraintType verticalConstraint,
221 virtual GLS_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis ) DISTI_METHOD_OVERRIDE;
224 virtual GLS_EXPORT
void SetValue(
int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
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 );
360 GlsEyePoint* thisEye,
369 GlsEyePoint* thisEye,
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 );
422 bool _getModelViewMatrixIncludeEyeToWorld;
428 int _getProjectionMatrixWidth;
429 int _getProjectionMatrixHeight;
432 GlsEyePoint& operator=(
const GlsEyePoint& that ) DISTI_SPECIAL_MEM_FUN_DELETE;
433 GlsEyePoint(
const GlsEyePoint& ) DISTI_SPECIAL_MEM_FUN_DELETE;
444 virtual GLS_EXPORT ~DistiAttributeFovConstraintTypeEnum();
virtual DisplayObject * CloneObject(bool generateNames=false) override
double _otherFov
Definition: gls_eyepoint.h:136
bool _orthographic
Definition: gls_eyepoint.h:137
double _farClip
Definition: gls_eyepoint.h:144
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
Definition: gls_eyepoint.h:71
EyePointCalcViewCallbackBase * _alternateCalcOrthographicView
Definition: gls_eyepoint.h:147
Definition: dynamic_array.h:66
double _orthoSize
Definition: gls_eyepoint.h:138
bool _fovIsHorizontal
Definition: gls_eyepoint.h:140
virtual void CalcOrthographicView(int viewWidth, int viewHeight, GlsEyePoint *thisEye, double &fovY, double &aspect)
double _otherOrthoSize
Definition: gls_eyepoint.h:139
virtual void CopyGeometry(DisplayObject *src) override
void GetViewVectors(Vector &x, Vector &y, Vector &z)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *list) override
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:440
virtual void CopyProperties(DisplayObject *src) override
A file for all GL Studio files to include.
Definition: gls_glo_file.h:988
The disti::DisplayObject class and global enumerations.
FovConstraintType HorizontalConstraint(void)
Vector _viewVectors[3]
Definition: gls_eyepoint.h:145
VertexNoColor Vector
Definition: gls_font_base.h:66
Definition: disti_metadata.h:894
FovConstraintType VerticalConstraint(void)
virtual void CalcPerspectiveView(int viewWidth, int viewHeight, GlsEyePoint *thisEye, double &fovY, double &aspect)
virtual void SetAvailableAttributes(unsigned int value) override
void SetViewVectors(const Vector &x, const Vector &y, const Vector &z)
GLS_EyePoint_Initializers
Definition: gls_eyepoint.h:55
FovConstraintType _horizontalConstraint
Definition: gls_eyepoint.h:141
Definition: gls_eyepoint.h:115
double OtherOrthoSize(void)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) override
virtual void Rotate(float angle, int axis=Z_AXIS)
float Roll(const Vector upVector=Vector(0, 1, 0))
virtual void Draw(void) override
bool FovIsHorizontal(void)
double _nearClip
Definition: gls_eyepoint.h:143
double _fov
Definition: gls_eyepoint.h:135
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:148
virtual void GetModelViewMatrix(GlsMatrixType &modelview, bool includeEyeToWorld=true)
virtual void SetValue(int spec, va_list &args) override
Definition: gls_eyepoint.h:84
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual void ApplyViewMatrices(void)
Definition: disti_metadata.h:85
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList) override
Definition: bmpimage.h:46
static void DrawDebugGeometry(bool draw)
Definition: gls_eyepoint.h:161
FovConstraintType _verticalConstraint
Definition: gls_eyepoint.h:142
virtual void GetProjectionMatrix(GlsMatrixType &proj, int viewW, int viewH)